Commit d0c12e76 authored by fangxinjiang's avatar fangxinjiang

社保自动化配置-fxj

parent 12d9832a
......@@ -52,8 +52,7 @@ public class TAutoSocialRuleInfo extends BaseEntity {
/**
* 项目配置ID
*/
@ExcelAttribute(name = "项目配置ID", isNotEmpty = true, errorInfo = "项目配置ID不能为空", maxLength = 32)
@NotBlank(message = "项目配置ID不能为空")
@ExcelAttribute(name = "项目配置ID", isNotEmpty = false, errorInfo = "项目配置ID不能为空", maxLength = 32)
@Length(max = 32, message = "项目配置ID不能超过32个字符")
@ExcelProperty("项目配置ID")
@Schema(description = "项目配置ID")
......
......@@ -48,7 +48,7 @@ public class TAutoMainRelAddVo implements Serializable {
private List<TAutoContractScheme> contractSchemes;
//社保规则主表
private TAutoSocialRuleInfo autoSocialRuleInfo;
private TAutoSocialRuleInfo socialRuleInfo;
//社保规则明细表
private List<TAutoSocialRuleRel> socialRuleRels;
......
......@@ -50,9 +50,8 @@ public class TAutoSocialRuleInfoVo extends RowIndex implements Serializable {
/**
* 项目配置ID
*/
@NotBlank(message = "项目配置ID 不能为空")
@Length(max = 32, message = "项目配置ID 不能超过32 个字符")
@ExcelAttribute(name = "项目配置ID", isNotEmpty = true, errorInfo = "项目配置ID 不能为空", maxLength = 32)
@ExcelAttribute(name = "项目配置ID", isNotEmpty = false, errorInfo = "项目配置ID 不能为空", maxLength = 32)
@Schema(description = "项目配置ID")
@ExcelProperty("项目配置ID")
private String mainId;
......
......@@ -374,7 +374,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
return PARAM_IS_NOT_ERROR;
}
//校验社保规则主表信息
TAutoSocialRuleInfo autoSocialRuleInfo = entity.getAutoSocialRuleInfo();
TAutoSocialRuleInfo autoSocialRuleInfo = entity.getSocialRuleInfo();
if (Common.isNotNull(autoSocialRuleInfo)){
ExcelUtil<TAutoSocialRuleInfo> excelUtil = new ExcelUtil<>(TAutoSocialRuleInfo.class);
ErrorMessage errorMessage = excelUtil.checkEntity(autoSocialRuleInfo,0);
......@@ -712,7 +712,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
}
//校验社保规则主表信息
TAutoSocialRuleInfo autoSocialRuleNew = entity.getAutoSocialRuleInfo();
TAutoSocialRuleInfo autoSocialRuleNew = entity.getSocialRuleInfo();
TAutoSocialRuleInfo autoSocialRuleOld = null;
if (Common.isNotNull(autoSocialRuleNew)){
// 检查社保规则信息的有效性
......@@ -805,6 +805,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
if (Common.isNotNull(autoSocialRuleNew.getId())){
autoSocialRuleNew.setUpdateBy(user.getId());
autoSocialRuleNew.setUpdateTime(LocalDateTime.now());
autoContractRuleNew.setMainId(autoMainRel.getId());
autoSocialRuleInfoMapper.updateById(autoSocialRuleNew);
}else {
autoSocialRuleNew.setDeptNo(autoMainRel.getDeptNo());
......@@ -1330,11 +1331,11 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
// 添加了异常处理,避免 recordBase 不是合法数字格式时程序崩溃
if (CommonConstants.TWO_STRING.equals(rel.getPaymentType())) {
if (BigDecimal.valueOf(Double.valueOf(rel.getRecordBase())).compareTo(setInfo.getUpperLimit()) != 0) {
return R.failed("备案基数不等于社保户最高基数");
return R.failed("备案基数不等于社保户最高基数:"+setInfo.getUpperLimit());
}
} else if (CommonConstants.ZERO_STRING.equals(rel.getPaymentType())){
if (BigDecimal.valueOf(Double.valueOf(rel.getRecordBase())).compareTo(setInfo.getLowerLimit()) != 0) {
return R.failed("备案基数不等于社保户最低基数");
return R.failed("备案基数不等于社保户最低基数:"+setInfo.getLowerLimit());
}
}
} catch (NumberFormatException e) {
......
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