fix: 手动创建指令修改、日志添加

This commit is contained in:
2024-07-04 09:56:48 +08:00
parent 2bf7146c87
commit 260e796ac5
9 changed files with 23 additions and 4 deletions

View File

@@ -962,7 +962,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
param.put("actionType", actionType.toString());
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(instructionDto.getCarno())
.content("二次分配请求lms,参数:" + task_code + "--" + actionType)
.content("二次分配请求lms,参数:" + task_code + "--" + AgvActionTypeEnum.getStatus(actionType) )
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);

View File

@@ -404,7 +404,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.applyTwo(param);
JSONObject jo = JSON.parseObject(response);
message = "申请空托盘出入库,返回参数:" + jo.getString("body");
message = "申请空托盘出入库,返回参数:" + jo;
if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
@@ -420,6 +420,8 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
this.writing(list1);
this.requireSucess = true;
} else {
this.iserror = false;
message = "申请空托盘出入库出错,返回参数:" + jo;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请空托盘出入库,返回参数:" + response)

View File

@@ -388,7 +388,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,参数:" + param);
String response = acsToWmsService.applyTowToOne(param);
JSONObject jo = JSON.parseObject(response);
message = "二楼到一楼输送线申请行架任务,返回参数:" + jo.getString("body");
message = "二楼到一楼输送线申请行架任务,返回参数:" + jo;
if (response == null || jo.getInteger("status") == 200) {
List list1 = new ArrayList();
Map map = new HashMap();
@@ -404,6 +404,8 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
luceneExecuteLogService.deviceExecuteLog(logDto2);
this.requireSucess = true;
} else {
this.iserror = false;
message = "二楼到一楼输送线申请行架任务报错,返回参数:" + jo;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("二楼到一楼输送线申请行架任务,返回参数:" + jo.getString("body"))

View File

@@ -387,6 +387,9 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
this.writing(list);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,返回参数:" + jo);
requireSucess = true;
}else {
message = "申请AGV任务报错,参数,接口返回:" + jo;
this.iserror = false;
}
}

View File

@@ -369,6 +369,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
packagePLCData(jo.getString("data"), mode);
requireSucess = true;
} else {
this.iserror = false;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请捆扎失败,接口返回:" + response)
@@ -402,6 +403,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL.getType());
String response = acsToWmsService.deviceApplyTwo(param);
JSONObject jo = JSON.parseObject(response);
message = "申请贴标,参数,接口返回:" + jo;
if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
@@ -422,6 +424,8 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
// Map datas = applyLabelingAndBindingResponse.getData();
requireSucess = true;
} else {
this.iserror = false;
message = "申请贴标报错,接口返回:" + jo;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请贴标失败,接口返回:" + jo.getString("body"))

View File

@@ -610,6 +610,8 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
this.writing(list1);
this.requireSucess = true;
} else {
this.iserror = false;
message = "申请空托盘出入库报错,接口返回:" + jo;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请空托盘出入库,返回参数:" + response)

View File

@@ -614,6 +614,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
this.writing(list1);
this.requireSucess = true;
} else {
this.iserror = false;
message = "申请空托盘出入库报错,返回参数:" + jo;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请空托盘出入库,返回参数:" + response)
@@ -676,6 +678,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
list1.add(map);
this.writing(list1);
} else {
this.iserror = false;
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("木箱、子卷入库申请入库任务,返回参数:" + response)

View File

@@ -285,6 +285,9 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
finish_instruction(inst);
}
}else {
message = "木箱开盖报错,返回参数:" + jo;
this.iserror = false;
}

View File

@@ -926,7 +926,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
for (int m = 0; m < pathlist.size(); m++) {
if (pathlist.get(m).equals(start_device_code)) {
//起点为货架跳过堆垛机
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
if (startDevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
index = m + 2;
}else {
index = m + 1;