Commit 2c450e6d authored by KeYong's avatar KeYong

修改绍兴版本预案接口

parent 054940e7
...@@ -85,6 +85,18 @@ public class TimeLineController extends BaseController { ...@@ -85,6 +85,18 @@ public class TimeLineController extends BaseController {
return CommonResponseUtil.success("SUCCESS"); return CommonResponseUtil.success("SUCCESS");
} }
@ApiOperation(httpMethod = "PUT", value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse fire(@RequestParam("batchNo") String batchNo,
@RequestParam("stepCode") String stepCode,
@RequestParam("buttonCode") String buttonCode,
@RequestParam("confirm") String confirm,
@RequestParam("contingencyPlanId") String contingencyPlanId,
@RequestParam("stepState") String stepState) throws Exception {
iContingencyInstance.fire(batchNo, stepCode, contingencyPlanId, buttonCode, confirm, stepState, "true");
return CommonResponseUtil.success("SUCCESS");
}
@Permission @Permission
@ApiOperation(httpMethod = "PUT", value = "点击按钮", notes = "点击按钮") @ApiOperation(httpMethod = "PUT", value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......
...@@ -448,6 +448,36 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -448,6 +448,36 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
} }
@Override @Override
public Optional<Equipment> fire(String batchNo, String stepCode, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute) throws Exception {
Map<String, String> map = new HashMap<>();
map.put("batchNo", batchNo);
map.put("stepCode", stepCode);
map.put("buttonCode", buttonCode);
map.put("confirm", buttonState);
map.put("contingencyPlanId", contingencyPlanId);
map.put("stepState", stepStateOnbutton);
map.put("isExecute", isExecute);
System.out.println("======加入队列参数=====fire===1===");
System.out.println("fireQueue-size:-->" + fireQueue.size());
System.out.println("batchNo-->" + batchNo);
System.out.println("stepCode-->" + stepCode);
System.out.println("buttonCode-->" + buttonCode);
System.out.println("confirm-->" + buttonState);
System.out.println("contingencyPlanId-->" + contingencyPlanId);
System.out.println("stepState-->" + stepStateOnbutton);
System.out.println("isExecute-->" + isExecute);
System.out.println("======加入队列参数=====fire===2===");
map.put("appKey", RequestContext.getAppKey());
map.put("token", RequestContext.getToken());
map.put("product", RequestContext.getProduct());
fireQueue.addLast(map);
//应急指挥给总部推送消息
sendPlanAlarm(batchNo, buttonCode);
return Optional.empty();
}
@Override
public ContingencyPlanInstance updateExtendColumn(ContingencyPlanInstance contingencyPlanInstance) { public ContingencyPlanInstance updateExtendColumn(ContingencyPlanInstance contingencyPlanInstance) {
String recordType = contingencyPlanInstance.getRecordType(); String recordType = contingencyPlanInstance.getRecordType();
if ("OPERATE".equals(recordType)) { if ("OPERATE".equals(recordType)) {
......
...@@ -25,6 +25,8 @@ public interface IContingencyInstance { ...@@ -25,6 +25,8 @@ public interface IContingencyInstance {
Optional<Equipment> fire(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception; Optional<Equipment> fire(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception;
Optional<Equipment> fire(String batchNo, String stepCode, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute) throws Exception;
/** /**
* 扩展属性赋值 * 扩展属性赋值
* @param contingencyPlanInstance * @param contingencyPlanInstance
......
...@@ -45,8 +45,10 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in= ...@@ -45,8 +45,10 @@ file.readUrl=http://172.16.11.201:8085/file/getFile?in=
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.11.201:1883 emqx.broker=tcp://172.16.11.201:1883
emqx.user-name=admin emqx.client-user-name=admin
emqx.password=public emqx.client-password=public
emqx.max-inflight=1000
emqx.keep-alive-interval=10
#\u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740 #\u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740
file.downLoad.url=http://172.16.11.201:9000/ file.downLoad.url=http://172.16.11.201:9000/
......
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