Commit a0555a63 authored by fangxinjiang's avatar fangxinjiang

公积金自动化-fxj

parent 2934a019
...@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity { ...@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity {
/** /**
* 类型:1档案;2商险 * 类型:1档案;2商险
*/ */
@ExcelAttribute(name = "类型:1档案;2商险3合同4社保", maxLength = 1) @ExcelAttribute(name = "类型:1档案;2商险3合同4社保5公积金", maxLength = 1)
@Length(max = 1, message = "类型:1档案;2商险3合同4社保不能超过1个字符") @Length(max = 1, message = "类型:1档案;2商险3合同4社保5公积金不能超过1个字符")
@ExcelProperty("类型:1档案;2商险3合同4社保") @ExcelProperty("类型:1档案;2商险3合同4社保5公积金")
@Schema(description = "类型:1档案;2商险 3合同 4社保") @Schema(description = "类型:1档案;2商险 3合同 4社保 5公积金")
private String type; private String type;
/** /**
* 入职确认信息表ID * 入职确认信息表ID
......
...@@ -832,11 +832,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -832,11 +832,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(resR) && resR.getData() != null) { if (Common.isNotNull(resR) && resR.getData() != null) {
SysBaseSetInfoVo setInfo = resR.getData(); SysBaseSetInfoVo setInfo = resR.getData();
if (employeeRegistrationPre.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) { if (employeeRegistrationPre.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) {
return R.other(CommonConstants.TWO_INT,null,"公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!"); return R.other(CommonConstants.THREE_INT,null,"公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!");
} }
}else { }else {
return R.other(CommonConstants.TWO_INT,null,"获取公积金配置信息失败!"); return R.other(CommonConstants.THREE_INT,null,"获取公积金配置信息失败!");
} }
} }
//流程中的公积金数据不能修改 //流程中的公积金数据不能修改
...@@ -854,8 +854,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -854,8 +854,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
}*/ }*/
//更新合同签署状态 //更新合同签署状态
if (null != employeeRegistrationPre.getDispatchInfoPreVo()) { if (null != employeeRegistrationPre.getDispatchInfoFundPreVo()) {
employeeRegistrationPre.getDispatchInfoPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING); employeeRegistrationPre.getDispatchInfoFundPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
} }
} }
......
...@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.vo.TEmployeeContractDateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
...@@ -35,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -35,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator; import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
...@@ -44,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; ...@@ -44,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -53,7 +56,9 @@ import org.springframework.context.annotation.Lazy; ...@@ -53,7 +56,9 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.ParseException; import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*; import java.util.*;
import static com.alibaba.fastjson.serializer.SerializerFeature.*; import static com.alibaba.fastjson.serializer.SerializerFeature.*;
...@@ -540,8 +545,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -540,8 +545,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//查询老的公积金明细 //查询老的公积金明细
R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoList(empPreId); R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoList(empPreId);
TDispatchInfoPreVo dispatchInfoFundPreOldVo = null; TDispatchInfoPreVo dispatchInfoFundPreOldVo = null;
if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreVo()) { if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreFundVo()) {
dispatchInfoFundPreOldVo = fundSdr.getData().getDispatchInfoPreVo(); dispatchInfoFundPreOldVo = fundSdr.getData().getDispatchInfoPreFundVo();
} }
TDispatchInfoPreVo dispatchInfoFundPreVo = newInfo.getDispatchInfoFundPreVo(); TDispatchInfoPreVo dispatchInfoFundPreVo = newInfo.getDispatchInfoFundPreVo();
...@@ -568,6 +573,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -568,6 +573,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("公积金") && dispatchInfoFundPreOldVo != null && dispatchInfoFundPreVo != null) { if (newInfo.getServerItem().contains("公积金") && dispatchInfoFundPreOldVo != null && dispatchInfoFundPreVo != null) {
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD); , dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (differenceFundKey.length() > 0) { if (differenceFundKey.length() > 0) {
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息"; diffTitle += "、公积金信息";
...@@ -647,6 +653,87 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -647,6 +653,87 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
} }
} }
private TDispatchInfoPreVo initFundTime(TDispatchInfoPreVo preVo ,Date joinLeaveDate) {
if (null == preVo){
preVo = new TDispatchInfoPreVo();
}
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())) {
TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
//接收方式 0项目配置 1自定义
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
}else {
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(joinLeaveDate);
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(joinLeaveDate);
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
}
Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getContractAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getRegistDate());
preVo.setExpectedConfirmTime(dataR.getData().getRegistDate());
} else {
preVo.setExpectedCollectionTime(date);
preVo.setExpectedConfirmTime(date);
}
try {
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
} catch (ParseException e) {
log.error("初始化预计派单日期异常!", e);
throw new RuntimeException("初始化预计派单日期异常!"+e.getMessage());
}
}
return preVo;
}
public Date addYearsMonths(TEmployeeContractDateVo vo) {
if (vo == null || vo.getRegistDate() == null) return null;
// 转换为LocalDate(自动处理时区)
LocalDate localDate = vo.getRegistDate().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
// 添加年数和月数
if (vo.getMonthAfter() ==0 && vo.getYearAfter() ==0) {
// 转回Date类型
return Date.from(localDate.atStartOfDay()
.atZone(ZoneId.systemDefault())
.toInstant());
} else {
localDate = localDate
.plusYears(vo.getYearAfter())
.plusMonths(vo.getMonthAfter())
.minusDays(1);
// 转回Date类型
return Date.from(localDate.atStartOfDay()
.atZone(ZoneId.systemDefault())
.toInstant());
}
}
@Override @Override
public void saveUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo public void saveUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, String userId, String nickName, Map<String, TEmployeeInsurancePre> oldMap , EmployeeRegistrationPre newInfo, String userId, String nickName, Map<String, TEmployeeInsurancePre> oldMap
...@@ -663,6 +750,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -663,6 +750,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//记录社保是否已购买日志 //记录社保是否已购买日志
String isSocailBuyOld = oldInfo.getSocialIsBuy(); String isSocailBuyOld = oldInfo.getSocialIsBuy();
String isSocailBuyNew = newInfo.getSocialIsBuy(); String isSocailBuyNew = newInfo.getSocialIsBuy();
//记录公积金是否已购买日志
String isFundBuyOld = oldInfo.getSocialIsBuy();
String isFundBuyNew = newInfo.getSocialIsBuy();
//社保是否已购买list不做比较 //社保是否已购买list不做比较
oldInfo.setExitSocialInfoList(newInfo.getExitSocialInfoList()); oldInfo.setExitSocialInfoList(newInfo.getExitSocialInfoList());
oldInfo.setSocialIsBuy(newInfo.getSocialIsBuy()); oldInfo.setSocialIsBuy(newInfo.getSocialIsBuy());
...@@ -853,7 +944,59 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -853,7 +944,59 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
} }
} }
// 公积金修改日志
String differenceFundKey;
if (Common.isEmpty(isFundBuyOld) ||(Common.isNotNull(isFundBuyOld) && !isFundBuyOld.equals(isFundBuyNew))) {
//单独记录是否已购买社保的变更记录
differenceFundKey = "fundIsBuy";
TEmployeePreLogDetail detailSocialLog = new TEmployeePreLogDetail();
detailSocialLog.setModelType(CommonConstants.TWO_STRING);
detailSocialLog.setType(CommonConstants.FIVE_STRING);
Map<String,Object> old = new HashMap<>();
old.put("fundIsBuy", isFundBuyOld);
Map<String,Object> simNew = new HashMap<>();
simNew.put("fundIsBuy", isFundBuyNew);
this.setPreLogBaseInfo(empPreId, old, simNew, userId, nickName, differenceFundKey, logId, detailSocialLog);
detailList.add(detailSocialLog);
}
//查询老的社保明细
R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoList(empPreId);
TDispatchInfoPreVo dispatchInfoPreOldFundVo = null;
if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreFundVo()) {
dispatchInfoPreOldFundVo = fundSdr.getData().getDispatchInfoPreFundVo();
}
TDispatchInfoPreVo dispatchInfoPreFundVo = newInfo.getDispatchInfoFundPreVo();
if (!newInfo.getServerItem().contains("公积金") && oldInfo.getServerItem().contains("公积金") && Common.isNotNull(dispatchInfoPreOldFundVo)) {
//记录操作记录
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.THREE_STRING);
detailEmpLog.setType(CommonConstants.FOUR_STRING);
this.setPreLogBaseInfo(empPreId, dispatchInfoPreOldFundVo, null, userId, nickName,
null, logId, detailEmpLog);
detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
} else {
diffTitle = "公积金信息";
}
}
if (newInfo.getServerItem().contains("公积金") && dispatchInfoPreOldFundVo != null && dispatchInfoPreFundVo != null) {
differenceSocialKey = HrEquator.comparisonValueIgnoreField(dispatchInfoPreOldFundVo, dispatchInfoPreFundVo, SOCIAL_IGNORE_FIELD);
if (differenceSocialKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
} else {
diffTitle = "公积金信息";
}
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.TWO_STRING);
detailEmpLog.setType(CommonConstants.FIVE_STRING);
this.setPreLogBaseInfo(empPreId, dispatchInfoPreOldFundVo, dispatchInfoPreFundVo, userId, nickName,
differenceSocialKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
}
// 有修改,则加日志 // 有修改,则加日志
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
TEmployeePreLog empPreLog = new TEmployeePreLog(); TEmployeePreLog empPreLog = new TEmployeePreLog();
...@@ -949,6 +1092,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -949,6 +1092,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//公积金待购买数据初始化 //公积金待购买数据初始化
private void initFundPreInfo(EmployeeRegistrationPreVo pre, TDispatchInfoPreVo preVo, private void initFundPreInfo(EmployeeRegistrationPreVo pre, TDispatchInfoPreVo preVo,
YifuUser user, String id) throws ParseException { YifuUser user, String id) throws ParseException {
TDispatchInfoPreVo fundPreVo = pre.getDispatchInfoFundPreVo();
preVo.setRegisterId(id); preVo.setRegisterId(id);
preVo.setCustomerUsername(pre.getCustomerUsernameNew()); preVo.setCustomerUsername(pre.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(pre.getCustomerUserLoginname()); preVo.setCustomerUserLoginName(pre.getCustomerUserLoginname());
...@@ -966,8 +1110,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -966,8 +1110,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
preVo.setTypeSub(CommonConstants.ONE_STRING); preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING); preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金"); preVo.setDispatchItem("公积金");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) { if (null != fundPreVo){
preVo.setSocialStartDate(pre.getJoinLeaveDate()); preVo.setExpectedCollectionTime(fundPreVo.getExpectedCollectionTime());
preVo.setExpectedConfirmTime(fundPreVo.getExpectedConfirmTime());
preVo.setExpectedCollectionType(fundPreVo.getExpectedCollectionType());
preVo.setReceiveType(fundPreVo.getReceiveType());
preVo.setConfigId(fundPreVo.getConfigId());
preVo.setConfigName(fundPreVo.getConfigName());
preVo.setConfigHouseId(fundPreVo.getConfigHouseId());
preVo.setFundStartDate(fundPreVo.getFundStartDate());
preVo.setPaymentType(fundPreVo.getPaymentType());
preVo.setFundProvince(fundPreVo.getFundProvince());
preVo.setFundCity(fundPreVo.getFundCity());
preVo.setFundTown(fundPreVo.getFundTown());
preVo.setFundProvinceId(fundPreVo.getFundProvinceId());
preVo.setFundCityId(fundPreVo.getFundCityId());
preVo.setFundTownId(fundPreVo.getFundTownId());
preVo.setProvidentHouseholdName(fundPreVo.getProvidentHouseholdName());
preVo.setProvidentCardinal(fundPreVo.getProvidentCardinal());
preVo.setUnitProvidentPer(fundPreVo.getUnitProvidentPer());
preVo.setPersonalProvidentPer(fundPreVo.getPersonalProvidentPer());
preVo.setFundPerFlag(fundPreVo.getFundPerFlag());
preVo.setFundDateType(fundPreVo.getFundDateType());
preVo.setLowerLimit(fundPreVo.getLowerLimit());
preVo.setUpperLimit(fundPreVo.getUpperLimit());
} }
} }
} }
...@@ -783,7 +783,7 @@ public class Common { ...@@ -783,7 +783,7 @@ public class Common {
} }
/** /**
* 校验字符串是否符合格式 10,10;12,13 * 校验字符串是否符合格式 10,10;12,13 或 10.01,10;12,13
* @param str 待校验的字符串 * @param str 待校验的字符串
* @return 符合格式返回true,否则返回false * @return 符合格式返回true,否则返回false
*/ */
...@@ -794,12 +794,12 @@ public class Common { ...@@ -794,12 +794,12 @@ public class Common {
} }
// 使用正则表达式匹配格式 // 使用正则表达式匹配格式
// 格式要求: 数字,数字;数字,数字;... // 格式要求: 数字(可带小数),数字(可带小数);数字(可带小数),数字(可带小数);...
// 其中数字为一个或多个数字字符 // 其中数字为一个或多个数字字符,可能包含小数点
return str.matches("\\d+,\\d+(;\\d+,\\d+)*"); return str.matches("\\d+(\\.\\d+)?,\\d+(\\.\\d+)?(;\\d+(\\.\\d+)?,\\d+(\\.\\d+)?)*");
} }
/** /**
* 校验字符串是否符合格式 2025-11 * 校验字符串是否符合格式 2025-11 或 2025/11 或202511
* @param str 待校验的字符串 * @param str 待校验的字符串
* @return 符合格式返回true,否则返回false * @return 符合格式返回true,否则返回false
*/ */
...@@ -808,6 +808,7 @@ public class Common { ...@@ -808,6 +808,7 @@ public class Common {
if (str == null || str.isEmpty()) { if (str == null || str.isEmpty()) {
return false; return false;
} }
return str.matches("\\d{4}-\\d{2}"); // 支持三种格式:2025-11、2025/11、202511
return str.matches("\\d{4}[-/]\\d{1,2}") || str.matches("\\d{6}");
} }
} }
...@@ -680,11 +680,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -680,11 +680,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isNotNull(resR) && resR.getData() != null) { if (Common.isNotNull(resR) && resR.getData() != null) {
SysBaseSetInfoVo setInfo = resR.getData(); SysBaseSetInfoVo setInfo = resR.getData();
if (preVo.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) { if (preVo.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) {
return R.other(CommonConstants.TWO_INT,null,"公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!"); return R.other(CommonConstants.THREE_INT,null,"公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!");
} }
}else { }else {
return R.other(CommonConstants.TWO_INT,null,"获取公积金配置信息失败!"); return R.other(CommonConstants.THREE_INT,null,"获取公积金配置信息失败!");
} }
} }
...@@ -792,29 +792,38 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -792,29 +792,38 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis()) if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())) { && Common.isNotNull(preVo.getExpectedCollectionType())) {
TEmployeeContractDateVo vo = new TEmployeeContractDateVo(); TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
//如果公积金起缴日期为空需要初始化--只有批量确认时才会走到这里
initFundStartDate(registration, preVo);
//接收方式 0项目配置 1自定义 //接收方式 0项目配置 1自定义
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){ if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate()); vo.setRegistDate(preVo.getFundStartDate());
}else { }else {
//先计算起缴日期 if (null == preVo.getFundStartDate()){
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){ //先计算起缴日期
//用户选择起缴日期类型为入职日期,以入职日期为基准 if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
vo.setMonthAfter(CommonConstants.ZERO_INT); //用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setYearAfter(0); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setRegistDate(registration.getJoinLeaveDate()); vo.setYearAfter(0);
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){ vo.setRegistDate(registration.getJoinLeaveDate());
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整 }else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
vo.setMonthAfter(CommonConstants.ONE_INT); //用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setYearAfter(CommonConstants.ONE_INT); vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setRegistDate(registration.getJoinLeaveDate()); vo.setYearAfter(CommonConstants.ONE_INT);
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){ vo.setRegistDate(registration.getJoinLeaveDate());
//用户自定义取值用户填写的起缴日期为基准 }else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
}else {
vo.setMonthAfter(CommonConstants.ZERO_INT); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate()); vo.setRegistDate(preVo.getFundStartDate());
} }
} }
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
...@@ -843,6 +852,39 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -843,6 +852,39 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
private void initFundStartDate(EmployeeRegistration registration, TDispatchInfoPreVo preVo) {
if (null == preVo.getFundStartDate()) {
TEmployeeContractDateVo initDate = new TEmployeeContractDateVo();
//先计算起缴日期 接收方式 0项目配置 自定义必须填写起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
initDate.setMonthAfter(CommonConstants.ZERO_INT);
initDate.setYearAfter(0);
initDate.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
initDate.setMonthAfter(CommonConstants.ONE_INT);
initDate.setYearAfter(CommonConstants.ONE_INT);
initDate.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
initDate.setMonthAfter(CommonConstants.ZERO_INT);
initDate.setYearAfter(0);
initDate.setRegistDate(preVo.getFundStartDate());
}
Date date = this.addYearsMonths(initDate);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getContractAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setFundStartDate(dataR.getData().getRegistDate());
}
}
}
/** /**
* 初始化合同预信息 * 初始化合同预信息
* 该方法用于将员工注册信息转换并填充到合同预信息对象中,以便后续的合同签订流程使用 * 该方法用于将员工注册信息转换并填充到合同预信息对象中,以便后续的合同签订流程使用
...@@ -1220,7 +1262,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1220,7 +1262,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
//服务类型包含公积金购买时 //服务类型包含公积金购买时
if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList() if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList()
|| null != preVo.getDispatchInfoPreVo())) { || null != preVo.getDispatchInfoFundPreVo())) {
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) { if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData())); preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
} }
......
...@@ -657,4 +657,13 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -657,4 +657,13 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("起缴日期:0 入职日期") @ExcelProperty("起缴日期:0 入职日期")
private String fundDateType; private String fundDateType;
/**
* 公积金户ID
*/
@ExcelAttribute(name = "公积金户ID", maxLength = 50)
@Length(max = 50, message = "公积金户ID不能超过50个字符")
@ExcelProperty("公积金户ID")
@Schema(description = "公积金户ID")
private String configHouseId;
} }
...@@ -74,4 +74,14 @@ public class TSocialAutoLog extends BaseEntity { ...@@ -74,4 +74,14 @@ public class TSocialAutoLog extends BaseEntity {
@Schema(description = "异常原因说明") @Schema(description = "异常原因说明")
private String errorInfo; private String errorInfo;
/**
* 类型 0 社保 1 公积金
*/
@ExcelAttribute(name = "类型", maxLength = 200)
@Length(max = 200, message = "类型")
@ExcelProperty("类型")
@Schema(description = "类型")
private String type;
} }
...@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; ...@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion; import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -147,7 +148,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable { ...@@ -147,7 +148,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/** /**
* 补缴政策 * 补缴政策
*/ */
@ExcelAttribute(name = "补缴政策",maxLength = 200) @ExcelAttribute(name = "补缴政策")
@Schema(description = "补缴政策") @Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策") @ExcelProperty("补缴政策")
......
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -239,7 +240,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -239,7 +240,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位医疗缴纳比例 * 单位医疗缴纳比例
*/ */
@ExcelAttribute(name = "单位医疗比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位医疗比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位医疗比例") @Schema(description = "单位医疗比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗比例") @ExcelProperty("单位医疗比例")
...@@ -248,7 +249,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -248,7 +249,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人医疗比例 * 个人医疗比例
*/ */
@ExcelAttribute(name = "个人医疗比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "个人医疗比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "个人医疗比例") @Schema(description = "个人医疗比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗比例") @ExcelProperty("个人医疗比例")
...@@ -257,7 +258,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -257,7 +258,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位生育缴纳比例 * 单位生育缴纳比例
*/ */
@ExcelAttribute(name = "单位生育比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位生育比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位生育比例") @Schema(description = "单位生育比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育比例") @ExcelProperty("单位生育比例")
...@@ -266,7 +267,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -266,7 +267,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位养老缴纳比例 * 单位养老缴纳比例
*/ */
@ExcelAttribute(name = "单位养老比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位养老比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位养老比例") @Schema(description = "单位养老比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老比例") @ExcelProperty("单位养老比例")
...@@ -275,7 +276,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -275,7 +276,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人养老比例 * 个人养老比例
*/ */
@ExcelAttribute(name = "个人养老比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "个人养老比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "个人养老比例") @Schema(description = "个人养老比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老比例") @ExcelProperty("个人养老比例")
...@@ -285,7 +286,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -285,7 +286,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位工伤缴纳比例 * 单位工伤缴纳比例
*/ */
@ExcelAttribute(name = "单位工伤比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位工伤比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位工伤比例") @Schema(description = "单位工伤比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤比例") @ExcelProperty("单位工伤比例")
...@@ -294,7 +295,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -294,7 +295,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位失业缴纳比例 * 单位失业缴纳比例
*/ */
@ExcelAttribute(name = "单位失业比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位失业比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位失业比例") @Schema(description = "单位失业比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业比例") @ExcelProperty("单位失业比例")
...@@ -303,7 +304,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -303,7 +304,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人失业比例 * 个人失业比例
*/ */
@ExcelAttribute(name = "个人失业比例", isNotEmpty = true,isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "个人失业比例", isNotEmpty = true,isFloat = true,max = "99.99",min = 0)
@Schema(description = "个人失业比例") @Schema(description = "个人失业比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业比例") @ExcelProperty("个人失业比例")
...@@ -312,7 +313,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -312,7 +313,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 单位大病比例 * 单位大病比例
*/ */
@ExcelAttribute(name = "单位大病比例",isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "单位大病比例",isFloat = true,max = "99.99",min = 0)
@Schema(description = "单位大病比例") @Schema(description = "单位大病比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病比例") @ExcelProperty("单位大病比例")
...@@ -321,7 +322,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -321,7 +322,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 个人大病比例 * 个人大病比例
*/ */
@ExcelAttribute(name = "个人大病比例",isFloat = true,max = "100",min = 0) @ExcelAttribute(name = "个人大病比例",isFloat = true,max = "99.99",min = 0)
@Schema(description = "个人大病比例") @Schema(description = "个人大病比例")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病比例") @ExcelProperty("个人大病比例")
...@@ -375,7 +376,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable { ...@@ -375,7 +376,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/** /**
* 补缴政策 * 补缴政策
*/ */
@ExcelAttribute(name = "补缴政策",maxLength = 200) @ExcelAttribute(name = "补缴政策")
@Schema(description = "补缴政策") @Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策") @ExcelProperty("补缴政策")
......
...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoLogService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoLogService;
...@@ -39,6 +41,10 @@ public class TSocialAutoLogController { ...@@ -39,6 +41,10 @@ public class TSocialAutoLogController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TSocialAutoLog>> getTSocialAutoLogPage(Page<TSocialAutoLog> page, TSocialAutoLog tSocialAutoLog) { public R<IPage<TSocialAutoLog>> getTSocialAutoLogPage(Page<TSocialAutoLog> page, TSocialAutoLog tSocialAutoLog) {
if (null != tSocialAutoLog && Common.isEmpty(tSocialAutoLog.getType())){
// 0 社保 1 公积金
tSocialAutoLog.setType(CommonConstants.ZERO_STRING);
}
return new R<>(tSocialAutoLogService.getTSocialAutoLogPage(page,tSocialAutoLog)); return new R<>(tSocialAutoLogService.getTSocialAutoLogPage(page,tSocialAutoLog));
} }
......
...@@ -505,6 +505,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -505,6 +505,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
data.setRowIndex(rowIndex+1); data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex()); ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){ if (Common.isNotNull(errorMessage)){
errorMessage.setData(data);
errorMessageList.add(errorMessage); errorMessageList.add(errorMessage);
}else { }else {
cachedDataList.add(data); cachedDataList.add(data);
...@@ -572,6 +573,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -572,6 +573,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
data.setRowIndex(rowIndex+1); data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex()); ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){ if (Common.isNotNull(errorMessage)){
errorMessage.setData(data);
errorMessageList.add(errorMessage); errorMessageList.add(errorMessage);
}else { }else {
cachedDataList.add(data); cachedDataList.add(data);
...@@ -654,7 +656,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -654,7 +656,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
excel = excelVOList.get(i); excel = excelVOList.get(i);
hold = holdMap.get(excel.getDepartName()); hold = holdMap.get(excel.getDepartName());
if (Common.isEmpty(hold)){ if (Common.isEmpty(hold)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户"); errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -666,23 +668,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -666,23 +668,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (!Objects.equals(hold.getTown(), null==infoVo.getTown()?null:infoVo.getTown().toString()) if (!Objects.equals(hold.getTown(), null==infoVo.getTown()?null:infoVo.getTown().toString())
|| !Objects.equals(hold.getCity(), null==infoVo.getCity()?null:infoVo.getCity().toString()) || !Objects.equals(hold.getCity(), null==infoVo.getCity()?null:infoVo.getCity().toString())
|| !Objects.equals(hold.getProvince(), null==infoVo.getProvince()?null:infoVo.getProvince().toString())) { || !Objects.equals(hold.getProvince(), null==infoVo.getProvince()?null:infoVo.getProvince().toString())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
//校验适用其实月份及执行月月份 是否符合规则 2025-10 //校验适用其实月份及执行月月份 是否符合规则 2025-10
if (!Common.validateFormatYearMonth(excel.getApplyStartDate()) if (!Common.validateFormatYearMonth(excel.getApplyStartDate())
|| !Common.validateFormatYearMonth(excel.getDoMonth())){ || !Common.validateFormatYearMonth(excel.getDoMonth())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
excel.setApplyStartDate(excel.getApplyStartDate()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING));
excel.setDoMonth(excel.getDoMonth()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING));
//适用起始月份 //适用起始月份
dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT); dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateFormat){ if (null != dateFormat){
infoVo.setApplyStartDate(dateFormat); infoVo.setApplyStartDate(dateFormat);
}else { }else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -691,7 +699,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -691,7 +699,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“" errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“"
+DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“" +DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“"
+DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING) +DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”,请修改后重新提交。"); +"”,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -699,18 +707,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -699,18 +707,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天 // 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if (Common.isNotNull(temp)){ if (Common.isNotNull(temp)){
if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){ if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份"); errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1)); temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1));
} }
//执行月份校验 //执行月份校验
dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT); dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateUse){ if (null != dateUse){
infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0)); infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0));
}else { }else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份格式错误,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -718,13 +726,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -718,13 +726,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (dateUse.after(dateFormat)){ if (dateUse.after(dateFormat)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只能填写“" errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只能填写“"
+DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING) +DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”及之前的月份,请修改后重新提交。"); +"”及之前的月份,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
//是否同一基数上下限 //是否同一基数上下限
if (!CommonConstants.ZERO_STRING.equals(excel.getIsSameBase()) && !CommonConstants.ONE_STRING.equals(excel.getIsSameBase())){ if (!CommonConstants.ZERO_STRING.equals(excel.getIsSameBase()) && !CommonConstants.ONE_STRING.equals(excel.getIsSameBase())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -752,7 +760,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -752,7 +760,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| Common.isEmpty(excel.getUpMedical()) || Common.isEmpty(excel.getLowerMedical()) || Common.isEmpty(excel.getUpMedical()) || Common.isEmpty(excel.getLowerMedical())
|| Common.isEmpty(excel.getUpBirth()) || Common.isEmpty(excel.getLowerBirth()) || Common.isEmpty(excel.getUpBirth()) || Common.isEmpty(excel.getLowerBirth())
|| Common.isEmpty(excel.getUpUnemployment()) || Common.isEmpty(excel.getLowerUnemployment())){ || Common.isEmpty(excel.getUpUnemployment()) || Common.isEmpty(excel.getLowerUnemployment())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限为否时,工伤、失业、医疗、生育上下限必填"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限为否时,工伤、失业、医疗、生育上下限必填",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -779,7 +787,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -779,7 +787,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpPersion() if (null != infoVo.getUpPersion()
&& null != infoVo.getLowerPersion() && null != infoVo.getLowerPersion()
&& infoVo.getUpPersion().compareTo(infoVo.getLowerPersion()) < 0) { && infoVo.getUpPersion().compareTo(infoVo.getLowerPersion()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"养老基数下限不可大于养老基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"养老基数下限不可大于养老基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -787,7 +795,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -787,7 +795,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpInjury() if (null != infoVo.getUpInjury()
&& null != infoVo.getLowerInjury() && null != infoVo.getLowerInjury()
&& infoVo.getUpInjury().compareTo(infoVo.getLowerInjury()) < 0) { && infoVo.getUpInjury().compareTo(infoVo.getLowerInjury()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"工伤基数下限不可大于工伤基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"工伤基数下限不可大于工伤基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -795,7 +803,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -795,7 +803,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpMedical() if (null != infoVo.getUpMedical()
&& null != infoVo.getLowerMedical() && null != infoVo.getLowerMedical()
&& infoVo.getUpMedical().compareTo(infoVo.getLowerMedical()) < 0) { && infoVo.getUpMedical().compareTo(infoVo.getLowerMedical()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"医疗基数下限不可大于医疗基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"医疗基数下限不可大于医疗基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -803,7 +811,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -803,7 +811,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpBirth() if (null != infoVo.getUpBirth()
&& null != infoVo.getLowerBirth() && null != infoVo.getLowerBirth()
&& infoVo.getUpBirth().compareTo(infoVo.getLowerBirth()) < 0) { && infoVo.getUpBirth().compareTo(infoVo.getLowerBirth()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"生育基数下限不可大于生育基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"生育基数下限不可大于生育基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -811,14 +819,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -811,14 +819,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpUnemployment() if (null != infoVo.getUpUnemployment()
&& null !=infoVo.getLowerUnemployment() && null !=infoVo.getLowerUnemployment()
&& infoVo.getUpUnemployment().compareTo(infoVo.getLowerUnemployment()) < 0) { && infoVo.getUpUnemployment().compareTo(infoVo.getLowerUnemployment()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"失业基数下限不可大于失业基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"失业基数下限不可大于失业基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
//大病是否收取 //大病是否收取
if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && !CommonConstants.ONE_STRING.equals(excel.getIsIllness())){ if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && !CommonConstants.ONE_STRING.equals(excel.getIsIllness())){
if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness())){ if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -829,7 +837,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -829,7 +837,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setIsIllness(excel.getIsIllness()); infoVo.setIsIllness(excel.getIsIllness());
//大病缴纳周期必填且只可是按年或按月 //大病缴纳周期必填且只可是按年或按月
if (!CommonConstants.ZERO_STRING.equals(excel.getCollectType()) && !CommonConstants.ONE_STRING.equals(excel.getCollectType())){ if (!CommonConstants.ZERO_STRING.equals(excel.getCollectType()) && !CommonConstants.ONE_STRING.equals(excel.getCollectType())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期必填且只可填写“按年”或“按月”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期必填且只可填写“按年”或“按月”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -838,7 +846,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -838,7 +846,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (CommonConstants.ZERO_STRING.equals(excel.getCollectType())){ if (CommonConstants.ZERO_STRING.equals(excel.getCollectType())){
//大病缴纳周期按年 收费模式必填且只可填写“立即收费”或“次年起手” //大病缴纳周期按年 收费模式必填且只可填写“立即收费”或“次年起手”
if (!CommonConstants.ZERO_STRING.equals(excel.getCollectTypeSub()) && !CommonConstants.ONE_STRING.equals(excel.getCollectTypeSub())){ if (!CommonConstants.ZERO_STRING.equals(excel.getCollectTypeSub()) && !CommonConstants.ONE_STRING.equals(excel.getCollectTypeSub())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期按年时,收费模式必填且只可填写“立即收费”或“次年起收”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期按年时,收费模式必填且只可填写“立即收费”或“次年起收”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -849,7 +857,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -849,7 +857,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING, CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING) CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getCollectMoth())) { .contains(excel.getCollectMoth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”的,缴纳月份字段必填,只可以填写一月~十二月中的任意一月,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”的,缴纳月份字段必填,只可以填写一月~十二月中的任意一月,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -858,7 +866,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -858,7 +866,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//大病缴纳周期按月 //大病缴纳周期按月
if (CommonConstants.ONE_STRING.equals(excel.getCollectType())){ if (CommonConstants.ONE_STRING.equals(excel.getCollectType())){
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getValueType())){ if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getValueType())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,缴纳方式字段必填,只可填写“按定值”或“按比例”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,缴纳方式字段必填,只可填写“按定值”或“按比例”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -870,7 +878,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -870,7 +878,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getLowerBig() || null == excel.getLowerBig()
|| excel.getLowerBig().compareTo(BigDecimal.ZERO) < 0 || excel.getLowerBig().compareTo(BigDecimal.ZERO) < 0
|| excel.getUpBig().compareTo(BigDecimal.ZERO) < 0){ || excel.getUpBig().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病基数上下限字段必填,仅填写正确基数即可,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病基数上下限字段必填,仅填写正确基数即可,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -881,7 +889,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -881,7 +889,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getPayPersonalPro() || null == excel.getPayPersonalPro()
|| excel.getPayPersonalPro().compareTo(BigDecimal.ZERO) < 0 || excel.getPayPersonalPro().compareTo(BigDecimal.ZERO) < 0
|| excel.getPayPersonalPro().compareTo(BigDecimal.ZERO) < 0){ || excel.getPayPersonalPro().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病比例字段必填,仅填写正确比例即可,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病比例字段必填,仅填写正确比例即可,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -897,7 +905,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -897,7 +905,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getChargePersonal() || null == excel.getChargePersonal()
|| excel.getChargePersonal().compareTo(BigDecimal.ZERO) < 0 || excel.getChargePersonal().compareTo(BigDecimal.ZERO) < 0
|| excel.getChargeCompany().compareTo(BigDecimal.ZERO) < 0){ || excel.getChargeCompany().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”或大病缴纳周期为“按月”且缴纳方式为“按定值”时,单位或个人大病金额字段必填,仅填写正确金额即可,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”或大病缴纳周期为“按月”且缴纳方式为“按定值”时,单位或个人大病金额字段必填,仅填写正确金额即可,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -908,14 +916,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -908,14 +916,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpBig() if (null != infoVo.getUpBig()
&& null !=infoVo.getLowerBig() && null !=infoVo.getLowerBig()
&& infoVo.getUpBig().compareTo(infoVo.getLowerBig()) < 0) { && infoVo.getUpBig().compareTo(infoVo.getLowerBig()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病基数下限不可大于大病基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"大病基数下限不可大于大病基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
} }
//是否可补缴 只可以填写是或否,必填 //是否可补缴 只可以填写是或否,必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -923,7 +931,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -923,7 +931,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//是否可补缴为是时补缴险种必填 //是否可补缴为是时补缴险种必填
if (CommonConstants.ZERO_STRING.equals(excel.getCanOverpay())) { if (CommonConstants.ZERO_STRING.equals(excel.getCanOverpay())) {
if (!Common.isNotNull(excel.getInsurancePension())) { if (!Common.isNotNull(excel.getInsurancePension())) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "是否可补缴为是时补缴险种必填,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(), "是否可补缴为是时补缴险种必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -956,7 +964,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -956,7 +964,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.replace(" ", "") .replace(" ", "")
.replace(",", ""); .replace(",", "");
if (insurancePension.length() > 0) { if (insurancePension.length() > 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "补缴险种填写错误,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(), "补缴险种填写错误,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -966,28 +974,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -966,28 +974,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING, CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING) CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getOverpayNumber())){ .contains(excel.getOverpayNumber())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setOverpayNumber(Integer.parseInt(excel.getOverpayNumber())); infoVo.setOverpayNumber(Integer.parseInt(excel.getOverpayNumber()));
//是否含起缴当月 必填 //是否含起缴当月 必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setHaveThisMonth(excel.getHaveThisMonth()); infoVo.setHaveThisMonth(excel.getHaveThisMonth());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数” // 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setInsuranceIsLatestCardinality(excel.getInsuranceIsLatestCardinality()); infoVo.setInsuranceIsLatestCardinality(excel.getInsuranceIsLatestCardinality());
// 补缴政策 必填 // 补缴政策 必填
if (Common.isEmpty(excel.getPayPolicy())) { if (Common.isEmpty(excel.getPayPolicy())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策必填,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
//补缴政策大于200个汉字,则报错
if (excel.getPayPolicy().length() > 200) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策长度不可大于200个汉字,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1024,7 +1038,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1024,7 +1038,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
try { try {
insertSocialExcel(infoVo,socialSetInfoMap,temp); insertSocialExcel(infoVo,socialSetInfoMap,temp);
}catch (Exception e){ }catch (Exception e){
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1088,14 +1102,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1088,14 +1102,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo = new SysBaseSetInfo(); infoVo = new SysBaseSetInfo();
hold = holdMap.get(excel.getDepartName()); hold = holdMap.get(excel.getDepartName());
if (Common.isEmpty(hold)){ if (Common.isEmpty(hold)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户"); errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setDepartName(excel.getDepartName()); infoVo.setDepartName(excel.getDepartName());
//公积金类型 //公积金类型
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getFundPayType())){ if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getFundPayType())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金类型必填,只可填写“省直”或“市直”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金类型必填,只可填写“省直”或“市直”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1106,23 +1120,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1106,23 +1120,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (!Objects.equals(hold.getTown(), null==infoVo.getTown()?null:infoVo.getTown().toString()) if (!Objects.equals(hold.getTown(), null==infoVo.getTown()?null:infoVo.getTown().toString())
|| !Objects.equals(hold.getCity(), null==infoVo.getCity()?null:infoVo.getCity().toString()) || !Objects.equals(hold.getCity(), null==infoVo.getCity()?null:infoVo.getCity().toString())
|| !Objects.equals(hold.getProvince(), null==infoVo.getProvince()?null:infoVo.getProvince().toString())) { || !Objects.equals(hold.getProvince(), null==infoVo.getProvince()?null:infoVo.getProvince().toString())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
//校验适用其实月份及执行月月份 是否符合规则 2025-10 //校验适用其实月份及执行月月份 是否符合规则 2025-10
if (!Common.validateFormatYearMonth(excel.getApplyStartDate()) if (!Common.validateFormatYearMonth(excel.getApplyStartDate())
|| !Common.validateFormatYearMonth(excel.getDoMonth())){ || !Common.validateFormatYearMonth(excel.getDoMonth())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
excel.setApplyStartDate(excel.getApplyStartDate()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING));
excel.setDoMonth(excel.getDoMonth()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING));
//适用起始月份 //适用起始月份
dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT); dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateFormat){ if (null != dateFormat){
infoVo.setApplyStartDate(dateFormat); infoVo.setApplyStartDate(dateFormat);
}else { }else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1131,7 +1151,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1131,7 +1151,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“" errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“"
+DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“" +DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“"
+DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING) +DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”,请修改后重新提交。"); +"”,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1139,14 +1159,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1139,14 +1159,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天 // 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if (Common.isNotNull(temp)){ if (Common.isNotNull(temp)){
if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){ if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份"); errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1)); temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1));
} }
//执行月份校验 //执行月份校验
dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT); dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateUse){ if (null != dateUse){
infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0)); infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0));
}else { }else {
...@@ -1158,7 +1178,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1158,7 +1178,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (dateUse.after(dateFormat)){ if (dateUse.after(dateFormat)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只可填写“" errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只可填写“"
+DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING) +DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”及之前的月份,请修改后重新提交。"); +"”及之前的月份,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1167,7 +1187,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1167,7 +1187,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setUpperLimit(excel.getUpperLimit()); infoVo.setUpperLimit(excel.getUpperLimit());
//基数下限不可大于基数上限 //基数下限不可大于基数上限
if (excel.getLowerLimit().compareTo(excel.getUpperLimit()) > 0) { if (excel.getLowerLimit().compareTo(excel.getUpperLimit()) > 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"基数下限不可大于基数上限,请修改后重新提交。"); errorMsg = new ErrorMessage(excel.getRowIndex(),"基数下限不可大于基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1178,49 +1198,33 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1178,49 +1198,33 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.THREE_STRING, CommonConstants.FOUR_STRING, CommonConstants.THREE_STRING, CommonConstants.FOUR_STRING,
CommonConstants.FIVE_STRING, CommonConstants.SIX_STRING) CommonConstants.FIVE_STRING, CommonConstants.SIX_STRING)
.contains(excel.getFundPayPoint())){ .contains(excel.getFundPayPoint())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单边小数点必填,只可填写“四舍五入取整或元以下舍去或见角进元或保留两位小数或保留一位小数或见分进元”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"单边小数点必填,只可填写“四舍五入取整或元以下舍去或见角进元或保留两位小数或保留一位小数或见分进元”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setFundPayPoint(Integer.parseInt(excel.getFundPayPoint())); infoVo.setFundPayPoint(Integer.parseInt(excel.getFundPayPoint()));
//单位公积金比例,个人公积金比例 :需要校验格式 为 10,10;12,13 //单位公积金比例,个人公积金比例 :需要校验格式 为 10,10;12,13
if (!Common.isNotNull(excel.getHousingFundPro())){ if (!Common.isNotNull(excel.getHousingFundPro())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例必填,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
// 校验 单位公积金比例,个人公积金比例格式:10,10;12,13 // 校验 单位公积金比例,个人公积金比例格式:10,10;12,13
if (!Common.validateFormat(excel.getHousingFundPro())){ if (!Common.validateFormat(excel.getHousingFundPro())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例格式错误,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例格式错误,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
split = excel.getHousingFundPro().split(CommonConstants.SEMICOLON_STRING); split = excel.getHousingFundPro().split(CommonConstants.SEMICOLON_STRING);
fundProList = new ArrayList<>(); fundProList = new ArrayList<>();
for (String var : split) { errorMsg = initFundper(excel, fundProList, split);
fundPro = new SysPayProportion(); if (null != errorMsg){
splitSub = var.split(CommonConstants.COMMA_STRING); errorMessageList.add(errorMsg);
if (null != splitSub && splitSub.length == 2){ continue;
fundPro.setCompanyPro(Double.valueOf(splitSub[0]));
fundPro.setPersonalPro(Double.valueOf(splitSub[1]));
//如果单位比例大于100或小于等于0 则报错
if (fundPro.getCompanyPro() > 100 || fundPro.getCompanyPro() <= 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
//如果个人比例大于100或小于等于0 则报错
if (fundPro.getPersonalPro() > 100 || fundPro.getPersonalPro() <= 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"个人比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
}
fundProList.add(fundPro);
} }
//是否可补缴 只可以填写是或否,必填 //是否可补缴 只可以填写是或否,必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getCanOverpay())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1232,7 +1236,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1232,7 +1236,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING, CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING) CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getOverpayNumber())){ .contains(excel.getOverpayNumber())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1241,20 +1245,26 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1241,20 +1245,26 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//是否含起缴当月 //是否含起缴当月
//是否含起缴当月 必填 //是否含起缴当月 必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
infoVo.setHaveThisMonth(excel.getHaveThisMonth()); infoVo.setHaveThisMonth(excel.getHaveThisMonth());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数” // 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) { if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
// 补缴政策 必填 // 补缴政策 必填
if (Common.isEmpty(excel.getPayPolicy())) { if (Common.isEmpty(excel.getPayPolicy())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策必填,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
//补缴政策大于200个汉字,则报错
if (excel.getPayPolicy().length() > 200) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策长度不可大于200个汉字,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
...@@ -1268,14 +1278,41 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -1268,14 +1278,41 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
try { try {
insertFundExcel(temp,infoVo,fundProList,fundSetInfoMap); insertFundExcel(temp,infoVo,fundProList,fundSetInfoMap);
}catch (Exception e){ }catch (Exception e){
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交"); errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交",excel);
errorMessageList.add(errorMsg); errorMessageList.add(errorMsg);
continue; continue;
} }
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,excel));
}
}
private ErrorMessage initFundper(SysBaseSetFundInsertVo excel, List<SysPayProportion> fundProList, String[] split) {
ErrorMessage errorMsg = null;
String[] splitSub;
SysPayProportion fundPro;
for (String var : split) {
fundPro = new SysPayProportion();
splitSub = var.split(CommonConstants.COMMA_STRING);
if (null != splitSub && splitSub.length == 2) {
fundPro.setCompanyPro(Double.valueOf(splitSub[0]));
fundPro.setPersonalPro(Double.valueOf(splitSub[1]));
//如果单位比例大于100或小于等于0 则报错
if (fundPro.getCompanyPro() >= 100 || fundPro.getCompanyPro() <= 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "单位比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
break;
}
//如果个人比例大于100或小于等于0 则报错
if (fundPro.getPersonalPro() >= 100 || fundPro.getPersonalPro() <= 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "个人比例必填,只可填写“0-100”之间的数字,请修改后重新提交");
break;
}
}
fundProList.add(fundPro);
} }
return errorMsg;
} }
/** /**
* 插入excel bad record * 插入excel bad record
*/ */
......
...@@ -361,25 +361,32 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -361,25 +361,32 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){ if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate()); vo.setRegistDate(preVo.getFundStartDate());
}else { }else {
//先计算起缴日期 if (null == preVo.getFundDateType()){
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){ //先计算起缴日期
//用户选择起缴日期类型为入职日期,以入职日期为基准 if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
vo.setMonthAfter(CommonConstants.ZERO_INT); //用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setYearAfter(0); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setRegistDate(preVo.getJoinLeaveDate()); vo.setYearAfter(0);
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){ vo.setRegistDate(preVo.getJoinLeaveDate());
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整 }else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
vo.setMonthAfter(CommonConstants.ONE_INT); //用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setYearAfter(CommonConstants.ONE_INT); vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setRegistDate(preVo.getJoinLeaveDate()); vo.setYearAfter(CommonConstants.ONE_INT);
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){ vo.setRegistDate(preVo.getJoinLeaveDate());
//用户自定义取值用户填写的起缴日期为基准 }else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
}else {
vo.setMonthAfter(CommonConstants.ZERO_INT); vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate()); vo.setRegistDate(preVo.getFundStartDate());
} }
} }
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
...@@ -527,7 +534,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -527,7 +534,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override @Override
public void deleteUnProcessFundPreInfo(String id) { public void deleteUnProcessFundPreInfo(String id) {
//删除未处理的社保待购买信息 //删除未处理的公积金待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda() this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING) .eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8")) .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
...@@ -608,6 +615,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -608,6 +615,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
socialAutoLog.setEmpName(contractVO.getEmpName()); socialAutoLog.setEmpName(contractVO.getEmpName());
socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard()); socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard());
socialAutoLog.setErrorInfo(errorMessage.getMessage()); socialAutoLog.setErrorInfo(errorMessage.getMessage());
socialAutoLog.setType(CommonConstants.ZERO_STRING);
socialAutoLogService.save(socialAutoLog); socialAutoLogService.save(socialAutoLog);
} }
} }
...@@ -896,6 +904,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -896,6 +904,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
socialAutoLog.setEmpName(contractVO.getEmpName()); socialAutoLog.setEmpName(contractVO.getEmpName());
socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard()); socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard());
socialAutoLog.setErrorInfo(errorMessage.getMessage()); socialAutoLog.setErrorInfo(errorMessage.getMessage());
socialAutoLog.setType(CommonConstants.ONE_STRING);
socialAutoLogService.save(socialAutoLog); socialAutoLogService.save(socialAutoLog);
} }
} }
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/> <result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/> <result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="configHouseId" column="CONFIG_HOUSE_ID"/>
</resultMap> </resultMap>
...@@ -188,7 +189,8 @@ ...@@ -188,7 +189,8 @@
a.LOWER_BIG, a.LOWER_BIG,
a.PROVIDENT_CARDINAL, a.PROVIDENT_CARDINAL,
a.UNIT_PROVIDENT_PER, a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER a.PERSONAL_PROVIDENT_PER,
a.CONFIG_HOUSE_ID
</sql> </sql>
<sql id="tDispatchInfoPre_other_where"> <sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null"> <if test="tDispatchInfoPre != null">
...@@ -569,6 +571,7 @@ ...@@ -569,6 +571,7 @@
a.expected_collection_time is not null a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE() and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0' and a.process_status = '0'
group by a.customer_user_login_name
</select> </select>
<select id="getAllUnDisDataIdList" resultType="java.lang.String"> <select id="getAllUnDisDataIdList" resultType="java.lang.String">
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="socialId" column="SOCIAL_ID"/> <result property="socialId" column="SOCIAL_ID"/>
<result property="type" column="TYPE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -30,10 +31,13 @@ ...@@ -30,10 +31,13 @@
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.CREATE_TIME,a.SOCIAL_ID a.CREATE_TIME,a.SOCIAL_ID,a.TYPE
</sql> </sql>
<sql id="tSocialAutoLog_where"> <sql id="tSocialAutoLog_where">
<if test="tSocialAutoLog != null"> <if test="tSocialAutoLog != null">
<if test="tSocialAutoLog.type != null and tSocialAutoLog.type.trim() != ''">
AND a.TYPE = #{tSocialAutoLog.type}
</if>
<if test="tSocialAutoLog.id != null and tSocialAutoLog.id.trim() != ''"> <if test="tSocialAutoLog.id != null and tSocialAutoLog.id.trim() != ''">
AND a.ID = #{tSocialAutoLog.id} AND a.ID = #{tSocialAutoLog.id}
</if> </if>
......
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