From 5d46fa3c4d5f9653b34b5f85f7884cc782a230d1 Mon Sep 17 00:00:00 2001 From: liujun Date: Fri, 22 Dec 2023 15:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8Bbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/xgf/impl/XgfUserServiceImpl.java | 30 +++++++++++++++---- .../datasource/xgf/XgfUserDetailsMapper.xml | 17 +++++++++++ .../mybatis/datasource/xgf/XgfUserMapper.xml | 11 ++++++- 3 files changed, 52 insertions(+), 6 deletions(-) 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 @@