rev agv監控顯示
This commit is contained in:
@@ -64,6 +64,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
int agvaddr_copy = 0;
|
int agvaddr_copy = 0;
|
||||||
int weight = 0;
|
int weight = 0;
|
||||||
String device_code = "";
|
String device_code = "";
|
||||||
|
|
||||||
|
String message = null;
|
||||||
|
|
||||||
int phase = 0;
|
int phase = 0;
|
||||||
String error_type = "agv_error_type";
|
String error_type = "agv_error_type";
|
||||||
String error_code = "0";
|
String error_code = "0";
|
||||||
@@ -201,6 +204,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (siemensConveyorDeviceDriver.getMove() == 1) {
|
if (siemensConveyorDeviceDriver.getMove() == 1) {
|
||||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
|
message = siemensConveyorDeviceDriver.getDevice_code() + "请求取货条件不满足待机有货";
|
||||||
log.info("请求取货条件不满足待机有货");
|
log.info("请求取货条件不满足待机有货");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,6 +214,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (siemensConveyorDeviceDriver.getMove() == 1) {
|
if (siemensConveyorDeviceDriver.getMove() == 1) {
|
||||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
|
message = siemensConveyorDeviceDriver.getDevice_code() + "请求取货条件不满足待机有货";
|
||||||
log.info("请求取货条件不满足待机有货");
|
log.info("请求取货条件不满足待机有货");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -219,6 +224,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (siemensOneFloorAGVConveyorDeviceDriver.getMove() == 1) {
|
if (siemensOneFloorAGVConveyorDeviceDriver.getMove() == 1) {
|
||||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
|
message = siemensOneFloorAGVConveyorDeviceDriver.getDevice_code() + "请求取货条件不满足待机有货";
|
||||||
log.info("请求取货条件不满足待机有货");
|
log.info("请求取货条件不满足待机有货");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,6 +546,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
||||||
//异常
|
//异常
|
||||||
jo.put("fault", this.getError_message());
|
jo.put("fault", this.getError_message());
|
||||||
|
jo.put("message", this.getMessage());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
log.info("未找到指令号{}对应的指令", ikey);
|
log.info("未找到指令号{}对应的指令", ikey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isEmpty(inst.getCarno())){
|
||||||
|
inst.setCarno(String.valueOf(carno));
|
||||||
|
instructionService.update(inst);
|
||||||
|
}
|
||||||
|
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
@@ -237,7 +241,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
if (standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey;
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey +"不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction(), ikey);
|
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction(), ikey);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -279,7 +283,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
log.info("未找到指令号{}对应的指令", ikey);
|
log.info("未找到指令号{}对应的指令", ikey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isEmpty(inst.getCarno())){
|
||||||
|
inst.setCarno(String.valueOf(carno));
|
||||||
|
instructionService.update(inst);
|
||||||
|
}
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get("wait"))
|
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get("wait"))
|
||||||
@@ -301,7 +308,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (standardInspectSiteDeviceDriver.getMove() == 0) {
|
if (standardInspectSiteDeviceDriver.getMove() == 0) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey;
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -339,7 +346,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
log.info("未找到指令号{}对应的指令", ikey);
|
log.info("未找到指令号{}对应的指令", ikey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ObjectUtil.isEmpty(inst.getCarno())){
|
||||||
|
inst.setCarno(String.valueOf(carno));
|
||||||
|
instructionService.update(inst);
|
||||||
|
}
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||||
@@ -793,6 +803,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
jo.put("task_code", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
|
||||||
//异常
|
//异常
|
||||||
jo.put("fault", this.getError_message());
|
jo.put("fault", this.getError_message());
|
||||||
|
jo.put("message", this.getMessage());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,14 +275,16 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) {
|
if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) {
|
||||||
JSONObject param = new JSONObject();
|
if(error != 0 && error != 110 && error != 70 ){
|
||||||
param.put("device_code", this.device_code);
|
JSONObject param = new JSONObject();
|
||||||
param.put("error", error);
|
param.put("device_code", this.device_code);
|
||||||
param.put("error_msg", error == 0 ? "" : ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
param.put("error", error);
|
||||||
param.put("device_name", this.getDevice().getDevice_name());
|
param.put("error_msg", error == 0 ? "" : ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||||
param.put("device_type", "1");
|
param.put("device_name", this.getDevice().getDevice_name());
|
||||||
param.put("product_area", paramService.findByCode("productArea").getValue());
|
param.put("device_type", "1");
|
||||||
acsToWmsService.sendDeviceStatus(param);
|
param.put("product_area", paramService.findByCode("productArea").getValue());
|
||||||
|
acsToWmsService.sendDeviceStatus(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
"信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
"信号carrier_direction:" + last_carrier_direction + "->" + carrier_direction);
|
||||||
}
|
}
|
||||||
if (error != last_error) {
|
if (error != last_error) {
|
||||||
if (error != 0) {
|
if(error != 0 && error != 110 && error != 70 ){
|
||||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||||
dto.setDevice_code(device_code);
|
dto.setDevice_code(device_code);
|
||||||
dto.setError_code(String.valueOf(error));
|
dto.setError_code(String.valueOf(error));
|
||||||
|
|||||||
@@ -950,6 +950,16 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
message = "申请贴标电气设备载具号为空";
|
message = "申请贴标电气设备载具号为空";
|
||||||
throw new RuntimeException("载具号为空!");
|
throw new RuntimeException("载具号为空!");
|
||||||
}
|
}
|
||||||
|
TaskDto taskdto = taskserver.findByContainer(newBarcodes);
|
||||||
|
if (!ObjectUtil.isEmpty(taskdto)) {
|
||||||
|
// if (!ObjectUtils.isEmpty(instructionService.findByTaskcodeAndStatus(taskdto.getTask_code()))) {
|
||||||
|
// }
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请任务时该载具号" + newBarcodes
|
||||||
|
+ "已存在对应任务,不再请求");
|
||||||
|
message = "申请任务时该载具号"+ newBarcodes + "已存在对应任务,不再请求";
|
||||||
|
throw new RuntimeException("申请任务时该载具号"+ newBarcodes + "已存在对应任务,不再请求");
|
||||||
|
}
|
||||||
|
|
||||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||||
new ApplyLabelingAndBindingRequest();
|
new ApplyLabelingAndBindingRequest();
|
||||||
JSONObject device_json =
|
JSONObject device_json =
|
||||||
|
|||||||
@@ -1336,8 +1336,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
|
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
entity.setRemark("NDC取消");
|
||||||
entity.setUpdate_time(now);
|
entity.setUpdate_time(now);
|
||||||
entity.setUpdate_by(currentUsername);
|
entity.setUpdate_by("NDC");
|
||||||
entity.setInstruction_status("3");
|
entity.setInstruction_status("3");
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
||||||
JSONObject json = (JSONObject) JSONObject.toJSON(entity);
|
JSONObject json = (JSONObject) JSONObject.toJSON(entity);
|
||||||
|
|||||||
Reference in New Issue
Block a user