Browse Source

opt:优化日志

main
龚宝雄 3 weeks ago
parent
commit
bf270d9542
  1. 7
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java
  2. 86
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/ItemProtocol.java
  4. 5
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/SsxControlDefination.java
  5. 22
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/SsxDeviceDriver.java
  6. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  7. 4
      nladmin-ui/src/views/acs/device/config.vue

7
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java

@ -36,9 +36,10 @@ public enum DriverTypeEnum {
BAOSHIJIAN_SITE(14, "baoshijian_site", "保湿间", "conveyor"),
HJ1(15, "hj1", "桁架1", "conveyor"),
HJ2(16, "hj2", "桁架2", "conveyor"),
SSX(17, "ssx", "输送线", "conveyor");
SSX(15, "ssx", "输送线", "conveyor"),
HJ1(16, "hj1", "桁架1", "conveyor"),
HJ2(17, "hj2", "桁架2", "conveyor");
//驱动索引

86
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -203,20 +203,22 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//下发请求取货信号
hj1DeviceDriver.writing(2);
//反馈WMS请求取货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction());
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() != 0 && (hj1DeviceDriver.getAction() == 1)) {
if (hj1DeviceDriver.getTo_command() == 2) {
//反馈车辆动作
agv_status = 1;
flag = true;
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
} else {
log.info("到达{}取货点,成品码垛信号不为2,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction());
hj1DeviceDriver.writing(2);
//反馈WMS请求取货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
}
hj1DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj1DeviceDriver.getMode() == 0) {
@ -243,19 +245,21 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//下发请求取货信号
hj2DeviceDriver.writing(2);
//反馈WMS请求取货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction());
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() != 0 && (hj2DeviceDriver.getAction() == 1)) {
if (hj2DeviceDriver.getTo_command() == 2) {
agv_status = 1;
flag = true;
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
} else {
log.info("到达{}取货点,裸瓷码垛信号不为2,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction());
hj2DeviceDriver.writing(2);
//反馈WMS请求取货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
}
hj2DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj2DeviceDriver.getMode() == 0) {
@ -281,6 +285,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver();
//有货,待机,运行取货
log.info("tofix==================agv到达取货点==================");
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction());
if (ssxDeviceDriver.getMove() == 1 & ssxDeviceDriver.getMode() == 1 & ssxDeviceDriver.getAction() == 1) {
log.info("tofix==================agv到达取货点,有货,待机,运行取货,允许AGV取货==================");
//agv进入取货
@ -310,6 +315,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//到达普通站点
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
log.info("到达{}取货点请求取货", device_code);
log.info("tofix==================agv到达普通站点取货点===================agvphase:" + phase + "反馈成功");
inst.setExecute_status("1");
instructionService.update(inst);
@ -367,16 +373,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) {
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver();
hj1DeviceDriver.writing(3);
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction());
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() == 0) {
if (hj1DeviceDriver.getTo_command() == 3) {
//反馈车辆动作
agv_status = 0;
flag = true;
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成");
} else {
log.info("{}取货完成,成品码垛信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction());
hj1DeviceDriver.writing(3);
}
hj1DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj1DeviceDriver.getMode() == 0) {
@ -398,16 +406,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (device.getDeviceDriver() instanceof Hj2DeviceDriver) {
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver();
hj2DeviceDriver.writing(3);
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction());
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() == 0) {
if (hj2DeviceDriver.getTo_command() == 3) {
flag = true;
//反馈车辆动作
agv_status = 0;
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成");
} else {
log.info("{}取货完成,裸瓷码垛信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction());
hj2DeviceDriver.writing(3);
}
hj2DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj2DeviceDriver.getMode() == 0) {
@ -428,17 +439,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//到达输送线取货完成
if (device.getDeviceDriver() instanceof SsxDeviceDriver) {
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver();
log.info("tofix==================agv取货完成==================");
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction());
if (ssxDeviceDriver.getMode() != 0 && ssxDeviceDriver.getMove() == 0) {
if (ssxDeviceDriver.getTo_command() == 3) {
//反馈车辆动作
agv_status = 0;
flag = true;
data = actionComplete(index, inst, device_code, ssxDeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成");
} else {
log.info("{}取货完成,输送线信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getTo_command(), ssxDeviceDriver.getAction());
ssxDeviceDriver.writing(3);
}
ssxDeviceDriver.setMessage("");
flag = true;
} else {
log.info("tofix==================agv允许取货离开==================");
String message = "";
@ -459,7 +471,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//到达普通站点
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
log.info("tofix==================agv到达普通站点取货完成==================agvphase:" + phase + "反馈成功");
log.info("{}取货完成", device_code);
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
flag = true;
@ -512,21 +524,23 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver();
Map<String, Object> map = new LinkedHashMap<>();
hj1DeviceDriver.writing(4);
log.info("到达{}放货点请求放货,写入4,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction());
//反馈WMS请求放货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() == 0 && (hj1DeviceDriver.getAction() == 1)) {
if (hj1DeviceDriver.getTo_command() == 4) {
//反馈车辆动作
agv_status = 2;
flag = true;
//让agv进入
data = getData(data, index, inst, task);
} else {
log.info("到达{}放货点,成品信号不为4,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction());
hj1DeviceDriver.writing(4);
//反馈WMS请求放货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
}
hj1DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj1DeviceDriver.getMode() == 0) {
@ -552,21 +566,23 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver();
Map<String, Object> map = new LinkedHashMap<>();
hj2DeviceDriver.writing(4);
log.info("到达{}放货点请求放货,写入4,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction());
//反馈WMS请求放货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() == 0 && (hj2DeviceDriver.getAction() == 1)) {
if (hj2DeviceDriver.getTo_command() == 4) {
//反馈车辆动作
agv_status = 2;
flag = true;
//让agv进入
data = getData(data, index, inst, task);
} else {
log.info("到达{}放货点,裸瓷信号不为4,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction());
hj2DeviceDriver.writing(4);
//反馈WMS请求放货
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
}
hj2DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj2DeviceDriver.getMode() == 0) {
@ -589,8 +605,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//输送线到达放货点
if (device.getDeviceDriver() instanceof SsxDeviceDriver) {
log.info("tofix==================agv到达放货点==================");
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver();
log.info("到达{}放货点,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction());
//无货,待机,运行放货
if (ssxDeviceDriver.getMove() == 0 & ssxDeviceDriver.getMode() == 1 & ssxDeviceDriver.getAction() == 1) {
log.info("tofix==================agv到达放货点,无货,待机,运行放货,允许AGV放货==================");
@ -621,7 +637,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//普通站点
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
log.info("tofix==================agv到达放货点==================agvphase:" + phase + "反馈成功");
log.info("到达{}放货点", device_code);
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
flag = true;
@ -671,16 +687,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) {
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver();
hj1DeviceDriver.writing(5);
log.info("{}放货完成,写入5确认,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction());
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() != 0) {
if (hj1DeviceDriver.getTo_command() == 5) {
//反馈车辆动作
agv_status = 0;
flag = true;
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成");
} else {
log.info("{}放货完成,成品码垛信号不为5,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction());
hj1DeviceDriver.writing(5);
}
hj1DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj1DeviceDriver.getMode() == 0) {
@ -702,16 +720,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
if (device.getDeviceDriver() instanceof Hj2DeviceDriver) {
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver();
hj2DeviceDriver.writing(5);
log.info("{}放货完成,写入5确认,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction());
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() != 0) {
if (hj2DeviceDriver.getTo_command() == 5) {
//反馈车辆动作
agv_status = 0;
flag = true;
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成");
} else {
log.info("{}放货完成,裸瓷码垛信号不为5,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction());
hj2DeviceDriver.writing(5);
}
hj2DeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (hj2DeviceDriver.getMode() == 0) {
@ -731,19 +751,20 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//到达输送线放货完成
if (device.getDeviceDriver() instanceof SsxDeviceDriver) {
log.info("tofix==================agv放货完成==================");
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver();
ssxDeviceDriver.writing(4);
log.info("{}放货完成,写入4确认,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction());
if (ssxDeviceDriver.getMode() != 0 && ssxDeviceDriver.getMove() != 0) {
if (ssxDeviceDriver.getTo_command() == 4) {
//反馈车辆动作
agv_status = 0;
flag = true;
data = actionComplete(index, inst, device_code, ssxDeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成");
} else {
log.info("{}放货完成,输送线信号不为4,Mode:{},command{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getTo_command(), ssxDeviceDriver.getAction());
ssxDeviceDriver.writing(4);
}
ssxDeviceDriver.setMessage("");
flag = true;
} else {
String message = "";
if (ssxDeviceDriver.getMode() == 0) {
@ -764,8 +785,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
//agv普通站点放货完成
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
log.info("tofix==================agv普通站点放货完成==================agvphase:" + phase + "反馈成功");
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
log.info("{}放货完成", device_code);
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
flag = true;
}
@ -826,7 +846,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//反馈ndc动作完成
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
//todo 接口,反馈AGV动作信息
sendAgvTaskStatus(inst, device_code, status);
//sendAgvTaskStatus(inst, device_code, status);
log.info(action + "请求离开,当前输送to_command:" + to_command);
logServer.deviceExecuteLog(this.device_code, "", "", action);
return data;
@ -900,19 +920,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
}
private byte[] getData(byte[] data, int index, Instruction inst, TaskDto task) {
if (!"2".equals(task.getTask_type())) {
String resp = acsToWmsService.requestTaskAgain(task.getNext_point_code(), task.getExt_task_id(), inst.getVehicle_code());
JSONObject respjson = JSONObject.parseObject(resp);
String next_device_code = respjson.getString("next_point_code");
task.setNext_point_code(next_device_code);
int start_address = deviceService.queryAddressBydeviceCode(inst.getStart_point_code());
int next_address = deviceService.queryAddressBydeviceCode(next_device_code);
taskService.update(task);
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, 0, 0);
log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);
} else {
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
}
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
return data;
}

2
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/ItemProtocol.java

@ -3,7 +3,7 @@ package org.nl.acs.device_driver.yinfei.ssx;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
import org.nl.acs.device_driver.yinfei.hj1.Hj1DeviceDriver;
import java.util.ArrayList;
import java.util.List;

5
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/SsxControlDefination.java

@ -5,7 +5,6 @@ import org.nl.acs.device.domain.Device;
import org.nl.acs.device.enums.DeviceType;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
import org.nl.acs.device_driver.yinfei.hj1.Hj1DeviceDriver;
import org.nl.acs.device_driver.yinfei.hj1.ItemProtocol;
import org.springframework.stereotype.Service;
@ -35,13 +34,13 @@ public class SsxControlDefination implements OpcDeviceDriverDefination {
@Override
public DeviceDriver getDriverInstance(Device device) {
return (new Hj1DeviceDriver()).setDevice(device).setDriverDefination(this);
return (new SsxDeviceDriver()).setDevice(device).setDriverDefination(this);
}
@Override
public Class<? extends DeviceDriver> getDeviceDriverType() {
return Hj1DeviceDriver.class;
return SsxDeviceDriver.class;
}
@Override

22
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/yinfei/ssx/SsxDeviceDriver.java

@ -36,7 +36,10 @@ import org.nl.system.service.param.ISysParamService;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadPoolExecutor;
@ -303,13 +306,20 @@ public class SsxDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
public void writing(int command) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + ItemProtocol.item_to_command;
//String opcservcerid = this.getDevice().getOpc_server_id();
//Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
try {
this.control(itemMap);
} catch (Exception e) {
for (int i = 0; i < 10; i++) {
try {
this.control(itemMap);
return;
} catch (Exception e1) {
log.error("{}写入信号:{}失败:{}{}", this.getDevice().getDevice_code(), to_command, e, e.getMessage());
}
}
}
}
public void writing(int command, int target, int task) {

2
nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -308,7 +308,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
}
}
if (StrUtil.isEmpty(is_over) && StrUtil.isEmpty(status)) {
wrapper.lt(Task::getTask_status, 3);
wrapper.lt(Task::getTask_status, 2);
}
IPage<Task> taskPage = taskMapper.selectPage(queryPage, wrapper);
final JSONObject json = (JSONObject) JSON.toJSON(ConvertUtil.convertPage(taskPage, TaskDto.class));

4
nladmin-ui/src/views/acs/device/config.vue

@ -117,9 +117,9 @@ export default {
agv_ndc_two,
agv_ndc_one,
xg_agv,
ssx,
hj1,
hj2,
ssx
hj2
},
dicts: ['device_type'],
mixins: [crud],

Loading…
Cancel
Save