fix: 添加堆垛机,下发信号日志
This commit is contained in:
@@ -320,7 +320,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
log.info("运行中");
|
||||
log.info(this.device_code + ",运行中");
|
||||
break;
|
||||
case 4:
|
||||
//申请出货
|
||||
|
||||
@@ -39,8 +39,8 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
public void checkcontrol(Map<String, Object> itemValues) throws Exception {
|
||||
Group group;
|
||||
try {
|
||||
group = opcServerService.getServer(this.getOpcServer());
|
||||
}catch (Exception e){
|
||||
group = opcServerService.getServer(this.getOpcServer());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
group = opcServerService.getServer(this.getOpcServer());
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
}
|
||||
|
||||
if (i >= 2) {
|
||||
log.info("写入次数超过3次而失败");
|
||||
log.info(itemValues + "写入次数超过3次而失败");
|
||||
throw new RuntimeException("写入次数超过3次而失败");
|
||||
}
|
||||
++i;
|
||||
|
||||
@@ -183,7 +183,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
private int instruction_require_time_out = 3000;
|
||||
private int require_apply_mxrk_time_out = 4000;
|
||||
private int require_apply_tprk_time_out = 4000;
|
||||
private int require_apply_zjrk_time_out = 4000;
|
||||
private int require_apply_zjrk_time_out = 4000;
|
||||
private int require_apply_thrk_time_out = 4000;
|
||||
//行架机械手申请任务成功标识
|
||||
boolean requireSucess = false;
|
||||
@@ -349,20 +349,20 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
|
||||
//申请空托盘入库
|
||||
if (mode == 9 && move == 1 && !requireSucess) {
|
||||
if (container_type == 0 || StrUtil.isEmpty(barcode)) {
|
||||
message = "托盘类型为空";
|
||||
} else {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
|
||||
}
|
||||
if (container_type == 0 || StrUtil.isEmpty(barcode)) {
|
||||
message = "托盘类型为空";
|
||||
} else {
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
|
||||
}
|
||||
}
|
||||
|
||||
//申请退货入库
|
||||
if (mode == 18 && move == 1 && !requireSucess) {
|
||||
if (StrUtil.isEmpty(barcode) || StrUtil.isEmpty(material_barcode)) {
|
||||
message = "托盘条码为空或者木箱号为空";
|
||||
} else {
|
||||
applyBoxReturnTask(StorageTypeEnum.BOX_RETURN.getType(), mode);
|
||||
}
|
||||
if (StrUtil.isEmpty(barcode) || StrUtil.isEmpty(material_barcode)) {
|
||||
message = "托盘条码为空或者木箱号为空";
|
||||
} else {
|
||||
applyBoxReturnTask(StorageTypeEnum.BOX_RETURN.getType(), mode);
|
||||
}
|
||||
|
||||
}
|
||||
//申请高度
|
||||
@@ -410,6 +410,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.iserror = true;
|
||||
log.error("空指针:{}", e);
|
||||
String extracted = DeviceErrorUtil.extracted(e);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
@@ -729,7 +730,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
String body = httpResponse.body();
|
||||
jsonObject = JSONObject.parseObject(body);
|
||||
}
|
||||
log.info("wms反馈结果:{}",jsonObject);
|
||||
log.info("wms反馈结果:{}", jsonObject);
|
||||
message = "木箱、子卷入库申请入库任务,返回参数:" + jsonObject;
|
||||
LuceneLogDto logDto3 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
@@ -749,7 +750,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
map.put("code", "to_command");
|
||||
map.put("value", mode);
|
||||
list1.add(map);
|
||||
log.error("下发电气--------:{}",map);
|
||||
log.error("下发电气--------:{}", map);
|
||||
this.writing(list1);
|
||||
requireSucess = true;
|
||||
} else {
|
||||
@@ -799,7 +800,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
String body = httpResponse.body();
|
||||
jsonObject = JSONObject.parseObject(body);
|
||||
}
|
||||
log.info("wms反馈结果:{}",jsonObject);
|
||||
log.info("wms反馈结果:{}", jsonObject);
|
||||
message = "木箱、子卷入库申请入库任务,返回参数:" + jsonObject;
|
||||
LuceneLogDto logDto3 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
@@ -819,7 +820,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
map.put("code", "to_command");
|
||||
map.put("value", mode);
|
||||
list1.add(map);
|
||||
log.error("下发电气--------:{}",map);
|
||||
log.error("下发电气--------:{}", map);
|
||||
this.writing(list1);
|
||||
requireSucess = true;
|
||||
} else {
|
||||
|
||||
@@ -229,6 +229,7 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
} catch (Exception e) {
|
||||
this.iserror = true;
|
||||
log.error("空指针:{}",e);
|
||||
String extracted = DeviceErrorUtil.extracted(e);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
|
||||
@@ -1046,7 +1046,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
"有货或未联机,无法下发指令!指令号:" + inst.getInstruction_code();
|
||||
return false;
|
||||
}
|
||||
log.info(next_device_code + "设备mode:" + beltConveyorDeviceDriver.getMode() + ",move:" + beltConveyorDeviceDriver.getMove());
|
||||
}
|
||||
|
||||
List list = new ArrayList();
|
||||
pakageCommand(list, inst.getInstruction_code());
|
||||
packagePlcCoordinate(startDevice, list, "1");
|
||||
|
||||
Reference in New Issue
Block a user