diff --git a/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportParamVO.java b/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportParamVO.java index 7a43f6aa96124a95ef04a70e2960cff1b0e49645..3f77fd4f6ac14a1de30bf1213b890e9553ad19ab 100644 --- a/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportParamVO.java +++ b/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportParamVO.java @@ -450,6 +450,14 @@ public class EmployeeProjectExportParamVO extends BaseEntity { @ExcelProperty(value ="项目档案状æ€") private String status; + /** + * é¡¹ç›®æ¡£æ¡ˆçŠ¶æ€ + */ + @HeadFontStyle(fontHeightInPoints = 11) + @ExcelProperty(value ="项目档案状æ€") + @ExcelAttribute(name = "项目档案状æ€") + private String projectStatusReplace; + /** * 社ä¿-çœ */ diff --git a/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java b/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java index 5567fa3cfa3f5079488f0708f4b60fd40b81150d..d9449694652c469d671172b36063707eece6aa65 100644 --- a/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java +++ b/yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java @@ -442,12 +442,12 @@ public class EmployeeProjectExportVO { private String projectSource; /** - * 项目档案状æ€ï¼ˆ0è‰ç¨¿ã€1å·²å®¡æ ¸ï¼‰ + * 项目档案状æ€ï¼ˆ0=æ£å¸¸,1=å·²å‡é¡¹ï¼‰ */ - @ExcelAttribute(name ="项目档案状æ€", readConverterExp = "0=è‰ç¨¿,1=å·²å®¡æ ¸") @HeadFontStyle(fontHeightInPoints = 11) @ExcelProperty(value ="项目档案状æ€") - private String status; + @ExcelAttribute(name = "项目档案状æ€") + private String projectStatus; /** * 项目档案创建人 diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java index 760440f64b70f16a09d165b5a8119f6af4c1b18a..696b9e06b18aad9068ea6637e743c85e1d49c272 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java @@ -30,7 +30,7 @@ public class EmployeeConstants { public static final String FILE_ROVINCE_MUST = "更新档案市,档案çœå¿…å¡«"; public static final String FILE_CITY_MUST = "更新档案县,档案市必填"; public static final String DEPT_NO_ERROR = "项目编ç 错误"; - public static final String DEPT_NO_EXIST = "未找到对应的项目或者项目已åœæ¢åˆä½œï¼Œè¯·æ ¸å®ž"; + public static final String DEPT_NO_EXIST = "æœªæ‰¾åˆ°å¯¹åº”çš„é¡¹ç›®ï¼Œè¯·æ ¸å®ž"; public static final String CHECK_ERROR = "æ ¡éªŒæœåŠ¡é”™è¯¯ï¼Œè¯·è”系管ç†å‘˜ï¼"; public static final String CHECK_NO_RESPONSE = "æ ¡éªŒæœåŠ¡å™¨æœªè¿”回,请è”系管ç†å‘˜ï¼"; diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java index 00ab9e568c1e78b2f6bddaf4097a036dd44223f7..3df217d215b004006a0b363ea388fcf494700af5 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java @@ -373,10 +373,13 @@ public class TEmployeeContractInfoController { @SysLog("批é‡å¯¼å‡ºåˆåŒå®¡æ ¸") @PostMapping("/exportAuditContractInfo") @PreAuthorize("@pms.hasPermission('employee_export_contract_audit')") - public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo, HttpServletResponse response) { + public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo, + @RequestParam(required = false,name = "mId") String mId, + HttpServletResponse response) { if (Common.isEmpty(contractInfo)){ contractInfo = new TEmployeeContractSearchVo(); } + contractInfo.setMId(mId); contractInfo.setAuditStatus(CommonConstants.ONE_INT); this.setAuth(contractInfo); tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response); diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java index 3a5c088cfa47985f4c55ebbce0958b2e3134543b..e3a8f861e3a73ebe3326c25269ed1d6340fc1166 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java @@ -201,7 +201,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, .eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)); if (Common.isNotNull(tEmployeeProject)) { - errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHECKS_CHANGE_EMP_PROJECT, excel.getNewSettleCode())); + errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode())); } // æ•°æ®åˆæ³•æƒ…况 if (CollUtil.isEmpty(errorMsg)) { diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java index 4dcf507cf2dcbe0e7d15a6e6f5f9468e5ee7b87d..ba5349e3e36a0b2f0b983ce76beb142dd616a609 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java @@ -152,12 +152,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr if (null == tEmployeeInfo || tEmployeeProject == null) { return R.failed(EMPINFO_IS_NOT_EXITS_BYID); } - TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() - .eq(TSettleDomain::getDepartNo, tEmployeeContractInfo.getDeptNo()) - .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) - .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); - if (Common.isEmpty(settleDomain)) { - return R.failed(EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP); + + if (!(ArchivesConstants.contractSituation[0].equals(tEmployeeContractInfo.getSituation()) || + ArchivesConstants.contractSituation[6].equals(tEmployeeContractInfo.getSituation()))) { + TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() + .eq(TSettleDomain::getDepartNo, tEmployeeContractInfo.getDeptNo()) + .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) + .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); + if (Common.isEmpty(settleDomain)) { + return R.failed(EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP); + } } YifuUser user = SecurityUtils.getUser(); if (user == null || Common.isEmpty(user.getId())) { @@ -1023,6 +1027,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr insert.setContractEnd(contractInfo.getContractEnd()); } } else { + TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() + .eq(TSettleDomain::getDepartNo, insert.getDeptNo()) + .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) + .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); + if (Common.isEmpty(settleDomain)) { + errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP)); + return; + } // 2022-9-28 16:59:57 å¾æ¢…说产å“在验收时,业务说已完æˆä¸€å®šä»»åŠ¡çš„也ä¸å¿…å¡« if (EmployeeConstants.CONTRACT_TYPE_ONE.equals(insert.getContractType()) && Common.isEmpty(insert.getContractEnd())) { diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java index a9360fe49dead05fd7ca835a196595795303864e..0ac5fa7585fad41a97a5c5b94beb1adc89112ce4 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java @@ -957,6 +957,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T String idCard; // ä¸ªæ€§åŒ–æ ¡éªŒé€»è¾‘ List<String> deptNoList = new ArrayList<>(); + TSettleDomain settleDomain; for (int i = 0; i < excelVOList.size(); i++) { errorMsg = new HashSet<>(); // 判空 @@ -992,7 +993,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T if (!deptNoList.isEmpty()) { List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda() .eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL) - .eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL) .in(TSettleDomain::getDepartNo, deptNoList) ); if (deptList == null || deptList.isEmpty()) { @@ -1112,6 +1112,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T saveList.add(saveEmp); } } else { + settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() + .eq(TSettleDomain::getDepartNo, excel.getDeptNo()) + .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) + .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) + .last(CommonConstants.LAST_ONE_SQL)); + if (Common.isEmpty(settleDomain)) { + errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getEmpIdcard())); + } // 档案ä¸å˜åœ¨ // æ ¡éªŒèº«ä»½è¯å®žå TCheckIdCard checkIdCard = new TCheckIdCard(); diff --git a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java index 5ddd7e123a66cdfcf60788cb88721cec7a584181..3a723e2253c0d37e21d7529b3bd4cfd9cd77c99a 100644 --- a/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java +++ b/yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java @@ -128,14 +128,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap return new R<>(CommonConstants.dingleDigitIntArray[2], "该人员已å‡æ¡£å‡é¡¹ï¼Œæ˜¯å¦â€œå¤æ¡£å¤é¡¹â€", map); } } - //项目编ç æ ¡éªŒ - TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() - .eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()) - .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) - .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)); - if (Common.isEmpty(tSettleDomain)) { - return R.failed("未找到对应的项目或者项目已åœæ¢åˆä½œï¼Œè¯·æ ¸å®ž"); - } //状æ€ä¸ºè‰ç¨¿ã€å·²å®¡æ ¸ if (CommonConstants.dingleDigitIntArray[0] == employeeProject.getStatus() || CommonConstants.dingleDigitIntArray[1] == employeeProject.getStatus()) { @@ -154,6 +146,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap return new R<>(CommonConstants.dingleDigitIntArray[3], "该人员在离èŒåº“å·²å˜åœ¨ï¼Œæ˜¯å¦â€œæ¢å¤æ¡£æ¡ˆâ€", map); } } + //项目编ç æ ¡éªŒ + TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() + .eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()) + .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) + .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)); + if (Common.isEmpty(tSettleDomain)) { + return R.failed("未找到对应的项目或者项目已åœæ¢åˆä½œï¼Œè¯·æ ¸å®ž"); + } return R.ok(); } @@ -407,7 +407,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap if (contractCount > CommonConstants.ZERO_INT){ errorTemp.append("åˆåŒå¯ç”¨æˆ–在途ã€"); } - if (Common.isNotNull(errorTemp)){ + if (Common.isNotNull(errorTemp.toString())){ return R.failed(errorTemp.substring(0,errorTemp.length()-1) +",ç¦æ¢å‡é¡¹"); } tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]); @@ -600,7 +600,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap if (contractCount > CommonConstants.ZERO_INT){ errorTemp.append("åˆåŒå¯ç”¨æˆ–在途ã€"); } - if (Common.isNotNull(errorTemp)){ + if (Common.isNotNull(errorTemp.toString())){ errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage +errorTemp.substring(0,errorTemp.length()-1) +",ç¦æ¢å‡é¡¹")); break; } diff --git a/yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml b/yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml index bb07234a958d7ad842fb62b05f061656f844d4d4..33bdfe9e7881523226e1c47796f58d572fcc9eb0 100644 --- a/yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml +++ b/yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml @@ -60,6 +60,7 @@ <resultMap id="tEmployeeProjectExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO"> <result property="empCode" column="EMP_CODE"/> + <result property="projectStatus" column="PROJECT_STATUS"/> <result property="proEmpNatrue" column="PROEMP_NATRUE"/> <result property="empNatrue" column="EMP_NATRUE"/> <result property="empName" column="EMP_NAME"/> @@ -103,7 +104,6 @@ <result property="empNatrue" column="EMP_NATRUE"/> <result property="proCreateName" column="PROCREATE_NAME"/> <result property="proCreateTime" column="PROCREATE_TIME"/> - <result property="status" column="STATUS"/> <result property="fileProvince" column="FILE_PROVINCE"/> <result property="fileCity" column="FILE_CITY"/> <result property="fileTown" column="FILE_TOWN"/> @@ -224,7 +224,7 @@ b.ADMISSION_DATE, b.GRADUTION_DATE, b.REMARK, - if(a.STATUS=0,'è‰ç¨¿','å·²å®¡æ ¸') STATUS, + if(a.STATUS='0','è‰ç¨¿',IF(a.PROJECT_STATUS=1,'å·²å‡é¡¹','å·²å®¡æ ¸')) PROJECT_STATUS, a.CREATE_NAME, a.CREATE_TIME, b.EMP_EMAIL, @@ -377,10 +377,10 @@ <if test="tEmployeeProject.socialProvince != null"> AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince} </if> - <if test="tEmployeeProject.fileCity != null"> + <if test="tEmployeeProject.socialCity != null"> AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity} </if> - <if test="tEmployeeProject.fileTown != null"> + <if test="tEmployeeProject.socialTown != null"> AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown} </if> <if test="tEmployeeProject.empNatureArray != null and tEmployeeProject.empNatureArray.length > 0"> @@ -435,6 +435,9 @@ <if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''"> AND a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%') </if> + <if test="tEmployeeProject.projectStatusReplace != null and tEmployeeProject.projectStatusReplace.trim() != ''"> + AND a.PROJECT_STATUS = #{tEmployeeProject.projectStatusReplace} + </if> <if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''"> AND a.BANK_NAME = #{tEmployeeProject.bankName} </if> @@ -528,10 +531,10 @@ <if test="tEmployeeProject.socialProvince != null"> AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince} </if> - <if test="tEmployeeProject.fileCity != null"> + <if test="tEmployeeProject.socialCity != null"> AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity} </if> - <if test="tEmployeeProject.fileTown != null"> + <if test="tEmployeeProject.socialTown != null"> AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown} </if> <if test="tEmployeeProject.idList != null"> diff --git a/yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java b/yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java index d5cc2819dfa0b9888c1b6bf7b9eb427df59c2ae2..0dadca18df7c8a4cb0f7cb05f232f906a28bc43e 100644 --- a/yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java +++ b/yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java @@ -307,6 +307,10 @@ public interface ErrorCodes { * 人员在原项目ä¸å˜åœ¨åœ¨é€”çš„æœåŠ¡ï¼Œè¯·å…ˆç»ˆæ¢åŽï¼Œå†è¿›è¡Œåˆ’转 */ String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist"; + /** + * 未找到对应的新项目或者新项目已åœæ¢åˆä½œï¼Œè¯·æ ¸å®ž + */ + String PROJECT_NEW_SEARCH_NOT_EXIST = "project.new.search.not.exist"; /** * 未找到对应的项目或者项目已åœæ¢åˆä½œï¼Œè¯·æ ¸å®ž */ diff --git a/yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties b/yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties index a31f63671633a11bc456438b98fb4211112c6d5b..7dd6de92d2c94aa471a18d4f936f4e86d12d0e48 100644 --- a/yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties +++ b/yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties @@ -102,7 +102,8 @@ archives.project.change.contract.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0 archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A qt.project.change.not.exist=\u4EBA\u5458\u5728\u539F\u9879\u76EE\u4E2D\u5B58\u5728\u5728\u9014\u7684\u670D\u52A1\uFF0C\u8BF7\u5148\u7EC8\u6B62\u540E\uFF0C\u518D\u8FDB\u884C\u5212\u8F6C -project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u65B0\u9879\u76EE\u6216\u8005\u65B0\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E +project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\u6216\u8005\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E +project.new.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u65B0\u9879\u76EE\u6216\u8005\u65B0\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A change.less.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u8981\u5C0F\u4E8E\u7B49\u4E8E\u5F53\u524D\u6708 diff --git a/yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java b/yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java index e001a8d60e7ec420d0aa6a0774bd33af0659c03a..b550c993c64342d097e65c8cadee73b180c466c0 100644 --- a/yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java +++ b/yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java @@ -112,6 +112,10 @@ public class InsurancesConstants { * 对应项目编ç å·²åœæ¢åˆä½œ */ public static final String EMP_DISPATCH_SETTLEDOMAIN_STOP = "对应项目编ç å·²åœæ¢åˆä½œ"; + /** + * 对应替æ¢å‘˜å·¥é¡¹ç›®ç¼–ç å·²åœæ¢åˆä½œ + */ + public static final String EMP_DISPATCH_REPALCE_SETTLEDOMAIN_STOP = "对应替æ¢å‘˜å·¥é¡¹ç›®ç¼–ç å·²åœæ¢åˆä½œ"; /** * 替æ¢å‘˜å·¥é¡¹ç›®ä¸å˜åœ¨ */ diff --git a/yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java b/yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java index 395901f23e45d7d01452fc4c09efaf33cf54a525..72b0e8c057deff8135104f4890a34123c9b54fc8 100644 --- a/yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java +++ b/yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java @@ -2890,10 +2890,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap listResult.add(param); continue; }else { - //对应的项目编ç å·²åœæ¢åˆä½œ + //对应的替æ¢å‘˜å·¥é¡¹ç›®ç¼–ç å·²åœæ¢åˆä½œ if (CommonConstants.ONE_STRING.equals(projectSetInfoVo.getStopFlag()) || CommonConstants.TWO_STRING.equals(projectSetInfoVo.getStopFlag())){ - param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP); + param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_REPALCE_SETTLEDOMAIN_STOP); listResult.add(param); continue; } diff --git a/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java b/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java index 3b62b02e225635bfbc2bd99ad17ef36707a3488a..4bd0ddb1249132193755e3226cafaf16416eb36d 100644 --- a/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java +++ b/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java @@ -344,7 +344,11 @@ public class TDispatchInfoController { @Operation(description = "导出派å•å®¡æ ¸è®°å½• hasPermission('tdispatchinfo-export')") @PostMapping("/auditExport") @PreAuthorize("@pms.hasPermission('tdispatchinfo-export')") - public void auditExport(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) { + public void auditExport(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo, + @RequestParam(required = false,name = "mId") String mId) { + searchVo.setDeleteFlag(CommonConstants.ZERO_STRING); + searchVo.setStatus(CommonConstants.ONE_STRING); + searchVo.setMId(mId); YifuUser user = SecurityUtils.getUser(); menuUtil.setAuthSql(user, searchVo); if (Common.isNotNull(searchVo.getAuthSql())) { diff --git a/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java b/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java index e8a12f9925cae06598ca25aad728ba798cfb6f56..c1d43cacea0b37a50364597c2cb518192d8e3282 100644 --- a/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java +++ b/yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java @@ -923,9 +923,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa if (Common.isNotNull(list)) { TPaymentInfo paymentInfo; TSocialFundInfo socialInfo; - TSocialInfo tSocialInfo; + TSocialInfo tSocialInfo = new TSocialInfo(); String temp; int res; + List<TSocialInfo> socialist; + List<TSettleDomainSelectVo> settleDomainR; + R<TSettleDomainListVo> listVo; List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); @@ -981,9 +984,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa } if (null == socialInfo) { - errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + - infoVo.getEmpIdcard() + "的社ä¿æ•°æ®(请查验社ä¿ç¼´çº³åœ°)")); - continue; + boolean isTrueAdder = false; + socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda() + .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()) + .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince()) + .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity())); + if (!socialist.isEmpty()) { + for (TSocialInfo socialInfo1:socialist) { + if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && + infoVo.getSocialTown().equals(socialInfo1.getSocialTown()))) && + DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 && + (Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) && + DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) { + isTrueAdder = true; + tSocialInfo = socialInfo1; + break; + } + } + } + if (!isTrueAdder) { + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + + infoVo.getEmpIdcard() + "的社ä¿æ•°æ®(请查验社ä¿ç¼´çº³åœ°)")); + continue; + } } //导入模æ¿åˆ¤é‡ å…»è€ @@ -1232,28 +1255,53 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa continue; } } - tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() - .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) - .last(CommonConstants.LAST_ONE_SQL)); + if (Common.isEmpty(tSocialInfo)) { + tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() + .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) + .last(CommonConstants.LAST_ONE_SQL)); + } paymentInfo = new TPaymentInfo(); paymentInfo.setLockStatus(CommonConstants.ZERO_STRING); - paymentInfo.setEmpId(socialInfo.getEmpId()); - paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard()); - paymentInfo.setEmpName(socialInfo.getEmpName()); - paymentInfo.setSettleDomainId(socialInfo.getSettleDomain()); - paymentInfo.setSettleDomainName(socialInfo.getSettleDomainName()); - paymentInfo.setSettleDomainCode(socialInfo.getSettleDomainCode()); - paymentInfo.setUnitId(socialInfo.getUnitId()); - paymentInfo.setUnitName(socialInfo.getUnitName()); + if (Common.isNotNull(socialInfo)) { + paymentInfo.setEmpId(socialInfo.getEmpId()); + paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard()); + paymentInfo.setEmpName(socialInfo.getEmpName()); + paymentInfo.setSettleDomainId(socialInfo.getSettleDomain()); + paymentInfo.setSettleDomainName(socialInfo.getSettleDomainName()); + paymentInfo.setSettleDomainCode(socialInfo.getSettleDomainCode()); + paymentInfo.setUnitId(socialInfo.getUnitId()); + paymentInfo.setUnitName(socialInfo.getUnitName()); + paymentInfo.setSocialProvince(socialInfo.getSocialProvince()); + paymentInfo.setSocialCity(socialInfo.getSocialCity()); + paymentInfo.setSocialTown(socialInfo.getSocialTown()); + paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName()); + } else if(Common.isNotNull(tSocialInfo)){ + paymentInfo.setEmpId(tSocialInfo.getEmpId()); + paymentInfo.setEmpIdcard(tSocialInfo.getEmpIdcard()); + paymentInfo.setEmpName(tSocialInfo.getEmpName()); + paymentInfo.setSettleDomainId(tSocialInfo.getSettleDomain()); + listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tSocialInfo.getSettleDomain()); + if (Common.isNotNull(listVo)) { + TSettleDomainListVo tSettleDomainListVo = listVo.getData(); + if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { + settleDomainR = tSettleDomainListVo.getListSelectVO(); + for (TSettleDomainSelectVo vo :settleDomainR) { + paymentInfo.setSettleDomainName(vo.getDepartName()); + paymentInfo.setSettleDomainCode(vo.getDepartNo()); + paymentInfo.setUnitId(vo.getCustomerId()); + paymentInfo.setUnitName(vo.getCustomerName()); } + } + } + paymentInfo.setSocialProvince(tSocialInfo.getSocialProvince()); + paymentInfo.setSocialCity(tSocialInfo.getSocialCity()); + paymentInfo.setSocialTown(tSocialInfo.getSocialTown()); + paymentInfo.setSocialHousehold(tSocialInfo.getSocialHouseholdName()); + } if (Common.isNotNull(tSocialInfo)) { paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam()); paymentInfo.setEmpNo(tSocialInfo.getEmpNo()); } - paymentInfo.setSocialProvince(socialInfo.getSocialProvince()); - paymentInfo.setSocialCity(socialInfo.getSocialCity()); - paymentInfo.setSocialTown(socialInfo.getSocialTown()); - paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName()); paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth()); if (null != paymentInfo.getSocialProvince()) { @@ -1489,12 +1537,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorDetailVO> errorMessageList) { HashMap<String, String> areaMap = new HashMap<>(); + HashMap<String, String> areaMap2 = new HashMap<>(); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR(); if (Common.isNotNull(areaListR)) { AreaVo areaList = areaListR.getData(); if (null != areaList && !areaList.getSysAreaList().isEmpty()) { for (SysArea area : areaList.getSysAreaList()) { areaMap.put(Integer.toString(area.getId()), area.getAreaName()); + areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + ( + null == area.getParentId() ? "null" : (0 == area.getParentId() ? "null" : Integer.toString( + area.getParentId()))), Integer.toString(area.getId())); } } } @@ -1504,6 +1556,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa TSocialFundInfo fund; String temp; int res = -1; + List<TProvidentFund> fundlist; + TProvidentFund tProvidentFund = new TProvidentFund(); + List<TSettleDomainSelectVo> settleDomainR; + R<TSettleDomainListVo> listVo; //获å–身份è¯åˆ—表 List<String> idcards = list.stream().map(TPaymentInfoVo::getEmpIdcard).collect(Collectors.toList()); @@ -1574,13 +1630,33 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa continue; } areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING); - fund = checkAddress(areaArray, areaMap, fund); + fund = checkAddress(areaArray, areaMap, fund, areaMap2,infoVo); //æ— å¯¹åº”å‘˜å·¥å…¬ç§¯é‡‘æ•°æ® if (null == fund) { - errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + infoVo.getEmpName() + - CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard() - + "的公积金数æ®(请查验公积金缴纳地)ï¼")); - continue; + boolean isTrueAdder = false; + fundlist = providentFundMapper.selectList(Wrappers.<TProvidentFund>query().lambda() + .eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()) + .eq(TProvidentFund::getFundProvince, infoVo.getSocialProvince()) + .eq(TProvidentFund::getFundCity, infoVo.getSocialCity())); + if (!fundlist.isEmpty()) { + for (TProvidentFund providentFund:fundlist) { + if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && + infoVo.getFundTown().equals(providentFund.getFundTown()))) && + DateUtil.dateToString(providentFund.getProvidentStart(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) <=0 && + (Common.isEmpty(providentFund.getFundReduceDate()) || (Common.isNotNull(providentFund.getFundReduceDate()) && + DateUtil.dateToString(providentFund.getFundReduceDate(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >=0))) { + isTrueAdder = true; + tProvidentFund = providentFund; + break; + } + } + } + if (!isTrueAdder) { + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + infoVo.getEmpName() + + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard() + + "的公积金数æ®(请查验公积金缴纳地)ï¼")); + continue; + } } //计算公积金åˆè®¡ï¼Œä¸ªäººé‡‘é¢å’Œå•ä½é‡‘é¢ä¸€è‡´ infoVo.setProvidentSum(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum(), infoVo.getUnitProvidentSum())); @@ -1606,29 +1682,54 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa continue; } - TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda() - .eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TProvidentFund::getCreateTime) - .last(CommonConstants.LAST_ONE_SQL)); + if (Common.isEmpty(tProvidentFund)) { + tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda() + .eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TProvidentFund::getCreateTime) + .last(CommonConstants.LAST_ONE_SQL)); + } paymentInfo = new TPaymentInfo(); paymentInfo.setLockStatus(CommonConstants.ZERO_STRING); - paymentInfo.setEmpId(fund.getEmpId()); - paymentInfo.setEmpIdcard(fund.getEmpIdcard()); - paymentInfo.setEmpName(fund.getEmpName()); - paymentInfo.setSettleDomainId(fund.getSettleDomainFund()); - paymentInfo.setSettleDomainName(fund.getSettleDomainNameFund()); - paymentInfo.setSettleDomainCode(fund.getSettleDomainCodeFund()); - paymentInfo.setUnitId(fund.getUnitIdFund()); - paymentInfo.setUnitName(fund.getUnitNameFund()); + if (Common.isNotNull(fund)) { + paymentInfo.setEmpId(fund.getEmpId()); + paymentInfo.setEmpIdcard(fund.getEmpIdcard()); + paymentInfo.setEmpName(fund.getEmpName()); + paymentInfo.setSettleDomainId(fund.getSettleDomainFund()); + paymentInfo.setSettleDomainName(fund.getSettleDomainNameFund()); + paymentInfo.setSettleDomainCode(fund.getSettleDomainCodeFund()); + paymentInfo.setUnitId(fund.getUnitIdFund()); + paymentInfo.setUnitName(fund.getUnitNameFund()); + paymentInfo.setFundProvince(fund.getFundProvince()); + paymentInfo.setFundCity(fund.getFundCity()); + paymentInfo.setFundTown(fund.getFundTown()); + paymentInfo.setProvidentHousehold(fund.getProvidentHouseholdName()); + } else if (Common.isNotNull(tProvidentFund)) { + paymentInfo.setEmpId(tProvidentFund.getEmpId()); + paymentInfo.setEmpIdcard(tProvidentFund.getEmpIdcard()); + paymentInfo.setEmpName(tProvidentFund.getEmpName()); + paymentInfo.setSettleDomainId(tProvidentFund.getSettleDomain()); + listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tProvidentFund.getSettleDomain()); + if (Common.isNotNull(listVo)) { + TSettleDomainListVo tSettleDomainListVo = listVo.getData(); + if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { + settleDomainR = tSettleDomainListVo.getListSelectVO(); + for (TSettleDomainSelectVo vo :settleDomainR) { + paymentInfo.setSettleDomainName(vo.getDepartName()); + paymentInfo.setSettleDomainCode(vo.getDepartNo()); + paymentInfo.setUnitId(vo.getCustomerId()); + paymentInfo.setUnitName(vo.getCustomerName()); } + } + } + paymentInfo.setFundProvince(tProvidentFund.getFundProvince()); + paymentInfo.setFundCity(tProvidentFund.getFundCity()); + paymentInfo.setFundTown(tProvidentFund.getFundTown()); + paymentInfo.setProvidentHousehold(tProvidentFund.getProvidentHouseholdName()); + } if (Common.isNotNull(tProvidentFund)) { paymentInfo.setInauguralTeam(tProvidentFund.getInauguralTeam()); paymentInfo.setEmpNo(tProvidentFund.getEmpNo()); } paymentInfo.setProvidentPayMonth(infoVo.getProvidentPayMonth()); - paymentInfo.setFundProvince(fund.getFundProvince()); - paymentInfo.setFundCity(fund.getFundCity()); - paymentInfo.setFundTown(fund.getFundTown()); - paymentInfo.setProvidentHousehold(fund.getProvidentHouseholdName()); if (null != paymentInfo.getFundProvince()) { temp = areaMap.get(paymentInfo.getFundProvince()); if (Common.isNotNull(temp)) { @@ -1669,7 +1770,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_SUCCESS)); } - if (Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) { + if (Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) { paymentInfoMap.put(paymentInfo.getProvidentPayAddr() + CommonConstants.DOWN_LINE_STRING + paymentInfo.getEmpIdcard().trim() @@ -1996,10 +2097,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa if (Common.isNotNull(list)) { TPaymentInfo payExists; TSocialFundInfo socialInfo = null; - TSocialInfo tSocialInfo; + TSocialInfo tSocialInfo = new TSocialInfo(); String temp; - int res = -1; - + List<TSocialInfo> socialist; + int res; + List<TSettleDomainSelectVo> settleDomainR; + R<TSettleDomainListVo> listVo; List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); @@ -2047,9 +2150,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa } } if (null == socialInfo) { - errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + infoVo.getEmpIdcard() + - "的社ä¿æ•°æ®(请查验社ä¿ç¼´çº³åœ°)")); - continue; + boolean isTrueAdder = false; + socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda() + .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()) + .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString()) + .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())); + if (!socialist.isEmpty()) { + for (TSocialInfo socialInfo1:socialist) { + if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && + infoVo.getSocialTown().toString().equals(socialInfo1.getSocialTown()))) && + DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 && + (Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) && + DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) { + isTrueAdder = true; + tSocialInfo = socialInfo1; + break; + } + } + } + if (!isTrueAdder) { + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "æ— å¯¹åº”å‘˜å·¥" + infoVo.getEmpIdcard() + + "的社ä¿æ•°æ®(请查验社ä¿ç¼´çº³åœ°)")); + continue; + } } //判æ–是å¦å˜åœ¨å…»è€ç¼´è´¹æ•°æ® @@ -2245,30 +2368,53 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa } } - tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() - .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) - .last(CommonConstants.LAST_ONE_SQL)); + if (Common.isEmpty(tSocialInfo)) { + tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() + .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) + .last(CommonConstants.LAST_ONE_SQL)); + } payExists = new TPaymentInfo(); payExists.setLockStatus(CommonConstants.ZERO_STRING); - payExists.setEmpId(socialInfo.getEmpId()); - payExists.setEmpIdcard(socialInfo.getEmpIdcard()); - payExists.setEmpName(socialInfo.getEmpName()); - payExists.setSettleDomainId(socialInfo.getSettleDomain()); - payExists.setSettleDomainName(socialInfo.getSettleDomainName()); - payExists.setSettleDomainCode(socialInfo.getSettleDomainCode()); - payExists.setUnitId(socialInfo.getUnitId()); - payExists.setUnitName(socialInfo.getUnitName()); + if (Common.isNotNull(socialInfo)) { + payExists.setEmpId(socialInfo.getEmpId()); + payExists.setEmpIdcard(socialInfo.getEmpIdcard()); + payExists.setEmpName(socialInfo.getEmpName()); + payExists.setSettleDomainId(socialInfo.getSettleDomain()); + payExists.setSettleDomainName(socialInfo.getSettleDomainName()); + payExists.setSettleDomainCode(socialInfo.getSettleDomainCode()); + payExists.setUnitId(socialInfo.getUnitId()); + payExists.setUnitName(socialInfo.getUnitName()); + payExists.setSocialProvince(socialInfo.getSocialProvince()); + payExists.setSocialCity(socialInfo.getSocialCity()); + payExists.setSocialTown(socialInfo.getSocialTown()); + payExists.setSocialHousehold(socialInfo.getSocialHouseholdName()); + }else if (Common.isNotNull(tSocialInfo)) { + payExists.setEmpId(tSocialInfo.getEmpId()); + payExists.setEmpIdcard(tSocialInfo.getEmpIdcard()); + payExists.setEmpName(tSocialInfo.getEmpName()); + payExists.setSettleDomainId(tSocialInfo.getSettleDomain()); + listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tSocialInfo.getSettleDomain()); + if (Common.isNotNull(listVo)) { + TSettleDomainListVo tSettleDomainListVo = listVo.getData(); + if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { + settleDomainR = tSettleDomainListVo.getListSelectVO(); + for (TSettleDomainSelectVo vo :settleDomainR) { + payExists.setSettleDomainName(vo.getDepartName()); + payExists.setSettleDomainCode(vo.getDepartNo()); + payExists.setUnitId(vo.getCustomerId()); + payExists.setUnitName(vo.getCustomerName()); } + } + } + payExists.setSocialProvince(tSocialInfo.getSocialProvince()); + payExists.setSocialCity(tSocialInfo.getSocialCity()); + payExists.setSocialTown(tSocialInfo.getSocialTown()); + payExists.setSocialHousehold(tSocialInfo.getSocialHouseholdName()); + } if (Common.isNotNull(tSocialInfo)) { payExists.setInauguralTeam(tSocialInfo.getInauguralTeam()); payExists.setEmpNo(tSocialInfo.getEmpNo()); } - - payExists.setSocialProvince(socialInfo.getSocialProvince()); - payExists.setSocialCity(socialInfo.getSocialCity()); - payExists.setSocialTown(socialInfo.getSocialTown()); - - payExists.setSocialHousehold(socialInfo.getSocialHouseholdName()); payExists.setSocialPayMonth(infoVo.getSocialPayMonth()); if (null != payExists.getSocialProvince()) { @@ -2403,11 +2549,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa } //比对缴纳地是å¦ä¸€è‡´ - private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s) { + private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s, + HashMap<String, String> areaMap2, TPaymentInfoVo infoVo) { if (null == areaArray || null == areaMap || null == s) { return null; } + String temp; if (areaArray.length >= CommonConstants.TWO_INT) { + temp = areaMap2.get(areaArray[0] + CommonConstants.DOWN_LINE_STRING + "null"); + if (Common.isNotNull(temp)) { + infoVo.setSocialProvince(temp); + } + temp = areaMap2.get(areaArray[1] + CommonConstants.DOWN_LINE_STRING + (null == infoVo.getSocialProvince() + ? "null" : infoVo.getSocialProvince())); + if (Common.isNotNull(temp)) { + infoVo.setSocialCity(temp); + } + if (areaArray.length >= CommonConstants.THREE_INT) { + temp = areaMap2.get(areaArray[2] + CommonConstants.DOWN_LINE_STRING + (null == infoVo.getSocialCity() + ? "null" : infoVo.getSocialCity())); + if (Common.isNotNull(temp)) { + infoVo.setSocialTown(temp); + } + } if (null != s.getFundProvince()) { if (areaArray[0].equals(areaMap.get(s.getFundProvince()))) { if (null != s.getFundCity()) { @@ -2616,6 +2780,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) + .eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000")); synchronized (this) { if (Common.isNotNull(sumList)) { @@ -2654,6 +2819,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) + .eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .isNotNull(TPaymentInfo::getFundId).last(" limit 0,10000")); synchronized (this) { if (Common.isNotNull(sumList)) {