From eae9b520d259aa5a1aeaa2e6b5d2251cae9b6d92 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Thu, 23 May 2024 10:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96BUG=20=20=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/UsersController.java | 19 +++++++++++-- .../datasource/system/UserCorpMapper.java | 2 ++ .../system/UserCorpReviewMapper.java | 1 - .../service/system/UserCorpReviewService.java | 1 - .../service/system/UserCorpService.java | 2 ++ .../impl/DictionariesCorpServiceImpl.java | 2 +- .../impl/UserCorpReviewServiceImpl.java | 4 --- .../system/impl/UserCorpServiceImpl.java | 28 +++++++++++++++++++ .../service/system/impl/UsersServiceImpl.java | 17 ++++++++--- .../datasource/system/UserCorpMapper.xml | 13 +++++++++ .../system/UserCorpReviewMapper.xml | 11 -------- .../datasource/system/UserInfoMapper.xml | 2 +- 12 files changed, 76 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index bfdf01a..7dea56c 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -745,7 +745,7 @@ public class UsersController extends BaseController { pd = this.getPageData(); // pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd = userInfoService.getUserCardId(pd); - if (pd != null && !StringUtils.isEmpty(pd.getString("ENTRY_DATE"))) { + if (pd != null && !StringUtils.isEmpty(pd.getString("ENTRY_DATE")) && !"".equals(pd.getString("ENTRY_DATE"))) { map.put("pd", pd); } map.put("result", errInfo); //返回结果 @@ -2555,11 +2555,15 @@ public class UsersController extends BaseController { PageData data = new PageData(); data.put("USER_ID", pd.getString("USER_ID")); data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - PageData userReviewInfo = userCorpReviewService.findByUserId(data); + List dataInfoList = userCorpService.findByUserId(data); + dataInfoList = dataInfoList.stream() + .filter(userCorpData -> StringUtils.equals(userCorpData.getString("ISDELETE"), "0")) + .collect(Collectors.toList()); + System.out.println("dataInfoList = " + dataInfoList); map.put("pd", pd); + map.put("statusInfo", dataInfoList.get(0)); map.put("userCerList", userCerList); map.put("certificateList", certificateList); - map.put("statusInfo", userReviewInfo); map.put("result", errInfo); return map; } @@ -3017,6 +3021,15 @@ public class UsersController extends BaseController { if(!CollectionUtil.isEmpty(userCorpList)) { if(StringUtils.equals(userCorpList.get(0).getString("APPLY_STATUS"), "-1")) { userCorpList.get(0).put("APPLY_STATUS", "0"); + userCorpList.get(0).put("TITLE", pd.getString("TITLE")); + userCorpList.get(0).put("DUTIES", pd.getString("DUTIES")); + userCorpList.get(0).put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); + userCorpList.get(0).put("POST_ID", pd.getString("POST_ID")); + userCorpList.get(0).put("ENTRY_DATE", pd.getString("ENTRY_DATE")); + userCorpList.get(0).put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); + userCorpList.get(0).put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); + + } } userCorpService.edit(userCorpList.get(0)); diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java index b559e1a..539e453 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpMapper.java @@ -76,5 +76,7 @@ public interface UserCorpMapper { * @throws Exception */ void setPractitionerCorpInvalid(PageData pd); + + List findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java index 7f95d8a..2171737 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UserCorpReviewMapper.java @@ -55,6 +55,5 @@ public interface UserCorpReviewMapper { */ void deleteAll(String[] ArrayDATA_IDS); - PageData findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/service/system/UserCorpReviewService.java b/src/main/java/com/zcloud/service/system/UserCorpReviewService.java index ee9ea2e..885918b 100644 --- a/src/main/java/com/zcloud/service/system/UserCorpReviewService.java +++ b/src/main/java/com/zcloud/service/system/UserCorpReviewService.java @@ -55,6 +55,5 @@ public interface UserCorpReviewService { */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception; - PageData findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/service/system/UserCorpService.java b/src/main/java/com/zcloud/service/system/UserCorpService.java index 7db07e8..3ade484 100644 --- a/src/main/java/com/zcloud/service/system/UserCorpService.java +++ b/src/main/java/com/zcloud/service/system/UserCorpService.java @@ -84,5 +84,7 @@ public interface UserCorpService { void setPractitionerCorpInvalid(PageData pd) throws Exception; Object setPractitionerConfirmByUser(PageData pd) throws Exception; + + List findByUserId(PageData data); } diff --git a/src/main/java/com/zcloud/service/system/impl/DictionariesCorpServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/DictionariesCorpServiceImpl.java index af2db9f..3d50caa 100644 --- a/src/main/java/com/zcloud/service/system/impl/DictionariesCorpServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/DictionariesCorpServiceImpl.java @@ -258,7 +258,7 @@ public class DictionariesCorpServiceImpl implements DictionariesCorpService { lc.put("PARENT_ID", pd.getString("PARENT_ID")); lc.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID lc.put("YNDEL", "no"); - this.save(lc); + this. save(lc); } return lc; } diff --git a/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java index 6d3d290..fc67f3c 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserCorpReviewServiceImpl.java @@ -81,9 +81,5 @@ public class UserCorpReviewServiceImpl implements UserCorpReviewService { userCorpReviewMapper.deleteAll(ArrayDATA_IDS); } - @Override - public PageData findByUserId(PageData data) { - return userCorpReviewMapper.findByUserId(data); - } } diff --git a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java index 0706b66..413bf10 100644 --- a/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UserCorpServiceImpl.java @@ -182,6 +182,30 @@ public class UserCorpServiceImpl implements UserCorpService { userInfo.put("INCUMBENCY", "bd4d802e94354230b1bb19cfabd7f810"); // 在职 userInfoService.setPractitionerReview(userInfo); } else { + //补充人员关联信息(企业、部门、岗位、排班) + PageData user = new PageData(); + Warden.initData(user, "app", pd); + user.put("USER_ID", pd.getString("USER_ID")); + user.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + user.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); + user.put("POST_ID", pd.getString("POST_ID")); + user.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); + user.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); + user.put("DURATION", pd.getString("DURATION")); + user.put("WORKSTATUS", pd.getString("WORKSTATUS")); + user.put("WORKPERIOD", pd.getString("WORKPERIOD")); + usersService.setPractitionerConfirm(user); + + //补充人员附加信息(工种、入职时间、职务、职称、在职状态) + PageData userInfo = new PageData(); + Warden.initData(userInfo, "app", pd); + userInfo.put("USER_ID", pd.getString("USER_ID")); + userInfo.put("TYPE_OF_WORK", pd.getString("POST_ID")); + userInfo.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); + userInfo.put("DUTIES", pd.getString("DUTIES")); + userInfo.put("TITLE", pd.getString("TITLE")); + userInfo.put("INCUMBENCY", "bd4d802e94354230b1bb19cfabd7f810"); // 在职 + userInfoService.setPractitionerReview(userInfo); pd.put("ISDELETE", "2"); } userCorpMapper.edit(pd); @@ -234,5 +258,9 @@ public class UserCorpServiceImpl implements UserCorpService { setPractitionerReviewResignation(uc); } + @Override + public List findByUserId(PageData data) { + return userCorpMapper.findByUserId(data); + } } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 42f6593..d8b3f02 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -9,6 +9,7 @@ import com.zcloud.mapper.datasource.system.UsersMapper; import com.zcloud.service.corp.CorpInfoService; import com.zcloud.service.system.*; import com.zcloud.util.*; +import org.apache.commons.lang.StringUtils; import org.apache.shiro.crypto.hash.SimpleHash; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -1137,9 +1138,9 @@ public class UsersServiceImpl implements UsersService { throw new Exception("人脸图像不符合要求,请重新上传"); } } - if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) { + /*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) { return ReturnMap.error("身份证号校验不通过,请核对信息"); - } + }*/ PageData corp = new PageData(); corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); corp = corpInfoService.findById(corp); @@ -1201,7 +1202,11 @@ public class UsersServiceImpl implements UsersService { dicPd.put("BIANMA", "zhiwu"); dicPd.put("NAME", pd.getString("DUTIESValue")); dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); - pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID")); + if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID")); + }else{ + pd.put("DUTIES", pd.getString("DUTIES")); + } } applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务 if ("select".equals(pd.getString("letTitleType"))) { @@ -1212,7 +1217,11 @@ public class UsersServiceImpl implements UsersService { dicPd.put("BIANMA", "zhicheng"); dicPd.put("NAME", pd.getString("letTitleValue")); dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd); - pd.put("TITLE", dicPd.getString("DICTIONARIES_ID")); + if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) { + pd.put("TITLE", dicPd.getString("DICTIONARIES_ID")); + }else{ + pd.put("TITLE", pd.getString("TITLE")); + } } applyCorp.put("TITLE", pd.getString("TITLE")); // 职称 userCorpService.save(applyCorp); diff --git a/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml b/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml index b3af41c..4903b6c 100644 --- a/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UserCorpMapper.xml @@ -268,4 +268,17 @@ where USER_ID = #{USER_ID} and ISDELETE = '0' + + diff --git a/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml b/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml index 59fa3e9..a3b046a 100644 --- a/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UserCorpReviewMapper.xml @@ -146,15 +146,4 @@ #{item} - - diff --git a/src/main/resources/mybatis/datasource/system/UserInfoMapper.xml b/src/main/resources/mybatis/datasource/system/UserInfoMapper.xml index 3ec4920..3c3629b 100644 --- a/src/main/resources/mybatis/datasource/system/UserInfoMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UserInfoMapper.xml @@ -281,7 +281,7 @@ from f left join sys_user u on u.USER_ID = f.USER_ID - where f.USER_ID_CARD = #{USER_ID_CARD} + where f.USER_ID_CARD = #{USER_ID_CARD} AND f.ENTRY_DATE != '' and u.CORPINFO_ID != #{CORPINFO_ID}