fix: 手持机下发任务报错修改,添加下发信号日志
This commit is contained in:
@@ -243,6 +243,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
// acsToWmsService.sendDeviceStatus(param);
|
// acsToWmsService.sendDeviceStatus(param);
|
||||||
sendDeviceStatus(param);
|
sendDeviceStatus(param);
|
||||||
}
|
}
|
||||||
|
message = "";
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记:" + requireSucess);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||||
}
|
}
|
||||||
@@ -358,7 +359,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
Instruction instruction = null;
|
Instruction instruction = null;
|
||||||
List toInstructions;
|
List toInstructions;
|
||||||
if(mode > 0) {
|
if(mode > 0) {
|
||||||
message = "";
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
log.debug("设备运转模式:等待工作");
|
log.debug("设备运转模式:等待工作");
|
||||||
@@ -1070,18 +1070,20 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
apply.put("device_code", device_code);
|
apply.put("device_code", device_code);
|
||||||
apply.put("type", "2");
|
apply.put("type", "2");
|
||||||
String str = acsToWmsService.applyTaskToWms(apply);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply + ",响应参数:" + JSON.toJSONString(str));
|
||||||
message = "申请空盘入库任务,请求参数:" + apply;
|
message = "申请空盘入库任务,请求参数:" + apply + "响应参数: "+ str;
|
||||||
|
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
message = "申请空盘入库接口不通";
|
message = "申请空盘入库接口不通";
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库接口不通");
|
||||||
} else {
|
} else {
|
||||||
if (jo.getInteger("status") == 200) {
|
if (jo.getInteger("status") == 200) {
|
||||||
message = "申请空盘入库成功";
|
message = "申请空盘入库成功";
|
||||||
requireEmptyInSuccess = true;
|
requireEmptyInSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
message = "申请空盘入库失败," + jo.get("message").toString();
|
message = "申请空盘入库失败," + jo.get("message").toString();
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -652,6 +652,11 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import org.nl.acs.task.service.dto.TaskDto;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||||
import org.openscada.opc.lib.da.Server;
|
import org.openscada.opc.lib.da.Server;
|
||||||
|
|
||||||
@@ -71,6 +73,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
|
|
||||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
//当前指令
|
//当前指令
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
@@ -355,6 +358,11 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -504,6 +504,11 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -648,6 +648,11 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineServiceImpl.class);
|
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineServiceImpl.class);
|
||||||
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
|
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
|
||||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||||
|
|
||||||
//工作模式
|
//工作模式
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
@@ -544,6 +547,11 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -488,6 +488,11 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -70,6 +72,8 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
|
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
@@ -505,6 +509,11 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -67,6 +69,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
|
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
|
||||||
|
|
||||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
|
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
@@ -521,6 +524,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.config.language.LangProcess;
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||||
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -69,6 +71,8 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
|
|
||||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
|
|
||||||
|
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
|
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
@@ -553,6 +557,11 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
itemMap.put(to_param, json.getString("value"));
|
itemMap.put(to_param, json.getString("value"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
try {
|
try {
|
||||||
this.checkcontrol(itemMap);
|
this.checkcontrol(itemMap);
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||||
OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver;
|
OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver;
|
||||||
if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
/*if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) {
|
if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) {
|
||||||
@@ -347,7 +347,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code();
|
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||||
@@ -459,7 +459,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||||
OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver;
|
OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver;
|
||||||
if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
/*if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) {
|
if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) {
|
||||||
@@ -477,7 +477,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
if (nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||||
if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) {
|
if (ovenInspectSiteDeviceDriver.getMove() == 1 || standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() +
|
notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() +
|
||||||
"无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!任务号:" + task.getTask_code();
|
"无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!任务号:" + task.getTask_code();
|
||||||
return false;
|
return false;
|
||||||
@@ -488,7 +488,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + task.getStart_device_code() + ",放货位:" + task.getNext_device_code() + ",存在关联的同一列烘箱设备未关门!任务号:" + task.getTask_code();
|
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + task.getStart_device_code() + ",放货位:" + task.getNext_device_code() + ",存在关联的同一列烘箱设备未关门!任务号:" + task.getTask_code();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||||
@@ -668,7 +668,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
//判断关联设备是否开门
|
//判断关联设备是否开门
|
||||||
if (hongXiangConveyorDeviceDriver.getDoor() == 1) {
|
if (hongXiangConveyorDeviceDriver.getDoor() != 2) {
|
||||||
notCreateInstMessage = "关联设备->" + device + "烘箱门未关闭!";
|
notCreateInstMessage = "关联设备->" + device + "烘箱门未关闭!";
|
||||||
flag = false;
|
flag = false;
|
||||||
break;
|
break;
|
||||||
@@ -707,7 +707,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
//判断关联设备是否开门
|
//判断关联设备是否开门
|
||||||
if (hongXiangConveyorDeviceDriver.getDoor() == 1 || hongXiangConveyorDeviceDriver.getError1() != 0
|
if (hongXiangConveyorDeviceDriver.getDoor() != 2 || hongXiangConveyorDeviceDriver.getError1() != 0
|
||||||
|| hongXiangConveyorDeviceDriver.getError() != 0) {
|
|| hongXiangConveyorDeviceDriver.getError() != 0) {
|
||||||
isClose = true;
|
isClose = true;
|
||||||
notCreateInstMessage = start_device_code + "关联设备->" + deviceCode + "烘箱门未关闭!";
|
notCreateInstMessage = start_device_code + "关联设备->" + deviceCode + "烘箱门未关闭!";
|
||||||
@@ -733,7 +733,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (linkDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
//判断关联设备是否开门
|
//判断关联设备是否开门
|
||||||
if (hongXiangConveyorDeviceDriver.getDoor() == 1 || hongXiangConveyorDeviceDriver.getError1() != 0
|
if (hongXiangConveyorDeviceDriver.getDoor() != 2 || hongXiangConveyorDeviceDriver.getError1() != 0
|
||||||
|| hongXiangConveyorDeviceDriver.getError() != 0) {
|
|| hongXiangConveyorDeviceDriver.getError() != 0) {
|
||||||
isClose = true;
|
isClose = true;
|
||||||
notCreateInstMessage = next_device_code + "关联设备->" + deviceCode + "烘箱门未关闭!";
|
notCreateInstMessage = next_device_code + "关联设备->" + deviceCode + "烘箱门未关闭!";
|
||||||
@@ -1125,7 +1125,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("message", message);
|
jo.put("message", message);
|
||||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
jo.put("feedMessage", LangProcess.msg(feedMessage));
|
jo.put("feedMessage", feedMessage);
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("x", x_position);
|
jo.put("x", x_position);
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import org.nl.acs.instruction.domain.Instruction;
|
|||||||
import org.nl.acs.instruction.domain.InstructionMybatis;
|
import org.nl.acs.instruction.domain.InstructionMybatis;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.instruction.service.dto.InstructionDto;
|
import org.nl.acs.instruction.service.dto.InstructionDto;
|
||||||
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
|
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||||
import org.nl.acs.task.domain.Task;
|
import org.nl.acs.task.domain.Task;
|
||||||
import org.nl.acs.task.enums.TaskStatusEnum;
|
import org.nl.acs.task.enums.TaskStatusEnum;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
@@ -31,6 +33,7 @@ import org.nl.acs.task.service.dto.TaskDto;
|
|||||||
import org.nl.acs.task.service.dto.TaskIdAndStatusDTO;
|
import org.nl.acs.task.service.dto.TaskIdAndStatusDTO;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.CodeUtil;
|
import org.nl.common.utils.CodeUtil;
|
||||||
|
import org.nl.config.SpringContextHolder;
|
||||||
import org.nl.hand.dto.HeadDto;
|
import org.nl.hand.dto.HeadDto;
|
||||||
import org.nl.hand.dto.HeadInstDto;
|
import org.nl.hand.dto.HeadInstDto;
|
||||||
import org.nl.hand.dto.HeadTaskDto;
|
import org.nl.hand.dto.HeadTaskDto;
|
||||||
@@ -66,6 +69,8 @@ public class HandServiceImpl implements HandService {
|
|||||||
private InstructionService instructionService;
|
private InstructionService instructionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
NDCAgvService ndcAgvService;
|
NDCAgvService ndcAgvService;
|
||||||
|
@Autowired
|
||||||
|
DeviceAppService deviceAppService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -129,22 +134,42 @@ public class HandServiceImpl implements HandService {
|
|||||||
String next_device_code2 = "";
|
String next_device_code2 = "";
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
if (StrUtil.equals(task_type, CommonFinalParam.TYPE_ONE)) {
|
if (StrUtil.equals(task_type, CommonFinalParam.TYPE_ONE)) {
|
||||||
String s = start_device_code.substring(9);
|
String s = start_device_code.substring(start_device_code.length() - 1);
|
||||||
if (StrUtil.equals("K", s)) {
|
if (StrUtil.equals("K", s)) {
|
||||||
start_device_code2 = next_device_code.substring(0, 10) + "M";
|
start_device_code2 = next_device_code.substring(0, next_device_code.length() - 1) + "M";
|
||||||
next_device_code2 = start_device_code.substring(0, 9) + "M";
|
next_device_code2 = start_device_code.substring(0, start_device_code.length() - 1) + "M";
|
||||||
jo.put("start_device_code2", start_device_code2);
|
jo.put("start_device_code2", start_device_code2);
|
||||||
jo.put("next_device_code2", next_device_code2);
|
jo.put("next_device_code2", next_device_code2);
|
||||||
jo.put("start_point_code2", start_device_code2);
|
jo.put("start_point_code2", start_device_code2);
|
||||||
jo.put("next_point_code2", next_device_code2);
|
jo.put("next_point_code2", next_device_code2);
|
||||||
|
}else{
|
||||||
|
throw new BadRequestException("起点设备名称不符");
|
||||||
}
|
}
|
||||||
} else if (StrUtil.equals(task_type, CommonFinalParam.TYPE_TWO)) {
|
} else if (StrUtil.equals(task_type, CommonFinalParam.TYPE_TWO)) {
|
||||||
start_device_code2 = next_device_code.substring(0, 9) + "K";
|
String s = start_device_code.substring(start_device_code.length() - 1);
|
||||||
next_device_code2 = start_device_code.substring(0, 9) + "K";
|
String n = next_device_code.substring(next_device_code.length() - 1);
|
||||||
jo.put("start_device_code2", start_device_code2);
|
if (StrUtil.equals("M", s) && StrUtil.equals("M", n)) {
|
||||||
jo.put("next_device_code2", next_device_code2);
|
start_device_code2 = next_device_code.substring(0, next_device_code.length() - 1) + "K";
|
||||||
jo.put("start_point_code2", start_device_code2);
|
next_device_code2 = start_device_code.substring(0, start_device_code.length() - 1) + "K";
|
||||||
jo.put("next_point_code2", next_device_code2);
|
jo.put("start_device_code2", start_device_code2);
|
||||||
|
jo.put("next_device_code2", next_device_code2);
|
||||||
|
jo.put("start_point_code2", start_device_code2);
|
||||||
|
jo.put("next_point_code2", next_device_code2);
|
||||||
|
}else if(StrUtil.equals("S", n) && StrUtil.equals("M", s)){
|
||||||
|
start_device_code2 = next_device_code.substring(0, next_device_code.length() - 1) + "X";
|
||||||
|
next_device_code2 = start_device_code.substring(0, start_device_code.length() - 1) + "K";
|
||||||
|
jo.put("start_device_code2", start_device_code2);
|
||||||
|
jo.put("next_device_code2", next_device_code2);
|
||||||
|
jo.put("start_point_code2", start_device_code2);
|
||||||
|
jo.put("next_point_code2", next_device_code2);
|
||||||
|
}else{
|
||||||
|
throw new BadRequestException("起点设备名称不符");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Device startDevice = deviceAppService.findDeviceByCode(start_device_code2);
|
||||||
|
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code2);
|
||||||
|
if(StrUtil.isAllNotEmpty(start_device_code2,next_device_code2) && ObjectUtil.isAllEmpty(startDevice,nextDevice)){
|
||||||
|
throw new BadRequestException("起点终点设备不存在");
|
||||||
}
|
}
|
||||||
jo.put("start_device_code", start_device_code);
|
jo.put("start_device_code", start_device_code);
|
||||||
jo.put("next_device_code", next_device_code);
|
jo.put("next_device_code", next_device_code);
|
||||||
@@ -162,6 +187,7 @@ public class HandServiceImpl implements HandService {
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("message", e.getMessage());
|
json.put("message", e.getMessage());
|
||||||
errArr.add(json);
|
errArr.add(json);
|
||||||
|
throw new RuntimeException(e.getMessage());
|
||||||
}
|
}
|
||||||
JSONArray data = new JSONArray();
|
JSONArray data = new JSONArray();
|
||||||
JSONObject resultJson = new JSONObject();
|
JSONObject resultJson = new JSONObject();
|
||||||
|
|||||||
@@ -268,11 +268,7 @@ export default {
|
|||||||
],
|
],
|
||||||
device_type: [
|
device_type: [
|
||||||
{ required: true, message: '设备类型不能为空', trigger: 'blur' }
|
{ required: true, message: '设备类型不能为空', trigger: 'blur' }
|
||||||
],
|
|
||||||
region: [
|
|
||||||
{ required: true, message: '所属区域不能为空', trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user