Commit ca07c0fb authored by fangxinjiang's avatar fangxinjiang

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

parent b2476458
...@@ -588,10 +588,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -588,10 +588,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("公积金") && null != newInfo.getFundUpdateFlag() if (newInfo.getServerItem().contains("公积金") && null != newInfo.getFundUpdateFlag()
&& newInfo.getFundUpdateFlag() && dispatchInfoFundPreOldVo != null && newInfo.getFundUpdateFlag() && dispatchInfoFundPreOldVo != null
&& dispatchInfoFundPreVo != null) { && dispatchInfoFundPreVo != null) {
Date expectedCollectionTime = dispatchInfoFundPreVo.getExpectedCollectionTime(); //initFundTime(dispatchInfoFundPreVo);
Date expectedConfirmTime = dispatchInfoFundPreVo.getExpectedConfirmTime();
//如果自动触发派增为是,计算派单发起时间和派单确认时间
initFundTime(dispatchInfoFundPreVo);
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD); , dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
if (differenceFundKey.length() > 0) { if (differenceFundKey.length() > 0) {
...@@ -607,8 +604,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -607,8 +604,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceFundKey, logId, detailEmpLog); differenceFundKey, logId, detailEmpLog);
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
} }
dispatchInfoFundPreVo.setExpectedCollectionTime(expectedCollectionTime);
dispatchInfoFundPreVo.setExpectedConfirmTime(expectedConfirmTime);
} }
// 有修改,则加日志 // 有修改,则加日志
...@@ -1144,9 +1139,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -1144,9 +1139,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
preVo.setProcessStatus(CommonConstants.ZERO_STRING); preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("公积金"); preVo.setDispatchItem("公积金");
if (null != fundPreVo){ if (null != fundPreVo){
preVo.setExpectedCollectionTime(null);
preVo.setExpectedConfirmTime(null);
preVo.setExpectedCollectionType(fundPreVo.getExpectedCollectionType());
preVo.setReceiveType(fundPreVo.getReceiveType()); preVo.setReceiveType(fundPreVo.getReceiveType());
preVo.setConfigId(fundPreVo.getConfigId()); preVo.setConfigId(fundPreVo.getConfigId());
preVo.setConfigName(fundPreVo.getConfigName()); preVo.setConfigName(fundPreVo.getConfigName());
......
...@@ -441,7 +441,7 @@ public class SocialDaprUtils { ...@@ -441,7 +441,7 @@ public class SocialDaprUtils {
**/ **/
public R<THouseHoldLimitInnerVo> getWorkDayByDeadLineDay(BaseSearchVO paramVo) { public R<THouseHoldLimitInnerVo> getWorkDayByDeadLineDay(BaseSearchVO paramVo) {
R<THouseHoldLimitInnerVo> res = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId() 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)){ if (Common.isEmpty(res)){
return R.failed("查询截止日对应的工作日信息失败!"); return R.failed("查询截止日对应的工作日信息失败!");
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty; 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.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -55,6 +56,7 @@ public class THouseHoldLimitInnerVo extends RowIndex implements Serializable { ...@@ -55,6 +56,7 @@ public class THouseHoldLimitInnerVo extends RowIndex implements Serializable {
/** /**
* date * date
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wordDate; private Date wordDate;
/** /**
......
...@@ -88,7 +88,7 @@ public class THouseHoldLimitController { ...@@ -88,7 +88,7 @@ public class THouseHoldLimitController {
return R.ok(tHouseHoldLimitService.getById(id)); return R.ok(tHouseHoldLimitService.getById(id));
} }
/** /**
* 通过户名称及类型查询到具体截止日期后去看是否为工作日,如果不是工作日则往前推,知道找到工作日,然后返回工作日 * 通过户名称及类型查询到具体截止日期后去看是否为工作日,如果不是工作日则往前推,直到找到工作日,然后返回工作日
* 如果找不到对应截止日期,则返回null * 如果找不到对应截止日期,则返回null
* @param paramVo:户名称 type: 0 社保、1 公积金 * @param paramVo:户名称 type: 0 社保、1 公积金
* @return R * @return R
......
...@@ -248,7 +248,6 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -248,7 +248,6 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
//如果自动触发派增为是,计算派单发起时间和派单确认时间 //如果自动触发派增为是,计算派单发起时间和派单确认时间
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.isEmpty(preVo.getExpectedCollectionTime())) { && Common.isEmpty(preVo.getExpectedCollectionTime())) {
initExpectedCollectionTime(preVo.getSocialHouseholdName(), preVo.getSocialStartDate(), preVo); initExpectedCollectionTime(preVo.getSocialHouseholdName(), preVo.getSocialStartDate(), preVo);
} }
...@@ -323,63 +322,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -323,63 +322,8 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
//如果自动触发派增为是,计算派单发起时间和派单确认时间 //如果自动触发派增为是,计算派单发起时间和派单确认时间
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.isEmpty(preVo.getExpectedCollectionTime())) { && Common.isEmpty(preVo.getExpectedCollectionTime())) {
initExpectedCollectionTime(preVo.getProvidentHouseholdName(), preVo.getFundStartDate(), preVo); 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)) { if (Common.isNotNull(preExit)) {
pre.setId(preExit.getId()); pre.setId(preExit.getId());
......
...@@ -394,7 +394,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe ...@@ -394,7 +394,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
try { try {
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
// 设置RegistDate为当前月份对应的截止日期deadLineDay // 设置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) { if (null == registDate) {
return null; return null;
} }
...@@ -440,7 +440,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe ...@@ -440,7 +440,7 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
try { try {
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
// 设置RegistDate为当前月份对应的截止日期deadLineDay // 设置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) { if (null == registDate) {
return R.failed("未找到截止日期对应的可用工作日"); 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