fix: 联调修改

This commit is contained in:
2024-05-16 19:12:03 +08:00
parent 32549c4b06
commit fc94a4799c
4 changed files with 24 additions and 24 deletions

View File

@@ -323,14 +323,14 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
this.require_apply_strangulation_time = date; this.require_apply_strangulation_time = date;
// String vehicle_code = ""; // String vehicle_code = "";
// //
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task)); // Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
if (StrUtil.isEmpty(inst.getVehicle_code())) { // if (StrUtil.isEmpty(inst.getVehicle_code())) {
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11"); // message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
return; // return;
} // }
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("device_code", device_code); param.put("device_code", device_code);
param.put("vehicle_code", inst.getVehicle_code()); // param.put("vehicle_code", inst.getVehicle_code());
param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType()); param.put("type", AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
String response = acsToWmsService.deviceApplyTwo(param); String response = acsToWmsService.deviceApplyTwo(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
@@ -413,7 +413,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
JSONObject jo = JSON.parseObject(datas); JSONObject jo = JSON.parseObject(datas);
String length = jo.get("length").toString(); String length = jo.get("length").toString();
String weight = jo.get("weight").toString(); String width = jo.get("width").toString();
String height = jo.get("height").toString(); String height = jo.get("height").toString();
String isBinding = jo.get("isBinding").toString(); String isBinding = jo.get("isBinding").toString();
String isLabeling = jo.get("isLabeling").toString(); String isLabeling = jo.get("isLabeling").toString();
@@ -433,7 +433,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map); list.add(map);
Map map2 = new HashMap(); Map map2 = new HashMap();
map2.put("code", "to_weight"); map2.put("code", "to_weight");
map2.put("value", weight); map2.put("value", width);
list.add(map2); list.add(map2);
Map map3 = new HashMap(); Map map3 = new HashMap();
map3.put("code", "to_height"); map3.put("code", "to_height");
@@ -483,7 +483,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map); list.add(map);
Map map2 = new HashMap(); Map map2 = new HashMap();
map2.put("code", "to_weight"); map2.put("code", "to_weight");
map2.put("value", weight); map2.put("value", width);
list.add(map2); list.add(map2);
Map map3 = new HashMap(); Map map3 = new HashMap();
map3.put("code", "to_height"); map3.put("code", "to_height");
@@ -540,7 +540,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map); list.add(map);
Map map2 = new HashMap(); Map map2 = new HashMap();
map2.put("code", "to_weight"); map2.put("code", "to_weight");
map2.put("value", weight); map2.put("value", width);
list.add(map2); list.add(map2);
Map map3 = new HashMap(); Map map3 = new HashMap();
map3.put("code", "to_height"); map3.put("code", "to_height");

View File

@@ -557,7 +557,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.applyTwo(param); String response = acsToWmsService.applyTwo(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
if (response == null || jo.getInteger("status") == 200) { if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("申请空托盘出入库,参数,接口返回:" + jo) .content("申请空托盘出入库,参数,接口返回:" + jo)

View File

@@ -260,7 +260,6 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
requireSucess = false; requireSucess = false;
} }
if (move != 0 && task > 0) { if (move != 0 && task > 0) {
update_instruction_status(); update_instruction_status();
} }
@@ -403,7 +402,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.applyTwo(param); String response = acsToWmsService.applyTwo(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
if (response == null || jo.getInteger("status") == 200) { if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("申请空托盘出入库,参数,接口返回:" + jo) .content("申请空托盘出入库,参数,接口返回:" + jo)
@@ -452,7 +451,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.applyTwo(param); String response = acsToWmsService.applyTwo(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
if (response == null || jo.getInteger("status") == 200) { if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("木箱、子卷入库申请入库任务,参数,接口返回:" + jo) .content("木箱、子卷入库申请入库任务,参数,接口返回:" + jo)

View File

@@ -155,16 +155,17 @@ public class CreateDDJInst {
} }
next_device_code = taskDto.getNext_device_code(); next_device_code = taskDto.getNext_device_code();
nextDevice = appService.findDeviceByCode(next_device_code);
BeltConveyorDeviceDriver beltConveyorDeviceDriver; // nextDevice = appService.findDeviceByCode(next_device_code);
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { // BeltConveyorDeviceDriver beltConveyorDeviceDriver;
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver(); // if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
if (beltConveyorDeviceDriver.getMode() != 2 || beltConveyorDeviceDriver.getMove() == 1) { // beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
log.error("输送机,{}未联机或执行中", next_device_code); // if (beltConveyorDeviceDriver.getMode() != 2 || beltConveyorDeviceDriver.getMove() == 1) {
((BeltConveyorDeviceDriver) nextDevice.getDeviceDriver()).setNotCreateInstMessage("one_message7"); // log.error("输送机,{}未联机或执行中", next_device_code);
return; // ((BeltConveyorDeviceDriver) nextDevice.getDeviceDriver()).setNotCreateInstMessage("one_message7");
} // return;
} // }
// }
/** /**
* 开始平均分配 * 开始平均分配
*/ */