Commit c2453662 authored by zhangwanglin's avatar zhangwanglin

失能人员退出跑批

parent 6bc5a093
...@@ -5,6 +5,7 @@ import org.springframework.boot.SpringApplication; ...@@ -5,6 +5,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
/** /**
...@@ -16,6 +17,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -16,6 +17,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableTransactionManagement @EnableTransactionManagement
@EnableFeignClients @EnableFeignClients
@EnableScheduling
public class ApplyApplication { public class ApplyApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ApplyApplication.class, args); SpringApplication.run(ApplyApplication.class, args);
......
package com.hungraim.ltc.controller;
import com.hungraim.ltc.redis.RedisLock;
import com.hungraim.ltc.service.DisableService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author zwl
* @ClassName DisableSch
* @description
* @date 2023/3/31 15:22
**/
@Component
@EnableAsync
@Slf4j
public class DisableScheduledController {
@Autowired
private RedisLock redisLock;
@Autowired
private DisableService disableService;
public static final String JOB_KEY = "redis.job.task:exitTask";
@Scheduled(cron = "0 12 00 * * ?")
public void disableExitTask() {
boolean flag = redisLock.tryLock(JOB_KEY, 1000*30);
if(flag){
log.info("disableExitTask========start:{}");
disableService.disableExitTask();
log.info("disableExitTask========end:{}");
}
}
}
...@@ -9,6 +9,7 @@ import com.hungraim.ltc.util.Result; ...@@ -9,6 +9,7 @@ import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -184,6 +185,8 @@ public interface DisableService { ...@@ -184,6 +185,8 @@ public interface DisableService {
int disableInfoExit(DisableExitVO disableExitVO); int disableInfoExit(DisableExitVO disableExitVO);
void disableExitHanlder(Integer exitReasonId, Integer srvOrganId, Integer disableInfoId, Date date);
List<ChDisableExit> getDisableExitHis(Integer disableInfoId); List<ChDisableExit> getDisableExitHis(Integer disableInfoId);
Integer selectByCertiCode(String certiCode); Integer selectByCertiCode(String certiCode);
......
...@@ -653,7 +653,8 @@ public class DisableServiceImpl implements DisableService { ...@@ -653,7 +653,8 @@ public class DisableServiceImpl implements DisableService {
* @param date 退出时间 * @param date 退出时间
*@return void *@return void
**/ **/
private void disableExitHanlder(Integer exitReasonId, Integer srvOrganId, Integer disableInfoId, Date date) { @Override
public void disableExitHanlder(Integer exitReasonId, Integer srvOrganId, Integer disableInfoId, Date date) {
// 更新方案为已终止 // 更新方案为已终止
ChSrvProgram chSrvProgram = new ChSrvProgram(); ChSrvProgram chSrvProgram = new ChSrvProgram();
chSrvProgram.setDisabInfoId(Long.valueOf(disableInfoId)); chSrvProgram.setDisabInfoId(Long.valueOf(disableInfoId));
......
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