Commit fc43c213 authored by hongguangwu's avatar hongguangwu

30号版本:档案合同、商险、薪资状态;缴费库反馈列;合同提交的直接审核优化等

parent aaae2b0b
...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity {
private Integer projectNum; private Integer projectNum;
/** /**
* 员工合同状态(字典) * 员工合同状态(字典:0初始1在用2不在用
*/ */
@Schema(description = "员工合同状态(字典)0初始状态 personnel_state") @Schema(description = "员工合同状态(字典)0初始状态 personnel_state")
@ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE) @ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE)
...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity {
/** /**
* 商险状态(字典) * 商险状态(字典)
* 商险状态(字典0无2正常3失效4处理中)commercial_satte
*/ */
@Schema(description = "商险状态(字典)0初始状态") @Schema(description = "商险状态(字典)0初始状态")
private Integer insuranceStatus; private Integer insuranceStatus;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpIdCardAndDeptVo {
// 身份证
private String idCard;
// 项目id
private String deptId;
// 项目编码:薪资使用的,只有编码
private String deptNo;
// 状态
private String status;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.util.List;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpStatusVo {
// 身份证、项目id
private List<EmpIdCardAndDeptVo> empInfo;
}
...@@ -65,4 +65,12 @@ public class EmployeeConstants { ...@@ -65,4 +65,12 @@ public class EmployeeConstants {
**/ **/
public static final String DATA_UPDATE_FAIL = "数据更新失败!"; public static final String DATA_UPDATE_FAIL = "数据更新失败!";
/**
* @Description: 如果派单减少完成,则自动审核合同通过
* @Author: hgw
* @Date: 2022/11/25 16:42
* @return:
**/
public static final String CONTRACT_NAME[] = {"标准合同","劳动派遣合同","其他"};
} }
...@@ -385,4 +385,55 @@ public class TEmployeeInfoController { ...@@ -385,4 +385,55 @@ public class TEmployeeInfoController {
public Boolean checkMobile(@RequestBody String mobile) { public Boolean checkMobile(@RequestBody String mobile) {
return tEmployeeInfoService.checkMobile(mobile); return tEmployeeInfoService.checkMobile(mobile);
} }
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的商险状态", description = "更新人员档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的薪资状态", description = "更新人员档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoSalaryStatus")
public Boolean updateEmployeeInfoSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoSalaryStatus(vo);
}
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态为2否
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每月1号更新人员档案、项目档案的薪资状态为2否", description = "每月1号更新人员档案、项目档案的薪资状态为2否")
@Inner
@PostMapping("/inner/everyMonthUpdateSalaryStatus")
public void everyMonthUpdateSalaryStatus() {
tEmployeeInfoService.everyMonthUpdateSalaryStatus();
}
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每天更新人员档案、项目档案的过期合同为2不在用", description = "每天更新人员档案、项目档案的过期合同为2不在用")
@Inner
@PostMapping("/inner/everyDayUpdateEmployeeContractStatus")
public void everyDayUpdateEmployeeContractStatus() {
tEmployeeInfoService.everyDayUpdateEmployeeContractStatus();
}
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -314,4 +315,28 @@ public class TEmployeeProjectController { ...@@ -314,4 +315,28 @@ public class TEmployeeProjectController {
public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) { public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) {
return tEmployeeProjectService.updateProjectSocialFund(vo); return tEmployeeProjectService.updateProjectSocialFund(vo);
} }
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的商险状态", description = "更新人员档案、项目档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的薪资状态", description = "更新人员档案、项目档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeSalaryStatus")
public Boolean updateEmployeeSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeSalaryStatus(vo);
}
} }
...@@ -87,4 +87,38 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> { ...@@ -87,4 +87,38 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV); int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV);
int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee); int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee);
/**
* @Description: 更新档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:38
* @return: int
**/
int updateEmployeeInfoInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:29
* @return: int
**/
int updateEmployeeInfoSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为否薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeInfoSalaryStatus();
/**
* @param
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:17
* @return: int
**/
int everyDayUpdateEmployeeInfoContractStatus();
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -65,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -65,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
/**
* @Description: 更新项目档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:43
* @return: int
**/
int updateEmployeeInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新项目档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:28
* @return: int
**/
int updateEmployeeSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为无薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:19
* @return: int
**/
int everyDayUpdateEmployeContractStatus();
} }
...@@ -186,4 +186,37 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -186,4 +186,37 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
Boolean updateEmpInfo(UpdateEmpVo vo); Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean checkMobile(String mobile); Boolean checkMobile(String mobile);
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoInsuranceStatus(EmpStatusVo vo);
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:35
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyMonthUpdateSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyDayUpdateEmployeeContractStatus();
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
String getEmpNo(String deptNo); String getEmpNo(String deptNo);
Boolean updateProjectSocialFund(UpProjectSocialFundVo vo); Boolean updateProjectSocialFund(UpProjectSocialFundVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInsuranceStatus(EmpStatusVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:25
* @return: java.lang.Boolean
**/
Boolean updateEmployeeSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号定时更新项目档案薪资状态为否
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyDayUpdateEmployeContractStatus();
} }
...@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants;
...@@ -40,11 +41,18 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -40,11 +41,18 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
...@@ -72,6 +80,7 @@ import java.util.List; ...@@ -72,6 +80,7 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@EnableConfigurationProperties({DaprSocialProperties.class})
public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService { public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService {
private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空"; private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空";
...@@ -85,7 +94,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -85,7 +94,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private final TAttaInfoService tAttaInfoService; private final TAttaInfoService tAttaInfoService;
private final TEmployeeContractAuditService tEmployeeContractAuditService; private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TEmployeeLogService tEmployeeLogService; private final TEmployeeLogService tEmployeeLogService;
@Autowired
private DaprSocialProperties socialProperties;
// 缓存信息 // 缓存信息
private final CacheManager cacheManager; private final CacheManager cacheManager;
...@@ -315,6 +325,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -315,6 +325,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止 //初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
initType(tEmployeeContractInfo); initType(tEmployeeContractInfo);
// 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过
this.judgeAuditStatus(tEmployeeContractInfo);
if (Common.isEmpty(tEmployeeContractInfo.getId())) { if (Common.isEmpty(tEmployeeContractInfo.getId())) {
// 针对编码再做一次重复性校验 // 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo()); String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
...@@ -947,6 +960,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -947,6 +960,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
/**
* @Description: 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过,
* 判断同项目的社保公积金都已派减,则无需审核
* @Author: hgw
* @Date: 2022/11/28 10:05
* @return: void
**/
private void judgeAuditStatus(TEmployeeContractInfo insert) {
if (insert.getAuditStatus() != CommonConstants.TWO_INT
&& (EmployeeConstants.CONTRACT_NAME[0].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[1].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[2].equals(insert.getContractName()))) {
//
TSocialFundInfo sf = new TSocialFundInfo();
sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomainCode(insert.getDeptNo());
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
insert.setAuditStatus(CommonConstants.TWO_INT);
}
}
}
/** /**
* 导出 * 导出
*/ */
......
...@@ -1150,4 +1150,32 @@ ...@@ -1150,4 +1150,32 @@
</trim> </trim>
WHERE a.id=#{tEmployeeInfo.id} WHERE a.id=#{tEmployeeInfo.id}
</update> </update>
<!-- 更新档案商险状态 -->
<update id="updateEmployeeInfoInsuranceStatus" >
update t_employee_info a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 更新档案薪资状态 -->
<update id="updateEmployeeInfoSalaryStatus" >
update t_employee_info a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 每月1号更新档案薪资状态为否薪资 -->
<update id="everyMonthUpdateEmployeeInfoSalaryStatus" >
update t_employee_info e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeeInfoContractStatus" >
update t_employee_info e
left join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update>
</mapper> </mapper>
...@@ -764,8 +764,7 @@ ...@@ -764,8 +764,7 @@
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String"> <select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
select MAX(EMP_NO) from t_employee_project where select MAX(EMP_NO) from t_employee_project where
id not like '%abc' and id not like '%abc' and
DEPT_NO = #{deptNo} EMP_NO like concat(#{deptNo},'%')
GROUP BY DEPT_NO
</select> </select>
<update id="updateEmpIdById" parameterType="java.util.List"> <update id="updateEmpIdById" parameterType="java.util.List">
...@@ -850,4 +849,32 @@ ...@@ -850,4 +849,32 @@
</if> </if>
</where> </where>
</select> </select>
<!-- 更新项目档案商险状态 -->
<update id="updateEmployeeInsuranceStatus" >
update t_employee_project a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_ID = #{emp.deptId}
</update>
<!-- 更新项目档案薪资状态 -->
<update id="updateEmployeeSalaryStatus" >
update t_employee_project a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_NO = #{emp.deptNo}
</update>
<!-- 每月1号更新项目档案薪资状态 -->
<update id="everyMonthUpdateEmployeeSalaryStatus" >
update t_employee_project e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD and a.dept_id=e.DEPT_ID
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeContractStatus" >
update t_employee_project e
join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and e.DEPT_NO=c.DEPT_NO and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update>
</mapper> </mapper>
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.common.core.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 封装更多信息-返回给前端的错误信息
*
* @author hgw
* @date 2022-11-24 16:41:21
*/
@Data
public class ErrorDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
// 行号
private int lineNum;
// 员工姓名
private String empName;
// 身份证号
private String empIdCard;
// 社保户
private String socialHousehold;
// 公积金户
private String providentHousehold;
// 每一行的结果:0错误;1正确(例如:是否允许删除:0否;1是)
private int result = 0;
// 提示信息
private String message;
// 所有行的结果,当第一行的allTrue=1时,需要反馈文件,否则直接提示成功
private int allTrue = 0;
public ErrorDetailVO(Integer lineNum, String message) {
this.lineNum = lineNum;
this.result = 0;
this.message = message;
}
public ErrorDetailVO(Integer lineNum, int result, String empIdCard, String socialHousehold, String providentHousehold, String empName,String message) {
this.lineNum = lineNum;
this.result = result;
this.empIdCard = empIdCard;
this.socialHousehold = socialHousehold;
this.providentHousehold = providentHousehold;
this.empName = empName;
this.message = message;
}
}
...@@ -294,4 +294,38 @@ public class ArchivesDaprUtil { ...@@ -294,4 +294,38 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Description: 更新人员档案与项目档案,状态一致。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022/11/23 15:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeInsuranceStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案、项目档案】的商险状态失败!");
}
return res;
}
/**
* @Description: 仅更新人员档案,项目档案另外更新。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022-11-23 16:50:41
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInfoInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmployeeInfoInsuranceStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案】的商险状态失败!");
}
return res;
}
} }
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<!--选配: orm 模块--> <!--选配: orm 模块-->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
......
...@@ -236,4 +236,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -236,4 +236,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/ **/
int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept); int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* @param idCardList
* @Description: 根据身份证列表,查找所有商险
* @Author: hgw
* @Date: 2022/11/23 15:17
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail>
**/
List<TInsuranceDetail> selectByIdCardList(@Param("idCardList") List<String> idCardList
, @Param("idList") List<String> idList);
} }
...@@ -43,6 +43,7 @@ import org.apache.commons.collections.MapUtils; ...@@ -43,6 +43,7 @@ import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -129,17 +130,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -129,17 +130,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
); );
if (CollectionUtils.isNotEmpty(list)){ if (CollectionUtils.isNotEmpty(list)){
log.info("定时任务扫描到的未过期数据是:{}条",list.size()); log.info("定时任务扫描到的未过期数据是:{}条",list.size());
// 过期同步档案逻辑:
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
list.stream().forEach(e -> { list.stream().forEach(e -> {
if (!LocalDateUtil.isOverdueDate(e.getPolicyEnd().toString())){ if (!LocalDateUtil.isOverdueDate(e.getPolicyEnd().toString())){
e.setIsOverdue(CommonConstants.ONE_INT); e.setIsOverdue(CommonConstants.ONE_INT);
e.setUpdateTime(LocalDateTime.now()); e.setUpdateTime(LocalDateTime.now());
sourceIdCardList.add(e.getEmpIdcardNo());
replaceIdList.add(e.getId());
} }
}); });
List<TInsuranceDetail> collect = list.stream().filter(e -> e.getIsOverdue() == CommonConstants.ONE_INT).collect(Collectors.toList()); List<TInsuranceDetail> collect = list.stream().filter(e -> e.getIsOverdue() == CommonConstants.ONE_INT).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)){ if (CollectionUtils.isNotEmpty(collect)){
log.info("定时任务扫描到的已过期数据是:{}条",collect.size()); log.info("定时任务扫描到的已过期数据是:{}条",collect.size());
this.updateBatchById(collect); this.updateBatchById(collect);
} }
this.doFailInfo(collect, sourceIdCardList, replaceIdList, CommonConstants.THREE_STRING);
} }
} }
...@@ -324,6 +333,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -324,6 +333,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceAddParam> listSuccess = map.get("listSuccess"); List<InsuranceAddParam> listSuccess = map.get("listSuccess");
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
for (InsuranceAddParam success : listSuccess) { for (InsuranceAddParam success : listSuccess) {
TInsuranceDetail detail = new TInsuranceDetail(); TInsuranceDetail detail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(success,detail); BeanCopyUtils.copyProperties(success,detail);
...@@ -342,8 +353,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -342,8 +353,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setCreateBy(user.getId()); detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname()); detail.setCreateName(user.getNickname());
detailList.add(detail); detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo());
replaceIdList.add(detail.getId());
} }
this.saveBatch(detailList); this.saveBatch(detailList);
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.doFailInfo(detailList, sourceIdCardList, replaceIdList, CommonConstants.FOUR_STRING);
} }
//操作记录 //操作记录
addOperate(detailList,user,InsurancesConstants.ADD,null,CommonConstants.ONE_INT); addOperate(detailList,user,InsurancesConstants.ADD,null,CommonConstants.ONE_INT);
...@@ -378,6 +393,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -378,6 +393,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
TInsuranceDetail detail; TInsuranceDetail detail;
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
for (InsuranceBatchParam success : listSuccess) { for (InsuranceBatchParam success : listSuccess) {
detail = new TInsuranceDetail(); detail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(success,detail); BeanCopyUtils.copyProperties(success,detail);
...@@ -394,8 +411,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -394,8 +411,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setCreateBy(user.getId()); detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname()); detail.setCreateName(user.getNickname());
detailList.add(detail); detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo());
replaceIdList.add(detail.getId());
} }
this.saveBatch(detailList); this.saveBatch(detailList);
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.doFailInfo(detailList, sourceIdCardList, replaceIdList, CommonConstants.FOUR_STRING);
} }
//操作记录 //操作记录
addOperate(detailList,user,InsurancesConstants.BATCH,null,CommonConstants.ONE_INT); addOperate(detailList,user,InsurancesConstants.BATCH,null,CommonConstants.ONE_INT);
...@@ -717,6 +738,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -717,6 +738,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId.setUpdateBy(user.getId()); byId.setUpdateBy(user.getId());
byId.setUpdateTime(LocalDateTime.now()); byId.setUpdateTime(LocalDateTime.now());
this.updateById(byId); this.updateById(byId);
// 同步档案
List<TInsuranceDetail> detailList = new ArrayList<>();
detailList.add(byId);
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
sourceIdCardList.add(byId.getEmpIdcardNo());
replaceIdList.add(byId.getId());
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.doFailInfo(detailList, sourceIdCardList, replaceIdList, CommonConstants.FOUR_STRING);
}else if(byId.getBuyHandleStatus() == CommonConstants.FOUR_INT && byId.getBuyType() == CommonConstants.FOUR_INT){ }else if(byId.getBuyHandleStatus() == CommonConstants.FOUR_INT && byId.getBuyType() == CommonConstants.FOUR_INT){
//替换的编辑逻辑 //替换的编辑逻辑
...@@ -768,6 +799,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -768,6 +799,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId.setUpdateBy(user.getId()); byId.setUpdateBy(user.getId());
byId.setUpdateTime(LocalDateTime.now()); byId.setUpdateTime(LocalDateTime.now());
this.updateById(byId); this.updateById(byId);
// 同步档案
List<TInsuranceDetail> detailList = new ArrayList<>();
detailList.add(byId);
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
sourceIdCardList.add(byId.getEmpIdcardNo());
replaceIdList.add(byId.getId());
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.doFailInfo(detailList, sourceIdCardList, replaceIdList, CommonConstants.THREE_STRING);
} }
} }
} else { } else {
...@@ -1282,6 +1323,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1282,6 +1323,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
handleParam.setRemark(e.getRemark()); handleParam.setRemark(e.getRemark());
list.add(handleParam); list.add(handleParam);
}); });
// TODO-关联档案1
this.successfulInsurance(user,list); this.successfulInsurance(user,list);
} }
...@@ -1294,6 +1336,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1294,6 +1336,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
handleParam.setRemark(e.getRemark()); handleParam.setRemark(e.getRemark());
list.add(handleParam); list.add(handleParam);
}); });
// TODO-关联档案2
this.rollBackInsurance(user,list); this.rollBackInsurance(user,list);
} }
} }
...@@ -1324,6 +1367,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1324,6 +1367,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> successList = new ArrayList<>(); List<TInsuranceDetail> successList = new ArrayList<>();
//被替换人标记被替换成功 //被替换人标记被替换成功
List<TInsuranceDetail> sourceList = new ArrayList<>(); List<TInsuranceDetail> sourceList = new ArrayList<>();
//被替换人的档案要处理状态
List<String> sourceIdCardList = new ArrayList<>();
// 被替换的id
List<String> replaceIdList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
for (TInsuranceDetail detail : detailList) { for (TInsuranceDetail detail : detailList) {
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据 //先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
...@@ -1357,6 +1404,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1357,6 +1404,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId()); TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()) { if (Optional.ofNullable(byId).isPresent()) {
sourceList.add(byId); sourceList.add(byId);
replaceIdList.add(byId.getId());
sourceIdCardList.add(byId.getEmpIdcardNo());
} }
} }
}else{ }else{
...@@ -1451,7 +1500,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1451,7 +1500,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
updateBatchById(successList); updateBatchById(successList);
if (CollectionUtils.isNotEmpty(successList)){ // 被替换的老商险,要处理档案状态
if (CollectionUtils.isNotEmpty(sourceIdCardList)) {
this.doFailInfo(sourceList, sourceIdCardList, replaceIdList, CommonConstants.THREE_STRING);
}
if (CollectionUtils.isNotEmpty(successList)) {
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.updateEmpInfp(successList, CommonConstants.TWO_STRING);
threadPool.execute(() -> { threadPool.execute(() -> {
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送) //根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for (TInsuranceDetail tInsuranceDetail : successList) { for (TInsuranceDetail tInsuranceDetail : successList) {
...@@ -1488,6 +1544,132 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1488,6 +1544,132 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.ok(errorList, InsurancesConstants.OPERATE_SUCCESS); return R.ok(errorList, InsurancesConstants.OPERATE_SUCCESS);
} }
/**
* @param sourceList 失效的商险list
* @param sourceIdCardList 失效的身份证list
* @param replaceIdList 失效的idlist
* @Description:
* @Author: hgw
* @Date: 2022/11/23 17:57
* @return: void
**/
private void doFailInfo(List<TInsuranceDetail> sourceList, List<String> sourceIdCardList, List<String> replaceIdList, String toStatus) {
List<TInsuranceDetail> sourceEmpList = baseMapper.selectByIdCardList(sourceIdCardList, replaceIdList);
if (sourceEmpList != null) {
// 项目档案状态
Map<String , Integer> proStatusMap = new HashMap<>();
// 人员档案状态
Map<String , Integer> empStatusMap = new HashMap<>();
Integer proStatus;
Integer empStatus;
int status;
for (TInsuranceDetail detail : sourceEmpList) {
proStatus = proStatusMap.get(detail.getEmpIdcardNo() + CommonConstants.DOWN_LINE_STRING + detail.getDeptId());
empStatus = empStatusMap.get(detail.getEmpIdcardNo());
// 判断该项目的商险的状态 2正常>3处理中>4失效>0无商险
status = this.judgeStatus(detail);
if (proStatus != null) {
if (status != 0 && status < proStatus) {
proStatus = status;
}
} else {
proStatus = status;
}
if (empStatus != null) {
if (status != 0 && status < empStatus) {
empStatus = status;
}
} else {
empStatus = status;
}
proStatusMap.put(detail.getEmpIdcardNo()+CommonConstants.DOWN_LINE_STRING+detail.getDeptId(), proStatus);
empStatusMap.put(detail.getEmpIdcardNo(), empStatus);
}
if (!proStatusMap.isEmpty()) {
EmpStatusVo empStatusVo = this.getEmpStatusVo(proStatusMap, true);
archivesDaprUtil.updateEmployeeInsuranceStatus(empStatusVo);
}
if (!empStatusMap.isEmpty()) {
EmpStatusVo empStatusVo = this.getEmpStatusVo(empStatusMap, false);
archivesDaprUtil.updateEmployeeInfoInsuranceStatus(empStatusVo);
}
} else {
// 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
this.updateEmpInfp(sourceList, toStatus);
}
}
/**
* @param isDept true :含项目,要分割字符串; false:不含项目,直接用身份证,仅更新人员档案
* @Description: 提取方法,塞值
* @Author: hgw
* @Date: 2022/11/23 16:48
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo
**/
private EmpStatusVo getEmpStatusVo(Map<String, Integer> empStatusMap, boolean isDept) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (Map.Entry<String, Integer> entry : empStatusMap.entrySet()) {
if (isDept) {
empIdCardAndDeptVo.setIdCard(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[0]);
empIdCardAndDeptVo.setDeptId(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[1]);
} else {
empIdCardAndDeptVo.setIdCard(entry.getKey());
}
empIdCardAndDeptVo.setStatus(String.valueOf(entry.getValue()));
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
return empStatusVo;
}
/**
* @param detail
* @Description: 判断商险状态
* @Author: hgw
* @Date: 2022/11/23 16:35
* @return: int
**/
private int judgeStatus(TInsuranceDetail detail) {
// (0无2正常3失效4处理中)
if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
return CommonConstants.ZERO_INT;
} else if (detail.getIsOverdue() == CommonConstants.ZERO_INT
|| detail.getIsEffect() == CommonConstants.ONE_INT
|| detail.getBuyHandleStatus() == CommonConstants.FOUR_INT
|| detail.getBuyHandleStatus() == CommonConstants.FIVE_INT) {
return CommonConstants.THREE_INT;
} else if (detail.getBuyHandleStatus() == CommonConstants.THREE_INT) {
return CommonConstants.TWO_INT;
} else {
return CommonConstants.FOUR_INT;
}
}
/**
* @param sourceList
* @Description: // 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
* @Author: hgw
* @Date: 2022/11/23 15:46
* @return: void
**/
private void updateEmpInfp(List<TInsuranceDetail> sourceList, String status) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (TInsuranceDetail d : sourceList) {
empIdCardAndDeptVo.setIdCard(d.getEmpIdcardNo());
empIdCardAndDeptVo.setDeptId(d.getDeptId());
empIdCardAndDeptVo.setStatus(status);
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
archivesDaprUtil.updateEmployeeInsuranceStatus(empStatusVo);
}
/** /**
* 登记保单保费 * 登记保单保费
* *
......
...@@ -1186,4 +1186,24 @@ ...@@ -1186,4 +1186,24 @@
</foreach> </foreach>
</update> </update>
<!--查询所有商险,如果idList 不为空,则不含被替换的本身。 用来改变档案状态-->
<select id="selectByIdCardList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
t_insurance_detail
where
DELETE_FLAG = 0 AND EMP_IDCARD_NO in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
<if test="idList != null">
AND id not in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.job.compont;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @Author hgw
* @Description 定时任务具体执行类
* @Date 2022-11-24 15:03:14
* @Param
* @return
**/
@Component(value = "archiveTask")
@Slf4j
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class ArchiveTask {
@Autowired
private DaprArchivesProperties daprArchivesProperties;
/**
* @Author hgw
* @Description 每月1号清理人员档案、项目档案的薪资状态
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyMonthUpdateSalaryStatus() {
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyMonthUpdateSalaryStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务结束------------");
}
/**
* @Author hgw
* @Description 每天更新人员档案、项目档案的过期合同为2不在用
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyDayUpdateEmployeeContractStatus() {
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyDayUpdateEmployeeContractStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务结束------------");
}
}
\ No newline at end of file
...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl; ...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
Date sendTime = new Date(); Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0); String nowMonth = DateUtil.addMonth(0);
EkpSalaryParam salaryParam; EkpSalaryParam salaryParam;
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (EkpSalaryParamVo sendParam : ekpList) { for (EkpSalaryParamVo sendParam : ekpList) {
salaryParam = new EkpSalaryParam(); salaryParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParam, salaryParam); BeanUtils.copyProperties(sendParam, salaryParam);
// 转化报账表的参数 // 转化报账表的参数
account = new TSalaryAccount(); account = new TSalaryAccount();
account.setId(sendParam.getFd_3b10af838eab5c()); account.setId(sendParam.getFd_3b10af838eab5c());
// 社保 // 社保
if ((Common.isNotNull(sendParam.getUnitSocial()) if ((Common.isNotNull(sendParam.getUnitSocial())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial())) && !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial()))
...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account.setSendStatus(CommonConstants.ONE_STRING); account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth); account.setSendMonth(nowMonth);
account.setEkpId(sendBack); account.setEkpId(sendBack);
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(sendParam.getFd_3adfedfb8f76d4());
empIdCardAndDeptVo.setDeptNo(sendParam.getFd_3adfedf98ccba2());
empIdCardAndDeptVo.setStatus(CommonConstants.ONE_STRING);
voList.add(empIdCardAndDeptVo);
} else { } else {
sendStatus = false; sendStatus = false;
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
accountList.add(account); accountList.add(account);
} }
salaryAccountService.updateBatchById(accountList); salaryAccountService.updateBatchById(accountList);
if (!voList.isEmpty()) {
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
}
if (sendStatus) { if (sendStatus) {
EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam(); EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam();
standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName()); standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName());
...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4) standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6)); + CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
// 推送主表信息 // 推送主表信息
String loginName; String loginName = user.getUsername();
if (user != null) {
loginName = user.getUsername();
} else {
loginName = s.getCreateName();
}
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
} }
/**
* @param isDept true :含项目,要分割字符串; false:不含项目,直接用身份证,仅更新人员档案
* @Description: 提取方法,塞值
* @Author: hgw
* @Date: 2022/11/23 16:48
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo
**/
private EmpStatusVo getEmpStatusVo(Map<String, Integer> empStatusMap, boolean isDept) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (Map.Entry<String, Integer> entry : empStatusMap.entrySet()) {
if (isDept) {
empIdCardAndDeptVo.setIdCard(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[0]);
empIdCardAndDeptVo.setDeptId(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[1]);
} else {
empIdCardAndDeptVo.setIdCard(entry.getKey());
}
empIdCardAndDeptVo.setStatus(String.valueOf(entry.getValue()));
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
return empStatusVo;
}
/** /**
* @Description: 添加流程进展明细 * @Description: 添加流程进展明细
* @Author: hgw * @Author: hgw
......
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
...@@ -146,7 +147,7 @@ public class TPaymentInfoController { ...@@ -146,7 +147,7 @@ public class TPaymentInfoController {
@SysLog("批量新增缴费库") @SysLog("批量新增缴费库")
@PostMapping("/importListAdd") @PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) { public R<List<ErrorDetailVO>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) {
return tPaymentInfoService.importSocialDiy(file.getInputStream()); return tPaymentInfoService.importSocialDiy(file.getInputStream());
} }
...@@ -160,7 +161,7 @@ public class TPaymentInfoController { ...@@ -160,7 +161,7 @@ public class TPaymentInfoController {
@Operation(description = "导入省市社保-合肥三险") @Operation(description = "导入省市社保-合肥三险")
@SysLog("批量新增缴费库-合肥三险") @SysLog("批量新增缴费库-合肥三险")
@PostMapping("/importListSocialHeFei") @PostMapping("/importListSocialHeFei")
public R<List<ErrorMessage>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random, public R<List<ErrorDetailVO>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random,
@RequestParam(value = "type") String type) { @RequestParam(value = "type") String type) {
return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type); return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type);
} }
...@@ -176,7 +177,7 @@ public class TPaymentInfoController { ...@@ -176,7 +177,7 @@ public class TPaymentInfoController {
@SysLog("导入公积金") @SysLog("导入公积金")
@PostMapping("/batchImportPaymentFundInfo") @PostMapping("/batchImportPaymentFundInfo")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListFund(@RequestBody MultipartFile file) { public R<List<ErrorDetailVO>> importListFund(@RequestBody MultipartFile file) {
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream()); return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream());
} }
......
...@@ -156,4 +156,16 @@ public class TSocialFundInfoController { ...@@ -156,4 +156,16 @@ public class TSocialFundInfoController {
tSocialFundInfoService.updateSocialAndFoundInfo(list); tSocialFundInfoService.updateSocialAndFoundInfo(list);
} }
/**
* @Description: 查找社保公积金,是否都派减或为空,允许直接审核通过合同——盛宇2022年11月28日09:18:38
* @Author: hgw
* @Date: 2022/11/28 9:18
* @return: void
**/
@Inner
@PostMapping("/inner/selectSocialFoundByContract")
public int selectSocialFoundByContract(@RequestBody TSocialFundInfo sf) {
return tSocialFundInfoService.selectSocialFoundByContract(sf);
}
} }
...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo); void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo);
int selectSocialFoundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
} }
...@@ -18,8 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/* ...@@ -18,8 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/*
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream * @param inputStream
* @return * @return
*/ */
R<List<ErrorMessage>> importSocialDiy(InputStream inputStream); R<List<ErrorDetailVO>> importSocialDiy(InputStream inputStream);
/** /**
* 批量新增缴费库-合肥三险 * 批量新增缴费库-合肥三险
...@@ -59,14 +59,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -59,14 +59,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param type * @param type
* @return * @return
*/ */
R<List<ErrorMessage>> importSocialHeFeiDiy(InputStream inputStream, String random, String type); R<List<ErrorDetailVO>> importSocialHeFeiDiy(InputStream inputStream, String random, String type);
/** /**
* 批量导入公积金 * 批量导入公积金
* @param inputStream * @param inputStream
* @return * @return
*/ */
R<List<ErrorMessage>> batchImportPaymentFundInfo(InputStream inputStream); R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream);
/** /**
* 导出缴费库 * 导出缴费库
......
...@@ -74,5 +74,7 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -74,5 +74,7 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
TSocialFundInfoDetailVo getDetailById(String id); TSocialFundInfoDetailVo getDetailById(String id);
void updateSocialAndFoundInfo(UpdateSocialFoundVo list); void updateSocialAndFoundInfo(UpdateSocialFoundVo list);
int selectSocialFoundByContract(TSocialFundInfo sf);
} }
...@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
...@@ -402,7 +403,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -402,7 +403,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public R<List<ErrorMessage>> importSocialDiy(InputStream inputStream) { public R<List<ErrorDetailVO>> importSocialDiy(InputStream inputStream) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key"; String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
if (Common.isNotNull(redisUtil.get(sumNumKey))) { if (Common.isNotNull(redisUtil.get(sumNumKey))) {
...@@ -412,7 +413,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -412,7 +413,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(redisUtil.get(importSuccessKey))) { if (Common.isNotNull(redisUtil.get(importSuccessKey))) {
redisUtil.remove(importSuccessKey); redisUtil.remove(importSuccessKey);
} }
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorDetailVO> errorMessageList = new ArrayList<>();
//养老 //养老
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>(); ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
//大病救助金 //大病救助金
...@@ -454,7 +455,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -454,7 +455,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data.setRowIndex(rowIndex + 1); data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex()); ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) { if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage); errorMessageList.add(new ErrorDetailVO(errorMessage.getLineNum(), errorMessage.getMessage()));
} else { } else {
cachedDataList.add(data); cachedDataList.add(data);
} }
...@@ -492,11 +493,37 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -492,11 +493,37 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
injuryMoneyMap.clear(); injuryMoneyMap.clear();
medicalMoneyMap.clear(); medicalMoneyMap.clear();
accrualMoneyMap.clear(); accrualMoneyMap.clear();
return R.ok(errorMessageList); return this.judgeAllMessage(errorMessageList);
}
/**
* @param errorMessageList
* @Description: 判断所有返回数据,是否全部为正确的
* @Author: hgw
* @Date: 2022/11/24 18:03
* @return: void
**/
private R<List<ErrorDetailVO>> judgeAllMessage(List<ErrorDetailVO> errorMessageList) {
if (!errorMessageList.isEmpty()) {
boolean isAllTrue = true;
for (ErrorDetailVO d : errorMessageList) {
if (d.getResult() == 0) {
isAllTrue = false;
break;
}
}
if (isAllTrue) {
errorMessageList.clear();
return R.ok();
} else {
return R.ok(errorMessageList);
}
}
return R.ok();
} }
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey,String importSuccessKey, private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey,String importSuccessKey,
List<ErrorMessage> errorMessageList, List<ErrorDetailVO> errorMessageList,
YifuUser user, Integer rowNumber, YifuUser user, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
...@@ -523,7 +550,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -523,7 +550,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 判断是否有相同的用户在导入社保费用 存在提示稍后重试 // 判断是否有相同的用户在导入社保费用 存在提示稍后重试
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_IMPORT; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_IMPORT;
if (redisUtil.exists(key)) { if (redisUtil.exists(key)) {
errorMessageList.add(new ErrorMessage(-1, "当前用户数据导入中,请稍后重试!")); errorMessageList.add(new ErrorDetailVO(-1, "当前用户数据导入中,请稍后重试!"));
redisUtil.remove(key); redisUtil.remove(key);
} else { } else {
redisUtil.set(key, user.getId(), 360L); redisUtil.set(key, user.getId(), 360L);
...@@ -533,7 +560,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -533,7 +560,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int taskSize = list.size() / partSize + CommonConstants.ONE_INT; int taskSize = list.size() / partSize + CommonConstants.ONE_INT;
int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity(); int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity();
if (taskSize > residualCapacity) { if (taskSize > residualCapacity) {
errorMessageList.add(new ErrorMessage(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE))); errorMessageList.add(new ErrorDetailVO(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE)));
}else { }else {
// -----------------------------生成paymentInfoMap本段开始-------------------------------- // -----------------------------生成paymentInfoMap本段开始--------------------------------
//已存在的档案数据 //已存在的档案数据
...@@ -729,7 +756,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -729,7 +756,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始-------------------------------- // -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentInfoVo> tempList = new ArrayList<>(); List<TPaymentInfoVo> tempList = new ArrayList<>();
List<CompletableFuture<List<ErrorMessage>>> completableFutureList = new ArrayList<>(); List<CompletableFuture<List<ErrorDetailVO>>> completableFutureList = new ArrayList<>();
// 创建一个数值格式化对象 // 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance(); NumberFormat numberFormat = NumberFormat.getInstance();
...@@ -759,7 +786,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -759,7 +786,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
try { try {
// 1.list.size()不足partSize,直接执行 // 1.list.size()不足partSize,直接执行
if (list.size() < partSize) { if (list.size() < partSize) {
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() -> CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, list, areaMap, areaMap2, executeImportSocialList(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
...@@ -774,7 +801,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -774,7 +801,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (partSize <= list.size()) { if (partSize <= list.size()) {
// 处理第一个0位元素 // 处理第一个0位元素
final List<TPaymentInfoVo> finalList = list.subList(0, 1); final List<TPaymentInfoVo> finalList = list.subList(0, 1);
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() -> CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalList, areaMap, areaMap2, executeImportSocialList(user, finalList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
...@@ -790,7 +817,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -790,7 +817,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (i % partSize == 0) { if (i % partSize == 0) {
lastIdx = i; lastIdx = i;
List<TPaymentInfoVo> finalTempList = tempList; List<TPaymentInfoVo> finalTempList = tempList;
CompletableFuture<List<ErrorMessage>> oneCompletableFuture = CompletableFuture.supplyAsync(() -> CompletableFuture<List<ErrorDetailVO>> oneCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalTempList, areaMap, areaMap2, executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
...@@ -818,7 +845,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -818,7 +845,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
List<TPaymentInfoVo> finalTempList = tempList; List<TPaymentInfoVo> finalTempList = tempList;
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() -> CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalTempList, areaMap, areaMap2, executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
...@@ -831,7 +858,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -831,7 +858,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
boolean computeFlag; boolean computeFlag;
do { do {
computeFlag = false; computeFlag = false;
for (CompletableFuture<List<ErrorMessage>> listCompletableFuture : completableFutureList) { for (CompletableFuture<List<ErrorDetailVO>> listCompletableFuture : completableFutureList) {
if (!listCompletableFuture.isDone()) { if (!listCompletableFuture.isDone()) {
computeFlag = true; computeFlag = true;
} }
...@@ -888,7 +915,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -888,7 +915,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @date: 2022/7/25 * @date: 2022/7/25
* @return: * @return:
*/ */
private List<ErrorMessage> executeImportSocialList(YifuUser user, private List<ErrorDetailVO> executeImportSocialList(YifuUser user,
List<TPaymentInfoVo> list, List<TPaymentInfoVo> list,
HashMap<String, String> areaMap, HashMap<String, String> areaMap,
HashMap<String, String> areaMap2, HashMap<String, String> areaMap2,
...@@ -898,7 +925,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -898,7 +925,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
List<ErrorMessage> errorMessageList, List<ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap, ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
...@@ -937,15 +964,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -937,15 +964,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
//导入校验 //导入校验
if (!Common.isNotNull(infoVo.getSocialPayMonth())) { if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getSocialCreateMonth())) { if (!Common.isNotNull(infoVo.getSocialCreateMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保生成月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保生成月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getSocialPayAddr())) { if (!Common.isNotNull(infoVo.getSocialPayAddr())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳地不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳地不可为空!"));
continue; continue;
} }
//无对应员工的社保数据 //无对应员工的社保数据
...@@ -959,16 +986,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -959,16 +986,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
? "null" : infoVo.getSocialTown())); ? "null" : infoVo.getSocialTown()));
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) { if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "姓名与身份证信息不一致,请核实后再次尝试!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
if (socialInfo != null && socialInfo.getSocialStartDate() == null) { if (socialInfo != null && socialInfo.getSocialStartDate() == null) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "的社保起缴日期为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpIdcard() , "的社保起缴日期为空!"));
continue; continue;
} }
if (null == socialInfo) { if (null == socialInfo) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无对应员工" + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "无对应员工" +
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)")); infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
continue; continue;
} }
...@@ -978,8 +1005,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -978,8 +1005,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalPensionMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalPensionMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的养老缴费数据")); infoVo.getEmpIdcard() , "的养老缴费数据"));
continue; continue;
} else { } else {
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()),
...@@ -990,8 +1017,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -990,8 +1017,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (accrualMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (accrualMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()), BigDecimalUtils.isNullToZero(
infoVo.getCompanyAccrual())), accrualMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getCompanyAccrual())), accrualMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的补缴缴费数据")); infoVo.getEmpIdcard() , "的补缴缴费数据"));
continue; continue;
} else { } else {
accrualMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( accrualMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1003,8 +1030,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1003,8 +1030,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医保缴费数据")); infoVo.getEmpIdcard() , "的医保缴费数据"));
continue; continue;
} else { } else {
medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1016,8 +1043,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1016,8 +1043,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalUnemploymentMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalUnemploymentMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的失业缴费数据")); infoVo.getEmpIdcard() , "的失业缴费数据"));
continue; continue;
} else { } else {
unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1028,8 +1055,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1028,8 +1055,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.GS)); exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.GS));
if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的工伤缴费数据")); infoVo.getEmpIdcard() , "的工伤缴费数据"));
continue; continue;
} else { } else {
injuryMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney())); injuryMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()));
...@@ -1038,8 +1065,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1038,8 +1065,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.BIR)); exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.BIR));
if (birMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), if (birMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
birMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { birMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的生育缴费数据")); infoVo.getEmpIdcard() , "的生育缴费数据"));
continue; continue;
} else { } else {
birMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney())); birMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()));
...@@ -1050,8 +1077,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1050,8 +1077,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())),
bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医疗救助金缴费数据")); infoVo.getEmpIdcard() , "的医疗救助金缴费数据"));
continue; continue;
} else { } else {
bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1078,7 +1105,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1078,7 +1105,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalPensionMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalPensionMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1103,7 +1130,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1103,7 +1130,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalAccrual()), BigDecimalUtils.isNullToZero(paymentInfo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(paymentInfo.getCompanyAccrual()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getCompanyAccrual()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的补缴缴费数据,请勿重复导入!")); + "的补缴缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1128,7 +1155,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1128,7 +1155,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalUnemploymentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalUnemploymentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1154,7 +1181,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1154,7 +1181,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1179,7 +1206,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1179,7 +1206,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1200,7 +1227,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1200,7 +1227,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && ((null != paymentInfo.getGsSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getGsSameFlg())) if (null != paymentInfo && ((null != paymentInfo.getGsSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getGsSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1221,7 +1248,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1221,7 +1248,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && ((null != paymentInfo.getBrSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBrSameFlg())) if (null != paymentInfo && ((null != paymentInfo.getBrSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBrSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位生育缴费数据,请勿重复导入!")); + "的单位生育缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1317,7 +1344,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1317,7 +1344,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSocialId(UUID.randomUUID().toString()); paymentInfo.setSocialId(UUID.randomUUID().toString());
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库保存失败!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_FAILED));
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_SUCCESS));
} }
} }
} }
...@@ -1341,7 +1370,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1341,7 +1370,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public R<List<ErrorMessage>> importSocialHeFeiDiy(InputStream inputStream, String random, String type) { public R<List<ErrorDetailVO>> importSocialHeFeiDiy(InputStream inputStream, String random, String type) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key"; String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
if (Common.isNotNull(redisUtil.get(sumNumKey))) { if (Common.isNotNull(redisUtil.get(sumNumKey))) {
...@@ -1351,7 +1380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1351,7 +1380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(redisUtil.get(importSuccessKey))) { if (Common.isNotNull(redisUtil.get(importSuccessKey))) {
redisUtil.remove(importSuccessKey); redisUtil.remove(importSuccessKey);
} }
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorDetailVO> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentHeFeiVo> util1 = new ExcelUtil<>(TPaymentHeFeiVo.class); ExcelUtil<TPaymentHeFeiVo> util1 = new ExcelUtil<>(TPaymentHeFeiVo.class);
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>(); ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>(); ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>();
...@@ -1383,7 +1412,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1383,7 +1412,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data.setRowIndex(rowIndex + 1); data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex()); ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) { if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage); errorMessageList.add(new ErrorDetailVO(errorMessage.getLineNum(), errorMessage.getMessage()));
} else { } else {
cachedDataList.add(data); cachedDataList.add(data);
} }
...@@ -1418,12 +1447,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1418,12 +1447,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
unEmpMoneyMap.clear(); unEmpMoneyMap.clear();
injuryMoneyMap.clear(); injuryMoneyMap.clear();
medicalMoneyMap.clear(); medicalMoneyMap.clear();
return R.ok(errorMessageList); return this.judgeAllMessage(errorMessageList);
} }
@Override @Override
public R<List<ErrorMessage>> batchImportPaymentFundInfo(InputStream inputStream) { public R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorDetailVO> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class); ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
// 写法2: // 写法2:
// 匿名内部类 不用额外写一个DemoDataListener // 匿名内部类 不用额外写一个DemoDataListener
...@@ -1446,7 +1475,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1446,7 +1475,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data.setRowIndex(rowIndex + 1); data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex()); ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) { if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage); errorMessageList.add(new ErrorDetailVO(errorMessage.getLineNum(), errorMessage.getMessage()));
} else { } else {
cachedDataList.add(data); cachedDataList.add(data);
} }
...@@ -1475,10 +1504,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1475,10 +1504,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e); log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR); return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
} }
return R.ok(errorMessageList); return this.judgeAllMessage(errorMessageList);
} }
private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList) { private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorDetailVO> errorMessageList) {
HashMap<String, String> areaMap = new HashMap<>(); HashMap<String, String> areaMap = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR(); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
...@@ -1534,33 +1563,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1534,33 +1563,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
//检查数据规范性 //检查数据规范性
if (!Common.isNotNull(infoVo.getEmpIdcard())) { if (!Common.isNotNull(infoVo.getEmpIdcard())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "员工身份证不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "员工身份证不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPayMonth())) { if (!Common.isNotNull(infoVo.getProvidentPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳月份不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "公积金缴纳月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentCreateMonth())) { if (!Common.isNotNull(infoVo.getProvidentCreateMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金生成月份不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "公积金生成月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPercent())) { if (!Common.isNotNull(infoVo.getProvidentPercent())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边比例不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "公积金单边比例不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getUnitProvidentSet())) { if (!Common.isNotNull(infoVo.getUnitProvidentSet())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边基数不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "公积金单边基数不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPayAddr())) { if (!Common.isNotNull(infoVo.getProvidentPayAddr())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳地不可为空!"));
+ CommonConstants.DOWN_LINE_STRING + "公积金缴纳地不可为空!"));
continue; continue;
} }
if (fundMap.size() > CommonConstants.ZERO_INT) { if (fundMap.size() > CommonConstants.ZERO_INT) {
...@@ -1568,14 +1591,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1568,14 +1591,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (null != fund && !fund.getEmpName().equals(infoVo.getEmpName())) { if (null != fund && !fund.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add errorMessageList.add
(new ErrorMessage(infoVo.getRowIndex(), "姓名与身份证信息不一致,请核实后再次尝试!")); (new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), fund.getSocialHousehold(), fund.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING); areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING);
fund = checkAddress(areaArray, areaMap, fund); fund = checkAddress(areaArray, areaMap, fund);
//无对应员工公积金数据 //无对应员工公积金数据
if (null == fund) { if (null == fund) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无对应员工" + infoVo.getEmpName() + 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() CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "的公积金数据(请查验公积金缴纳地)!")); + "的公积金数据(请查验公积金缴纳地)!"));
continue; continue;
...@@ -1598,7 +1621,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1598,7 +1621,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getProvidentSum()).compareTo(BigDecimal.ZERO) != 0) { if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getProvidentSum()).compareTo(BigDecimal.ZERO) != 0) {
//允许覆盖,但已核准表或工资结算或已锁定不允许覆盖 //允许覆盖,但已核准表或工资结算或已锁定不允许覆盖
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" +
infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard() infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "公积金缴费数据,禁止覆盖!")); + "公积金缴费数据,禁止覆盖!"));
continue; continue;
...@@ -1660,9 +1683,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1660,9 +1683,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setFundId(UUID.randomUUID().toString()); paymentInfo.setFundId(UUID.randomUUID().toString());
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName()
+ "_缴费库保存失败!")); , CommonConstants.SAVE_FAILED));
continue; continue;
} else {
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() paymentInfoMap.put(paymentInfo.getProvidentPayAddr()
...@@ -1683,7 +1709,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1683,7 +1709,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
private void importTPaymentSocialHeFei(List<TPaymentHeFeiVo> list, List<ErrorMessage> errorMessageList, private void importTPaymentSocialHeFei(List<TPaymentHeFeiVo> list, List<ErrorDetailVO> errorMessageList,
YifuUser user, String type, Integer rowNumber, YifuUser user, String type, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
...@@ -1713,7 +1739,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1713,7 +1739,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int taskSize = list.size() / partSize + CommonConstants.ONE_INT; int taskSize = list.size() / partSize + CommonConstants.ONE_INT;
int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity(); int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity();
if (taskSize > residualCapacity) { if (taskSize > residualCapacity) {
errorMessageList.add(new ErrorMessage(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE))); errorMessageList.add(new ErrorDetailVO(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE)));
} else { } else {
// -----------------------------生成paymentInfoMap本段开始-------------------------------- // -----------------------------生成paymentInfoMap本段开始--------------------------------
...@@ -1861,7 +1887,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1861,7 +1887,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始-------------------------------- // -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentHeFeiVo> tempList = new ArrayList<>(); List<TPaymentHeFeiVo> tempList = new ArrayList<>();
List<CompletableFuture<List<ErrorMessage>>> completableFutureList = new ArrayList<>(); List<CompletableFuture<List<ErrorDetailVO>>> completableFutureList = new ArrayList<>();
// 创建一个数值格式化对象 // 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance(); NumberFormat numberFormat = NumberFormat.getInstance();
...@@ -1891,7 +1917,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1891,7 +1917,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
try { try {
// 1.list.size()不足partSize,直接执行 // 1.list.size()不足partSize,直接执行
if (list.size() < partSize) { if (list.size() < partSize) {
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, list, areaMap, areaMap2, -> executeImportSocialListThree(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, bigMoneyMap, paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, bigMoneyMap,
...@@ -1905,7 +1931,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1905,7 +1931,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (partSize <= list.size()) { if (partSize <= list.size()) {
// 处理第一个0位元素 // 处理第一个0位元素
final List<TPaymentHeFeiVo> finalList = list.subList(0, 1); final List<TPaymentHeFeiVo> finalList = list.subList(0, 1);
CompletableFuture<List<ErrorMessage>> oneCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> oneCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, finalList, areaMap, -> executeImportSocialListThree(user, finalList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type, paymentInfoInjuryMap, paymentInfoBigMap, type,
...@@ -1919,7 +1945,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1919,7 +1945,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (i % partSize == 0) { if (i % partSize == 0) {
lastIdx = i; lastIdx = i;
List<TPaymentHeFeiVo> finalTempList1 = tempList; List<TPaymentHeFeiVo> finalTempList1 = tempList;
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, finalTempList1 -> executeImportSocialListThree(user, finalTempList1
, areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, , areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap,
paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap, type, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap, type,
...@@ -1946,7 +1972,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1946,7 +1972,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
List<TPaymentHeFeiVo> finalTempList = tempList; List<TPaymentHeFeiVo> finalTempList = tempList;
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, finalTempList, areaMap, -> executeImportSocialListThree(user, finalTempList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList,pensionMoneyMap,
...@@ -1959,7 +1985,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1959,7 +1985,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
boolean computeFlag; boolean computeFlag;
do { do {
computeFlag = false; computeFlag = false;
for (CompletableFuture<List<ErrorMessage>> listCompletableFuture : completableFutureList) { for (CompletableFuture<List<ErrorDetailVO>> listCompletableFuture : completableFutureList) {
if (!listCompletableFuture.isDone()) { if (!listCompletableFuture.isDone()) {
computeFlag = true; computeFlag = true;
} }
...@@ -1973,7 +1999,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1973,7 +1999,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
private List<ErrorMessage> executeImportSocialListThree(YifuUser user, private List<ErrorDetailVO> executeImportSocialListThree(YifuUser user,
List<TPaymentHeFeiVo> list, List<TPaymentHeFeiVo> list,
HashMap<String, String> areaMap, HashMap<String, String> areaMap,
HashMap<String, String> areaMap2, HashMap<String, String> areaMap2,
...@@ -1982,7 +2008,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1982,7 +2008,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
String type, List<ErrorMessage> errorMessageList, String type, List<ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap, ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
...@@ -2033,16 +2059,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2033,16 +2059,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) { if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "姓名与身份证信息不一致,请核实后再次尝试!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
if (socialInfo != null && socialInfo.getSocialStartDate() == null) { if (socialInfo != null && socialInfo.getSocialStartDate() == null) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "的社保起缴日期为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName() , "的社保起缴日期为空!"));
continue; continue;
} }
} }
if (null == socialInfo) { if (null == socialInfo) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无对应员工" + infoVo.getEmpIdcard() + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无对应员工" + infoVo.getEmpIdcard() +
"的社保数据(请查验社保缴纳地)")); "的社保数据(请查验社保缴纳地)"));
continue; continue;
} }
...@@ -2054,8 +2080,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2054,8 +2080,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的养老缴费数据")); infoVo.getEmpIdcard() , "的养老缴费数据"));
continue; continue;
} else { } else {
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
...@@ -2078,7 +2104,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2078,7 +2104,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2091,8 +2117,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2091,8 +2117,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的失业缴费数据")); infoVo.getEmpIdcard() , "的失业缴费数据"));
continue; continue;
} else { } else {
unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2116,7 +2142,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2116,7 +2142,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2129,8 +2155,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2129,8 +2155,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医保缴费数据")); infoVo.getEmpIdcard() , "的医保缴费数据"));
continue; continue;
} else { } else {
medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2155,7 +2181,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2155,7 +2181,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2169,8 +2195,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2169,8 +2195,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的工伤缴费数据")); infoVo.getEmpIdcard() , "的工伤缴费数据"));
continue; continue;
} else { } else {
injuryMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( injuryMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2194,7 +2220,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2194,7 +2220,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
BigDecimalUtils.isNullToZero(payExists.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2208,8 +2234,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2208,8 +2234,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())),
bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医疗救助金缴费数据")); infoVo.getEmpIdcard() , "的医疗救助金缴费数据"));
continue; continue;
} else { } else {
bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2234,7 +2260,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2234,7 +2260,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2333,7 +2359,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2333,7 +2359,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
res = insertAndSTimestamp(payExists); res = insertAndSTimestamp(payExists);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库保存失败!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_FAILED));
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_SUCCESS));
} }
} }
} }
...@@ -2343,24 +2371,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2343,24 +2371,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/** /**
* 导入校验 * 导入校验
**/ **/
private boolean socialThreeCheckBase(List<ErrorMessage> errorMessageList, TPaymentHeFeiVo private boolean socialThreeCheckBase(List<ErrorDetailVO> errorMessageList, TPaymentHeFeiVo
infoVo, String type) { infoVo, String type) {
if (!Common.isNotNull(infoVo.getSocialPayMonth())) { if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳月份不可为空!"));
return true; return true;
} }
if (!Common.isNotNull(infoVo.getSocialCreateMonth())) { if (!Common.isNotNull(infoVo.getSocialCreateMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保生成月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保生成月份不可为空!"));
return true; return true;
} }
if (!Common.isNotNull(infoVo.getSocialPayAddr())) { if (!Common.isNotNull(infoVo.getSocialPayAddr())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳地不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳地不可为空!"));
return true; return true;
} }
if (CommonConstants.ZERO_STRING.equals(type) && !PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType()) if (CommonConstants.ZERO_STRING.equals(type) && !PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())
&& !PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType()) && !PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())
&& !PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) { && !PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无相关险种!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无相关险种!"));
return true; return true;
} }
return false; return false;
......
...@@ -790,4 +790,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -790,4 +790,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
} }
} }
@Override
public int selectSocialFoundByContract(TSocialFundInfo sf) {
return baseMapper.selectSocialFoundByContract(sf);
}
} }
\ No newline at end of file
...@@ -1071,4 +1071,17 @@ ...@@ -1071,4 +1071,17 @@
where EMP_IDCARD = #{infoVo.empIdcard} where EMP_IDCARD = #{infoVo.empIdcard}
</update> </update>
<!--获取count,合同使用-->
<select id="selectSocialFoundByContract" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_social_fund_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and
(
(a.SETTLE_DOMAIN_CODE = #{tSocialFundInfo.settleDomainCode} and a.SOCIAL_REDUCE_STATUS='2' and (a.SETTLE_DOMAIN_CODE_FUND is null or a.SETTLE_DOMAIN_CODE_FUND != #{tSocialFundInfo.settleDomainCode} or a.FUND_REDUCE_STATUS='2'))
or
(a.SETTLE_DOMAIN_CODE_FUND = #{tSocialFundInfo.settleDomainCode} and a.FUND_REDUCE_STATUS='2' and (a.SETTLE_DOMAIN_CODE is null or a.SETTLE_DOMAIN_CODE != #{tSocialFundInfo.settleDomainCode} or a.SOCIAL_REDUCE_STATUS='2'))
)
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment