Commit 9460cd2c authored by fangxinjiang's avatar fangxinjiang

续签代码-定时任务

parent 32d0725b
...@@ -49,7 +49,6 @@ import java.util.Map; ...@@ -49,7 +49,6 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/tempcontractalert" ) @RequestMapping("/tempcontractalert" )
@Tag(name = "员工合同续签待办管理") @Tag(name = "员工合同续签待办管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpContractAlertController { public class TEmpContractAlertController {
private final TEmpContractAlertService tEmpContractAlertService; private final TEmpContractAlertService tEmpContractAlertService;
...@@ -148,7 +147,8 @@ public class TEmpContractAlertController { ...@@ -148,7 +147,8 @@ public class TEmpContractAlertController {
* @Date 2022-07-4 * @Date 2022-07-4
**/ **/
@SysLog("定时任务生成合同续签代码信息") @SysLog("定时任务生成合同续签代码信息")
@Inner @Operation(description = "定时任务生成合同续签代码信息")
//@Inner
@PostMapping("/inner/taskCreateContractAlert") @PostMapping("/inner/taskCreateContractAlert")
public R<Boolean> taskCreateContractAlert() { public R<Boolean> taskCreateContractAlert() {
return tEmpContractAlertService.taskCreateContractAlert(); return tEmpContractAlertService.taskCreateContractAlert();
......
...@@ -259,20 +259,28 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -259,20 +259,28 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setEmpIdcard(contract.getEmpIdcard()); alert.setEmpIdcard(contract.getEmpIdcard());
alert.setContractStart(LocalDateTimeUtils.convertLDToDate(contract.getContractStart())); alert.setContractStart(LocalDateTimeUtils.convertLDToDate(contract.getContractStart()));
alert.setContractEnd(LocalDateTimeUtils.convertLDToDate(contract.getContractEnd())); alert.setContractEnd(LocalDateTimeUtils.convertLDToDate(contract.getContractEnd()));
alert.setFileProvince(Integer.toString(contract.getFileProvince())); if (Common.isNotNull(contract.getFileProvince())){
alert.setFileCity(Integer.toString(contract.getFileCity())); alert.setFileProvince(Integer.toString(contract.getFileProvince()));
alert.setFileTown(Integer.toString(contract.getFileTown())); }
if (Common.isNotNull(contract.getFileCity())){
alert.setFileCity(Integer.toString(contract.getFileCity()));
}
if (Common.isNotNull(contract.getFileTown())){
alert.setFileTown(Integer.toString(contract.getFileTown()));
}
alert.setEmpType(contract.getEmpNatrue()); alert.setEmpType(contract.getEmpNatrue());
alert.setContractTerm(contract.getContractType()); alert.setContractTerm(contract.getContractType());
alert.setContractTerm(contract.getContractTerm()); alert.setContractTerm(contract.getContractTerm());
if (Common.isNotNull(contract.getContractEnd()) && contract.getContractEnd().isBefore(now)){ if (Common.isNotNull(alert.getContractEnd())){
alert.setDueFlag(CommonConstants.ONE_STRING); if (Common.isNotNull(contract.getContractEnd()) && contract.getContractEnd().isBefore(now)){
alert.setDaysOver(DateUtil.daysBetween(nowDate,alert.getContractEnd())); alert.setDueFlag(CommonConstants.ONE_STRING);
}else { alert.setDaysOver(DateUtil.daysBetween(nowDate,alert.getContractEnd()));
alert.setDaysDue(DateUtil.daysBetween(alert.getContractEnd(), nowDate)); }else {
alert.setDueFlag(CommonConstants.ZERO_STRING); alert.setDaysDue(DateUtil.daysBetween(alert.getContractEnd(), nowDate));
alert.setDueFlag(CommonConstants.ZERO_STRING);
}
alert.setFirstAlertTime(DateUtil.dateIncreaseByMonth(alert.getContractEnd(),CommonConstants.THREE_INT_NEGATE));
} }
alert.setFirstAlertTime(DateUtil.dateIncreaseByMonth(alert.getContractEnd(),CommonConstants.THREE_INT_NEGATE));
alert.setHandleStatus(CommonConstants.ZERO_STRING); alert.setHandleStatus(CommonConstants.ZERO_STRING);
alertMap.put(alert.getEmpIdcard(),alert); alertMap.put(alert.getEmpIdcard(),alert);
} }
......
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