opt:套件优化
This commit is contained in:
@@ -249,6 +249,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
||||
} else {
|
||||
//mes下发需要上报放货完成
|
||||
if ("2".equals(task.getCreate_by())) {
|
||||
log.info("放货完成申请,指令号:"+instruction.getInstruction_code());
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("taskCode", task.getTask_code());
|
||||
jo.put("carId", instruction.getCarno());
|
||||
@@ -263,6 +264,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
||||
return;
|
||||
} //wms下发需要上报放货完成
|
||||
} else if ("1".equals(task.getCreate_by())) {
|
||||
log.info("放货完成申请,指令号:"+instruction.getInstruction_code());
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("taskCode", task.getTask_code());
|
||||
jo.put("carId", instruction.getCarno());
|
||||
@@ -277,6 +279,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
||||
return;
|
||||
}
|
||||
}
|
||||
log.info("放货完成申请成功,指令号:"+instruction.getInstruction_code());
|
||||
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
|
||||
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
return;
|
||||
@@ -289,6 +292,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.info("设备执行失败"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,14 +62,7 @@ public class NDCToAcsServiceImpl implements NDCToAcsService {
|
||||
}
|
||||
instructionService.reload();
|
||||
}
|
||||
//taskPhase 任务完成
|
||||
if (TaskStateEnum.COMPLETED.getValue().equals(taskState)){
|
||||
instructionService.finish(instruction.getInstruction_id());
|
||||
resp.put("code", "200");
|
||||
resp.put("message", "完成任务成功");
|
||||
log.info("---响应kit请求---"+resp.toString());
|
||||
return resp;
|
||||
}
|
||||
|
||||
//taskPhase 任务取消
|
||||
if (TaskStateEnum.CANCELED.getValue().equals(taskState)){
|
||||
instructionService.cancel(instruction.getInstruction_id());
|
||||
@@ -122,6 +115,13 @@ public class NDCToAcsServiceImpl implements NDCToAcsService {
|
||||
instruction.setExecute_status(taskPhase);
|
||||
instructionService.update(instruction);
|
||||
}
|
||||
//taskPhase 任务完成
|
||||
if (TaskStateEnum.COMPLETED.getValue().equals(taskState)){
|
||||
instructionService.finish(instruction.getInstruction_id());
|
||||
resp.put("code", "200");
|
||||
resp.put("message", "完成任务成功");
|
||||
log.info("---响应kit请求---"+resp.toString());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
resp.put("code", "400");
|
||||
|
||||
Reference in New Issue
Block a user