fix:解决一期立库指令未完成问题

This commit is contained in:
2025-02-20 09:02:28 +08:00
parent fa83398a29
commit 2e0ce6f786
3 changed files with 18 additions and 16 deletions

View File

@@ -145,7 +145,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
public Resp<OutStoreReportResponse> outStoreReport(OutStoreReportRequest requestParam) throws Exception {
try {
MDC.put(log_file_type, log_type);
log.info("出库任务状态反馈-----输入参数{}", JSON.toJSONString(requestParam));
log.info("出库任务状态反馈1-----输入参数{}", JSON.toJSONString(requestParam));
String inst_code = requestParam.getOrderId();
String status = requestParam.getState();
String carNo = requestParam.getRobotId();
@@ -158,7 +158,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
result.put("code", "0");
result.put("comment", "未找到对应指令");
result.put("data", outStoreReportResponse );
log.info("出库任务状态反馈-----输出参数{}", result);
log.info("出库任务状态反馈2-----输出参数{}", result);
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
}
if (!StrUtil.equals(inst.getInstruction_status(),"0") && !StrUtil.equals(inst.getInstruction_status(),"1")) {
@@ -169,7 +169,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
result.put("code", "0");
result.put("comment", "未找到对应未完成的指令");
result.put("data", outStoreReportResponse );
log.info("出库任务状态反馈-----输出参数{}", result);
log.info("出库任务状态反馈3-----输出参数{}", result);
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
}
TaskDto task = taskService.findByCode(inst.getTask_code());
@@ -181,7 +181,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
result.put("code", "0");
result.put("comment", "未找到对应任务");
result.put("data", outStoreReportResponse );
log.info("出库任务状态反馈-----输出参数{}", result);
log.info("出库任务状态反馈4-----输出参数{}", result);
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
}
if (!StrUtil.equals(task.getTask_status(),"0") && !StrUtil.equals(task.getTask_status(),"1")) {
@@ -192,7 +192,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
result.put("code", "0");
result.put("comment", "未找到未完成的对应任务");
result.put("data", outStoreReportResponse );
log.info("出库任务状态反馈-----输出参数{}", result);
log.info("出库任务状态反馈5-----输出参数{}", result);
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
}
// 1 已接收 2 开始执行 3执行完成 4 阻挡 5 空洞
@@ -216,8 +216,10 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
inst.setInstruction_status("2");
instructionService.finish(inst.getInstruction_id());
}
inst.setRemark("立库已反馈完成,待输送上报任务号");
instructionService.update(inst);
if (!"2".equals(inst.getInstruction_status())) {
inst.setRemark("立库已反馈完成,待输送上报任务号");
instructionService.update(inst);
}
}
} else if(StrUtil.equals(status,"4")){
@@ -233,7 +235,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
result.put("code", "0");
result.put("comment", "");
result.put("data", outStoreReportResponse );
log.info("出库任务状态反馈-----输出参数{}", result);
log.info("出库任务状态反馈6-----输出参数{}", result);
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
} finally {

View File

@@ -481,7 +481,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
try{
instructions.add(dto);
log.warn("指令添加到指令列表:"+dto.toString());
log.warn("指令添加到指令列表1:"+dto.toString());
} catch (Exception e){
log.warn("指令添加到指令列表异常:" + dto.toString() +e.getMessage());
}
@@ -603,7 +603,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
wo.insert(json);
try{
instructions.add(dto);
log.warn("指令添加到指令列表:"+dto.toString());
log.warn("指令添加到指令列表2:"+dto.toString());
} catch (Exception e){
log.warn("指令添加到指令列表异常:"+e.getMessage());
}
@@ -723,7 +723,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
wo.insert(json);
try{
instructions.add(dto);
log.warn("指令添加到指令列表:"+dto.toString());
log.warn("指令添加到指令列表3:"+dto.toString());
} catch (Exception e){
log.warn("指令添加到指令列表异常:" + dto.toString() +e.getMessage());
}
@@ -827,7 +827,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
// }
try{
instructions.add(dto);
log.warn("指令添加到指令列表:"+dto.toString());
log.warn("指令添加到指令列表4:"+dto.toString());
} catch (Exception e){
log.warn("指令添加到指令列表异常:" + dto.toString() +e.getMessage());
}
@@ -847,7 +847,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
removeByCodeFromCache(dto.getInstruction_code());
try{
instructions.add(dto);
log.warn("指令添加到指令列表:"+dto.toString());
log.warn("指令添加到指令列表5:"+dto.toString());
} catch (Exception e){
log.warn("指令添加到指令列表异常:" + dto.toString() +e.getMessage());
}

View File

@@ -698,18 +698,18 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
message = "生成行架任务成功";
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请行架任务,返回参数:" + applyPlugPullSitResponse.getData())
.content("申请行架任务,返回参数:" + applyPlugPullSitResponse.getMessage())
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);
requireSucess = true;
} else {
message = applyPlugPullSitResponse.getMessage();
requireSucess = true;
// requireSucess = true;
message = "申请行架任务失败";
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请行架任务失败,返回参数:" + applyPlugPullSitResponse.getData())
.content("申请行架任务失败,返回参数:" + applyPlugPullSitResponse.getMessage())
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);