Commit ca07c0fb authored by fangxinjiang's avatar fangxinjiang

社保公积金自动化定时任务+社保公积金起缴日期+户截止日配置-fxj

parent b2476458
......@@ -588,10 +588,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("公积金") && null != newInfo.getFundUpdateFlag()
&& newInfo.getFundUpdateFlag() && dispatchInfoFundPreOldVo != null
&& dispatchInfoFundPreVo != null) {
Date expectedCollectionTime = dispatchInfoFundPreVo.getExpectedCollectionTime();
Date expectedConfirmTime = dispatchInfoFundPreVo.getExpectedConfirmTime();
//如果自动触发派增为是,计算派单发起时间和派单确认时间
initFundTime(dispatchInfoFundPreVo);
//initFundTime(dispatchInfoFundPreVo);
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
if (differenceFundKey.length() > 0) {
......@@ -607,8 +604,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceFundKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
dispatchInfoFundPreVo.setExpectedCollectionTime(expectedCollectionTime);
dispatchInfoFundPreVo.setExpectedConfirmTime(expectedConfirmTime);
}
// 有修改,则加日志
......@@ -1144,9 +1139,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金");
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());
......
......@@ -441,7 +441,7 @@ public class SocialDaprUtils {
**/
public R<THouseHoldLimitInnerVo> getWorkDayByDeadLineDay(BaseSearchVO paramVo) {
R<THouseHoldLimitInnerVo> res = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId()
,"/thouseholdlimit/inner/checkCanBeHandleByDeadLineDay", paramVo, THouseHoldLimitInnerVo.class, SecurityConstants.FROM_IN);
,"/thouseholdlimit/inner/getWorkDayByDeadLineDay", paramVo, THouseHoldLimitInnerVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("查询截止日对应的工作日信息失败!");
}
......
......@@ -661,6 +661,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ONE_STRING);
}
}
THouseHoldLimitInnerVo socialLimitVo = null;
//1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保")) {
//根据身份证号码和项目编号查询合同
......@@ -677,8 +678,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
errorTemp.append("该人员存在在途/有效的社保数据,请将【是否已参保】调整为【是】;");
// return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”");
}
if (null != preVo.getDispatchInfoPreVo()
&& Common.isNotNull(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoPreVo().getSocialHouseholdName());
paramVo.setType(CommonConstants.ZERO_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
socialLimitVo = null== resultR?null:resultR.getData();
if (null == socialLimitVo){
errorTemp.append("请及时配置户("+paramVo.getName()+")截止日配置信息");
}
}
}
THouseHoldLimitInnerVo fundLimitVo = null;
// 公积金自动化校验逻辑 1.9.17 FXJ
if (preVo.getServerItem().contains("公积金") && null != preVo.getDispatchInfoFundPreVo()) {
//根据身份证号码和项目编号查询公积金
......@@ -695,20 +710,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
errorTemp.append("该人员存在在途/有效的公积金数据,请将【是否已参保】调整为【是】;");
// return R.other(CommonConstants.THREE_INT,null,"该人员存在在途/有效的公积金数据,请将'是否已参保'调整为'是'");
}
//判断公积金基数 是否小于 公积金户配置的最低基数
/*if (Common.isNotNull(preVo.getDispatchInfoFundPreVo().getConfigHouseId())
&& Common.isNotNull(preVo.getDispatchInfoFundPreVo().getProvidentCardinal())){
R<SysBaseSetInfoVo> resR = socialDaprUtils.getSocialHouseBaseSet(preVo.getDispatchInfoFundPreVo().getConfigHouseId());
if (Common.isNotNull(resR) && resR.getData() != null) {
SysBaseSetInfoVo setInfo = resR.getData();
if (preVo.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) {
return R.other(CommonConstants.THREE_INT,null,"公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!");
}
}else {
return R.other(CommonConstants.THREE_INT,null,"获取公积金配置信息失败!");
if (null != preVo.getDispatchInfoFundPreVo()
&& Common.isNotNull(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoFundPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoFundPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoFundPreVo().getProvidentHouseholdName());
paramVo.setType(CommonConstants.ONE_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
fundLimitVo = null== resultR?null:resultR.getData();
if (null == fundLimitVo){
errorTemp.append("请及时配置户("+paramVo.getName()+")截止日配置信息");
}
}*/
}
}
//错误信息全量返回
......@@ -771,7 +786,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData());
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData(),socialLimitVo);
}
socialDaprUtils.saveSocialPreInfo(preVo);
}
......@@ -782,7 +797,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo);
}
socialDaprUtils.saveFundPreInfo(preVo);
}
......@@ -793,7 +808,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.ok();
}
private void initFundPreInfo(EmployeeRegistration registration, TDispatchInfoPreVo preVo, YifuUser user, String id) throws ParseException {
private void initFundPreInfo(EmployeeRegistration registration,
TDispatchInfoPreVo preVo, YifuUser user, String id,
THouseHoldLimitInnerVo limitInfo) throws ParseException {
preVo.setRegisterId(id);
preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(null != registration.getCustomerUserLoginNameNew()
......@@ -816,12 +833,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initFundStartDate(preVo);
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())
&& null == preVo.getExpectedCollectionTime()
&& null == preVo.getExpectedConfirmTime()) {
initExpectedCollectionTime(preVo.getProvidentHouseholdName(), preVo.getFundStartDate(), preVo);
initExpectedCollectionTime(preVo.getProvidentHouseholdName(), preVo.getFundStartDate(), preVo,limitInfo);
}
}
/**
......@@ -829,20 +844,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
* @Description 初始化预计派单发起时间、预计派单确认时间
* @Date 17:06 2025/12/12
**/
private void initExpectedCollectionTime(String houseName, Date startDate, TDispatchInfoPreVo preVo2) throws ParseException {
private void initExpectedCollectionTime(String houseName, Date startDate,
TDispatchInfoPreVo preVo2,
THouseHoldLimitInnerVo innerVo) throws ParseException {
//获取当前月是否可办理状态:获取办理截止日往前最近的工昨日,当前日及截止日前(含截止日)有工作日就是可办理
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(houseName);
paramVo.setType(CommonConstants.ZERO_STRING);
THouseHoldLimitInnerVo innerVo = null;
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
if (!Common.isNotNull(resultR) && !Common.isNotNull(resultR.getData())){
throw new RuntimeException("获取截止日信息失败");
}else {
innerVo = resultR.getData();
}
if (null == innerVo){
throw new RuntimeException("请及时配置户("+houseName+")截止日配置信息");
return;
}
boolean canBeHandle = innerVo.getCanBeHandle();
LocalTime currentTime = LocalTime.now();
......@@ -1219,7 +1226,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ONE_STRING);
}
}
THouseHoldLimitInnerVo socialLimitVo = null;
//1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保") && null != preVo.getDispatchInfoPreVo()) {
//根据身份证号码和项目编号查询合同
......@@ -1231,8 +1238,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
errorList.add(exitCheckVo);
continue;
}
if (null != preVo.getDispatchInfoPreVo()
&& Common.isNotNull(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoPreVo().getSocialHouseholdName());
paramVo.setType(CommonConstants.ZERO_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
socialLimitVo = null== resultR?null:resultR.getData();
if (null == socialLimitVo){
exitCheckVo.setType("社保");
exitCheckVo.setErrorMsg("请及时配置户("+paramVo.getName()+")截止日配置信息");
errorList.add(exitCheckVo);
continue;
}
}
}
THouseHoldLimitInnerVo fundLimitVo = null;
// 公积金自动化校验逻辑
if (preVo.getServerItem().contains("公积金") && null != preVo.getDispatchInfoFundPreVo()) {
//根据身份证号码和项目编号查询公积金
......@@ -1253,26 +1277,24 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
errorList.add(exitCheckVo);
continue;
}
//判断公积金基数 是否小于 公积金户配置的最低基数
/*if (Common.isNotNull(preVo.getDispatchInfoFundPreVo().getConfigHouseId())
&& Common.isNotNull(preVo.getDispatchInfoFundPreVo().getProvidentCardinal())){
resR = socialDaprUtils.getSocialHouseBaseSet(preVo.getDispatchInfoFundPreVo().getConfigHouseId());
if (Common.isNotNull(resR) && resR.getData() != null) {
setInfo = resR.getData();
if (preVo.getDispatchInfoFundPreVo().getProvidentCardinal().compareTo(setInfo.getLowerLimit()) < 0) {
exitCheckVo.setType("公积金");
exitCheckVo.setErrorMsg("公积金基数需≥当前户("+setInfo.getDepartName()+")的最低基数:"+setInfo.getLowerLimit()+"!");
errorList.add(exitCheckVo);
continue;
}
}else {
if (null != preVo.getDispatchInfoFundPreVo()
&& Common.isNotNull(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoFundPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoFundPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoFundPreVo().getProvidentHouseholdName());
paramVo.setType(CommonConstants.ONE_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
fundLimitVo = null== resultR?null:resultR.getData();
if (null == fundLimitVo){
exitCheckVo.setType("公积金");
exitCheckVo.setErrorMsg("获取公积金配置信息失败!");
exitCheckVo.setErrorMsg("请及时配置户("+paramVo.getName()+")截止日配置信息");
errorList.add(exitCheckVo);
continue;
}
}*/
}
//判断公积金基数 是否小于 公积金户配置的最低基数
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
......@@ -1318,7 +1340,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
|| null != preVo.getDispatchInfoPreVo())) {
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData());
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData(),socialLimitVo);
}
socialDaprUtils.saveSocialPreInfo(preVo);
}
......@@ -1329,7 +1351,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
initFundPreInfo(registration, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo);
}
socialDaprUtils.saveFundPreInfo(preVo);
}
......@@ -1542,7 +1564,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registrationNow, preVo.getDispatchInfoPreVo(), user, domainR.getData());
THouseHoldLimitInnerVo socialLimitVo = null;
if (Common.isNotNull(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoPreVo().getSocialHouseholdName());
paramVo.setType(CommonConstants.ZERO_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
socialLimitVo = null== resultR?null:resultR.getData();
if (null == socialLimitVo){
throw new RuntimeException("请及时配置户("+paramVo.getName()+")截止日配置信息");
}
}
initSocialPreInfo(registrationNow, preVo.getDispatchInfoPreVo(), user, domainR.getData(),socialLimitVo);
}
socialDaprUtils.saveSocialPreInfo(preVo);
}
......@@ -1554,7 +1590,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//生成公积金待购买或者已购买数据
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
THouseHoldLimitInnerVo fundLimitVo = null;
if (Common.isNotNull(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& CommonConstants.ZERO_STRING.equals(preVo.getDispatchInfoFundPreVo().getIsAutoDis())
&& null == preVo.getDispatchInfoFundPreVo().getExpectedCollectionTime()
&& null == preVo.getDispatchInfoFundPreVo().getExpectedConfirmTime()) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setName(preVo.getDispatchInfoFundPreVo().getProvidentHouseholdName());
paramVo.setType(CommonConstants.ZERO_STRING);
R<THouseHoldLimitInnerVo> resultR = socialDaprUtils.getWorkDayByDeadLineDay(paramVo);
fundLimitVo = null== resultR?null:resultR.getData();
if (null == fundLimitVo){
throw new RuntimeException("请及时配置户("+paramVo.getName()+")截止日配置信息");
}
}
initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo);
}
socialDaprUtils.saveFundPreInfo(preVo);
}
......@@ -2066,7 +2116,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//社保待购买数据初始化
private void initSocialPreInfo(EmployeeRegistration registration, TDispatchInfoPreVo preVo,
YifuUser user, String id) throws ParseException {
YifuUser user, String id,THouseHoldLimitInnerVo limitInfo) throws ParseException {
preVo.setRegisterId(id);
preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(null != registration.getCustomerUserLoginNameNew()
......@@ -2111,11 +2161,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间,因为前端可以修改,所以只有没有值的时候才后端结算
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())
&& null == preVo.getExpectedCollectionTime()
&& null == preVo.getExpectedConfirmTime()) {
//获取当前月是否可办理状态:获取办理截止日往前最近的工昨日,当前日及截止日前(含截止日)有工作日就是可办理
initExpectedCollectionTime(preVo.getSocialHouseholdName(), preVo.getSocialStartDate(), preVo);
initExpectedCollectionTime(preVo.getSocialHouseholdName(), preVo.getSocialStartDate(), preVo,limitInfo);
}
}
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -55,6 +56,7 @@ public class THouseHoldLimitInnerVo extends RowIndex implements Serializable {
/**
* date
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wordDate;
/**
......
......@@ -88,7 +88,7 @@ public class THouseHoldLimitController {
return R.ok(tHouseHoldLimitService.getById(id));
}
/**
* 通过户名称及类型查询到具体截止日期后去看是否为工作日,如果不是工作日则往前推,知道找到工作日,然后返回工作日
* 通过户名称及类型查询到具体截止日期后去看是否为工作日,如果不是工作日则往前推,直到找到工作日,然后返回工作日
* 如果找不到对应截止日期,则返回null
* @param paramVo:户名称 type: 0 社保、1 公积金
* @return R
......
......@@ -248,7 +248,6 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())
&& Common.isEmpty(preVo.getExpectedCollectionTime())) {
initExpectedCollectionTime(preVo.getSocialHouseholdName(), preVo.getSocialStartDate(), preVo);
}
......@@ -323,63 +322,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
&& Common.isNotNull(preVo.getExpectedCollectionType())
&& Common.isEmpty(preVo.getExpectedCollectionTime())) {
initExpectedCollectionTime(preVo.getProvidentHouseholdName(), preVo.getFundStartDate(), preVo);
/*TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
//接收方式 0项目配置 1自定义
if (CommonConstants.ONE_STRING.equals(preVo.getReceiveType())){
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}else {
if (null == preVo.getFundStartDate()){
//先计算起缴日期
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);
dayVo.setRegistType(0);
TEmployeeInsuranceWorkDayVo dataR = tHolidayInfoService.selectBeforeOrAfterWorkDayCommon(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getRegistDate())) {
preVo.setExpectedCollectionTime(dataR.getRegistDate());
preVo.setExpectedConfirmTime(dataR.getRegistDate());
} else {
preVo.setExpectedCollectionTime(date);
preVo.setExpectedConfirmTime(date);
}
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));
pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
pre.setExpectedConfirmTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedConfirmTime()));*/
}
if (Common.isNotNull(preExit)) {
pre.setId(preExit.getId());
......
......@@ -394,7 +394,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
try {
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
// 设置RegistDate为当前月份对应的截止日期deadLineDay
Date registDate = DateUtil.setDayByDate(new Date(), Integer.parseInt(deadLineDay));
Date registDate = DateUtil.setDayByDate(DateUtil.formatDateByPatten(new Date(), DateUtil.ISO_EXPANDED_DATE_FORMAT), Integer.parseInt(deadLineDay));
if (null == registDate) {
return null;
}
......@@ -440,7 +440,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
try {
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
// 设置RegistDate为当前月份对应的截止日期deadLineDay
Date registDate = DateUtil.setDayByDate(DateUtil.getDateByDayNum(0), Integer.parseInt(deadLineDay));
Date registDate = DateUtil.setDayByDate(DateUtil.formatDateByPatten(new Date(), DateUtil.ISO_EXPANDED_DATE_FORMAT), Integer.parseInt(deadLineDay));
if (null == registDate) {
return R.failed("未找到截止日期对应的可用工作日");
}
......
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