add: 测试新添内容
This commit is contained in:
@@ -4,11 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.AcsConfig;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
@@ -16,7 +12,6 @@ import org.nl.acs.device_driver.agv.xg_agv_car.XgAgvCarDeviceDriver;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.task.domain.Task;
|
||||
import org.nl.acs.task.enums.AgvActionTypeEnum;
|
||||
import org.nl.acs.task.enums.AgvSystemTypeEnum;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
@@ -80,7 +75,7 @@ public class QueryAGVStatus {
|
||||
instruction.setCarno(carNo);
|
||||
TaskDto task = new TaskDto();
|
||||
instructionService.update(instruction);
|
||||
task.setCarno(carNo);
|
||||
task.setCar_no(carNo);
|
||||
task.setTask_id(instruction.getTask_id());
|
||||
instructionService.update(instruction);
|
||||
taskService.update(task);
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.nl.acs.device_driver.agv.ndcone.AgvNdcOneDeviceDriver;
|
||||
import org.nl.acs.device_driver.agv.ndctwo.AgvNdcTwoDeviceDriver;
|
||||
import org.nl.acs.device_driver.autodoor.lift_door.LiftDoorDeviceDriver;
|
||||
import org.nl.acs.device_driver.autodoor.air_shower_door.AirShowerDoorDeviceDriver;
|
||||
import org.nl.acs.device_driver.autodoor.standard_autodoor.StandardAutodoorDeviceDriver;
|
||||
import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -163,8 +164,9 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
String old_device_code = null;
|
||||
String emptyNum = null;
|
||||
//自动门
|
||||
AirShowerDoorDeviceDriver standardAutodoorDeviceDriver;
|
||||
AirShowerDoorDeviceDriver airShowerDoorDeviceDriver;
|
||||
LiftDoorDeviceDriver liftDoorDeviceDriver;
|
||||
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
||||
if (agvaddr != 0) {
|
||||
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
|
||||
if (StrUtil.contains(old_device_code, "-")) {
|
||||
@@ -270,37 +272,35 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(device)) {
|
||||
if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
||||
airShowerDoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_open", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_close", "0");
|
||||
airShowerDoorDeviceDriver.writing("to_open", "1");
|
||||
airShowerDoorDeviceDriver.writing("to_close", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
log.info("下发风淋门电气信号失败:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
|
||||
log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
|
||||
if (airShowerDoorDeviceDriver.getOpen() == 1 && airShowerDoorDeviceDriver.getToOpen() == 1) {
|
||||
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getOpen());
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
} else {
|
||||
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
|
||||
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getToClose());
|
||||
}
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof LiftDoorDeviceDriver) {
|
||||
liftDoorDeviceDriver = (LiftDoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
liftDoorDeviceDriver.writing("to_open1", "1");
|
||||
liftDoorDeviceDriver.writing("to_open2", "1");
|
||||
liftDoorDeviceDriver.writing("to_close1", "0");
|
||||
liftDoorDeviceDriver.writing("to_close2", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电梯门电气信号失败:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (liftDoorDeviceDriver.getOpen1() == 1 && liftDoorDeviceDriver.getToOpen1() == 1 && liftDoorDeviceDriver.getOpen2() == 1 && liftDoorDeviceDriver.getToOpen2() == 1) {
|
||||
log.info("下发电梯门开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1(), liftDoorDeviceDriver.getToOpen2(), liftDoorDeviceDriver.getOpen2());
|
||||
if (liftDoorDeviceDriver.getOpen1() == 1 && liftDoorDeviceDriver.getToOpen1() == 1 ) {
|
||||
log.info("下发电梯门开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1());
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
} else {
|
||||
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1(), liftDoorDeviceDriver.getToOpen2(), liftDoorDeviceDriver.getOpen2());
|
||||
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,8 +314,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
return;
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(device)) {
|
||||
if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_close", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_open", "0");
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.acs.device_driver.agv.ndctwo;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -41,14 +42,10 @@ import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -547,6 +544,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
|
||||
@@ -559,7 +557,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
manipulatorAgvStationDeviceDriver.writing(3);
|
||||
// manipulatorAgvStationDeviceDriver.writing(3);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -575,6 +573,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
@@ -1101,28 +1100,48 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, next_device_code2)) {
|
||||
if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
try {
|
||||
manipulatorAgvStationDeviceDriver.writing(2);
|
||||
manipulatorAgvStationDeviceDriver.writing(6);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check"))
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check").toString())) {
|
||||
if (manipulatorAgvStationDeviceDriver.getAction() == 1 && manipulatorAgvStationDeviceDriver.getMode() == 2 && manipulatorAgvStationDeviceDriver.getMove() == 0) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "mode信号:" + manipulatorAgvStationDeviceDriver.getMode() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
message = "设备号:" + manipulatorAgvStationDeviceDriver.getDevice_code() + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1180,7 +1199,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String start_device_code2 = inst.getStart_device_code2();
|
||||
String next_device_code2 = inst.getNext_device_code2();
|
||||
//AGV取完收卷辊请求离开
|
||||
if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, start_device_code)) {
|
||||
if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, next_device_code2)) {
|
||||
if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
@@ -1279,6 +1298,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
|
||||
@@ -1331,6 +1351,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
@@ -1423,7 +1444,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
task.setWeight(String.valueOf(weight));
|
||||
task.setCarno(this.device_code);
|
||||
task.setCar_no(this.device_code);
|
||||
taskService.update(task);
|
||||
}
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
@@ -1476,14 +1497,48 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait"))
|
||||
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString())
|
||||
&& StrUtil.equals(task.getTask_type(), "1")) {
|
||||
if (standardOrdinarySiteDeviceDriver.getOption() == 1) {
|
||||
String task_code = standardOrdinarySiteDeviceDriver.getTask_code();
|
||||
log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code);
|
||||
if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("任务号为空")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
log.info("等待LMS系统进行确认允许取货,设备号{},option值{}", standardOrdinarySiteDeviceDriver.getDevice_code(), standardOrdinarySiteDeviceDriver.getOption());
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("等待LMS系统进行确认允许取货,设备号" + standardOrdinarySiteDeviceDriver.getDevice_code() + ",option当前值" + standardOrdinarySiteDeviceDriver.getOption())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
this.setPhase(phase);
|
||||
}
|
||||
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||
standardOrdinarySiteDeviceDriver.setIndex(index);
|
||||
standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||
@@ -1748,29 +1803,66 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
return;
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
// if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait"))
|
||||
// && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())
|
||||
// && StrUtil.equals(task.getTask_type(), "1")) {
|
||||
// //
|
||||
// if (standardOrdinarySiteDeviceDriver.getOption() == 2) {
|
||||
// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
// standardOrdinarySiteDeviceDriver.setOption(0);
|
||||
// } else {
|
||||
// log.info("等待LMS系统进行确认离开,设备号{},指令号:{}", device_code, ikey);
|
||||
// message = "等待LMS系统进行确认离开,设备号:" + device_code + ",指令号:" + ikey;
|
||||
// }
|
||||
// } else {
|
||||
// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
// }
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
this.setPhase(phase);
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait"))
|
||||
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString())
|
||||
&& StrUtil.equals(task.getTask_type(), "1")) {
|
||||
if (standardOrdinarySiteDeviceDriver.getOption() == 2) {
|
||||
String task_code = standardOrdinarySiteDeviceDriver.getTask_code();
|
||||
log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code);
|
||||
if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("任务号为空")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
log.info("等待LMS系统进行确认允许取货,设备号{},option值{}", standardOrdinarySiteDeviceDriver.getDevice_code(), standardOrdinarySiteDeviceDriver.getOption());
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("等待LMS系统进行确认允许取货,设备号" + standardOrdinarySiteDeviceDriver.getDevice_code() + ",option当前值" + standardOrdinarySiteDeviceDriver.getOption())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
this.setPhase(phase);
|
||||
}
|
||||
String task_code = inst.getTask_code();
|
||||
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("releaseBackToLms"))
|
||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("releaseBackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
acsToWmsService.releaseComplete(jsonObject);
|
||||
}
|
||||
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||
standardOrdinarySiteDeviceDriver.setIndex(index);
|
||||
standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
@@ -1994,12 +2086,6 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
try {
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//申请烘箱行架任务
|
||||
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task"))
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) {
|
||||
@@ -2007,7 +2093,18 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String task_code = inst.getTask_code();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
acsToWmsService.applyOvenGantryTask(jsonObject);
|
||||
String response = acsToWmsService.applyOvenGantryTask(jsonObject);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (jo.getInteger("status") == 200) {
|
||||
log.info("申请烘箱行架任务成功返回参数:"+ jo);
|
||||
try {
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
log.info("申请烘箱行架任务失败返回参数:"+ jo);
|
||||
}
|
||||
}
|
||||
//行架取货完成后反馈ndc
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) {
|
||||
@@ -2027,19 +2124,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
}
|
||||
//收卷辊放货忽略取货校验
|
||||
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check"))
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check").toString())) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
|
||||
}else {
|
||||
try {
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//收卷辊放货忽略取货校验
|
||||
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check"))
|
||||
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check").toString())) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
@@ -2048,14 +2141,24 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件";
|
||||
log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
} else {
|
||||
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件";
|
||||
log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
||||
@@ -2234,6 +2337,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
}
|
||||
String task_code = inst.getTask_code();
|
||||
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("releaseBackToLms"))
|
||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("releaseBackToLms").toString())) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("task_code", task_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
|
||||
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
acsToWmsService.releaseComplete(jsonObject);
|
||||
}
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
.content("agvphase:" + phase + "反馈:" + data)
|
||||
|
||||
@@ -6,7 +6,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.autodoor.standard_autodoor.ToDoorCommandControl;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.nl.acs.device_driver.autodoor.air_shower_door;
|
||||
|
||||
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ToDoorCommandControl {
|
||||
|
||||
private AirShowerDoorDeviceDriver driver;
|
||||
|
||||
public ToDoorCommandControl(AirShowerDoorDeviceDriver driver){
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
public void control(String param, String value) throws Exception {
|
||||
// ItemValue[] itemValues = new ItemValue[]{new ItemValue(this.driver.getItem(ItemProtocol.item_to_command), command)};
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
String to_param = this.driver.getDevice().getOpc_server_code() + "." + this.driver.getDevice().getOpc_plc_code() + "." + this.driver.getDevice().getDevice_code()
|
||||
+ "."+ param;
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
try {
|
||||
this.driver.checkcontrol(itemMap);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,9 @@ public class ItemProtocol {
|
||||
public static String item_robot_status = "lift_robot_status";
|
||||
|
||||
//主门开到位
|
||||
public static String item_open1 = "open1";
|
||||
public static String item_open1 = "open";
|
||||
|
||||
|
||||
//副门开到位
|
||||
public static String item_open2 = "open2";
|
||||
|
||||
//主门关到位
|
||||
public static String item_close1 = "close1";
|
||||
@@ -40,8 +39,7 @@ public class ItemProtocol {
|
||||
//开主门
|
||||
public static String item_to_open1 = "to_open1";
|
||||
|
||||
//开副门
|
||||
public static String item_to_open2 = "to_open2";
|
||||
|
||||
|
||||
public static String item_to_call= "to_call";
|
||||
|
||||
@@ -52,9 +50,6 @@ public class ItemProtocol {
|
||||
}
|
||||
|
||||
|
||||
public int getOpen2() {
|
||||
return this.getOpcIntegerValue(item_open2);
|
||||
}
|
||||
|
||||
public int getOpen1() {
|
||||
return this.getOpcIntegerValue(item_open1);
|
||||
@@ -89,9 +84,6 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_open1);
|
||||
}
|
||||
|
||||
public int getToOpen2() {
|
||||
return this.getOpcIntegerValue(item_to_open2);
|
||||
}
|
||||
|
||||
public int getHeartbeat() {
|
||||
return this.getOpcIntegerValue(item_heartbeat);
|
||||
@@ -128,7 +120,6 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "10003"));
|
||||
list.add(new ItemDto(item_open1, "主开到位", "10001"));
|
||||
list.add(new ItemDto(item_close1, "主关到位", "10002"));
|
||||
list.add(new ItemDto(item_open2, "副开到位", "10001"));
|
||||
list.add(new ItemDto(item_close2, "副关到位", "10002"));
|
||||
list.add(new ItemDto(item_mode, "工作模式", "10004"));
|
||||
list.add(new ItemDto(item_lift_status, "状态(拥挤 空闲 一般)", "10002"));
|
||||
@@ -141,7 +132,6 @@ public class ItemProtocol {
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_open1, "下发开主门", "10002"));
|
||||
list.add(new ItemDto(item_to_open2, "下发开副门", "10002"));
|
||||
list.add(new ItemDto(item_to_call, "呼叫", "10002"));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自动门驱动定义
|
||||
* 电梯门
|
||||
*/
|
||||
@Service
|
||||
public class LiftDoorDefination implements OpcDeviceDriverDefination {
|
||||
@@ -22,12 +22,12 @@ public class LiftDoorDefination implements OpcDeviceDriverDefination {
|
||||
|
||||
@Override
|
||||
public String getDriverName() {
|
||||
return "标准版-自动门";
|
||||
return "电梯门";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDriverDescription() {
|
||||
return "标准版-自动门";
|
||||
return "电梯门";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 自动门驱动
|
||||
* 电梯门
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@@ -36,15 +36,10 @@ public class LiftDoorDeviceDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
|
||||
int open1 = 0;
|
||||
int close1 = 0;
|
||||
int open2 = 0;
|
||||
int close2 = 0;
|
||||
int last_open1 = 0;
|
||||
int last_close1 = 0;
|
||||
int last_open2 = 0;
|
||||
int last_close2 = 0;
|
||||
int toOpen1 = 0;
|
||||
int last_toOpen1 = 0;
|
||||
int toOpen2 = 0;
|
||||
int toClose = 0;
|
||||
int last_toClose = 0;
|
||||
String device_code = null;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.acs.device_driver.autodoor.lift_door;
|
||||
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
public class ItemProtocol {
|
||||
public static String item_open = "open";
|
||||
public static String item_close = "close";
|
||||
public static String item_to_open = "to_open";
|
||||
public static String item_to_close = "to_close";
|
||||
|
||||
|
||||
private StandardAutodoorDeviceDriver driver;
|
||||
|
||||
public ItemProtocol(StandardAutodoorDeviceDriver driver) {
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
public int getOpen() {
|
||||
return this.getOpcIntegerValue(item_open);
|
||||
}
|
||||
|
||||
public int getClose() {
|
||||
return this.getOpcIntegerValue(item_close);
|
||||
}
|
||||
|
||||
|
||||
public int getToOpen() {
|
||||
return this.getOpcIntegerValue(item_to_open);
|
||||
}
|
||||
|
||||
public int getToClose() {
|
||||
return this.getOpcIntegerValue(item_to_close);
|
||||
}
|
||||
|
||||
public int getOpcIntegerValue(String protocol) {
|
||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||
if (value == null) {
|
||||
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public String getOpcStringValue(String protocol) {
|
||||
String value = this.driver.getStringValue(protocol);
|
||||
if (StrUtil.isEmpty(value)) {
|
||||
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_open, "开到位", "10001"));
|
||||
list.add(new ItemDto(item_close, "关到位", "10002"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_open, "下发开门", "00001" ));
|
||||
list.add(new ItemDto(item_to_close, "下发关门", "00002"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||
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.springframework.stereotype.Service;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自动门驱动定义
|
||||
*/
|
||||
@Service
|
||||
public class StandardAutodoorDefination implements OpcDeviceDriverDefination {
|
||||
@Override
|
||||
public String getDriverCode() {
|
||||
return "standard_autodoor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDriverName() {
|
||||
return "标准版-自动门";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDriverDescription() {
|
||||
return "标准版-自动门";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DeviceDriver getDriverInstance(Device device) {
|
||||
return (new StandardAutodoorDeviceDriver()).setDevice(device).setDriverDefination(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends DeviceDriver> getDeviceDriverType() {
|
||||
return StandardAutodoorDeviceDriver.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceType> getFitDeviceTypes() {
|
||||
List<DeviceType> types = new LinkedList();
|
||||
types.add(DeviceType.conveyor);
|
||||
return types;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemDto> getReadableItemDtos() {
|
||||
return ItemProtocol.getReadableItemDtos();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemDto> getWriteableItemDtos() {
|
||||
return ItemProtocol.getWriteableItemDtos();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.utils.ReadUtil;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 自动门驱动
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
protected ToDoorCommandControl toDoorCommandControl = new ToDoorCommandControl(this);
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
|
||||
int open = 0;
|
||||
int close = 0;
|
||||
|
||||
int last_open = 0;
|
||||
int last_close = 0;
|
||||
|
||||
int toOpen = 0;
|
||||
int last_toOpen = 0;
|
||||
int toClose = 0;
|
||||
int last_toClose = 0;
|
||||
String device_code = null;
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
return this.device;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
String message = null;
|
||||
|
||||
device_code = this.getDevice().getDevice_code();
|
||||
open = this.itemProtocol.getOpen();
|
||||
close = this.itemProtocol.getClose();
|
||||
toOpen = this.itemProtocol.getToOpen();
|
||||
toClose = this.itemProtocol.getToClose();
|
||||
if (open != last_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
||||
}
|
||||
if (close != last_close) {
|
||||
if(close ==1 ){
|
||||
this.writing("to_close","0");
|
||||
}
|
||||
}
|
||||
|
||||
last_open = open;
|
||||
last_close = close;
|
||||
last_toClose = toClose;
|
||||
last_toOpen = toOpen;
|
||||
}
|
||||
|
||||
|
||||
public void writing(String param, String value) {
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + param;
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("下发多个电气信号" + itemMap)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
try {
|
||||
this.toDoorCommandControl.control(param,value);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void writing(String param, int command) {
|
||||
String to_command = String.format("%s.%s.%s.%s", this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.getDevice().getDevice_code(), param);
|
||||
|
||||
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);
|
||||
ReadUtil.write(itemMap, server);
|
||||
log.info("下发PLC信号:{},{}", to_command, command);
|
||||
System.out.println("设备:" + this.device_code + ",下发PLC信号:" + to_command + ",value:" + command);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String open = "";
|
||||
String close = "";
|
||||
if (this.getOpen() == 0) {
|
||||
open = "未知";
|
||||
} else if (this.getOpen() == 1) {
|
||||
open = "开到位";
|
||||
}
|
||||
if (this.getClose() == 0) {
|
||||
open = "未知";
|
||||
} else if (this.getClose() == 1) {
|
||||
open = "关到位";
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("open", open);
|
||||
jo.put("close", close);
|
||||
jo.put("isOnline", true);
|
||||
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
|
||||
import org.nl.acs.device_driver.autodoor.air_shower_door.AirShowerDoorDeviceDriver;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ToDoorCommandControl {
|
||||
|
||||
private AirShowerDoorDeviceDriver driver;
|
||||
private StandardAutodoorDeviceDriver driver;
|
||||
|
||||
public ToDoorCommandControl(AirShowerDoorDeviceDriver driver){
|
||||
public ToDoorCommandControl(StandardAutodoorDeviceDriver driver){
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSi
|
||||
import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDriver;
|
||||
import org.nl.acs.enums.PointErrorTypeEnum;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
@@ -161,6 +160,8 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
String inst_message;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
return this.device;
|
||||
@@ -200,6 +201,42 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
updateInstructionStatus();
|
||||
}
|
||||
|
||||
|
||||
if (mode == 3 && !actionRequireSucess) {
|
||||
//入库任务完成
|
||||
if (action == 5 && move == 0) {
|
||||
try {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("device_code", target);
|
||||
jsonObject.put("barcode", barcode);
|
||||
String response = acsToWmsService.feedbackTubeInStorageComplete(jsonObject);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (jo.getInteger("status") == 200) {
|
||||
log.info("管芯入库申请放货完成成功:" + jo);
|
||||
Map<String, Object> map1 = new HashMap<>();
|
||||
List list = new ArrayList();
|
||||
map1.put("code", "to_command");
|
||||
map1.put("value", 6);
|
||||
list.add(map1);
|
||||
this.writing(list);
|
||||
message = "universal_message1";
|
||||
this.actionRequireSucess = true;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
message = "universal_message2";
|
||||
e.printStackTrace();
|
||||
}
|
||||
feedMessage = "";
|
||||
} else {
|
||||
feedMessage = "universal_feedMessage5";
|
||||
if (mode != 3) {
|
||||
feedMessage = "universal_feedMessage1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = "universal_off-line";
|
||||
@@ -209,14 +246,18 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
this.setIserror(true);
|
||||
message = "universal_message3";
|
||||
//满入空出分配新点位
|
||||
if (error == 2 || error == 3) {
|
||||
if ((error == 2 || error == 3) && !actionRequireSucess) {
|
||||
if (barcode == null || target == null) {
|
||||
notCreateInstMessage = "管芯规格或库位为空";
|
||||
} else {
|
||||
if (error == 2) {
|
||||
errorDispose(PointErrorTypeEnum.IN.getCode());
|
||||
errorDispose(PointErrorTypeEnum.IN.getCode(),null);
|
||||
} else {
|
||||
errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||
Instruction instruction = checkInst();
|
||||
if (instruction == null) {
|
||||
feedMessage = "universal_feedMessage4";
|
||||
}
|
||||
errorDispose(PointErrorTypeEnum.OUT.getCode(),instruction.getTask_code());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -292,13 +333,13 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
last_to_type = to_type;
|
||||
}
|
||||
|
||||
private void errorDispose(Integer code) {
|
||||
Instruction instruction = checkInst();
|
||||
private void errorDispose(Integer code, String taskCode) {
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("barcode", barcode);
|
||||
param.put("target", target);
|
||||
param.put("type", code);
|
||||
param.put("task_code", instruction.getTask_code());
|
||||
param.put("task_code", taskCode);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("管芯库满入或空出请求lms,参数:" + param)
|
||||
@@ -414,7 +455,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
}
|
||||
|
||||
//放货完成
|
||||
//出库放货完成
|
||||
if (action == 4 && move == 0) {
|
||||
if (inst != null) {
|
||||
try {
|
||||
@@ -448,6 +489,8 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,12 @@ public interface AcsToWmsService {
|
||||
*/
|
||||
void actionFinishRequest2(JSONObject jsonObject);
|
||||
|
||||
void releaseComplete(JSONObject jsonObject);
|
||||
|
||||
String outHotTaskApply(JSONObject apply);
|
||||
|
||||
void applyOvenGantryTask(JSONObject jsonObject);
|
||||
String applyOvenGantryTask(JSONObject jsonObject);
|
||||
|
||||
String feedbackTubeInStorageComplete(JSONObject jsonObject);
|
||||
|
||||
}
|
||||
|
||||
@@ -721,6 +721,40 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void releaseComplete(JSONObject jsonObject) {
|
||||
HttpResponse execute = null;
|
||||
try {
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("releaseComplete");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
try {
|
||||
execute = HttpRequest.post(url)
|
||||
.body(String.valueOf(jsonObject))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("releaseComplete-----输出参数{}", msg);
|
||||
//网络不通
|
||||
LuceneLogDto luceneLogDto1 = new LuceneLogDto(4,"releaseComplete", String.valueOf(execute.getStatus()),
|
||||
String.valueOf(jsonObject),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "设备工位放货完成反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto1);
|
||||
}
|
||||
log.info("releaseComplete - 设备工位放货完成反馈{}", jsonObject);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"releaseComplete", "",
|
||||
String.valueOf(jsonObject),
|
||||
"", jsonObject.getString("task_code") + "设备工位放货完成反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"releaseComplete", String.valueOf(execute.getStatus()),
|
||||
JSON.toJSONString(execute.body()),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "设备工位放货完成反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse feedbackDies(JSONObject param) {
|
||||
HttpResponse result2 = null;
|
||||
@@ -789,7 +823,42 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyOvenGantryTask(JSONObject jsonObject) {
|
||||
public String feedbackTubeInStorageComplete(JSONObject jsonObject) {
|
||||
HttpResponse execute = null;
|
||||
try {
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("feedbackTubeInStorageComplete");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
try {
|
||||
execute = HttpRequest.post(url)
|
||||
.body(String.valueOf(jsonObject))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("feedbackTubeInStorageComplete-----输出参数{}", msg);
|
||||
//网络不通
|
||||
LuceneLogDto luceneLogDto1 = new LuceneLogDto(4,"feedbackTubeInStorageComplete", String.valueOf(execute.getStatus()),
|
||||
String.valueOf(jsonObject),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "管芯入库申请放货完成");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto1);
|
||||
}
|
||||
log.info("feedbackTubeInStorageComplete - 管芯入库申请放货完成反馈{}", jsonObject);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackTubeInStorageComplete", "",
|
||||
String.valueOf(jsonObject),
|
||||
"", jsonObject.getString("task_code") + "管芯入库申请放货完成反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return execute.body();
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackTubeInStorageComplete", String.valueOf(execute.getStatus()),
|
||||
JSON.toJSONString(execute.body()),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "管芯入库申请放货完成反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String applyOvenGantryTask(JSONObject jsonObject) {
|
||||
HttpResponse execute = null;
|
||||
try {
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
@@ -813,11 +882,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String.valueOf(jsonObject),
|
||||
"", jsonObject.getString("task_code") + "申请烘箱行架任务完成反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return execute.body();
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyOvenGantryTask", String.valueOf(execute.getStatus()),
|
||||
JSON.toJSONString(execute.body()),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "申请烘箱行架任务反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
||||
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver();
|
||||
int phase = agvNdcTwoDeviceDriver.getPhase();
|
||||
if (phase == 0x03 || phase == 0x05 || phase == 0x08) {
|
||||
if (phase == 0x03 || phase == 0x05 || phase == 0x08 || phase == 0x0E || phase == 0x0C) {
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
Device devicePointDriver = deviceAppService.findDeviceByCode(device_code);
|
||||
if (devicePointDriver.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
@@ -662,72 +662,78 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
JSONObject data = JSONObject.parseObject(jsonObject);
|
||||
Map map = new HashMap();
|
||||
String device_code = data.getString("device_code");
|
||||
String to_barcode1 = data.getString("barcode1");
|
||||
String to_barcode2 = data.getString("barcode2");
|
||||
String to_barcode3 = data.getString("barcode3");
|
||||
String to_barcode4 = data.getString("barcode4");
|
||||
String to_barcode5 = data.getString("barcode5");
|
||||
String to_target1 = data.getString("target1");
|
||||
String to_target2 = data.getString("target2");
|
||||
String to_target3 = data.getString("target3");
|
||||
String to_target4 = data.getString("target4");
|
||||
String to_target5 = data.getString("target5");
|
||||
String num = data.getString("num");
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new Exception("未找到对应设备:" + device_code);
|
||||
JSONArray datas = JSONArray.parseArray(jsonObject);
|
||||
if (datas.size() > 0) {
|
||||
|
||||
JSONObject data = (JSONObject) datas.get(0);
|
||||
Map map = new HashMap();
|
||||
String device_code = data.getString("device_code");
|
||||
String to_barcode1 = data.getString("barcode1");
|
||||
String to_barcode2 = data.getString("barcode2");
|
||||
String to_barcode3 = data.getString("barcode3");
|
||||
String to_barcode4 = data.getString("barcode4");
|
||||
String to_barcode5 = data.getString("barcode5");
|
||||
String to_target1 = data.getString("target1");
|
||||
String to_target2 = data.getString("target2");
|
||||
String to_target3 = data.getString("target3");
|
||||
String to_target4 = data.getString("target4");
|
||||
String to_target5 = data.getString("target5");
|
||||
String num = data.getString("num");
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new Exception("未找到对应设备:" + device_code);
|
||||
}
|
||||
PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) {
|
||||
pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver();
|
||||
if (!ObjectUtil.isEmpty(to_barcode1)) {
|
||||
map.put("to_barcode1", to_barcode1);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_barcode2)) {
|
||||
map.put("to_barcode2", to_barcode2);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_barcode3)) {
|
||||
map.put("to_barcode3", to_barcode3);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_barcode4)) {
|
||||
map.put("to_barcode4", to_barcode4);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_barcode5)) {
|
||||
map.put("to_barcode5", to_barcode5);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_target1)) {
|
||||
map.put("to_target1", to_target1);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_target2)) {
|
||||
map.put("to_target2", to_target2);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_target3)) {
|
||||
map.put("to_target3", to_target3);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_target4)) {
|
||||
map.put("to_target4", to_target4);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(to_target5)) {
|
||||
map.put("to_target5", to_target5);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(num)) {
|
||||
map.put("to_num", num);
|
||||
}
|
||||
pipeCoreRackStationDeviceDriver.writing(map);
|
||||
}
|
||||
JSONObject resultJson = new JSONObject();
|
||||
resultJson.put("status", HttpStatus.OK.value());
|
||||
resultJson.put("message", "操作成功");
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code("下发管芯信息")
|
||||
.content("下发管芯信息-----返回参数:" + resultJson)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
return resultJson;
|
||||
|
||||
}
|
||||
PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) {
|
||||
pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver();
|
||||
if (ObjectUtil.isEmpty(to_barcode1)) {
|
||||
map.put("to_barcode1", to_barcode1);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_barcode2)) {
|
||||
map.put("to_barcode2", to_barcode2);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_barcode3)) {
|
||||
map.put("to_barcode3", to_barcode3);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_barcode4)) {
|
||||
map.put("to_barcode4", to_barcode4);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_barcode5)) {
|
||||
map.put("to_barcode5", to_barcode5);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_target1)) {
|
||||
map.put("to_target1", to_target1);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_target2)) {
|
||||
map.put("to_target2", to_target2);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_target3)) {
|
||||
map.put("to_target3", to_target3);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_target4)) {
|
||||
map.put("to_target4", to_target4);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(to_target5)) {
|
||||
map.put("to_target5", to_target5);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(num)) {
|
||||
map.put("to_num", num);
|
||||
}
|
||||
pipeCoreRackStationDeviceDriver.writing(map);
|
||||
}
|
||||
JSONObject resultJson = new JSONObject();
|
||||
resultJson.put("status", HttpStatus.OK.value());
|
||||
resultJson.put("message", "操作成功");
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code("下发管芯信息")
|
||||
.content("下发管芯信息-----返回参数:" + resultJson)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
return resultJson;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,6 +51,8 @@ public class Task extends CommonModel<Task> implements Serializable {
|
||||
|
||||
private String vehicle_type;
|
||||
|
||||
private String car_no;
|
||||
|
||||
|
||||
@NotBlank
|
||||
private String task_type;
|
||||
|
||||
@@ -57,7 +57,8 @@ public class TaskDto implements Serializable {
|
||||
/**
|
||||
* 车号
|
||||
*/
|
||||
private String carno;
|
||||
private String car_no;
|
||||
|
||||
|
||||
/**
|
||||
* 复合任务
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.dto.DeviceAssignedDto;
|
||||
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||
import org.nl.acs.device_driver.DeviceDriverDefination;
|
||||
import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
@@ -66,7 +65,6 @@ import org.nl.common.utils.CodeUtil;
|
||||
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -1087,7 +1085,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
map.put("路由方案编码", acsTask.getRoute_plan_code());
|
||||
map.put("是否需要反馈上位系统", acsTask.getIs_needfeedback());
|
||||
map.put("备注", acsTask.getRemark());
|
||||
map.put("agv车号", acsTask.getCarno());
|
||||
map.put("agv车号", acsTask.getCar_no());
|
||||
map.put("是否启用", acsTask.getIs_active());
|
||||
map.put("是否删除", acsTask.getIs_delete());
|
||||
map.put("创建者", acsTask.getCreate_by());
|
||||
@@ -1701,8 +1699,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (ObjectUtil.isNotEmpty(entity.getWeight())) {
|
||||
feed_jo.put("weight", entity.getWeight());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(entity.getCarno())) {
|
||||
feed_jo.put("car_no", entity.getCarno());
|
||||
if (ObjectUtil.isNotEmpty(entity.getCar_no())) {
|
||||
feed_jo.put("car_no", entity.getCar_no());
|
||||
}
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
<el-switch v-model="form.request_robot_task" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="取货完成反馈" label-width="150px">
|
||||
<el-switch v-model="form.feedbackToLms" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -303,6 +308,7 @@ export default {
|
||||
apply_task: true,
|
||||
link_three_lamp: '',
|
||||
feedbackToLms: true,
|
||||
releaseBackToLms: true,
|
||||
manual_create_task: true,
|
||||
is_pickup: true,
|
||||
is_release: true,
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
<el-switch v-model="form.feedbackToLms" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="放货完成反馈" label-width="150px">
|
||||
<el-switch v-model="form.releaseBackToLms" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
Reference in New Issue
Block a user