Explorar o código

【组织架构】新建/编辑/列表/详情,增加“是否大区经理”字段

wu hai 7 meses
pai
achega
5bf3293282

+ 2 - 1
src/custom/restcontroller/webmanage/hr/SQL/员工修改.sql

@@ -18,6 +18,7 @@ set changeuserid=$changeuserid$,
     isleader=$isleader$,
     isworker=$isworker$,
     status=$status$,
-    isuppictured=$isuppictured$
+    isuppictured=$isuppictured$,
+    ismanage=$ismanage$
 where siteid = $siteid$
   and hrid = $hrid$

+ 2 - 1
src/custom/restcontroller/webmanage/hr/SQL/员工列表查询.sql

@@ -19,7 +19,8 @@ select t1.hrid,
        t3.userid,
        t3.phonenumber as userphonenumber,
        t3.name        as username,
-       t3.accountno
+       t3.accountno,
+       t1.ismanage
 from sys_hr t1
          inner join sys_department t2 on t1.siteid = t2.siteid and t1.departmentid = t2.departmentid
          left join sys_users t3 on t1.userid = t3.userid

+ 3 - 2
src/custom/restcontroller/webmanage/hr/SQL/员工新增.sql

@@ -1,6 +1,6 @@
 insert into sys_hr(siteid, hrid, createby, createdate, changeuserid, changeby, changedate, sex, remarks, phonenumber,
                    name, idcard, email, birthday, hrcode, officetelephone, departmentid, position, reporthrid, userid,
-                   isleader, isworker, status, isuppictured)
+                   isleader, isworker, status, isuppictured,ismanage)
 select $siteid$,
        $hrid$,
        $createby$,
@@ -24,4 +24,5 @@ select $siteid$,
        $isleader$,
        $isworker$,
        $status$,
-       $isuppictured$
+       $isuppictured$,
+       $ismanage$

+ 2 - 1
src/custom/restcontroller/webmanage/hr/SQL/员工详情查询.sql

@@ -24,7 +24,8 @@ select t1.hrid,
        t3.userid,
        t3.phonenumber as userphonenumber,
        t3.name        as username,
-       t3.accountno
+       t3.accountno,
+       t1.ismanage
 from sys_hr t1
          inner join sys_department t2 on t1.siteid = t2.siteid and t1.departmentid = t2.departmentid
          left join sys_users t3 on t1.userid = t3.userid

+ 3 - 11
src/custom/restcontroller/webmanage/hr/hr.java

@@ -157,16 +157,8 @@ public class hr extends Controller {
         long hruserid = content.getLongValue("userid");//绑定账号
         long isworker = content.getLongValue("isworker");//是否工人(服务人员)
         long isuppictured = content.getLongValue("isuppictured");//是否上图员
-//        JSONArray tradefield;
-//        if (content.containsKey("tradefield")) {
-//            tradefield = content.getJSONArray("tradefield");
-//        } else {
-//            tradefield = new JSONArray();
-//        }
+        long ismanage = content.getLongValue("ismanage");//是否大区经理
 
-//        if (!idcard.equals("") && !idCard_validate(idcard)) {
-//            return getErrReturnObject().setErrMsg("身份证号" + idcard + "无效").toString();
-//        }
 
         boolean isrefresh;
         ArrayList<String> sqllist = new ArrayList<>();
@@ -200,7 +192,7 @@ public class hr extends Controller {
             addusersql.addParameter("isworker", isworker);
             addusersql.addParameter("isuppictured", isuppictured);
             addusersql.addParameter("status", content.getStringValue("status", false, "0"));
-//            addusersql.addParameter("tradefield", tradefield);
+            addusersql.addParameter("ismanage", ismanage);
 
             sqllist.add(DataContrlLog.createLog(this, "sys_hr", hrid, "新建", "新建人员" + name).getSQL());
             content.put("hrid", hrid);
@@ -252,7 +244,7 @@ public class hr extends Controller {
             modifyusersql.addParameter("isworker", isworker);
             modifyusersql.addParameter("isuppictured", isuppictured);
             modifyusersql.addParameter("status", content.getStringValue("status", false, "0"));
-//            modifyusersql.addParameter("tradefield", tradefield);
+            modifyusersql.addParameter("ismanage", ismanage);
 
             if (hruserid != (hrRows.isNotEmpty() ? hrRows.get(0).getLong("userid") : 0)) {
                 Rows userRows = dbConnect.runSqlQuery("select accountno from sys_users where userid=" + hruserid);