diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index 23725dc7..35c67c83 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -68,11 +68,21 @@ public class XgfUserServiceImpl implements XgfUserService { x.put("OPERATOR_TIME", DateUtil.getTime()); x.put("IS_DELETE", "0"); x.put("CREATE_TIME", DateUtil.getTime()); + /* 监管部门 */ condition.clear(); - condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID")); + condition.put("DEPARTMENT_ID", x.get("MANAGER_DEPARTMENT_ID")); PageData regDepartmentEntity = departmentService.getCorpDepartment(condition); if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) { - x.put("MANAGER_DEPARTMENT_NAME",regDepartmentEntity.get("NAME")); + x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); + } + + /* 主管部门 */ + condition.clear(); + condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID")); + regDepartmentEntity = departmentService.getCorpDepartment(condition); + x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); + if (regDepartmentEntity.size() > 0) { + x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); } xgfUserMapper.save(x); xgfUserDetailsMapper.save(x); @@ -82,13 +92,23 @@ public class XgfUserServiceImpl implements XgfUserService { x.put("IS_DELETE", "0"); x.put("CREATE_TIME", DateUtil.getTime()); x.put("OPERATOR_TIME", DateUtil.getTime()); + /* 监管部门 */ condition.clear(); - condition.put("DEPARTMENT_ID",x.get("MANAGER_DEPARTMENT_ID")); + condition.put("DEPARTMENT_ID", x.get("MANAGER_DEPARTMENT_ID")); PageData regDepartmentEntity = departmentService.getCorpDepartment(condition); if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) { - x.put("MANAGER_DEPARTMENT_NAME",regDepartmentEntity.get("NAME")); + x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); } - x.put("ISDELETE", "0"); + /* 主管部门 */ + condition.clear(); + condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID")); + regDepartmentEntity = departmentService.getCorpDepartment(condition); + x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); + if (regDepartmentEntity.size() > 0) { + x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME")); + } + + x.put("IS_DELETE", "0"); x.put("VALID_FLAG", "1"); x.put("STATUS", "2"); xgfUserMapper.edit(x); diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserDetailsMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserDetailsMapper.xml index 2a3ed948..6ff412f3 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserDetailsMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserDetailsMapper.xml @@ -52,6 +52,11 @@ f.IS_SPECIAL_JOB, f.CORPINFO_ID, f.MANAGER_DEPARTMENT_ID, + f.MANAGER_DEPARTMENT_NAME, + f.COMPETENT_DEPARTMENT_ID, + f.COMPETENT_DEPARTMENT_NAME, + f.MAIN_DEPARTMENT_ID, + f.MAIN_DEPARTMENT_NAME, f.CARD_ID, f.DEPARTMENT_ID, f.DEPARTMENT_NAME, @@ -107,6 +112,10 @@ CORPINFO_ID, MANAGER_DEPARTMENT_ID, MANAGER_DEPARTMENT_NAME, + COMPETENT_DEPARTMENT_ID, + COMPETENT_DEPARTMENT_NAME, + MAIN_DEPARTMENT_ID, + MAIN_DEPARTMENT_NAME, CARD_ID, DEPARTMENT_ID, DEPARTMENT_NAME, @@ -162,6 +171,10 @@ #{CORPINFO_ID}, #{MANAGER_DEPARTMENT_ID}, #{MANAGER_DEPARTMENT_NAME}, + #{COMPETENT_DEPARTMENT_ID}, + #{COMPETENT_DEPARTMENT_NAME}, + #{MAIN_DEPARTMENT_ID}, + #{MAIN_DEPARTMENT_NAME}, #{CARD_ID}, #{DEPARTMENT_ID}, #{DEPARTMENT_NAME}, @@ -241,6 +254,10 @@ CORPINFO_ID = #{CORPINFO_ID}, MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID}, MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME}, + COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID}, + COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME}, + MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID}, + MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME}, CARD_ID = #{CARD_ID}, DEPARTMENT_ID = #{DEPARTMENT_ID}, DEPARTMENT_NAME = #{DEPARTMENT_NAME}, diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index c5aaab28..99460b69 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -198,7 +198,16 @@