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 { ...@@ -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
......
...@@ -816,14 +816,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -816,14 +816,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//是否已购买为是需要判断公积金是否在用或者流程中 //是否已购买为是需要判断公积金是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeRegistrationPre.getFundIsBuy()) && if (CommonConstants.ZERO_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
(Common.isEmpty(fundFlag) || Boolean.TRUE.equals(!fundFlag.getData()))) { (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()) && if (CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getFundIsBuy()) &&
Common.isNotNull(fundFlag) && Boolean.TRUE.equals(fundFlag.getData()) && Common.isNotNull(fundFlag) && Boolean.TRUE.equals(fundFlag.getData()) &&
null != employeeRegistrationPre.getDispatchInfoPreVo() && null != employeeRegistrationPre.getDispatchInfoFundPreVo()) {
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) { return R.other(CommonConstants.THREE_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
return R.other(CommonConstants.TWO_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
} }
//判断公积金基数 是否小于 公积金户配置的最低基数 //判断公积金基数 是否小于 公积金户配置的最低基数
if (Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId()) if (Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId())
...@@ -832,11 +831,11 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -832,11 +831,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 +853,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -854,8 +853,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);
} }
} }
......
...@@ -254,4 +254,38 @@ public class BigDecimalUtils { ...@@ -254,4 +254,38 @@ public class BigDecimalUtils {
} }
return new BigDecimal(c); 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 { ...@@ -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}");
} }
} }
...@@ -1277,6 +1277,23 @@ public class DateUtil { ...@@ -1277,6 +1277,23 @@ public class DateUtil {
return c1.getTime(); 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 * @Author fxj
......
...@@ -666,12 +666,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -666,12 +666,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//是否已签署为是需要判断是否在用或者流程中的公积金 //是否已签署为是需要判断是否在用或者流程中的公积金
if (CommonConstants.ZERO_STRING.equals(preVo.getFundIsBuy()) && if (CommonConstants.ZERO_STRING.equals(preVo.getFundIsBuy()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) { (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()) && if (CommonConstants.ONE_STRING.equals(preVo.getFundIsBuy()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) { 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()) if (Common.isNotNull(preVo.getDispatchInfoFundPreVo().getConfigHouseId())
...@@ -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,"获取公积金配置信息失败!");
} }
} }
...@@ -786,18 +786,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -786,18 +786,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setTypeSub(CommonConstants.ONE_STRING); preVo.setTypeSub(CommonConstants.ONE_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING); preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金"); preVo.setDispatchItem("公积金");
//如果公积金起缴日期为空需要初始化--只有批量确认时才会走到这里
initFundStartDate(registration, preVo);
//如果自动触发派增为是,计算派单发起时间和派单确认时间 //如果自动触发派增为是,计算派单发起时间和派单确认时间
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();
//接收方式 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())){
//用户选择起缴日期类型为入职日期,以入职日期为基准 //用户选择起缴日期类型为入职日期,以入职日期为基准
...@@ -815,8 +817,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -815,8 +817,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate()); vo.setRegistDate(preVo.getFundStartDate());
} }
}else {
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
} }
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date); dayVo.setRegistDate(date);
...@@ -843,6 +854,42 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -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 ...@@ -1220,7 +1267,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("补缴政策")
......
...@@ -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));
} }
......
...@@ -38,7 +38,9 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> { ...@@ -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<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(); List<String> getAllUnDisDataIdList();
......
...@@ -361,8 +361,9 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -361,8 +361,9 @@ 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())){
//用户选择起缴日期类型为入职日期,以入职日期为基准 //用户选择起缴日期类型为入职日期,以入职日期为基准
...@@ -380,8 +381,17 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -380,8 +381,17 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
vo.setYearAfter(0); vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate()); vo.setRegistDate(preVo.getFundStartDate());
} }
}else {
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}
} }
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date); dayVo.setRegistDate(date);
...@@ -527,7 +537,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -527,7 +537,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 +618,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -608,6 +618,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);
} }
} }
...@@ -631,8 +642,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -631,8 +642,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override @Override
public void pushWxConfrimMessage() { public void pushWxConfrimMessage() {
//获取所有预计派单时间为当天而且状态是待确认的合同待签署数据 //获取所有预计派单时间为当天而且状态是待确认的社保待签署数据
List<TDispatchInfoPre> unConfirmList = baseMapper.getAllUnDisData(); List<TDispatchInfoPre> unConfirmList = baseMapper.getAllUnDisSocialData();
if (Common.isNotNull(unConfirmList) && !unConfirmList.isEmpty()) { if (Common.isNotNull(unConfirmList) && !unConfirmList.isEmpty()) {
for (TDispatchInfoPre pre : unConfirmList) { for (TDispatchInfoPre pre : unConfirmList) {
try { try {
...@@ -642,6 +653,17 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -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 @Override
...@@ -896,6 +918,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -896,6 +918,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">
...@@ -561,14 +563,26 @@ ...@@ -561,14 +563,26 @@
</foreach> </foreach>
</where> </where>
</select> </select>
<select id="getAllUnDisData" resultMap="tDispatchInfoPreMap"> <select id="getAllUnDisSocialData" resultMap="tDispatchInfoPreMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_dispatch_info_pre a FROM t_dispatch_info_pre a
where 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 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