fix: 联调木箱入库

This commit is contained in:
2024-05-15 15:36:15 +08:00
parent 1a0e0fe86c
commit 7a761e6577
4 changed files with 34 additions and 35 deletions

View File

@@ -261,7 +261,8 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
} else { } else {
if (mode == 2) { if (mode == 2) {
//if (!requireSucess) { //if (!requireSucess) {
String remark = "";; String remark = "";
;
if (mode != 2) { if (mode != 2) {
remark = "universal_remark2"; remark = "universal_remark2";
} }
@@ -298,7 +299,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
} }
/** /**
* 请求指令 * 请求指令
*/ */
@@ -586,8 +586,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
} }
@Override @Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
@@ -655,7 +653,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
} }
/** /**
* 更新指令状态 * 更新指令状态
*/ */
@@ -680,9 +677,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
if (StrUtil.equals(inst.getInstruction_status(), InstructionStatusEnum.BUSY.getIndex()) || StrUtil.equals(inst.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) { if (StrUtil.equals(inst.getInstruction_status(), InstructionStatusEnum.BUSY.getIndex()) || StrUtil.equals(inst.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) {
if (StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) { if (StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) {
inst.setExecute_device_code(this.device_code); inst.setExecute_device_code(this.device_code);
if (mode == 2) {
finish_instruction(); finish_instruction();
}
logServer.deviceExecuteLog(device_code, "", "", "纸箱入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task + ",载具号:" + inst.getVehicle_code()); logServer.deviceExecuteLog(device_code, "", "", "纸箱入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task + ",载具号:" + inst.getVehicle_code());
} else { } else {

View File

@@ -220,8 +220,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
to_task = this.itemProtocol.getTo_task(); to_task = this.itemProtocol.getTo_task();
to_container_type = this.itemProtocol.getTo_container_type(); to_container_type = this.itemProtocol.getTo_container_type();
container_type = this.itemProtocol.getContainer_type(); container_type = this.itemProtocol.getContainer_type();
carrier_direction = this.itemProtocol.getCarrier_direction(); carrier_direction = this.itemProtocol.getContainer_direction();
height = this.itemProtocol.getHeight();
weight = this.itemProtocol.getWeight(); weight = this.itemProtocol.getWeight();
barcode = this.itemProtocol.getBarcode(); barcode = this.itemProtocol.getBarcode();
material_barcode = this.itemProtocol.getMaterialBarcode(); material_barcode = this.itemProtocol.getMaterialBarcode();

View File

@@ -31,10 +31,7 @@ public class ItemProtocol {
* 报警 * 报警
*/ */
public static String item_error = "error"; public static String item_error = "error";
/**
* 高度
*/
public static String item_height = "height";
/** /**
* 任务号 * 任务号
*/ */
@@ -47,7 +44,7 @@ public class ItemProtocol {
/** /**
* 托盘方向 * 托盘方向
*/ */
public static String item_carrier_direction="carrier_direction"; public static String item_container_direction="container_direction";
/** /**
@@ -112,12 +109,10 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_task); return this.getOpcIntegerValue(item_task);
} }
public int getHeight(){
return this.getOpcIntegerValue(item_height);
}
public int getCarrier_direction(){
return this.getOpcIntegerValue(item_carrier_direction); public int getContainer_direction(){
return this.getOpcIntegerValue(item_container_direction);
} }
@@ -202,8 +197,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_error, "报警信号", "DB1.B5")); list.add(new ItemDto(item_error, "报警信号", "DB1.B5"));
list.add(new ItemDto(item_task, "任务号", "DB1.D6")); list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7")); list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB1.B8")); list.add(new ItemDto(item_container_direction, "托盘方向", "DB1.B8"));
list.add(new ItemDto(item_height, "高度", "DB1.B9"));
list.add(new ItemDto(item_weight, "重量", "DB1.B10")); list.add(new ItemDto(item_weight, "重量", "DB1.B10"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50")); list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50")); list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));

View File

@@ -257,9 +257,20 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("device_code", device_code); param.put("device_code", device_code);
param.put("task", task); param.put("task", task);
logServer.deviceExecuteLog(this.device_code, "", "", "木箱申请开盖任务,参数:" + param); LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("木箱、子卷入库申请入库任务,参数:" + param)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
ApplyLabelingAndBindingResponse response = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest); ApplyLabelingAndBindingResponse response = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
if (response == null || response.getstatus() == 200) { if (response == null || response.getstatus() == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("木箱、子卷入库申请入库任务,参数,接口返回:" + response)
.build();
logDto2.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto2);
Map datas = response.getData(); Map datas = response.getData();
packagePLCData(datas,instruction); packagePLCData(datas,instruction);
this.setRequireSucess(true); this.setRequireSucess(true);