Commit d6fe8064 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.17' into MVP1.7.17

parents 3321b553 035e968e
......@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity {
/**
* 类型:1档案;2商险
*/
@ExcelAttribute(name = "类型:1档案;2商险3合同4社保", maxLength = 1)
@Length(max = 1, message = "类型:1档案;2商险3合同4社保不能超过1个字符")
@ExcelProperty("类型:1档案;2商险3合同4社保")
@Schema(description = "类型:1档案;2商险 3合同 4社保")
@ExcelAttribute(name = "类型:1档案;2商险3合同4社保5公积金", maxLength = 1)
@Length(max = 1, message = "类型:1档案;2商险3合同4社保5公积金不能超过1个字符")
@ExcelProperty("类型:1档案;2商险3合同4社保5公积金")
@Schema(description = "类型:1档案;2商险 3合同 4社保 5公积金")
private String type;
/**
* 入职确认信息表ID
......
......@@ -816,14 +816,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//是否已购买为是需要判断公积金是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
(Common.isEmpty(fundFlag) || Boolean.TRUE.equals(!fundFlag.getData()))) {
return R.other(CommonConstants.TWO_INT, null, "未找到流程中或者在用的公积金信息!");
return R.other(CommonConstants.THREE_INT, null, "未找到流程中或者在用的公积金信息!");
}
//是否已购买为否需要判断是否在用或者流程中的公积金
if (CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
Common.isNotNull(fundFlag) && Boolean.TRUE.equals(fundFlag.getData()) &&
null != employeeRegistrationPre.getDispatchInfoPreVo() &&
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) {
return R.other(CommonConstants.TWO_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
null != employeeRegistrationPre.getDispatchInfoFundPreVo()) {
return R.other(CommonConstants.THREE_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
}
//判断公积金基数 是否小于 公积金户配置的最低基数
if (Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId())
......@@ -832,11 +831,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(resR) && resR.getData() != null) {
SysBaseSetInfoVo setInfo = resR.getData();
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 {
return R.other(CommonConstants.TWO_INT,null,"获取公积金配置信息失败!");
return R.other(CommonConstants.THREE_INT,null,"获取公积金配置信息失败!");
}
}
//流程中的公积金数据不能修改
......@@ -854,8 +853,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}*/
//更新合同签署状态
if (null != employeeRegistrationPre.getDispatchInfoPreVo()) {
employeeRegistrationPre.getDispatchInfoPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
if (null != employeeRegistrationPre.getDispatchInfoFundPreVo()) {
employeeRegistrationPre.getDispatchInfoFundPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
}
}
......
......@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.mapper.TEmployeePreLogMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
......@@ -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.SecurityConstants;
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.R;
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;
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.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
......@@ -53,7 +56,9 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import static com.alibaba.fastjson.serializer.SerializerFeature.*;
......@@ -540,8 +545,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//查询老的公积金明细
R<EmployeePreSocialListVo> fundSdr = socialDaprUtils.getFundPreInfoList(empPreId);
TDispatchInfoPreVo dispatchInfoFundPreOldVo = null;
if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreVo()) {
dispatchInfoFundPreOldVo = fundSdr.getData().getDispatchInfoPreVo();
if (fundSdr != null && fundSdr.getData() != null && null != fundSdr.getData().getDispatchInfoPreFundVo()) {
dispatchInfoFundPreOldVo = fundSdr.getData().getDispatchInfoPreFundVo();
}
TDispatchInfoPreVo dispatchInfoFundPreVo = newInfo.getDispatchInfoFundPreVo();
......@@ -568,6 +573,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("公积金") && dispatchInfoFundPreOldVo != null && dispatchInfoFundPreVo != null) {
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (differenceFundKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
......@@ -647,6 +653,90 @@ 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);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
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
public void saveUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, String userId, String nickName, Map<String, TEmployeeInsurancePre> oldMap
......@@ -663,6 +753,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//记录社保是否已购买日志
String isSocailBuyOld = oldInfo.getSocialIsBuy();
String isSocailBuyNew = newInfo.getSocialIsBuy();
//记录公积金是否已购买日志
String isFundBuyOld = oldInfo.getSocialIsBuy();
String isFundBuyNew = newInfo.getSocialIsBuy();
//社保是否已购买list不做比较
oldInfo.setExitSocialInfoList(newInfo.getExitSocialInfoList());
oldInfo.setSocialIsBuy(newInfo.getSocialIsBuy());
......@@ -853,7 +947,59 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
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)) {
TEmployeePreLog empPreLog = new TEmployeePreLog();
......@@ -949,6 +1095,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//公积金待购买数据初始化
private void initFundPreInfo(EmployeeRegistrationPreVo pre, TDispatchInfoPreVo preVo,
YifuUser user, String id) throws ParseException {
TDispatchInfoPreVo fundPreVo = pre.getDispatchInfoFundPreVo();
preVo.setRegisterId(id);
preVo.setCustomerUsername(pre.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(pre.getCustomerUserLoginname());
......@@ -966,8 +1113,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) {
preVo.setSocialStartDate(pre.getJoinLeaveDate());
if (null != fundPreVo){
preVo.setExpectedCollectionTime(null);
preVo.setExpectedConfirmTime(null);
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());
}
}
}
......@@ -254,4 +254,38 @@ public class BigDecimalUtils {
}
return new BigDecimal(c);
}
/**
* 判断BigDecimal值是否在指定范围内(包含边界)
* @param value 要检查的值
* @param min 最小值(包含)
* @param max 最大值(包含)
* @return 如果值在范围内返回true,否则返回false
*/
public static boolean isBetween(BigDecimal value, BigDecimal min, BigDecimal max) {
if (value == null || min == null || max == null) {
return false;
}
return value.compareTo(min) >= 0 && value.compareTo(max) <= 0;
}
/**
* 判断BigDecimal值是否在指定范围内
* @param value 要检查的值
* @param min 最小值
* @param minInclusive 最小值是否包含在内
* @param max 最大值
* @param maxInclusive 最大值是否包含在内
* @return 如果值在范围内返回true,否则返回false
*/
public static boolean isBetween(BigDecimal value, BigDecimal min, boolean minInclusive, BigDecimal max, boolean maxInclusive) {
if (value == null || min == null || max == null) {
return false;
}
boolean minCheck = minInclusive ? value.compareTo(min) >= 0 : value.compareTo(min) > 0;
boolean maxCheck = maxInclusive ? value.compareTo(max) <= 0 : value.compareTo(max) < 0;
return minCheck && maxCheck;
}
}
......@@ -783,7 +783,7 @@ public class Common {
}
/**
* 校验字符串是否符合格式 10,10;12,13
* 校验字符串是否符合格式 10,10;12,13 或 10.01,10;12,13
* @param str 待校验的字符串
* @return 符合格式返回true,否则返回false
*/
......@@ -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 待校验的字符串
* @return 符合格式返回true,否则返回false
*/
......@@ -808,6 +808,7 @@ public class Common {
if (str == null || str.isEmpty()) {
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}");
}
}
......@@ -1277,6 +1277,23 @@ public class DateUtil {
return c1.getTime();
}
/**
* 获取第一天
* @Author fxj
* @Date 2019-10-16
* @param date
* @return
**/
public static Date getFirstDay(Date date){
if (!Common.isNotNull(date)){
return null;
}
Calendar c1 = Calendar.getInstance();
c1.setTime(date);
c1.set(Calendar.DATE, 1);
return c1.getTime();
}
/**
* 获取第一天
* @Author fxj
......
......@@ -666,12 +666,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//是否已签署为是需要判断是否在用或者流程中的公积金
if (CommonConstants.ZERO_STRING.equals(preVo.getFundIsBuy()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) {
return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的公积金信息!");
return R.other(CommonConstants.THREE_INT,null,"未找到流程中或者在用的公积金信息!");
}
// 是否已签署为否需要判断是否在用或者流程中的公积金
if (CommonConstants.ONE_STRING.equals(preVo.getFundIsBuy()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的公积金数据,请将'是否已参保'调整为'是'");
return R.other(CommonConstants.THREE_INT,null,"该人员存在在途/有效的公积金数据,请将'是否已参保'调整为'是'");
}
//判断公积金基数 是否小于 公积金户配置的最低基数
if (Common.isNotNull(preVo.getDispatchInfoFundPreVo().getConfigHouseId())
......@@ -680,11 +680,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isNotNull(resR) && resR.getData() != null) {
SysBaseSetInfoVo setInfo = resR.getData();
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 {
return R.other(CommonConstants.TWO_INT,null,"获取公积金配置信息失败!");
return R.other(CommonConstants.THREE_INT,null,"获取公积金配置信息失败!");
}
}
......@@ -786,37 +786,48 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金");
//如果公积金起缴日期为空需要初始化--只有批量确认时才会走到这里
initFundStartDate(registration, preVo);
//如果自动触发派增为是,计算派单发起时间和派单确认时间
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());
vo.setRegistDate(preVo.getFundStartDate());
}else {
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
if (null == preVo.getFundStartDate()){
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(registration.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
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.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
}
Date date = this.addYearsMonths(vo);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
......@@ -843,6 +854,42 @@ 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);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
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 +1267,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//服务类型包含公积金购买时
if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
|| null != preVo.getDispatchInfoFundPreVo())) {
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
......
......@@ -657,4 +657,13 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("起缴日期:0 入职日期")
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 {
@Schema(description = "异常原因说明")
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;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -147,7 +148,7 @@ public class SysBaseSetFundInsertVo extends RowIndex implements Serializable {
/**
* 补缴政策
*/
@ExcelAttribute(name = "补缴政策",maxLength = 200)
@ExcelAttribute(name = "补缴政策")
@Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策")
......
......@@ -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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -68,7 +69,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 养老基数上限
*/
@ExcelAttribute(name = "养老基数上限", isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "养老基数上限", isNotEmpty = true,isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "养老基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数上限")
......@@ -77,7 +78,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 养老基数下限
*/
@ExcelAttribute(name = "养老基数下限", isNotEmpty = true,isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "养老基数下限", isNotEmpty = true,isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "养老基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数下限")
......@@ -86,7 +87,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 工伤基数上限
*/
@ExcelAttribute(name = "工伤基数上限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "工伤基数上限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "工伤基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数上限")
......@@ -95,7 +96,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 工伤基数下限
*/
@ExcelAttribute(name = "工伤基数下限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "工伤基数下限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "工伤基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数下限")
......@@ -104,7 +105,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 医疗基数上限
*/
@ExcelAttribute(name = "医疗基数上限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "医疗基数上限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "医疗基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数上限")
......@@ -113,7 +114,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 医疗基数下限
*/
@ExcelAttribute(name = "医疗基数下限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "医疗基数下限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "医疗基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数下限")
......@@ -122,7 +123,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 生育基数上限
*/
@ExcelAttribute(name = "生育基数上限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "生育基数上限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "生育基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数上限")
......@@ -131,7 +132,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 生育基数下限
*/
@ExcelAttribute(name = "生育基数下限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "生育基数下限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "生育基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数下限")
......@@ -140,7 +141,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 失业基数上限
*/
@ExcelAttribute(name = "失业基数上限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "失业基数上限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "失业基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数上限")
......@@ -149,7 +150,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 失业基数下限
*/
@ExcelAttribute(name = "失业基数下限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "失业基数下限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "失业基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数下限")
......@@ -158,7 +159,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 大病基数上限
*/
@ExcelAttribute(name = "大病基数上限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "大病基数上限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "大病基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数上限")
......@@ -167,7 +168,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 大病基数下限
*/
@ExcelAttribute(name = "大病基数下限",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "大病基数下限",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "大病基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数下限")
......@@ -221,7 +222,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 单位大病金额
*/
@ExcelAttribute(name = "单位大病金额",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "单位大病金额",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "单位大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额")
......@@ -230,7 +231,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 个人大病金额
*/
@ExcelAttribute(name = "个人大病金额",isFloat = true,max = "999999999.99",min = 0)
@ExcelAttribute(name = "个人大病金额",isFloat = true,max = "9999999100.01",min = 0)
@Schema(description = "个人大病金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额")
......@@ -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 = "100.01",min = 0)
@Schema(description = "单位医疗比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "个人医疗比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "单位生育比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "单位养老比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "个人养老比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "单位工伤比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "单位失业比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业比例")
......@@ -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 = "100.01",min = 0)
@Schema(description = "个人失业比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业比例")
......@@ -312,7 +313,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 单位大病比例
*/
@ExcelAttribute(name = "单位大病比例",isFloat = true,max = "100",min = 0)
@ExcelAttribute(name = "单位大病比例",isFloat = true,max = "100.01",min = 0)
@Schema(description = "单位大病比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病比例")
......@@ -321,7 +322,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 个人大病比例
*/
@ExcelAttribute(name = "个人大病比例",isFloat = true,max = "100",min = 0)
@ExcelAttribute(name = "个人大病比例",isFloat = true,max = "100.01",min = 0)
@Schema(description = "个人大病比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病比例")
......@@ -375,7 +376,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 补缴政策
*/
@ExcelAttribute(name = "补缴政策",maxLength = 200)
@ExcelAttribute(name = "补缴政策")
@Schema(description = "补缴政策")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("补缴政策")
......
......@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.social.entity.TSocialAutoLog;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoLogService;
......@@ -39,6 +41,10 @@ public class TSocialAutoLogController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
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));
}
......
......@@ -38,7 +38,9 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
List<TDispatchImportVo> getDisPatcherFundList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type);
List<TDispatchInfoPre> getAllUnDisData();
List<TDispatchInfoPre> getAllUnDisSocialData();
List<TDispatchInfoPre> getAllUnDisFundData();
List<String> getAllUnDisDataIdList();
......
......@@ -505,6 +505,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){
errorMessage.setData(data);
errorMessageList.add(errorMessage);
}else {
cachedDataList.add(data);
......@@ -572,6 +573,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){
errorMessage.setData(data);
errorMessageList.add(errorMessage);
}else {
cachedDataList.add(data);
......@@ -649,12 +651,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
SysHouseHoldInfo hold = null;
//补缴险种
String insurancePension = null;
String startDateTemp = null;
String doMonthTemp = null;
for (int i = 0; i < excelVOList.size(); i++) {
infoVo = new SysBaseSetInfo();
excel = excelVOList.get(i);
hold = holdMap.get(excel.getDepartName());
if (Common.isEmpty(hold)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户");
errorMsg = new ErrorMessage(excel.getRowIndex(),"社保户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -666,23 +670,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
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.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);
continue;
}
//校验适用其实月份及执行月月份 是否符合规则 2025-10
if (!Common.validateFormatYearMonth(excel.getApplyStartDate())
|| !Common.validateFormatYearMonth(excel.getDoMonth())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
startDateTemp = excel.getApplyStartDate()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING);
doMonthTemp = excel.getDoMonth()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING);
//适用起始月份
dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT);
dateFormat = DateUtil.stringToDate2(startDateTemp+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateFormat){
infoVo.setApplyStartDate(dateFormat);
}else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -691,7 +701,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“"
+DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“"
+DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”,请修改后重新提交。");
+"”,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -699,18 +709,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if (Common.isNotNull(temp)){
if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份");
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份",excel);
errorMessageList.add(errorMsg);
continue;
}
temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1));
}
//执行月份校验
dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT);
dateUse = DateUtil.stringToDate2(doMonthTemp+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateUse){
infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0));
}else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份格式错误,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -718,13 +728,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (dateUse.after(dateFormat)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只能填写“"
+DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”及之前的月份,请修改后重新提交。");
+"”及之前的月份,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
//是否同一基数上下限
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);
continue;
}
......@@ -752,7 +762,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| Common.isEmpty(excel.getUpMedical()) || Common.isEmpty(excel.getLowerMedical())
|| Common.isEmpty(excel.getUpBirth()) || Common.isEmpty(excel.getLowerBirth())
|| Common.isEmpty(excel.getUpUnemployment()) || Common.isEmpty(excel.getLowerUnemployment())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限为否时,工伤、失业、医疗、生育上下限必填");
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否同一基数上下限为否时,工伤、失业、医疗、生育上下限必填",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -779,7 +789,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpPersion()
&& null != infoVo.getLowerPersion()
&& infoVo.getUpPersion().compareTo(infoVo.getLowerPersion()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"养老基数下限不可大于养老基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"养老基数下限不可大于养老基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -787,7 +797,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpInjury()
&& null != infoVo.getLowerInjury()
&& infoVo.getUpInjury().compareTo(infoVo.getLowerInjury()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"工伤基数下限不可大于工伤基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"工伤基数下限不可大于工伤基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -795,7 +805,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpMedical()
&& null != infoVo.getLowerMedical()
&& infoVo.getUpMedical().compareTo(infoVo.getLowerMedical()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"医疗基数下限不可大于医疗基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"医疗基数下限不可大于医疗基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -803,7 +813,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpBirth()
&& null != infoVo.getLowerBirth()
&& infoVo.getUpBirth().compareTo(infoVo.getLowerBirth()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"生育基数下限不可大于生育基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"生育基数下限不可大于生育基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -811,14 +821,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpUnemployment()
&& null !=infoVo.getLowerUnemployment()
&& infoVo.getUpUnemployment().compareTo(infoVo.getLowerUnemployment()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"失业基数下限不可大于失业基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"失业基数下限不可大于失业基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
//大病是否收取
if (!CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && !CommonConstants.ONE_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);
continue;
}
......@@ -829,7 +839,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setIsIllness(excel.getIsIllness());
//大病缴纳周期必填且只可是按年或按月
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);
continue;
}
......@@ -838,7 +848,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (CommonConstants.ZERO_STRING.equals(excel.getCollectType())){
//大病缴纳周期按年 收费模式必填且只可填写“立即收费”或“次年起手”
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);
continue;
}
......@@ -849,7 +859,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getCollectMoth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”的,缴纳月份字段必填,只可以填写一月~十二月中的任意一月,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”的,缴纳月份字段必填,只可以填写一月~十二月中的任意一月,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -858,7 +868,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//大病缴纳周期按月
if (CommonConstants.ONE_STRING.equals(excel.getCollectType())){
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);
continue;
}
......@@ -870,7 +880,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getLowerBig()
|| excel.getLowerBig().compareTo(BigDecimal.ZERO) < 0
|| excel.getUpBig().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病基数上下限字段必填,仅填写正确基数即可,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病基数上下限字段必填,仅填写正确基数即可,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -881,7 +891,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getPayPersonalPro()
|| 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);
continue;
}
......@@ -897,7 +907,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
|| null == excel.getChargePersonal()
|| excel.getChargePersonal().compareTo(BigDecimal.ZERO) < 0
|| excel.getChargeCompany().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”或大病缴纳周期为“按月”且缴纳方式为“按定值”时,单位或个人大病金额字段必填,仅填写正确金额即可,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病是否收取为是时,大病缴纳周期为“按年”或大病缴纳周期为“按月”且缴纳方式为“按定值”时,单位或个人大病金额字段必填,仅填写正确金额即可,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -908,14 +918,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (null != infoVo.getUpBig()
&& null !=infoVo.getLowerBig()
&& infoVo.getUpBig().compareTo(infoVo.getLowerBig()) < 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病基数下限不可大于大病基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"大病基数下限不可大于大病基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
}
//是否可补缴 只可以填写是或否,必填
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);
continue;
}
......@@ -923,7 +933,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//是否可补缴为是时补缴险种必填
if (CommonConstants.ZERO_STRING.equals(excel.getCanOverpay())) {
if (!Common.isNotNull(excel.getInsurancePension())) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "是否可补缴为是时补缴险种必填,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(), "是否可补缴为是时补缴险种必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -956,7 +966,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.replace(" ", "")
.replace(",", "");
if (insurancePension.length() > 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(), "补缴险种填写错误,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(), "补缴险种填写错误,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -966,28 +976,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getOverpayNumber())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
infoVo.setOverpayNumber(Integer.parseInt(excel.getOverpayNumber()));
//是否含起缴当月 必填
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);
continue;
}
infoVo.setHaveThisMonth(excel.getHaveThisMonth());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
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);
continue;
}
infoVo.setInsuranceIsLatestCardinality(excel.getInsuranceIsLatestCardinality());
// 补缴政策 必填
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);
continue;
}
......@@ -1004,6 +1020,19 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setPersonalMedicalPro(excel.getPersonalMedicalPro());
infoVo.setPersonalPersionPro(excel.getPersonalPersionPro());
infoVo.setPayPersonalPro(excel.getPayPersonalPro());
//各种比例需在0~100内
if (infoVo.getUnitPersionPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getUnitInjuryPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getUnitMedicalPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getUnitBirthPro().compareTo( BigDecimal.ZERO) < 0
|| infoVo.getUnitUnemploymentPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getPersonalUnemploymentPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getPersonalMedicalPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getPersonalPersionPro().compareTo(BigDecimal.ZERO) < 0 ){
errorMsg = new ErrorMessage(excel.getRowIndex(),"比例需在0~100内,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
//单位及个人比例合计
infoVo.setUnitProSum(BigDecimalUtils.safeAdd(infoVo.getUnitInjuryPro(),
infoVo.getUnitMedicalPro(),
......@@ -1017,6 +1046,13 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (CommonConstants.ZERO_STRING.equals(excel.getIsIllness()) && CommonConstants.ONE_STRING.equals(excel.getValueType())){
infoVo.setUnitProSum(BigDecimalUtils.safeAdd(infoVo.getUnitProSum(), infoVo.getPayCompanyPro()));
infoVo.setPersonalProSum(BigDecimalUtils.safeAdd(infoVo.getPersonalProSum(),infoVo.getPayPersonalPro()));
//各种比例需在0~100内
if (infoVo.getPayCompanyPro().compareTo(BigDecimal.ZERO) < 0
|| infoVo.getPayPersonalPro().compareTo(BigDecimal.ZERO) < 0){
errorMsg = new ErrorMessage(excel.getRowIndex(),"比例需在0~100内,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
}
infoVo.setStatus(CommonConstants.ZERO_INT);
infoVo.setBaseType(CommonConstants.ZERO_STRING);
......@@ -1024,7 +1060,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
try {
insertSocialExcel(infoVo,socialSetInfoMap,temp);
}catch (Exception e){
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -1082,20 +1118,22 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
SysPayProportion fundPro = null;
String[] split = null;
String[] splitSub = null;
String startDateTemp = null;
String doMonthTemp = null;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i);
infoVo = new SysBaseSetInfo();
hold = holdMap.get(excel.getDepartName());
if (Common.isEmpty(hold)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户");
errorMsg = new ErrorMessage(excel.getRowIndex(),"公积金户”"+excel.getDepartName()+"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户",excel);
errorMessageList.add(errorMsg);
continue;
}
infoVo.setDepartName(excel.getDepartName());
//公积金类型
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);
continue;
}
......@@ -1106,23 +1144,29 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
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.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);
continue;
}
//校验适用其实月份及执行月月份 是否符合规则 2025-10
if (!Common.validateFormatYearMonth(excel.getApplyStartDate())
|| !Common.validateFormatYearMonth(excel.getDoMonth())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份或执行月月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
startDateTemp = excel.getApplyStartDate()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING);
doMonthTemp = excel.getDoMonth()
.replace("-", CommonConstants.EMPTY_STRING)
.replace("/", CommonConstants.EMPTY_STRING);
//适用起始月份
dateFormat = DateUtil.stringToDate2(excel.getApplyStartDate()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT);
dateFormat = DateUtil.stringToDate2(startDateTemp+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateFormat){
infoVo.setApplyStartDate(dateFormat);
}else {
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份格式错误,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -1131,7 +1175,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMsg = new ErrorMessage(excel.getRowIndex(),"适用起始月份只可填写“"
+DateUtil.getYearAndMonth(new Date(),0,CommonConstants.CENTER_SPLIT_LINE_STRING) +"”或“"
+DateUtil.getYearAndMonth(new Date(),1,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”,请修改后重新提交。");
+"”,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -1139,14 +1183,14 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if (Common.isNotNull(temp)){
if (temp.getApplyStartDate().getTime() >= dateFormat.getTime()){
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份");
errorMsg = new ErrorMessage(excel.getRowIndex(),"请检查数据,使用起始月份不能小于已存在的使用起始月份",excel);
errorMessageList.add(errorMsg);
continue;
}
temp.setApplyEndDate(DateUtil.addDayByDate(dateFormat,-1));
}
//执行月份校验
dateUse = DateUtil.stringToDate2(excel.getDoMonth()+"-01", DateUtil.ISO_EXPANDED_DATE_FORMAT);
dateUse = DateUtil.stringToDate2(doMonthTemp+"01", DateUtil.ISO_DATE_FORMAT);
if (null != dateUse){
infoVo.setDoMonth(DateUtil.getYearAndMonth(dateFormat,0));
}else {
......@@ -1158,7 +1202,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (dateUse.after(dateFormat)){
errorMsg = new ErrorMessage(excel.getRowIndex(),"执行月份只可填写“"
+DateUtil.getYearAndMonth(dateFormat,0,CommonConstants.CENTER_SPLIT_LINE_STRING)
+"”及之前的月份,请修改后重新提交。");
+"”及之前的月份,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -1167,7 +1211,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
infoVo.setUpperLimit(excel.getUpperLimit());
//基数下限不可大于基数上限
if (excel.getLowerLimit().compareTo(excel.getUpperLimit()) > 0) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"基数下限不可大于基数上限,请修改后重新提交。");
errorMsg = new ErrorMessage(excel.getRowIndex(),"基数下限不可大于基数上限,请修改后重新提交。",excel);
errorMessageList.add(errorMsg);
continue;
}
......@@ -1178,49 +1222,33 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.THREE_STRING, CommonConstants.FOUR_STRING,
CommonConstants.FIVE_STRING, CommonConstants.SIX_STRING)
.contains(excel.getFundPayPoint())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单边小数点必填,只可填写“四舍五入取整或元以下舍去或见角进元或保留两位小数或保留一位小数或见分进元”,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"单边小数点必填,只可填写“四舍五入取整或元以下舍去或见角进元或保留两位小数或保留一位小数或见分进元”,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
infoVo.setFundPayPoint(Integer.parseInt(excel.getFundPayPoint()));
//单位公积金比例,个人公积金比例 :需要校验格式 为 10,10;12,13
if (!Common.isNotNull(excel.getHousingFundPro())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例必填,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例必填,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
// 校验 单位公积金比例,个人公积金比例格式:10,10;12,13
if (!Common.validateFormat(excel.getHousingFundPro())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例格式错误,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"单位公积金比例,个人公积金比例格式错误,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
split = excel.getHousingFundPro().split(CommonConstants.SEMICOLON_STRING);
fundProList = new ArrayList<>();
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”之间的数字,请修改后重新提交");
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);
errorMsg = initFundper(excel, fundProList, split);
if (null != errorMsg){
errorMessageList.add(errorMsg);
continue;
}
//是否可补缴 只可以填写是或否,必填
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);
continue;
}
......@@ -1232,34 +1260,40 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
CommonConstants.SEVEN_STRING, CommonConstants.EIGHT_STRING, CommonConstants.NINE_STRING,
CommonConstants.TEN_STRING, CommonConstants.ELEVEN_STRING, CommonConstants.TWELVE_STRING)
.contains(excel.getOverpayNumber())){
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
infoVo.setOverpayNumber(Integer.parseInt(excel.getOverpayNumber()));
//是否含起缴当月
//是否含起缴当月 必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
infoVo.setHaveThisMonth(excel.getHaveThisMonth());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
continue;
}
// 补缴政策 必填
if (Common.isEmpty(excel.getPayPolicy())) {
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);
continue;
}
infoVo.setPayPolicy(excel.getPayPolicy());
infoVo.setInsuranceIsLatestCardinality(excel.getInsuranceIsLatestCardinality());
}
//是否含起缴当月
//是否含起缴当月 必填
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getHaveThisMonth())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
infoVo.setHaveThisMonth(excel.getHaveThisMonth());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if (!Common.getSet(CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING).contains(excel.getInsuranceIsLatestCardinality())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
// 补缴政策 必填
if (Common.isEmpty(excel.getPayPolicy())) {
errorMsg = new ErrorMessage(excel.getRowIndex(),"补缴政策必填,请修改后重新提交");
errorMessageList.add(errorMsg);
continue;
}
infoVo.setPayPolicy(excel.getPayPolicy());
infoVo.setInsuranceIsLatestCardinality(excel.getInsuranceIsLatestCardinality());
infoVo.setCanOverpay(excel.getCanOverpay());
infoVo.setStatus(CommonConstants.ZERO_INT);
infoVo.setBaseType(CommonConstants.ONE_STRING);
......@@ -1268,14 +1302,41 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
try {
insertFundExcel(temp,infoVo,fundProList,fundSetInfoMap);
}catch (Exception e){
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交");
errorMsg = new ErrorMessage(excel.getRowIndex(),"数据保存失败,请修改后重新提交",excel);
errorMessageList.add(errorMsg);
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
*/
......
......@@ -361,27 +361,37 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getSocialStartDate());
vo.setRegistDate(preVo.getFundStartDate());
}else {
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(preVo.getJoinLeaveDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
if (null == preVo.getFundDateType()){
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getJoinLeaveDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
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.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
}
Date date = this.addYearsMonths(vo);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
......@@ -527,7 +537,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override
public void deleteUnProcessFundPreInfo(String id) {
//删除未处理的社保待购买信息
//删除未处理的公积金待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
......@@ -608,6 +618,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
socialAutoLog.setEmpName(contractVO.getEmpName());
socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard());
socialAutoLog.setErrorInfo(errorMessage.getMessage());
socialAutoLog.setType(CommonConstants.ZERO_STRING);
socialAutoLogService.save(socialAutoLog);
}
}
......@@ -631,8 +642,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override
public void pushWxConfrimMessage() {
//获取所有预计派单时间为当天而且状态是待确认的合同待签署数据
List<TDispatchInfoPre> unConfirmList = baseMapper.getAllUnDisData();
//获取所有预计派单时间为当天而且状态是待确认的社保待签署数据
List<TDispatchInfoPre> unConfirmList = baseMapper.getAllUnDisSocialData();
if (Common.isNotNull(unConfirmList) && !unConfirmList.isEmpty()) {
for (TDispatchInfoPre pre : unConfirmList) {
try {
......@@ -642,6 +653,17 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
}
}
}
//获取所有预计派单时间为当天而且状态是待确认的公积金待签署数据
List<TDispatchInfoPre> unConfirmFundList = baseMapper.getAllUnDisFundData();
if (Common.isNotNull(unConfirmFundList) && !unConfirmFundList.isEmpty()) {
for (TDispatchInfoPre pre : unConfirmFundList) {
try {
sendMessageToWx(pre);
} catch (Exception e) {
log.error("执行异常", e);
}
}
}
}
@Override
......@@ -896,6 +918,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
socialAutoLog.setEmpName(contractVO.getEmpName());
socialAutoLog.setEmpIdcard(contractVO.getEmpIdcard());
socialAutoLog.setErrorInfo(errorMessage.getMessage());
socialAutoLog.setType(CommonConstants.ONE_STRING);
socialAutoLogService.save(socialAutoLog);
}
}
......
......@@ -87,6 +87,7 @@
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="configHouseId" column="CONFIG_HOUSE_ID"/>
</resultMap>
......@@ -188,7 +189,8 @@
a.LOWER_BIG,
a.PROVIDENT_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER
a.PERSONAL_PROVIDENT_PER,
a.CONFIG_HOUSE_ID
</sql>
<sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null">
......@@ -561,14 +563,26 @@
</foreach>
</where>
</select>
<select id="getAllUnDisData" resultMap="tDispatchInfoPreMap">
<select id="getAllUnDisSocialData" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
a.expected_collection_time is not null and type_sub = '0'
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0'
group by a.customer_user_login_name
</select>
<select id="getAllUnDisFundData" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null and type_sub = '1'
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0'
group by a.customer_user_login_name
</select>
<select id="getAllUnDisDataIdList" resultType="java.lang.String">
......
......@@ -18,6 +18,7 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="socialId" column="SOCIAL_ID"/>
<result property="type" column="TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -30,10 +31,13 @@
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,a.SOCIAL_ID
a.CREATE_TIME,a.SOCIAL_ID,a.TYPE
</sql>
<sql id="tSocialAutoLog_where">
<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() != ''">
AND a.ID = #{tSocialAutoLog.id}
</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