Commit 186ccae0 authored by 高东东's avatar 高东东

*)添加预案退出

parent 513c7fed
package com.yeejoin.amos.fas.business.controller; package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl;
import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance; import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
import com.yeejoin.amos.fas.business.service.intfc.IContingencyOriginalDataService; import com.yeejoin.amos.fas.business.service.intfc.IContingencyOriginalDataService;
import com.yeejoin.amos.fas.config.Permission; import com.yeejoin.amos.fas.config.Permission;
...@@ -14,6 +15,7 @@ import io.swagger.annotations.ApiParam; ...@@ -14,6 +15,7 @@ import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -38,6 +40,9 @@ public class TimeLineController extends BaseController{ ...@@ -38,6 +40,9 @@ public class TimeLineController extends BaseController{
static LinkedList<Map<String,String >> fireQueue = new LinkedList<>(); static LinkedList<Map<String,String >> fireQueue = new LinkedList<>();
@Autowired
private RedisTemplate redisTemplate;
@Permission @Permission
//@Authorization(ingore = true) //@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "根据批次号查询时间轴", notes = "根据批次号查询时间轴") @ApiOperation(httpMethod = "GET",value = "根据批次号查询时间轴", notes = "根据批次号查询时间轴")
...@@ -70,6 +75,22 @@ public class TimeLineController extends BaseController{ ...@@ -70,6 +75,22 @@ public class TimeLineController extends BaseController{
fireQueue.addLast(map); fireQueue.addLast(map);
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse fireExit(@RequestParam("batchNo") String batchNo,
@RequestParam("stepCode") String stepCode,
@RequestParam("buttonCode") String buttonCode,
@RequestParam("confirm") String confirm,
@RequestParam("stepState") String stepState) throws Exception{
Map<String,String> map = new HashMap<>();
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
iContingencyInstance.fire(batchNo,stepCode,"",buttonCode,confirm,stepState);
return CommonResponseUtil.success("SUCCESS");
}
@Scheduled(cron = "*/2 * * * * ?") @Scheduled(cron = "*/2 * * * * ?")
......
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