Commit 5f253ce2 authored by hongguangwu's avatar hongguangwu

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

parents 048bc5f4 6f0dd3ee
......@@ -436,4 +436,16 @@ public interface ErrorCodes {
* 派增异常: 社保派单基数不可小于最低基数且不可大于最高基数
*/
String EMP_DISPATCH_SOCIAL_LIMIT_ERROR = "emp.dispatch.social.limit.error";
/**
* 派增异常: 公积金派单基数不可小于最低基数且不可大于最高基数
*/
String EMP_DISPATCH_FUND_LIMIT_ERROR = "emp.dispatch.fund.limit.error";
/**
* 派增异常: 社保各项基数不一致,委托备注必填
*/
String EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR = "emp.dispatch.social.base.limit.error";
/**
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
String EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR = "emp.dispatch.social.date.limit.error";
}
......@@ -161,6 +161,14 @@ emp.dispatch.emp.not.used=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5BF9\u5E94\u8EAB\u4EF
emp.dispatch.social.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u6D3E\u5355\u57FA\u6570\u4E0D\u53EF\u5C0F\u4E8E\u6700\u4F4E\u57FA\u6570\u4E14\u4E0D\u53EF\u5927\u4E8E\u6700\u9AD8\u57FA\u6570
emp.dispatch.fund.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91D1\u6D3E\u5355\u57FA\u6570\u4E0D\u53EF\u5C0F\u4E8E\u6700\u4F4E\u57FA\u6570\u4E14\u4E0D\u53EF\u5927\u4E8E\u6700\u9AD8\u57FA\u6570
emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u57FA\u6570\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.date.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u8D77\u7F34\u65E5\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
......
......@@ -252,7 +252,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "备案基数", isFloat = true,max = "999999999.99")
@Schema(description = "备案基数:购买社保时必填" )
@ExcelProperty("备案基数" )
private String recordBase;
private BigDecimal recordBase;
/**
* 社保户
......
......@@ -113,7 +113,8 @@ public class TDispatchInfoController {
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageAudit")
public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setDeleteFlag(CommonConstants.ONE_STRING);
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
......
......@@ -716,6 +716,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setLowerLimit(socialSet.getLowerLimit());
socialFund.setUpperLimit(socialSet.getUpperLimit());
socialFund.setPayPolicy(socialSet.getPayPolicy());
socialFund.setLatestCardinality(socialSet.getInsuranceIsLatestCardinality());
}
}
if (Common.isNotNull(excel.getProvidentHousehold())){
......@@ -725,6 +726,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setUnitName(setInfoVo.getCustomerName());
socialFund.setUnitIdFund(setInfoVo.getCustomerId());
socialFund.setFundStatus(CommonConstants.ZERO_STRING);
socialFund.setProvidentStart(excel.getProvidentStart());
if (Common.isNotNull(fundSet)){
socialFund.setProvidentHousehold(fundSet.getDepartId());
socialFund.setProvidentHouseholdName(fundSet.getDepartName());
......@@ -734,7 +736,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setLowerLimitFund(fundSet.getLowerLimit());
socialFund.setUpperLimitFund(fundSet.getUpperLimit());
socialFund.setPayPolicyFund(fundSet.getPayPolicy());
socialFund.setProvidentStart(excel.getProvidentStart());
socialFund.setLatestCardinalityFund(fundSet.getInsuranceIsLatestCardinality());
}
}
......@@ -948,7 +950,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social.setWorkInjuryHandle(CommonConstants.ZERO_STRING);
social.setUnemployHandle(CommonConstants.ZERO_STRING);
social.setPaymentType(excel.getPaymentType());
social.setRecordBase(excel.getRecordBase());
social.setRecordBase(excel.getRecordBase().toString());
social.setPensionStart(excel.getPensionStart());
social.setMedicalStart(ServiceUtil.ifNull(excel.getMedicalStart(), excel.getPensionStart()));
social.setUnemployStart(ServiceUtil.ifNull(excel.getUnemployStart(), excel.getPensionStart()));
......@@ -1407,7 +1409,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& (CommonConstants.SIX_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.SEVEN_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.NINE_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.TEN_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.ZERO_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.ONE_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFund.getSocialStatus())
......@@ -1429,9 +1430,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
}
if (Common.isNotNull(excel.getSocialHousehold()) && Common.isNotNull(socialSet)
&& CommonConstants.ONE_STRING.equals(excel.getPaymentType())){
if ((Common.isNotNull(excel.getPensionCardinal())
if (Common.isNotNull(excel.getSocialHousehold())){
if (Common.isNotNull(socialSet) && CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& (Common.isNotNull(excel.getPensionCardinal())
&& excel.getPensionCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getPensionCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getMedicalCardinal())
......@@ -1453,10 +1454,102 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_LIMIT_ERROR)));
return true;
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if (Common.isEmpty(excel.getRecordBase()) && Common.isEmpty(excel.getSocialHousehold())){
boolean flag = false;
// 各个社保基数和日期空 默认养老日期和基数
initExcelBaseAndDate(excel);
// 自定义 只要有一个不相当同的 日期或基数 就要提示
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& (excel.getPensionCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| excel.getMedicalCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| excel.getUnemploymentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| excel.getWorkInjuryCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
}
Date temp = new Date();
if (Common.isEmpty(empVo)){
temp = excel.getContractStart();
}else if (Common.isNotNull(empVo) && Common.isNotNull(empVo.getContractStart())){
temp = empVo.getContractStart();
}else {
temp = excel.getContractStart();
}
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& (excel.getPensionStart().equals(temp)
|| excel.getMedicalStart().equals(temp)
|| excel.getUnemployStart().equals(temp)
|| excel.getWorkInjuryStart().equals(temp)
|| excel.getBirthStart().equals(temp)
|| excel.getBigailmentStart().equals(temp)
)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR)));
return true;
}
// 其他 只用判断对应养老基数和时间 与合同时间 即可
if (!CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& (excel.getPensionStart().equals(temp)
)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR)));
return true;
}
if (!CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& excel.getPensionCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
}
}
}
if (Common.isNotNull(excel.getProvidentHousehold())
&& Common.isNotNull(fundSet)
&& Common.isNotNull(excel.getProvidentCardinal())
&& excel.getProvidentCardinal().compareTo(fundSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getProvidentCardinal().compareTo(fundSet.getLowerLimit())< CommonConstants.ZERO_INT){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_FUND_LIMIT_ERROR)));
return true;
}
return false;
}
private void initExcelBaseAndDate(TDispatchImportVo excel) {
if (Common.isEmpty(excel.getMedicalCardinal())){
excel.setMedicalCardinal(excel.getPensionCardinal());
}
if (Common.isEmpty(excel.getUnemploymentCardinal())){
excel.setUnemploymentCardinal(excel.getPensionCardinal());
}
if (Common.isEmpty(excel.getWorkInjuryCardinal())){
excel.setWorkInjuryCardinal(excel.getPensionCardinal());
}
if (Common.isEmpty(excel.getBirthCardinal())){
excel.setBirthCardinal(excel.getPensionCardinal());
}
if (Common.isEmpty(excel.getBigailmentCardinal())){
excel.setBigailmentCardinal(excel.getPensionCardinal());
}
if (Common.isEmpty(excel.getMedicalStart())){
excel.setMedicalStart(excel.getPensionStart());
}
if (Common.isEmpty(excel.getUnemployStart())){
excel.setUnemployStart(excel.getPensionStart());
}
if (Common.isEmpty(excel.getWorkInjuryStart())){
excel.setWorkInjuryStart(excel.getPensionStart());
}
if (Common.isEmpty(excel.getBirthStart())){
excel.setBirthStart(excel.getPensionStart());
}
if (Common.isEmpty(excel.getBigailmentStart())){
excel.setBigailmentStart(excel.getPensionStart());
}
}
@Override
public R<List<ErrorMessage>> importReduceDiy(InputStream inputStream) {
......@@ -1810,8 +1903,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialInfo.setDeleteFlag(CommonConstants.ONE_STRING);
// 作废更新:社保状态、同步预估数据 审核不通过直接作废 TODO 预估数据
socialInfo.setAuditStatus(CommonConstants.TWO_STRING);
socialInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
sf.setSocialAddStatus(CommonConstants.FOUR_STRING);
socialInfo.setDeleteFlag(CommonConstants.ONE_STRING);
sf.setSocialAddStatus(CommonConstants.FIVE_STRING);
sf.setSocialStatus(CommonConstants.TEN_STRING);
}
socialInfo.setAuditTime(now);
......@@ -1884,9 +1977,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
// 审核不通过 直接作废 要考虑 部分派增的情况
if (CommonConstants.ONE_INT == flag.intValue()) {
/*if (CommonConstants.ONE_INT == flag.intValue()) {
dis.setDeleteFlag(CommonConstants.ONE_STRING);
}
}*/
//派单类型信息拼接
if (CommonConstants.ZERO_STRING.equals(dis.getType())) {
remark += DispatchConstants.DISPATCH_ADD;
......@@ -1919,6 +2012,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dis.setAuditUser(user.getId());
dis.setAuditTime(now);
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
}
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_AUDIT_ERROR , e);
......
......@@ -2158,7 +2158,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
importVo.setEmpNational(CommonConstants.ONE_STRING);
importVo.setEducationName(CommonConstants.FIVE_STRING);
if (null != preInfo.getPensionBase()){
importVo.setRecordBase(preInfo.getPensionBase().toString());
importVo.setRecordBase(preInfo.getPensionBase());
}
// 封装合同信息
initDispatchContractVo(preInfo, importVo);
......
......@@ -45,7 +45,6 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/${pathName}" )
@Tag(name = "${comments}管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class ${className}Controller {
private final ${className}Service ${classname}Service;
......
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