Commit 29f1b10b authored by huyuchen's avatar huyuchen

失败原因配置

parent e96a2c3a
......@@ -67,6 +67,12 @@ public class TInsuranceType extends BaseEntity {
@Length(max =50,message = "收款银行账号必须小于等于50")
private String bankNo;
/**
* 购买年龄限制 0 限制 1 不限制
*/
@Schema(description = "购买年龄限制")
private String ageLimit;
/**
* 删除标志(0:未删除,1:删除)
*/
......
......@@ -2672,12 +2672,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
// 保单开始日期 > 当前派单日期
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
......@@ -2845,6 +2839,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//如果有年龄限制则判断年龄是否在16-70之间
if (CommonConstants.ZERO_STRING.equals(insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY)){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3034,12 +3034,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、购买标准
for (int j = 0; j < distinctList.size(); j++) {
InsuranceBatchParam repeat = distinctList.get(j);
......@@ -3214,6 +3209,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//如果有年龄限制则判断年龄是否在16-70之间
if (CommonConstants.ZERO_STRING.equals(insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY)){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3320,6 +3321,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceReplaceParam> listResult = new ArrayList<>();
List<InsuranceReplaceParam> listSuccess = new ArrayList<>();
List<InsuranceReplaceParam> distinctList = paramList.stream().distinct().collect(Collectors.toList());
TInsuranceType insuranceType;
TInsuranceCompany insuranceCompany;
//定义外层循环标识,方便去重的时候跳出
outer:
for (int i = 0; i < distinctList.size(); i++) {
......@@ -3403,12 +3406,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getReplaceEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getReplaceEmpIdcardNo()) > CommonConstants.SEVENTY){
// 保险公司-险种-购买标准 是否存在
insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceCompany).isPresent()) {
insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
.eq(TInsuranceType::getName, param.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent() && CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo())
< CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo())
> CommonConstants.SEVENTY)) {
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
}
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
......
......@@ -63,7 +63,8 @@
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
from
t_insurance_type a,
t_insurance_company b
......@@ -87,7 +88,8 @@
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
from
t_insurance_type a,
t_insurance_company b
......
......@@ -203,6 +203,12 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 自动化配置状态 0 启用 1 禁用
*/
@Schema(description ="自动化配置状态")
private String autoStatus;
/**
* 审核人部门
*/
......
......@@ -122,6 +122,25 @@ public class SysHouseHoldInfoController {
return sysHouseHoldInfoService.updateByIdAsso(sysHouseHoldInfo);
}
/**
* 修改社保户公积金户自动化配置
* @param autoStatus 户自动化配置启用禁用标识 0 启用 1 禁用
* @return R
*/
@Operation(summary = "修改社保户公积金户自动化配置", description = "修改社保户公积金户自动化配置:hasPermission('demo_syshouseholdinfo_edit')")
@SysLog("修改社保户公积金户自动化配置" )
@PostMapping("/updateAutoType")
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_edit')" )
public R updateAutoType(@RequestParam String id, @RequestParam String autoStatus) {
SysHouseHoldInfo sysHouseHoldInfo = sysHouseHoldInfoService.getById(id);
if (Common.isNotNull(sysHouseHoldInfo)) {
sysHouseHoldInfo.setAutoStatus(autoStatus);
sysHouseHoldInfoService.updateById(sysHouseHoldInfo);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
/**
* 通过id删除社保户公积金户数据
* @param id id
......
......@@ -48,6 +48,7 @@
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
<result property="fundBank" column="FUND_BANK"/>
<result property="autoStatus" column="AUTO_STATUS"/>
</resultMap>
<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
......@@ -81,7 +82,8 @@
a.CUSTOMER_NO,
a.UNIT_CREDIT_CODE,
a.FUND_BANK,
a.HANDLE_USER_NAME
a.HANDLE_USER_NAME,
a.AUTO_STATUS
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
......
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