|
@@ -172,13 +172,14 @@ public class DispatchExceptionController extends SuperSimpleController<AAutoNode
|
|
|
|
|
|
@ApiOperation(value = "重发数据节点", notes = "重发数据节点")
|
|
@ApiOperation(value = "重发数据节点", notes = "重发数据节点")
|
|
@PostMapping("/resend")
|
|
@PostMapping("/resend")
|
|
- private R<Boolean> resend(@RequestBody Map<String, Long> map){
|
|
|
|
- AAutoNodeLog autoNodeLog = aAutoNodeLogService.getById(map.get("id"));
|
|
|
|
|
|
+ public R<Boolean> resend(@RequestBody Map<String, Long> map){
|
|
|
|
+ Long id = map.get("id");
|
|
|
|
+ AAutoNodeLog autoNodeLog = aAutoNodeLogService.getById(id);
|
|
Long taskNodeId = autoNodeLog.getTaskNodeId();
|
|
Long taskNodeId = autoNodeLog.getTaskNodeId();
|
|
//判断重发节点操作条件(待定)
|
|
//判断重发节点操作条件(待定)
|
|
Map<String, Object> conMap = msgUtil.redis_get_map(CacheKey.TASK_CURRENT_NODE_CONDITION + "_" + taskNodeId);
|
|
Map<String, Object> conMap = msgUtil.redis_get_map(CacheKey.TASK_CURRENT_NODE_CONDITION + "_" + taskNodeId);
|
|
//获取重发执行传参
|
|
//获取重发执行传参
|
|
- String jsonParam = msgUtil.redis_get(CacheKey.TASK_CURRENT_NODE_PARAMS + "_" + taskNodeId).toString();
|
|
|
|
|
|
+ String jsonParam = msgUtil.redis_get(CacheKey.TASK_CURRENT_NODE_PARAMS + "_" + taskNodeId)!=null? msgUtil.redis_get(CacheKey.TASK_CURRENT_NODE_PARAMS + "_" + taskNodeId).toString(): "";
|
|
if(StringUtils.isEmpty(jsonParam)){
|
|
if(StringUtils.isEmpty(jsonParam)){
|
|
return R.fail("指令请求不存在");
|
|
return R.fail("指令请求不存在");
|
|
}
|
|
}
|
|
@@ -213,7 +214,7 @@ public class DispatchExceptionController extends SuperSimpleController<AAutoNode
|
|
String instructionUrl = conMap.get("instructionUrl") +"/api/"+ autoNodeLog.getMethod().toString() ;
|
|
String instructionUrl = conMap.get("instructionUrl") +"/api/"+ autoNodeLog.getMethod().toString() ;
|
|
String returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
|
|
String returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
|
|
JSONObject retJson = JSONObject.parseObject(returnData);
|
|
JSONObject retJson = JSONObject.parseObject(returnData);
|
|
- String code = retJson.getString("code").trim();
|
|
|
|
|
|
+ String code = retJson.getString("result").trim();
|
|
if(code.equals("false")){
|
|
if(code.equals("false")){
|
|
autoNodeLog.setExeResult("0").setManual("1").setFeedback(retJson.getString("msg")).setExecuteTime(new Date());
|
|
autoNodeLog.setExeResult("0").setManual("1").setFeedback(retJson.getString("msg")).setExecuteTime(new Date());
|
|
aAutoNodeLogService.updateAllById(autoNodeLog);
|
|
aAutoNodeLogService.updateAllById(autoNodeLog);
|