opt:任务完成,取消逻辑优化;

This commit is contained in:
2024-10-11 22:32:52 +08:00
parent e8c507fe11
commit 3df88a39bf

View File

@@ -1036,15 +1036,13 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
StrUtil.equals(entity.getInstruction_type(), "3")) {
ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class);
HttpResponse result = zheDaAgvService.deleteZDAgvInst(entity.getInstruction_code());
if (result.getStatus() == 200) {
flag = true;
} else {
if (result.getStatus() != 200) {
flag = false;
log.error("下发rgv取消指令动作失败,下发AGV/RGV任务失败任务id为:{},指令号为:{},失败原因{}", task.getTask_id(), entity.getInstruction_code(), "AGV/RGV未响应");
if (task != null) {
task.setRemark("下发rgv取消指令动作失败失败原因: 连接AGV/RGV未响应");
taskService.update(task);
}
flag = false;
}
if (flag) {
String currentUsername = SecurityUtils.getCurrentUsername();