Commit cf0ed53e authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents 4969961f c610a4f3
...@@ -104,7 +104,7 @@ public class EkpSalaryUtil { ...@@ -104,7 +104,7 @@ public class EkpSalaryUtil {
} }
// 退表到ekp // 退表到ekp
public String backStandardToEKP(String loginName, EkpSalaryBackParam param){ public String backStandardToEKP(EkpSalaryBackParam param){
log.info("推送EKP开始--薪资退表"); log.info("推送EKP开始--薪资退表");
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
try{ try{
...@@ -112,7 +112,7 @@ public class EkpSalaryUtil { ...@@ -112,7 +112,7 @@ public class EkpSalaryUtil {
//把ModelingAppModelParameterAddForm转换成MultiValueMap //把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>(); MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject()); wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"" + loginName+ "\"}"); wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus()); wholeForm.add("docStatus", ekpProperties.getDocStatus());
String formValues = new ObjectMapper().writeValueAsString(param); String formValues = new ObjectMapper().writeValueAsString(param);
wholeForm.add("formValues", formValues); wholeForm.add("formValues", formValues);
......
...@@ -24,5 +24,9 @@ public class EkpSalaryBackParam implements Serializable { ...@@ -24,5 +24,9 @@ public class EkpSalaryBackParam implements Serializable {
* 薪酬申请编号 * 薪酬申请编号
**/ **/
private String fd_3b3c293811c0ee; private String fd_3b3c293811c0ee;
/**
* 薪酬推送姓名(英文的登录名)
**/
private String fd_3b422d73d73e02;
} }
...@@ -67,6 +67,12 @@ public class InsuranceRefundCheck implements Serializable { ...@@ -67,6 +67,12 @@ public class InsuranceRefundCheck implements Serializable {
@Schema(description = "保单结束日期") @Schema(description = "保单结束日期")
private String policyEnd; private String policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/** /**
* 减员状态 1待减员 2减员中3减员退回 * 减员状态 1待减员 2减员中3减员退回
*/ */
......
...@@ -578,7 +578,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -578,7 +578,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE); return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -587,7 +587,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -587,7 +587,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_INT != data.getIsTrue()){ if (CommonConstants.ONE_INT != data.getIsTrue()){
return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
} }
} }*/
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){ if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
return R.failed(InsurancesConstants.POLICY_START_PARSE_ERROR); return R.failed(InsurancesConstants.POLICY_START_PARSE_ERROR);
...@@ -717,7 +717,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -717,7 +717,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE); return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -726,7 +726,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -726,7 +726,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_INT != data.getIsTrue()){ if (CommonConstants.ONE_INT != data.getIsTrue()){
return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
} }
} }*/
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, byId.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, byId.getId())
...@@ -920,17 +920,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -920,17 +920,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT")); param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
} }
List<InsuranceExportListVO> insuranceExportList; List<InsuranceExportListVO> insuranceExportList;
//如果是待投保状态,sql中HANDLED_BY过滤条件不需要,这里强制变为null
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
param.setCreateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集 //如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportListBySelect(param.getIdList()); insuranceExportList = baseMapper.getInsuranceExportListBySelect(param.getIdList());
if (CollectionUtils.isNotEmpty(insuranceExportList)){
for (InsuranceExportListVO exportListVO : insuranceExportList) {
if (exportListVO.getBuyHandleStatus() != CommonConstants.ONE_INT){
return R.failed(InsurancesConstants.CHANGE_ERROR);
}
}
}
}else { }else {
insuranceExportList = baseMapper.getInsuranceExportList(param); insuranceExportList = baseMapper.getInsuranceExportList(param);
} }
...@@ -1984,7 +1980,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1984,7 +1980,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -1995,7 +1991,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1995,7 +1991,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
try{ try{
...@@ -2304,7 +2300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2304,7 +2300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -2315,7 +2311,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2315,7 +2311,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
try{ try{
...@@ -2686,7 +2682,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2686,7 +2682,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getReplaceEmpName()); checkIdCard.setName(param.getReplaceEmpName());
checkIdCard.setIdCard(param.getReplaceEmpIdcardNo()); checkIdCard.setIdCard(param.getReplaceEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -2697,7 +2693,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2697,7 +2693,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){ if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME); param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME);
...@@ -3536,6 +3532,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3536,6 +3532,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT")); param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
} }
List<RefundExportListVo> refundExportList; List<RefundExportListVo> refundExportList;
//如果是待减员状态,sql中UPDATE_BY过滤条件不需要,这里强制变为null
if(param.getReduceHandleStatus() == CommonConstants.ONE_INT){
param.setCreateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集 //如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList()); refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList());
...@@ -4741,6 +4741,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4741,6 +4741,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//购买标准
String buyStandard = param.getBuyStandard();
if (StringUtils.isBlank(buyStandard)){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
errorList.add(param);
continue;
}
// 身份证号位数校验(18 位合法) // 身份证号位数校验(18 位合法)
if (!ValidityUtil.validateIDCard(param.getEmpIdcardNo())){ if (!ValidityUtil.validateIDCard(param.getEmpIdcardNo())){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE); param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
...@@ -4768,12 +4775,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4768,12 +4775,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT) queryWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TInsuranceDetail ::getEmpName,empName ) .eq(TInsuranceDetail::getEmpName,empName )
.eq(TInsuranceDetail ::getEmpIdcardNo,empIdCardNo ) .eq(TInsuranceDetail::getEmpIdcardNo,empIdCardNo )
.eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName ) .eq(TInsuranceDetail::getInsuranceCompanyName,insuranceCompanyName )
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName) .eq(TInsuranceDetail::getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart)) .eq(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(policyStart))
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd)) .eq(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd))
.eq(TInsuranceDetail::getBuyStandard,buyStandard)
.orderByDesc(TInsuranceDetail::getUpdateTime) .orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL); .last(CommonConstants.LAST_ONE_SQL);
List<TInsuranceDetail> list = list(queryWrapper); List<TInsuranceDetail> list = list(queryWrapper);
......
...@@ -407,6 +407,9 @@ ...@@ -407,6 +407,9 @@
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.createBy != null and param.createBy.trim() != ''">
and a.HANDLED_BY = #{param.createBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
...@@ -946,6 +949,9 @@ ...@@ -946,6 +949,9 @@
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.createBy != null and param.createBy.trim() != ''">
and refund.UPDATE_BY = #{param.createBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
......
...@@ -362,12 +362,15 @@ public class TSalaryAccount extends BaseEntity { ...@@ -362,12 +362,15 @@ public class TSalaryAccount extends BaseEntity {
private Integer isRepeat; private Integer isRepeat;
/** /**
* 是否个人承担部分税费:0否1是 * 是否个人承担部分税费
* 公司承担全部税费0
* 个人承担部分税费1
* 个人承担全部税费2
*/ */
@ExcelAttribute(name = "是否个人承担部分税费:0否1是", maxLength = 1) @ExcelAttribute(name = "是否个人承担部分税费", maxLength = 8, readConverterExp = "0=公司承担全部税费,1=个人承担部分税费,2=个人承担全部税费")
@Length(max = 1, message = "是否个人承担部分税费:0否1是不能超过1个字符") @Length(max = 1, message = "是否个人承担部分税费不能超过1个字符")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否个人承担部分税费:0否1是") @ExcelProperty("是否个人承担部分税费")
private String isPersonTax; private String isPersonTax;
/** /**
* 应发薪酬(劳务费、稿酬) * 应发薪酬(劳务费、稿酬)
......
...@@ -283,12 +283,15 @@ public class TSalaryAccountVo implements Serializable { ...@@ -283,12 +283,15 @@ public class TSalaryAccountVo implements Serializable {
private String bankCity; private String bankCity;
/** /**
* 是否个人承担部分税费:0否1是 * 是否个人承担部分税费
* 公司承担全部税费0
* 个人承担部分税费1
* 个人承担全部税费2
*/ */
@ExcelAttribute(name = "是否个人承担部分税费:0否1是", maxLength = 1) @ExcelAttribute(name = "是否个人承担部分税费", maxLength = 8)
@Length(max = 1, message = "是否个人承担部分税费:0否1是不能超过1个字符") @Length(max = 8, message = "是否个人承担部分税费:0否1是2全不能超过1个字符")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否个人承担部分税费:0否1是") @ExcelProperty("是否个人承担部分税费")
private String isPersonTax; private String isPersonTax;
/** /**
* 应发薪酬(劳务费、稿酬) * 应发薪酬(劳务费、稿酬)
......
...@@ -184,6 +184,7 @@ public class TSalaryStandardController { ...@@ -184,6 +184,7 @@ public class TSalaryStandardController {
return R.failed("未找到工资表"); return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[0] } else if (s.getStatus() == SalaryConstants.STATUS[0]
|| s.getStatus() == SalaryConstants.STATUS[5] || s.getStatus() == SalaryConstants.STATUS[5]
|| s.getStatus() == SalaryConstants.STATUS[6]
|| s.getStatus() == SalaryConstants.STATUS[7]) { || s.getStatus() == SalaryConstants.STATUS[7]) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null) { if (user != null) {
......
...@@ -46,4 +46,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> { ...@@ -46,4 +46,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
List<TSalaryEmployeeExportVo> noPageDiy( @Param("tSalaryEmployee") TSalaryEmployeeSearchVo searchVo, @Param("idList")List<String> idList); List<TSalaryEmployeeExportVo> noPageDiy( @Param("tSalaryEmployee") TSalaryEmployeeSearchVo searchVo, @Param("idList")List<String> idList);
List<TSalaryEmployee> getListByIdCard(@Param("idCardList") List<String> idCardList); List<TSalaryEmployee> getListByIdCard(@Param("idCardList") List<String> idCardList);
TSalaryEmployee getByEmpIdCard(@Param("empIdCard") String empIdCard);
} }
...@@ -51,13 +51,14 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -51,13 +51,14 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo); List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo);
/** /**
* @param notLabour 是:非劳务费人员。 否:劳务费,不保存
* @param employee * @param employee
* @Description: 新建薪资员工,返回值为null,保存成功。其余都是失败原因 * @Description: 新建薪资员工,返回值为null,保存成功。其余都是失败原因
* @Author: hgw * @Author: hgw
* @Date: 2022/8/17 16:03 * @Date: 2022/8/17 16:03
* @return: java.lang.String * @return: java.lang.String
**/ **/
String saveNewSalaryEmployee(TSalaryEmployee employee); String saveNewSalaryEmployee(boolean notLabour, TSalaryEmployee employee);
/** /**
* @param inputStream * @param inputStream
...@@ -68,4 +69,6 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -68,4 +69,6 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/ **/
R<List<ErrorMessage>> batchUpdateSalaryEmployee(InputStream inputStream); R<List<ErrorMessage>> batchUpdateSalaryEmployee(InputStream inputStream);
TSalaryEmployee getByEmpIdCard(String empIdCard);
} }
...@@ -1683,7 +1683,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1683,7 +1683,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal nowTaxY; BigDecimal nowTaxY;
BigDecimal relaySalary; BigDecimal relaySalary;
BigDecimal salaryTax = BigDecimal.ZERO; BigDecimal salaryTax = BigDecimal.ZERO;
if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) { if (SalaryConstants.IS_PERSON_OTHER.equals(a.getIsPersonTax())) {
nowTaxT = getNowTax(actualSalarySumNow); nowTaxT = getNowTax(actualSalarySumNow);
if (actualSalarySum.compareTo(actualSalarySumNow) != 0) { if (actualSalarySum.compareTo(actualSalarySumNow) != 0) {
actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumSalaryTax, actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumSalaryTax, actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
...@@ -1700,7 +1700,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1700,7 +1700,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
a.setSalaryTax(salaryTax); a.setSalaryTax(salaryTax);
a.setSalaryTaxUnit(nowTaxT); a.setSalaryTaxUnit(nowTaxT);
a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax)); a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax));
} else { } else if (SalaryConstants.IS_COMPANY.equals(a.getIsPersonTax())) {
getNowTax(actualSalarySumNow); getNowTax(actualSalarySumNow);
nowTaxY = getNowTax(actualSalarySum); nowTaxY = getNowTax(actualSalarySum);
a.setActualSalary(actualSalarySumNow); a.setActualSalary(actualSalarySumNow);
...@@ -1709,6 +1709,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1709,6 +1709,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
a.setSalaryTaxUnit(nowTaxY); a.setSalaryTaxUnit(nowTaxY);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
} else {
// TODO-@胡 :个人承担全部税费,实发要变为应发,推算出实发、个税
nowTaxY = BigDecimal.ZERO;
relaySalary = a.getActualSalary();
} }
a.setRelaySalaryUnit(relaySalary); a.setRelaySalaryUnit(relaySalary);
a.setRelaySalary(actualSalarySumNow); a.setRelaySalary(actualSalarySumNow);
......
...@@ -274,6 +274,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -274,6 +274,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
/** /**
* @param notLabour 是:非劳务费人员。 否:劳务费,不保存
* @param employee * @param employee
* @Description: 新建薪资员工,返回值为null,保存成功。其余都是失败原因 * @Description: 新建薪资员工,返回值为null,保存成功。其余都是失败原因
* @Author: hgw * @Author: hgw
...@@ -281,7 +282,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -281,7 +282,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
* @return: java.lang.String * @return: java.lang.String
**/ **/
@Override @Override
public String saveNewSalaryEmployee(TSalaryEmployee employee) { public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) {
if (Common.isNotNull(employee.getEmpName()) && Common.isNotNull(employee.getEmpIdcard())) { if (Common.isNotNull(employee.getEmpName()) && Common.isNotNull(employee.getEmpIdcard())) {
// 银行卡 // 银行卡
if (Common.isNotNull(employee.getBankNo())) { if (Common.isNotNull(employee.getBankNo())) {
...@@ -306,22 +307,6 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -306,22 +307,6 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return pre + SalaryConstants.CHECK_NO_RESPONSE; return pre + SalaryConstants.CHECK_NO_RESPONSE;
} }
} }
// if (Common.isNotNull(employee.getBankNo())) {
// // 调用校验服务
// TCheckBankNo checkIdCard = new TCheckBankNo();
// checkIdCard.setName(employee.getEmpName());
// checkIdCard.setBankNo(employee.getBankNo());
// R<TCheckBankNo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
// , "/tcheckbankno/inner/checkBankNo", checkIdCard, TCheckBankNo.class, SecurityConstants.FROM_IN);
// if (checkListR != null && checkListR.getData() != null) {
// TCheckBankNo check = checkListR.getData();
// if (!CommonConstants.ONE_STRING.equals(check.getResult())) {
// return check.getMessage();
// }
// } else {
// return "校验服务未找到银行卡,请联系管理员";
// }
// }
// 手机号 // 手机号
if (Common.isNotNull(employee.getEmpPhone())) { if (Common.isNotNull(employee.getEmpPhone())) {
// 调用校验服务-校验手机号 // 调用校验服务-校验手机号
...@@ -342,7 +327,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -342,7 +327,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
} }
} }
if (!notLabour) {
this.save(employee); this.save(employee);
}
return null; return null;
} }
...@@ -442,7 +429,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -442,7 +429,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// 人员Map // 人员Map
Map<String, TSalaryEmployee> empMap = new HashMap<>(); Map<String, TSalaryEmployee> empMap = new HashMap<>();
for (TSalaryEmployee e : empList) { for (TSalaryEmployee e : empList) {
empMap.put(e.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + e.getDeptNo(), e); empMap.put(e.getEmpIdcard(), e);
} }
TSalaryEmployee emp; TSalaryEmployee emp;
// 开户行省市的区域暂存 // 开户行省市的区域暂存
...@@ -451,8 +438,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -451,8 +438,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i); excel = excelVOList.get(i);
if (excel != null) { if (excel != null) {
if (Common.isNotNull(excel.getEmpIdcard()) && Common.isNotNull(excel.getDeptNo())) { if (Common.isNotNull(excel.getEmpIdcard())) {
emp = empMap.get(excel.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + excel.getDeptNo()); emp = empMap.get(excel.getEmpIdcard());
if (Common.isNotNull(emp)) { if (Common.isNotNull(emp)) {
curTaxMonth = false; curTaxMonth = false;
if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length()==6) { if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length()==6) {
...@@ -501,11 +488,17 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -501,11 +488,17 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.NOT_HAVE_EMP)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.NOT_HAVE_EMP));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.IDCARD_DEPT_NO_MUST)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.ID_CARD_MUST));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(CommonConstants.ZERO_INT, SalaryConstants.IDCARD_DEPT_NO_MUST)); errorMessageList.add(new ErrorMessage(CommonConstants.ZERO_INT, SalaryConstants.DATA_MUST));
} }
} }
} }
@Override
public TSalaryEmployee getByEmpIdCard(String empIdCard) {
return baseMapper.getByEmpIdCard(empIdCard);
}
} }
...@@ -416,6 +416,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -416,6 +416,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if (sf != null && Common.isNotNull(sf.getId())) { if (sf != null && Common.isNotNull(sf.getId())) {
if (sf.getStatus() != null && !SalaryConstants.AUDIT_STATUS[0].equals(sf.getStatus()) if (sf.getStatus() != null && !SalaryConstants.AUDIT_STATUS[0].equals(sf.getStatus())
&& !SalaryConstants.AUDIT_STATUS[5].equals(sf.getStatus()) && !SalaryConstants.AUDIT_STATUS[5].equals(sf.getStatus())
&& !SalaryConstants.AUDIT_STATUS[6].equals(sf.getStatus())
&& !SalaryConstants.AUDIT_STATUS[7].equals(sf.getStatus())) { && !SalaryConstants.AUDIT_STATUS[7].equals(sf.getStatus())) {
return R.failed("状态为:【" + SalaryConstants.AUDIT_STATUS_STRING[sf.getStatus()] + "】,不可删除"); return R.failed("状态为:【" + SalaryConstants.AUDIT_STATUS_STRING[sf.getStatus()] + "】,不可删除");
} }
...@@ -908,15 +909,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -908,15 +909,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
param.setFd_3b3c2935c13056(ss.getDeptNo()); param.setFd_3b3c2935c13056(ss.getDeptNo());
param.setFd_3b3c293811c0ee(ss.getApplyNo()); param.setFd_3b3c293811c0ee(ss.getApplyNo());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String loginName;
if (user != null) { if (user != null) {
loginName = user.getUsername(); param.setFd_3b422d73d73e02(user.getUsername());
} else { } else {
loginName = ss.getCreateName(); param.setFd_3b422d73d73e02("");
} }
String sendBack = ekpSalaryUtil.backStandardToEKP(loginName, param); String sendBack = ekpSalaryUtil.backStandardToEKP(param);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.backStandardToEKP(loginName, param); sendBack = ekpSalaryUtil.backStandardToEKP(param);
} }
if (Common.isNotNull(sendBack) && sendBack.length() == 32) { if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
// 更新薪资为确认不通过 // 更新薪资为确认不通过
...@@ -936,6 +936,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -936,6 +936,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
, Object.class, SecurityConstants.FROM_IN); , Object.class, SecurityConstants.FROM_IN);
// 添加流程进展明细 // 添加流程进展明细
if (user != null) { if (user != null) {
ss.setRemark(" ");
this.saveRecordLog(ss, user, CommonConstants.ZERO_STRING, "从EKP退表"); this.saveRecordLog(ss, user, CommonConstants.ZERO_STRING, "从EKP退表");
} }
return R.ok(); return R.ok();
......
...@@ -118,18 +118,15 @@ public class SalaryAccountUtil implements Serializable { ...@@ -118,18 +118,15 @@ public class SalaryAccountUtil implements Serializable {
// 当前年月 // 当前年月
String nowMonth = DateUtil.addMonth(CommonConstants.ZERO_INT); String nowMonth = DateUtil.addMonth(CommonConstants.ZERO_INT);
String must; String must;
// 当前年(用来获取已有薪资的计税月份,覆盖填写的计税月份2022-1-19 17:11:24hgw根据郭华照等人提出的需求
int nowYear = Integer.parseInt(nowMonth.substring(0, 4));
// 当前结算年,已有工资的最小计税月
String minTaxMonth;
// 开户行省市的区域暂存
String areaStr;
// 员工新建保存的反馈,null 保存成功,其他,保存失败,反馈原因
String saveNewEmpReturn;
// 每一行是否有错误 true : 无错误 // 每一行是否有错误 true : 无错误
boolean errorFlag; boolean errorFlag;
// 是否含有年终奖 false 没有 // 是否含有年终奖 false 没有
boolean annualBonusFlag; boolean annualBonusFlag;
// 是否 不是劳务费(劳务费不用进档,不用档案信息)
boolean notLabour = true;
if (CommonConstants.THREE_STRING.equals(salaryType)) {
notLabour = false;
}
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
annualBonusFlag = false; annualBonusFlag = false;
errorFlag = true; errorFlag = true;
...@@ -309,7 +306,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -309,7 +306,7 @@ public class SalaryAccountUtil implements Serializable {
continue; continue;
} }
if ("3".equals(salaryType) && actualSalarySum == null) { if ("3".equals(salaryType) && actualSalarySum == null) {
error = "第" + (i + 2) + "行:【实发劳务费】列_不可缺少"; error = "第" + (i + 2) + "行:【劳务费】列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
...@@ -367,152 +364,48 @@ public class SalaryAccountUtil implements Serializable { ...@@ -367,152 +364,48 @@ public class SalaryAccountUtil implements Serializable {
if (newEmp != null && Common.isNotNull(entity.getEmpPhone()) && Common.isEmpty(newEmp.getEmpPhone())) { if (newEmp != null && Common.isNotNull(entity.getEmpPhone()) && Common.isEmpty(newEmp.getEmpPhone())) {
newEmp.setEmpPhone(entity.getEmpPhone()); newEmp.setEmpPhone(entity.getEmpPhone());
} }
if (emp == null) { if (emp == null && notLabour && Common.isNotNull(newEmp.getEmpIdcard())) {
if (isNewEmployee) { emp = tSalaryEmployeeService.getByEmpIdCard(newEmp.getEmpIdcard());
//增加工资人员档案:(临时使用) if (emp != null) {
if (newEmp != null) { emp.setDeptId(dept.getId());
if (Common.isEmpty(newEmp.getEmpName())) { emp.setDeptName(dept.getDepartName());
error = "第" + (i + 2) + "行:新员工-姓名-不可为空!"; emp.setDeptNo(dept.getDepartNo());
errorList.add(new ErrorMessage((i + 2), error)); emp.setUnitId(dept.getCustomerId());
continue; emp.setUnitName(dept.getCustomerName());
} emp.setUnitNo(dept.getCustomerCode());
if (Common.isEmpty(newEmp.getEmpIdcard())) { tSalaryEmployeeService.updateById(emp);
error = "第" + (i + 2) + "行:新员工-身份证号-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
// 2021-8-31 hgw2.6.5新增手机号校验
if (Common.isEmpty(newEmp.getEmpPhone())) {
error = "第" + (i + 2) + "行:新员工-手机号码-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
} else if (!ValidityUtil.validateEmpPhone(newEmp.getEmpPhone())) {
error = "第" + (i + 2) + "行:新员工-手机号码格式错误:" + newEmp.getEmpPhone();
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (entity != null) {
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (Common.isEmpty(entity.getTaxMonth())) {
error = "第" + (i + 2) + "行:新员工-计税月份-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
} else if (entity.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + (i + 2) + "行:新员工-计税月份-长度小于6:" + entity.getTaxMonth();
errorList.add(new ErrorMessage((i + 2), error));
continue;
} else if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + (i + 2) + "行:新员工-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage((i + 2), error));
continue;
} else {
newEmp.setTaxMonth(entity.getTaxMonth());
} }
} }
//工资发放方式(0现金/1银行)/2线下 && salaryGiveTime == true :立即发;false:暂停发:则不考虑开户行等 // 劳务费要使用人员信息
//银行+立即发,则考虑和开户行卡号 if (!notLabour) {
if (SalaryConstants.SALARY_STYLE_BANK.equals(salaryStyle) && salaryGiveTimeFlag) { R<TSalaryEmployee> eR = this.getNewEmp(newEmp, i, errorList, notLabour, entity, salaryType, dept, user
if (Common.isEmpty(entity.getBankName())) { , salaryStyle, salaryGiveTimeFlag, invoiceTitle, tSalaryAccountService
error = "第" + (i + 2) + "行:新员工-开户行总行-不可为空!"; , tSalaryEmployeeService);
errorList.add(new ErrorMessage((i + 2), error)); if (eR.getCode() != 200) {
continue; continue;
} else { } else {
newEmp.setBankName(entity.getBankName()); emp = eR.getData();
}
if (Common.isEmpty(entity.getBankProvince()) || Common.isEmpty(entity.getBankCity())) {
error = "第" + (i + 2) + "行:新员工-开户行省、市-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
} else {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr);
} else {
error = "第" + (i + 2) + "行:新员工-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr);
} else {
error = "第" + (i + 2) + "行:新员工-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
} }
if (Common.isEmpty(entity.getBankNo())) { } else if (emp == null) {
error = "第" + (i + 2) + "行:新员工-银行卡号-不可为空!"; if (isNewEmployee) {
errorList.add(new ErrorMessage((i + 2), error)); R<TSalaryEmployee> eR = this.getNewEmp(newEmp, i, errorList, notLabour, entity, salaryType, dept, user
, salaryStyle, salaryGiveTimeFlag, invoiceTitle, tSalaryAccountService
, tSalaryEmployeeService);
if (eR.getCode() != 200) {
continue; continue;
} else { } else {
newEmp.setBankNo(entity.getBankNo()); emp = eR.getData();
}
if (Common.isNotNull(entity.getBankSubName())) {
newEmp.setBankSubName(entity.getBankSubName());
} }
} else { } else {
if (Common.isNotNull(entity.getBankName())) { if ("4".equals(salaryType)) {
newEmp.setBankName(entity.getBankName()); error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
}
if (Common.isNotNull(entity.getBankNo())) {
newEmp.setBankNo(entity.getBankNo());
}
if (Common.isNotNull(entity.getBankSubName())) {
newEmp.setBankSubName(entity.getBankSubName());
}
if (Common.isNotNull(entity.getBankProvince())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr);
}
if (Common.isNotNull(entity.getBankCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr);
}
}
}
}
}
newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName());
newEmp.setDeptNo(dept.getDepartNo());
newEmp.setUnitId(dept.getCustomerId());
newEmp.setUnitName(dept.getCustomerName());
newEmp.setUnitNo(dept.getCustomerCode());
newEmp.setCreateBy(String.valueOf(user.getId()));
newEmp.setCreateName(user.getNickname());
newEmp.setInvoiceTitle(invoiceTitle);
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
minTaxMonth = tSalaryAccountService.getMinTaxMonthByNowYear(newEmp.getEmpIdcard(), nowYear);
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (i + 2) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} } else if (notLabour) {
} error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
saveNewEmpReturn = tSalaryEmployeeService.saveNewSalaryEmployee(newEmp);
if (Common.isNotNull(saveNewEmpReturn)) {
error = "第" + (i + 2) + "行:该员工新建失败:【" + saveNewEmpReturn + "】";
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
emp = newEmp;
} else {
if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
} else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
}
errorList.add(new ErrorMessage((i + 2), error));
continue;
} }
} }
if (emp != null) { if (emp != null) {
...@@ -653,9 +546,9 @@ public class SalaryAccountUtil implements Serializable { ...@@ -653,9 +546,9 @@ public class SalaryAccountUtil implements Serializable {
} }
} else { } else {
if ("3".equals(salaryType) || "4".equals(salaryType)) { if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
} else { } else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; error = "第" + (i + 2) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
} }
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
...@@ -707,6 +600,163 @@ public class SalaryAccountUtil implements Serializable { ...@@ -707,6 +600,163 @@ public class SalaryAccountUtil implements Serializable {
this.setErrorInfo(errorList); this.setErrorInfo(errorList);
} }
/**
* @Description: 处理表里人员相关数据
* @Author: hgw
* @Date: 2022/11/9 16:07
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee>
**/
private R<TSalaryEmployee> getNewEmp(TSalaryEmployee newEmp, int i, List<ErrorMessage> errorList, boolean notLabour
, TSalaryAccountVo entity, String salaryType, TSettleDomainSelectVo dept, YifuUser user, String salaryStyle
, boolean salaryGiveTimeFlag, String invoiceTitle, TSalaryAccountService tSalaryAccountService
, TSalaryEmployeeService tSalaryEmployeeService) {
String newEmpStr = "新员工";
if (!notLabour) {
newEmpStr = "劳务费";
}
String error;
String nowMonth = DateUtil.addMonth(CommonConstants.ZERO_INT);
//增加工资人员档案:(临时使用)
if (newEmp != null) {
if (Common.isEmpty(newEmp.getEmpName())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-姓名-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
if (Common.isEmpty(newEmp.getEmpIdcard())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-身份证号-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
// 2021-8-31 hgw2.6.5新增手机号校验
if (Common.isEmpty(newEmp.getEmpPhone())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-手机号码-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else if (!ValidityUtil.validateEmpPhone(newEmp.getEmpPhone())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-手机号码格式错误:" + newEmp.getEmpPhone();
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
} else {
newEmp = new TSalaryEmployee();
}
if (entity != null) {
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (Common.isEmpty(entity.getTaxMonth())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-计税月份-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else if (entity.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-计税月份-长度小于6:" + entity.getTaxMonth();
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else {
newEmp.setTaxMonth(entity.getTaxMonth());
}
}
//工资发放方式(0现金/1银行)/2线下 && salaryGiveTime == true :立即发;false:暂停发:则不考虑开户行等
//银行+立即发,则考虑和开户行卡号
String areaStr;
if (SalaryConstants.SALARY_STYLE_BANK.equals(salaryStyle) && salaryGiveTimeFlag) {
if (Common.isEmpty(entity.getBankName())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行总行-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else {
newEmp.setBankName(entity.getBankName());
}
if (Common.isEmpty(entity.getBankProvince()) || Common.isEmpty(entity.getBankCity())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行省、市-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr);
} else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr);
} else {
error = "第" + (i + 2) + "行:" + newEmpStr + "-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
}
if (Common.isEmpty(entity.getBankNo())) {
error = "第" + (i + 2) + "行:" + newEmpStr + "-银行卡号-不可为空!";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
} else {
newEmp.setBankNo(entity.getBankNo());
}
if (Common.isNotNull(entity.getBankSubName())) {
newEmp.setBankSubName(entity.getBankSubName());
}
} else {
if (Common.isNotNull(entity.getBankName())) {
newEmp.setBankName(entity.getBankName());
}
if (Common.isNotNull(entity.getBankNo())) {
newEmp.setBankNo(entity.getBankNo());
}
if (Common.isNotNull(entity.getBankSubName())) {
newEmp.setBankSubName(entity.getBankSubName());
}
if (Common.isNotNull(entity.getBankProvince())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(areaStr);
}
if (Common.isNotNull(entity.getBankCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(areaStr);
}
}
}
}
}
newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName());
newEmp.setDeptNo(dept.getDepartNo());
newEmp.setUnitId(dept.getCustomerId());
newEmp.setUnitName(dept.getCustomerName());
newEmp.setUnitNo(dept.getCustomerCode());
newEmp.setCreateBy(String.valueOf(user.getId()));
newEmp.setCreateName(user.getNickname());
newEmp.setInvoiceTitle(invoiceTitle);
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
int nowYear = Integer.parseInt(nowMonth.substring(0, 4));
String minTaxMonth = tSalaryAccountService.getMinTaxMonthByNowYear(newEmp.getEmpIdcard(), nowYear);
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (i + 2) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
}
String saveNewEmpReturn = tSalaryEmployeeService.saveNewSalaryEmployee(notLabour, newEmp);
if (Common.isNotNull(saveNewEmpReturn)) {
error = "第" + (i + 2) + "行:该员工新建失败:【" + saveNewEmpReturn + "】";
errorList.add(new ErrorMessage((i + 2), error));
return R.failed();
}
return R.ok(newEmp);
}
/** /**
* 按类型统一返回String内容 * 按类型统一返回String内容
* *
......
...@@ -463,6 +463,12 @@ public class SalaryCommonUtil implements Serializable { ...@@ -463,6 +463,12 @@ public class SalaryCommonUtil implements Serializable {
field.set(entity, "0"); field.set(entity, "0");
} else if ("单独".equals(cellValueStr)) { } else if ("单独".equals(cellValueStr)) {
field.set(entity, "1"); field.set(entity, "1");
} else if (SalaryConstants.IS_COMPANY.equals(cellValueStr)) {
field.set(entity, SalaryConstants.IS_PERSON_TAX_ARR[0]);
} else if (SalaryConstants.IS_PERSON_OTHER.equals(cellValueStr)) {
field.set(entity, SalaryConstants.IS_PERSON_TAX_ARR[1]);
} else if (SalaryConstants.IS_PERSON.equals(cellValueStr)) {
field.set(entity, SalaryConstants.IS_PERSON_TAX_ARR[2]);
} else { } else {
field.set(entity, cellValueStr); field.set(entity, cellValueStr);
} }
......
...@@ -21,7 +21,7 @@ public class SalaryConstants { ...@@ -21,7 +21,7 @@ public class SalaryConstants {
* @Date: 2019/10/10 14:55 * @Date: 2019/10/10 14:55
* @return: * @return:
**/ **/
public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"}; public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"};
...@@ -142,7 +142,16 @@ public class SalaryConstants { ...@@ -142,7 +142,16 @@ public class SalaryConstants {
public static final String ACTUAL_SALARY_SUM = "个人实发合计"; public static final String ACTUAL_SALARY_SUM = "个人实发合计";
//个人实发合计 //个人实发合计
public static final String ACTUAL_SALARY_SUM_JAVA = "actualSalarySum"; public static final String ACTUAL_SALARY_SUM_JAVA = "actualSalarySum";
// 是否个人承担部分税费
public static final String IS_PERSON_TAX = "isPersonTax";
// 是否个人承担部分税费数组
public static final String IS_PERSON_TAX_ARR[] = {"0","1","2"};
// 公司承担全部税费0
public static final String IS_COMPANY = "公司承担全部税费";
// 个人承担部分税费1
public static final String IS_PERSON_OTHER = "个人承担部分税费";
// 个人承担全部税费2
public static final String IS_PERSON = "个人承担全部税费";
//个人代扣 //个人代扣
public static final String PDEDUCTION_JAVA = "pdeduction"; public static final String PDEDUCTION_JAVA = "pdeduction";
//单位代扣 //单位代扣
...@@ -168,9 +177,9 @@ public class SalaryConstants { ...@@ -168,9 +177,9 @@ public class SalaryConstants {
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!"; public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
public static final String LINE_EMP = "行:员工:"; public static final String LINE_EMP = "行:员工:";
public static final String IDCARD_DEPT_NO_MUST = "身份证、项目编码不可为空!"; public static final String DATA_MUST = "未获取到表格数据!";
public static final String ID_CARD_MUST = "身份证不可为空!";
public static final String NOT_HAVE_EMP = "根据身份证、项目编码未找到人员!"; public static final String NOT_HAVE_EMP = "根据身份证、项目编码未找到人员!";
public static final String TAX_MONTH_CUR = "计税月份已存在,不可更新,请清空计税月份单元格内容!";
public static final String PROVINCE_ERROR = "开户行省错误!"; public static final String PROVINCE_ERROR = "开户行省错误!";
public static final String CITY_ERROR = "开户行市错误!"; public static final String CITY_ERROR = "开户行市错误!";
public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!"; public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!";
......
...@@ -221,4 +221,13 @@ ...@@ -221,4 +221,13 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<!-- 按身份证查询人员 -->
<select id="getByEmpIdCard" resultMap="tSalaryEmployeeMap" >
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_employee a
where a.EMP_IDCARD = #{empIdCard}
ORDER BY a.BANK_CITY DESC LIMIT 1
</select>
</mapper> </mapper>
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.entity; package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
...@@ -630,4 +632,42 @@ public class TPaymentInfo extends BaseEntity { ...@@ -630,4 +632,42 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("工资公积金结算状态") @ExcelProperty("工资公积金结算状态")
private String salaryFundFlag; private String salaryFundFlag;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String ylSameFlg;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String dbSameFlg;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String sySameFlg;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String brSameFlg;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String gsSameFlg;
/**
* 是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String ybSameFlg;
} }
...@@ -70,6 +70,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -70,6 +70,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -304,9 +305,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -304,9 +305,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<String> idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING); List<String> idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
TPaymentInfo paymentInfo; TPaymentInfo paymentInfo;
if (idList != null) {
for (String id : idList) { for (String id : idList) {
paymentInfo = baseMapper.selectById(id); paymentInfo = baseMapper.selectById(id);
if (null != paymentInfo && Common.isNotNull(paymentInfo.getId())) {
if ((!user.getId().equals(paymentInfo.getCreateBy()) && if ((!user.getId().equals(paymentInfo.getCreateBy()) &&
!CommonConstants.ONE_STRING.equals(user.getId())) || !CommonConstants.ONE_STRING.equals(user.getId())) ||
CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) { CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) {
...@@ -541,6 +542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -541,6 +542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (TPaymentInfo info : paymentInfos) { for (TPaymentInfo info : paymentInfos) {
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitPensionMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalPensionMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalPensionMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoPensionMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.YL)) {
info.setYlSameFlg("1");
}
paymentInfoPensionMap.put(info.getSocialPayAddr() paymentInfoPensionMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -554,6 +566,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -554,6 +566,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getPersonalBigmailmentMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getPersonalBigmailmentMoney()),
BigDecimalUtils.isNullToZero(info.getUnitBigmailmentMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getUnitBigmailmentMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoBigMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.DB)) {
info.setDbSameFlg("1");
}
paymentInfoBigMap.put(info.getSocialPayAddr() paymentInfoBigMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -567,6 +590,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -567,6 +590,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitUnemploymentMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalUnemploymentMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalUnemploymentMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoUnEmpMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.SY)) {
info.setSySameFlg("1");
}
paymentInfoUnEmpMap.put(info.getSocialPayAddr() paymentInfoUnEmpMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -579,6 +613,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -579,6 +613,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
, info); , info);
} }
if (BigDecimalUtils.isNullToZero(info.getUnitBirthMoney()).compareTo(BigDecimal.ZERO) != 0) { if (BigDecimalUtils.isNullToZero(info.getUnitBirthMoney()).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoBirMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BIR)) {
info.setBrSameFlg("1");
}
paymentInfoBirMap.put(info.getSocialPayAddr() paymentInfoBirMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -591,6 +636,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -591,6 +636,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
, info); , info);
} }
if (BigDecimalUtils.isNullToZero(info.getUnitInjuryMoney()).compareTo(BigDecimal.ZERO) != 0) { if (BigDecimalUtils.isNullToZero(info.getUnitInjuryMoney()).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoInjuryMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.GS)) {
info.setGsSameFlg("1");
}
paymentInfoInjuryMap.put(info.getSocialPayAddr() paymentInfoInjuryMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -604,6 +660,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -604,6 +660,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitMedicalMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalMedicalMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalMedicalMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoMedicalMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.YB)) {
info.setYbSameFlg("1");
}
paymentInfoMedicalMap.put(info.getSocialPayAddr() paymentInfoMedicalMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -949,12 +1016,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -949,12 +1016,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ SocialConstants.YL); + SocialConstants.YL);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && ((null != paymentInfo.getYlSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getYlSameFlg()))
BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), || (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()),
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(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -973,12 +1040,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -973,12 +1040,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.SY); + SocialConstants.SY);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && ((null != paymentInfo.getSySameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getSySameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()),
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(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -998,12 +1066,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -998,12 +1066,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ SocialConstants.YB); + SocialConstants.YB);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && ((null != paymentInfo.getYbSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getYbSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()),
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(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1022,12 +1091,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1022,12 +1091,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.DB); + SocialConstants.DB);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && ((null != paymentInfo.getDbSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getDbSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()),
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(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1045,9 +1115,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1045,9 +1115,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.GS); + SocialConstants.GS);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), if (null != paymentInfo && ((null != paymentInfo.getGsSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getGsSameFlg()))
BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0) { || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1065,9 +1136,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1065,9 +1136,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BIR); + SocialConstants.BIR);
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), if (null != paymentInfo && ((null != paymentInfo.getBrSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBrSameFlg()))
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0) { || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.EXIT_TEMPLATE + infoVo.getEmpIdcard() BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位生育缴费数据,请勿重复导入!")); + "的单位生育缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1574,6 +1646,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1574,6 +1646,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitPensionMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalPensionMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalPensionMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoMedicalMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.PENSION_RISK)) {
info.setYbSameFlg("1");
}
paymentInfoPensionMap.put(info.getSocialPayAddr() paymentInfoPensionMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -1587,6 +1670,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1587,6 +1670,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitUnemploymentMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalUnemploymentMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalUnemploymentMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoUnEmpMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.UNEMPLOYEEMENT_RISK)) {
info.setSySameFlg("1");
}
paymentInfoUnEmpMap.put(info.getSocialPayAddr() paymentInfoUnEmpMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -1599,6 +1693,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1599,6 +1693,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
, info); , info);
} }
if (BigDecimalUtils.isNullToZero(info.getUnitInjuryMoney()).compareTo(BigDecimal.ZERO) != 0) { if (BigDecimalUtils.isNullToZero(info.getUnitInjuryMoney()).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoInjuryMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.INJURY_RISK)) {
info.setGsSameFlg("1");
}
paymentInfoInjuryMap.put(info.getSocialPayAddr() paymentInfoInjuryMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -1612,6 +1717,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1612,6 +1717,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitMedicalMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(info.getPersonalMedicalMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getPersonalMedicalMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoMedicalMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.MEDICAL)) {
info.setYlSameFlg("1");
}
paymentInfoMedicalMap.put(info.getSocialPayAddr() paymentInfoMedicalMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -1625,6 +1741,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1625,6 +1741,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getPersonalBigmailmentMoney()), if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getPersonalBigmailmentMoney()),
BigDecimalUtils.isNullToZero(info.getUnitBigmailmentMoney())).compareTo(BigDecimal.ZERO) != 0) { BigDecimalUtils.isNullToZero(info.getUnitBigmailmentMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoBigMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.DB)) {
info.setDbSameFlg("1");
}
paymentInfoBigMap.put(info.getSocialPayAddr() paymentInfoBigMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard() + info.getEmpIdcard()
...@@ -1857,13 +1984,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1857,13 +1984,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.PENSION_RISK); + PaymentConstants.PENSION_RISK);
//存在社保缴费数据 //存在社保缴费数据
if (null != payExists && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != payExists && ((null != payExists.getYbSameFlg() && CommonConstants.ONE_STRING.equals(payExists.getYbSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
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(), SocialConstants.EXIT_TEMPLATE errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ infoVo.getEmpIdcard() + "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
} }
...@@ -1894,13 +2022,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1894,13 +2022,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ PaymentConstants.UNEMPLOYEEMENT_RISK); + PaymentConstants.UNEMPLOYEEMENT_RISK);
//存在社保缴费数据 //存在社保缴费数据
if (null != payExists && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != payExists && ((null != payExists.getSySameFlg() && CommonConstants.ONE_STRING.equals(payExists.getSySameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
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(), SocialConstants.EXIT_TEMPLATE errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ infoVo.getEmpIdcard() + "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
} }
...@@ -1932,13 +2061,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1932,13 +2061,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ PaymentConstants.MEDICAL); + PaymentConstants.MEDICAL);
//存在社保缴费数据 //存在社保缴费数据
if (null != payExists && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != payExists && ((null != payExists.getYlSameFlg() && CommonConstants.ONE_STRING.equals(payExists.getYlSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()),
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(), SocialConstants.EXIT_TEMPLATE errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ infoVo.getEmpIdcard() + "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
} }
...@@ -1971,12 +2101,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1971,12 +2101,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ PaymentConstants.INJURY_RISK); + PaymentConstants.INJURY_RISK);
//存在社保缴费数据 //存在社保缴费数据
if (null != payExists && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != payExists && ((null != payExists.getGsSameFlg() && CommonConstants.ONE_STRING.equals(payExists.getGsSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
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(), SocialConstants.EXIT_TEMPLATE errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ infoVo.getEmpIdcard() + "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
} }
...@@ -2009,13 +2140,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2009,13 +2140,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ SocialConstants.DB); + SocialConstants.DB);
//存在社保缴费数据 //存在社保缴费数据
if (null != payExists && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != payExists && ((null != payExists.getDbSameFlg() && CommonConstants.ONE_STRING.equals(payExists.getDbSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()),
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(), SocialConstants.EXIT_TEMPLATE errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ infoVo.getEmpIdcard() + "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
} }
...@@ -2653,14 +2785,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2653,14 +2785,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
for (String key : map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(key)); error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
//更新推送状态 //更新推送状态
...@@ -2825,14 +2957,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2825,14 +2957,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
for (String key : map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(key)); error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
//更新推送状态 //更新推送状态
...@@ -2895,9 +3027,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2895,9 +3027,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式 //预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (!exitFlag) { if (!exitFlag) {
...@@ -2916,11 +3047,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2916,11 +3047,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 1) { if (!exitFlag || isSum == 1) {
...@@ -2930,12 +3061,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2930,12 +3061,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式 //预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!exitFlag) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
...@@ -2954,11 +3083,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2954,11 +3083,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 2) { if (!exitFlag || isSum == 2) {
...@@ -2971,7 +3100,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2971,7 +3100,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}
incomeService.saveBathDetail(detailList); incomeService.saveBathDetail(detailList);
} }
......
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