fix: 联调木箱入库
This commit is contained in:
@@ -71,7 +71,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
|
||||
@@ -210,7 +210,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
|
||||
//托盘去扫码位
|
||||
if (mode == 4){
|
||||
if (mode == 4) {
|
||||
List list1 = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
map.put("code", "to_command");
|
||||
@@ -236,22 +236,22 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
List toInstructions;
|
||||
|
||||
//申请空托盘入库
|
||||
if (mode == 9 && move == 1 && !requireSucess){
|
||||
if (mode == 9 && move == 1 && !requireSucess) {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//申请空托盘出库
|
||||
if (mode == 8 && !requireSucess){
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType(),mode);
|
||||
if (mode == 8 && !requireSucess) {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType(), mode);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//碟盘位申请任务
|
||||
if (mode == 2 && move == 1 && !requireSucess) {
|
||||
if (mode == 2 && move == 1 && !requireSucess) {
|
||||
boolean res = instruction_require();
|
||||
if (res) {
|
||||
notCreateInstMessage = "";
|
||||
@@ -261,7 +261,8 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
} else {
|
||||
if (mode == 2) {
|
||||
//if (!requireSucess) {
|
||||
String remark = "";;
|
||||
String remark = "";
|
||||
;
|
||||
if (mode != 2) {
|
||||
remark = "universal_remark2";
|
||||
}
|
||||
@@ -269,13 +270,13 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
remark = "universal_remark3";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = LangProcess.msg("universal_remark4");
|
||||
remark = LangProcess.msg("universal_remark4");
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = LangProcess.msg("universal_remark5");
|
||||
remark = LangProcess.msg("universal_remark5");
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -298,7 +299,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 请求指令
|
||||
*/
|
||||
@@ -571,7 +571,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
list1.add(map);
|
||||
this.writing(list1);
|
||||
this.requireSucess = true;
|
||||
}else {
|
||||
} else {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请空托盘出入库,返回参数:" + jo.getString("body"))
|
||||
@@ -586,8 +586,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
@@ -603,9 +601,9 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}else if (this.getMode() == 9) {
|
||||
} else if (this.getMode() == 9) {
|
||||
mode = LangProcess.msg("one_mode2");
|
||||
}else if (this.getMode() == 8) {
|
||||
} else if (this.getMode() == 8) {
|
||||
mode = LangProcess.msg("one_mode4");
|
||||
}
|
||||
|
||||
@@ -637,7 +635,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
@@ -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(this.getDeviceCode(), inst.getNext_device_code())) {
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
if (mode == 2) {
|
||||
finish_instruction();
|
||||
}
|
||||
finish_instruction();
|
||||
logServer.deviceExecuteLog(device_code, "", "", "纸箱入库输送线任务开始反馈完成状态,反馈成功,指令号:" + task + ",载具号:" + inst.getVehicle_code());
|
||||
} else {
|
||||
|
||||
|
||||
@@ -220,8 +220,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
to_task = this.itemProtocol.getTo_task();
|
||||
to_container_type = this.itemProtocol.getTo_container_type();
|
||||
container_type = this.itemProtocol.getContainer_type();
|
||||
carrier_direction = this.itemProtocol.getCarrier_direction();
|
||||
height = this.itemProtocol.getHeight();
|
||||
carrier_direction = this.itemProtocol.getContainer_direction();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
material_barcode = this.itemProtocol.getMaterialBarcode();
|
||||
|
||||
@@ -31,10 +31,7 @@ public class ItemProtocol {
|
||||
* 报警
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
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_task, "任务号", "DB1.D6"));
|
||||
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
|
||||
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB1.B8"));
|
||||
list.add(new ItemDto(item_height, "高度", "DB1.B9"));
|
||||
list.add(new ItemDto(item_container_direction, "托盘方向", "DB1.B8"));
|
||||
list.add(new ItemDto(item_weight, "重量", "DB1.B10"));
|
||||
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
|
||||
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));
|
||||
|
||||
@@ -257,9 +257,20 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("device_code", device_code);
|
||||
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);
|
||||
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();
|
||||
packagePLCData(datas,instruction);
|
||||
this.setRequireSucess(true);
|
||||
|
||||
Reference in New Issue
Block a user