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;
// String vehicle_code = "";
//
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
if (StrUtil.isEmpty(inst.getVehicle_code())) {
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
return;
}
// Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
// if (StrUtil.isEmpty(inst.getVehicle_code())) {
// message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
// return;
// }
JSONObject param = new JSONObject();
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());
String response = acsToWmsService.deviceApplyTwo(param);
JSONObject jo = JSON.parseObject(response);
@@ -413,7 +413,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
JSONObject jo = JSON.parseObject(datas);
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 isBinding = jo.get("isBinding").toString();
String isLabeling = jo.get("isLabeling").toString();
@@ -433,7 +433,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_weight");
map2.put("value", weight);
map2.put("value", width);
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_height");
@@ -483,7 +483,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_weight");
map2.put("value", weight);
map2.put("value", width);
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_height");
@@ -540,7 +540,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_weight");
map2.put("value", weight);
map2.put("value", width);
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_height");

View File

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

View File

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

View File

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