|
@@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 事后触发监管
|
|
* 事后触发监管
|
|
@@ -33,10 +32,10 @@ public class AfterWaringJob implements Job {
|
|
|
QueryWrapper queryWrapper = new QueryWrapper(AfterIncidentLog.class);
|
|
QueryWrapper queryWrapper = new QueryWrapper(AfterIncidentLog.class);
|
|
|
queryWrapper.eq("state", Constant.WATING);
|
|
queryWrapper.eq("state", Constant.WATING);
|
|
|
long count = afterIncidentLogService.count(queryWrapper);
|
|
long count = afterIncidentLogService.count(queryWrapper);
|
|
|
- if(count>0){
|
|
|
|
|
|
|
+ if (count > 0) {
|
|
|
queryWrapper.last(" limit 1000");
|
|
queryWrapper.last(" limit 1000");
|
|
|
List<AfterIncidentLog> afterIncidentLogList = afterIncidentLogService.list(queryWrapper);
|
|
List<AfterIncidentLog> afterIncidentLogList = afterIncidentLogService.list(queryWrapper);
|
|
|
- for(AfterIncidentLog afterIncidentLog : afterIncidentLogList){
|
|
|
|
|
|
|
+ for (AfterIncidentLog afterIncidentLog : afterIncidentLogList) {
|
|
|
dealAftertask(afterIncidentLog);
|
|
dealAftertask(afterIncidentLog);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -45,11 +44,11 @@ public class AfterWaringJob implements Job {
|
|
|
|
|
|
|
|
|
|
|
|
|
@Async("commonTaskAsyncPool")
|
|
@Async("commonTaskAsyncPool")
|
|
|
- public void dealAftertask(AfterIncidentLog afterIncidentLog){
|
|
|
|
|
|
|
+ public void dealAftertask(AfterIncidentLog afterIncidentLog) {
|
|
|
AfterwardsAudit afterwardsAudit = ruleEngine.insertAfterWarning(afterIncidentLog);
|
|
AfterwardsAudit afterwardsAudit = ruleEngine.insertAfterWarning(afterIncidentLog);
|
|
|
afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.DEALING).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
|
|
afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.DEALING).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
|
|
|
List<AfterIncidentDetailLog> afterIncidentDetailLogList = afterIncidentDetailLogService.lambdaQuery().eq(AfterIncidentDetailLog::getAfterIncidentLogId, afterIncidentLog.getId()).list();
|
|
List<AfterIncidentDetailLog> afterIncidentDetailLogList = afterIncidentDetailLogService.lambdaQuery().eq(AfterIncidentDetailLog::getAfterIncidentLogId, afterIncidentLog.getId()).list();
|
|
|
- for(AfterIncidentDetailLog afterIncidentDetailLog : afterIncidentDetailLogList) {
|
|
|
|
|
|
|
+ for (AfterIncidentDetailLog afterIncidentDetailLog : afterIncidentDetailLogList) {
|
|
|
ruleEngine.dealAfterInterfaceEngin(afterwardsAudit, afterIncidentDetailLog);
|
|
ruleEngine.dealAfterInterfaceEngin(afterwardsAudit, afterIncidentDetailLog);
|
|
|
}
|
|
}
|
|
|
afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.SUCCESS).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
|
|
afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.SUCCESS).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
|