add: 取样、lms、acs联调
This commit is contained in:
@@ -166,7 +166,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
//自动门
|
//自动门
|
||||||
AirShowerDoorDeviceDriver airShowerDoorDeviceDriver;
|
AirShowerDoorDeviceDriver airShowerDoorDeviceDriver;
|
||||||
LiftDoorDeviceDriver liftDoorDeviceDriver;
|
LiftDoorDeviceDriver liftDoorDeviceDriver;
|
||||||
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
||||||
if (agvaddr != 0) {
|
if (agvaddr != 0) {
|
||||||
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
|
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
|
||||||
if (StrUtil.contains(old_device_code, "-")) {
|
if (StrUtil.contains(old_device_code, "-")) {
|
||||||
@@ -283,18 +283,33 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) {
|
||||||
airShowerDoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
airShowerDoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
airShowerDoorDeviceDriver.writing("to_open", "1");
|
if ("AD4".equals(device.getDevice_code())&& airShowerDoorDeviceDriver.getClose2() == 1) {
|
||||||
airShowerDoorDeviceDriver.writing("to_close", "0");
|
airShowerDoorDeviceDriver.writing("to_open", "1");
|
||||||
|
airShowerDoorDeviceDriver.writing("to_close", "0");
|
||||||
|
if (airShowerDoorDeviceDriver.getOpen() == 1 && airShowerDoorDeviceDriver.getToOpen() == 1&& airShowerDoorDeviceDriver.getClose2() == 1) {
|
||||||
|
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getOpen());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getToClose());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("AD5".equals(device.getDevice_code()) && airShowerDoorDeviceDriver.getClose() == 1) {
|
||||||
|
airShowerDoorDeviceDriver.writing("to_open2", "1");
|
||||||
|
airShowerDoorDeviceDriver.writing("to_close", "0");
|
||||||
|
airShowerDoorDeviceDriver.writing("to_close2", "0");
|
||||||
|
if (airShowerDoorDeviceDriver.getOpen2() == 1 && airShowerDoorDeviceDriver.getToOpen2() == 1&& airShowerDoorDeviceDriver.getClose() == 1) {
|
||||||
|
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getOpen());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen2(), airShowerDoorDeviceDriver.getToClose2());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("下发风淋门电气信号失败:" + e.getMessage());
|
log.info("下发风淋门电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (airShowerDoorDeviceDriver.getOpen() == 1 && airShowerDoorDeviceDriver.getToOpen() == 1) {
|
|
||||||
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getOpen());
|
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
|
||||||
} else {
|
|
||||||
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getToClose());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (device.getDeviceDriver() instanceof LiftDoorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof LiftDoorDeviceDriver) {
|
||||||
liftDoorDeviceDriver = (LiftDoorDeviceDriver) device.getDeviceDriver();
|
liftDoorDeviceDriver = (LiftDoorDeviceDriver) device.getDeviceDriver();
|
||||||
@@ -305,7 +320,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
log.info("下发电梯门电气信号失败:" + e.getMessage());
|
log.info("下发电梯门电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (liftDoorDeviceDriver.getOpen() == 1 && liftDoorDeviceDriver.getToOpen() == 1 ) {
|
if (liftDoorDeviceDriver.getOpen() == 1 && liftDoorDeviceDriver.getToOpen() == 1) {
|
||||||
log.info("下发电梯门开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen(), liftDoorDeviceDriver.getOpen());
|
log.info("下发电梯门开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen(), liftDoorDeviceDriver.getOpen());
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
@@ -342,8 +357,10 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
standardAutodoorDeviceDriver.writing("to_close", "1");
|
standardAutodoorDeviceDriver.writing("to_close", "1");
|
||||||
standardAutodoorDeviceDriver.writing("to_open", "0");
|
standardAutodoorDeviceDriver.writing("to_open", "0");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("下发电气信号失败:" + e.getMessage());
|
log.info("下发电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -355,6 +372,35 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
log.info("未下发NDC信号原因: 读取关门信号值为:{}", standardAutodoorDeviceDriver.getClose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) {
|
||||||
|
airShowerDoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver();
|
||||||
|
try {
|
||||||
|
if ("AD4".equals(device.getDevice_code())) {
|
||||||
|
airShowerDoorDeviceDriver.writing("to_close", "1");
|
||||||
|
airShowerDoorDeviceDriver.writing("to_open", "0");
|
||||||
|
if (airShowerDoorDeviceDriver.getClose2() == 1) {
|
||||||
|
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getOpen());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen(), airShowerDoorDeviceDriver.getToClose());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("AD5".equals(device.getDevice_code())) {
|
||||||
|
airShowerDoorDeviceDriver.writing("to_close2", "1");
|
||||||
|
airShowerDoorDeviceDriver.writing("to_open2", "0");
|
||||||
|
if (airShowerDoorDeviceDriver.getClose2() == 1 ) {
|
||||||
|
log.info("下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen2(), airShowerDoorDeviceDriver.getOpen2());
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
} else {
|
||||||
|
log.info("未下发NDC信号原因: 下发风淋门开门信号值为:{},读取开门信号值为:{}", airShowerDoorDeviceDriver.getToOpen2(), airShowerDoorDeviceDriver.getToClose2());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("下发风淋门电气信号失败:" + e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info(device_code + "对应设备号为空!");
|
log.info(device_code + "对应设备号为空!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.nl.acs.device_driver.one_manipulator.return_good_manipulator.ReturnGo
|
|||||||
import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.TrappedManipulatorManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.TrappedManipulatorManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.one_manipulator.volume_two_manipulator.VolumeTwoManipulatorManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.one_manipulator.volume_two_manipulator.VolumeTwoManipulatorManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver;
|
import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.pipe_core_rack_manipulator.PipeCoreRackManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.pipe_core_rack_manipulator.PipeCoreRackManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.two_conveyor.roll_up_roller_manipulator.RollUpRollerManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.two_conveyor.roll_up_roller_manipulator.RollUpRollerManipulatorDeviceDriver;
|
||||||
@@ -1065,6 +1066,10 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
|||||||
RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) device.getDeviceDriver();
|
RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
rollUpRollerManipulatorDeviceDriver.setDeviceStatus(form);
|
rollUpRollerManipulatorDeviceDriver.setDeviceStatus(form);
|
||||||
}
|
}
|
||||||
|
else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||||
|
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||||
|
manipulatorAgvStationDeviceDriver.setDeviceStatus(form);
|
||||||
|
}
|
||||||
|
|
||||||
else if (device.getDeviceDriver() instanceof PipeCoreRackManipulatorDeviceDriver) {
|
else if (device.getDeviceDriver() instanceof PipeCoreRackManipulatorDeviceDriver) {
|
||||||
PipeCoreRackManipulatorDeviceDriver pipeCoreRackManipulatorDeviceDriver = (PipeCoreRackManipulatorDeviceDriver) device.getDeviceDriver();
|
PipeCoreRackManipulatorDeviceDriver pipeCoreRackManipulatorDeviceDriver = (PipeCoreRackManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
try {
|
try {
|
||||||
manipulatorAgvStationDeviceDriver.writing(2);
|
manipulatorAgvStationDeviceDriver.writing(2);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -609,7 +609,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
logDto.setLog_level(4);
|
logDto.setLog_level(4);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1073,7 +1073,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//收卷锟行架
|
//收卷锟行架
|
||||||
if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
|
if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
|
||||||
rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && manipulatorAgvStationDeviceDriver.getMove() == 1 && rollUpRollerManipulatorDeviceDriver.getMode() != 3)) {
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && manipulatorAgvStationDeviceDriver.getMove() == 1 && rollUpRollerManipulatorDeviceDriver.getMode() != 3 && rollUpRollerManipulatorDeviceDriver.getError() == 0 && rollUpRollerManipulatorDeviceDriver.getError2()
|
||||||
|
== 0)) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(this.getDeviceCode())
|
.device_code(this.getDeviceCode())
|
||||||
@@ -1094,7 +1095,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//烘箱行架
|
//烘箱行架
|
||||||
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||||
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 )) {
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && ovenGantryManipulatorDeviceDriver.getError() == 0)) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(this.getDeviceCode())
|
.device_code(this.getDeviceCode())
|
||||||
@@ -1138,29 +1139,96 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (ObjectUtil.isNotEmpty(start_device_code) && (StrUtil.equals(device_code, next_device_code) || StrUtil.equals(device_code, next_device_code2))) {
|
} else if (ObjectUtil.isNotEmpty(start_device_code) && (StrUtil.equals(device_code, next_device_code) || StrUtil.equals(device_code, next_device_code2))) {
|
||||||
if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||||
|
List<String> linkDeviceCodes = manipulatorAgvStationDeviceDriver.getExtraDeviceCodes("link_device_code");
|
||||||
|
|
||||||
//放货进入区域请求进入
|
//放货进入区域请求进入
|
||||||
try {
|
try {
|
||||||
manipulatorAgvStationDeviceDriver.writing(6);
|
manipulatorAgvStationDeviceDriver.writing(6);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6)) {
|
//行架运行时agv不允许进入
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
if (CollUtil.isNotEmpty(linkDeviceCodes)) {
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
String linkDeviceCode = linkDeviceCodes.get(0);
|
||||||
.device_code(this.getDeviceCode())
|
Device linkDevice = deviceAppService.findDeviceByCode(linkDeviceCode);
|
||||||
.content("agvphase:" + phase + "反馈:" + data)
|
RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver;
|
||||||
.build();
|
OvenGantryManipulatorDeviceDriver ovenGantryManipulatorDeviceDriver;
|
||||||
logDto.setLog_level(4);
|
//收卷锟行架
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
|
||||||
|
rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && rollUpRollerManipulatorDeviceDriver.getMode() != 3 && rollUpRollerManipulatorDeviceDriver.getError() == 0 && rollUpRollerManipulatorDeviceDriver.getTask() == 0 && rollUpRollerManipulatorDeviceDriver.getError2() == 0)) {
|
||||||
|
// 查询缓存架点位状态
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", device_code);
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("获取收卷锟缓存位点位状态请求lms,参数:" + param)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
String response = acsToWmsService.getSJGHCPointStatus(param);
|
||||||
|
JSONObject jo = JSON.parseObject(response);
|
||||||
|
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("获取收卷锟缓存位点位状态,参数,接口返回:" + jo)
|
||||||
|
.build();
|
||||||
|
logDto2.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||||
|
if (jo.getInteger("status") == 200 && "1".equals(jo.getString("point_status")) ) {
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||||
|
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "信号不满足条件")
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
//烘箱行架
|
||||||
|
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||||
|
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && ovenGantryManipulatorDeviceDriver.getError() == 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() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",行架信号:" + ovenGantryManipulatorDeviceDriver.getMode() + ",指令号:" + ikey + "不满足放货条件";
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
||||||
|
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "信号不满足条件")
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件";
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6)) {
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
|
.device_code(this.getDeviceCode())
|
||||||
.build();
|
.content("agvphase:" + phase + "反馈:" + data)
|
||||||
logDto.setLog_level(4);
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ public class AirShowerDoorDeviceDriver extends AbstractOpcDeviceDriver implement
|
|||||||
int open = 0;
|
int open = 0;
|
||||||
int close = 0;
|
int close = 0;
|
||||||
|
|
||||||
|
int last_open2 = 0;
|
||||||
|
int last_close2 = 0;
|
||||||
|
|
||||||
|
int open2 = 0;
|
||||||
|
int close2= 0;
|
||||||
int last_open = 0;
|
int last_open = 0;
|
||||||
int last_close = 0;
|
int last_close = 0;
|
||||||
|
|
||||||
@@ -44,6 +49,11 @@ public class AirShowerDoorDeviceDriver extends AbstractOpcDeviceDriver implement
|
|||||||
int last_toOpen = 0;
|
int last_toOpen = 0;
|
||||||
int toClose = 0;
|
int toClose = 0;
|
||||||
int last_toClose = 0;
|
int last_toClose = 0;
|
||||||
|
|
||||||
|
int toOpen2 = 0;
|
||||||
|
int last_toOpen2 = 0;
|
||||||
|
int toClose2 = 0;
|
||||||
|
int last_toClose2 = 0;
|
||||||
String device_code = null;
|
String device_code = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -61,6 +71,10 @@ public class AirShowerDoorDeviceDriver extends AbstractOpcDeviceDriver implement
|
|||||||
close = this.itemProtocol.getClose();
|
close = this.itemProtocol.getClose();
|
||||||
toOpen = this.itemProtocol.getToOpen();
|
toOpen = this.itemProtocol.getToOpen();
|
||||||
toClose = this.itemProtocol.getToClose();
|
toClose = this.itemProtocol.getToClose();
|
||||||
|
open2 = this.itemProtocol.getOpen2();
|
||||||
|
close2 = this.itemProtocol.getClose2();
|
||||||
|
toOpen2 = this.itemProtocol.getToOpen2();
|
||||||
|
toClose2 = this.itemProtocol.getToClose2();
|
||||||
if (open != last_open) {
|
if (open != last_open) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ public class ItemProtocol {
|
|||||||
public static String item_close = "close";
|
public static String item_close = "close";
|
||||||
public static String item_to_open = "to_open";
|
public static String item_to_open = "to_open";
|
||||||
public static String item_to_close = "to_close";
|
public static String item_to_close = "to_close";
|
||||||
|
public static String item_open2 = "open2";
|
||||||
|
public static String item_close2 = "close2";
|
||||||
|
public static String item_to_open2 = "to_open2";
|
||||||
|
public static String item_to_close2 = "to_close2";
|
||||||
|
|
||||||
public static String item_status = "status";
|
public static String item_status = "status";
|
||||||
|
|
||||||
@@ -42,6 +45,23 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_to_close);
|
return this.getOpcIntegerValue(item_to_close);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getOpen2() {
|
||||||
|
return this.getOpcIntegerValue(item_open2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getClose2() {
|
||||||
|
return this.getOpcIntegerValue(item_close2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getToOpen2() {
|
||||||
|
return this.getOpcIntegerValue(item_to_open2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getToClose2() {
|
||||||
|
return this.getOpcIntegerValue(item_to_close2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getStatus() {
|
public int getStatus() {
|
||||||
return this.getOpcIntegerValue(item_status);
|
return this.getOpcIntegerValue(item_status);
|
||||||
@@ -75,17 +95,19 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_open, "开到位", "10001"));
|
list.add(new ItemDto(item_open, "开到位", "10002"));
|
||||||
list.add(new ItemDto(item_close, "关到位", "10002"));
|
list.add(new ItemDto(item_close, "关到位", "10001"));
|
||||||
list.add(new ItemDto(item_status, "状态", "10002"));
|
list.add(new ItemDto(item_open2, "开到位2", "10004"));
|
||||||
list.add(new ItemDto(item_error, "异常", "10002"));
|
list.add(new ItemDto(item_close2, "关到位2", "10003"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_open, "下发开门", "00001" ));
|
list.add(new ItemDto(item_to_open, "下发开门", "00002" ));
|
||||||
list.add(new ItemDto(item_to_close, "下发关门", "00002"));
|
list.add(new ItemDto(item_to_close, "下发关门", "00001"));
|
||||||
|
list.add(new ItemDto(item_to_open2, "下发开门2", "00004" ));
|
||||||
|
list.add(new ItemDto(item_to_close2, "下发关门2", "00003"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,12 +142,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "信号量同步异常";
|
message = "信号量同步异常";
|
||||||
//未联机
|
//未联机
|
||||||
} else if (mode == 0) {
|
} else {
|
||||||
this.setIsonline(false);
|
|
||||||
this.setIserror(true);
|
|
||||||
message = "未联机";
|
|
||||||
//有报警
|
|
||||||
} else {
|
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
message = "";
|
message = "";
|
||||||
@@ -287,7 +282,12 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
String ovenGantryTask = data.getString("ovenGantryTask");
|
||||||
|
if (StrUtil.equals(ovenGantryTask, "0")) {
|
||||||
|
this.requireSucess = false;
|
||||||
|
} else if (StrUtil.equals(ovenGantryTask, "1")) {
|
||||||
|
this.requireSucess = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1124,15 +1124,20 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
String requestSucess = data.getString("requireSucess");
|
String requestSucess = data.getString("requireSucess");
|
||||||
String requireActionSucess = data.getString("requireActionSucess");
|
String requireActionSucess = data.getString("requireActionSucess");
|
||||||
|
Device HXDJ4Device = deviceAppService.findDeviceByCode("A1_HXDJ_4");
|
||||||
|
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
|
||||||
if (StrUtil.equals(requestSucess, "0")) {
|
if (StrUtil.equals(requestSucess, "0")) {
|
||||||
this.requireSucess = false;
|
this.requireSucess = false;
|
||||||
} else if (StrUtil.equals(requestSucess, "1")) {
|
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||||
this.requireSucess = true;
|
this.requireSucess = true;
|
||||||
}
|
}
|
||||||
if (StrUtil.equals(requireActionSucess, "0")) {
|
if (HXDJ4Device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||||
this.requireActionSucess = false;
|
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
|
||||||
} else if (StrUtil.equals(requireActionSucess, "1")) {
|
if (StrUtil.equals(requireActionSucess, "0")) {
|
||||||
this.requireActionSucess = true;
|
manipulatorAgvStationDeviceDriver.setOvenGantryTask(false);
|
||||||
|
} else if (StrUtil.equals(requireActionSucess, "1")) {
|
||||||
|
manipulatorAgvStationDeviceDriver.setOvenGantryTask(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,6 +214,14 @@ public interface AcsToWmsService {
|
|||||||
*/
|
*/
|
||||||
String secondaryAllocationPoint(JSONObject param);
|
String secondaryAllocationPoint(JSONObject param);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取收卷锟缓存位状态
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getSJGHCPointStatus(JSONObject param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管芯库二次分配点位
|
* 管芯库二次分配点位
|
||||||
* @param param
|
* @param param
|
||||||
|
|||||||
@@ -688,6 +688,47 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSJGHCPointStatus(JSONObject param) {
|
||||||
|
try {
|
||||||
|
MDC.put(log_file_type, log_type);
|
||||||
|
log.info("getSJGHCPointStatus-----输入参数{}", param);
|
||||||
|
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
|
AddressDto addressDto = addressService.findByCode("getSJGHCPointStatus");
|
||||||
|
String url = wmsurl + addressDto.getMethods_url();
|
||||||
|
HttpResponse result2 = null;
|
||||||
|
try {
|
||||||
|
result2 = HttpRequest.post(url)
|
||||||
|
.header("Authorization", token)
|
||||||
|
.body(String.valueOf(param))
|
||||||
|
.execute();
|
||||||
|
} catch (Exception e) {
|
||||||
|
String msg = e.getMessage();
|
||||||
|
log.info("getSJGHCPointStatus-----输出参数{}", msg);
|
||||||
|
//网络不通
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isEmpty(result2)){
|
||||||
|
log.info("getSJGHCPointStatus-----输出参数{}", "返回结果为空");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String type = "";
|
||||||
|
if (result2.getStatus() == 200) {
|
||||||
|
type = "info";
|
||||||
|
} else {
|
||||||
|
type = "error";
|
||||||
|
}
|
||||||
|
log.info("getSJGHCPointStatus-----输出参数{}", result2.body());
|
||||||
|
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getSJGHCPointStatus", String.valueOf(result2.getStatus()),
|
||||||
|
JSON.toJSONString(param), String.valueOf(result2.body()), "获取收卷锟缓存位状态");
|
||||||
|
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||||
|
return result2.body();
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
MDC.remove(log_file_type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String applyPipeCoreRackNewPoint(JSONObject param) {
|
public String applyPipeCoreRackNewPoint(JSONObject param) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -178,7 +178,12 @@ public class AutoCreateInst {
|
|||||||
//6、行架
|
//6、行架
|
||||||
//7、立库
|
//7、立库
|
||||||
if (StrUtil.equals(task_type, CommonFinalParam.ONE) ) {
|
if (StrUtil.equals(task_type, CommonFinalParam.ONE) ) {
|
||||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
//生箔四个点任务是生箔agv,两个点是普通任务
|
||||||
|
if (StrUtil.isNotEmpty(instdto.getStart_device_code2())) {
|
||||||
|
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||||
|
}else {
|
||||||
|
instdto.setAgv_inst_type("2");
|
||||||
|
}
|
||||||
} else if (StrUtil.equals(task_type, "3")) {
|
} else if (StrUtil.equals(task_type, "3")) {
|
||||||
instdto.setAgv_inst_type("2");
|
instdto.setAgv_inst_type("2");
|
||||||
}else if (StrUtil.equals(task_type, "2")) {
|
}else if (StrUtil.equals(task_type, "2")) {
|
||||||
|
|||||||
@@ -61,6 +61,13 @@ public class AcsToWmsController {
|
|||||||
public ResponseEntity<Object> applyNewPoint(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> applyNewPoint(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(acsToWmsService.applyNewPoint(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.applyNewPoint(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getSJGHCPointStatus")
|
||||||
|
@Log(value = "分切上料AGV请求进入获取缓存架状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> getSJGHCPointStatus(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.getSJGHCPointStatus(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
@PostMapping("/applyRollUpRollerNewPoint")
|
@PostMapping("/applyRollUpRollerNewPoint")
|
||||||
@Log(value = "收卷辊库满入空出申请新点位", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
@Log(value = "收卷辊库满入空出申请新点位", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
|
|||||||
@@ -147,6 +147,14 @@ public interface AcsToWmsService {
|
|||||||
*/
|
*/
|
||||||
JSONObject applyNewPoint(JSONObject param);
|
JSONObject applyNewPoint(JSONObject param);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切上料AGV请求进入获取缓存架状态
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONObject getSJGHCPointStatus(JSONObject param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收卷辊满入空出
|
* 收卷辊满入空出
|
||||||
* @param param
|
* @param param
|
||||||
|
|||||||
@@ -208,6 +208,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
return otherOperationService.takeUpRollExceptionHandling(param);
|
return otherOperationService.takeUpRollExceptionHandling(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getSJGHCPointStatus(JSONObject param) {
|
||||||
|
return otherOperationService.getSJGHCPointStatus(param);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsFeedbackTubeInStorageComplete(JSONObject param) {
|
public JSONObject acsFeedbackTubeInStorageComplete(JSONObject param) {
|
||||||
return otherOperationService.acsFeedbackTubeInStorageComplete(param);
|
return otherOperationService.acsFeedbackTubeInStorageComplete(param);
|
||||||
|
|||||||
@@ -188,28 +188,39 @@ public class RawFoilPdaServiceImpl implements RawFoilPdaService {
|
|||||||
if (ObjectUtil.isEmpty(sbPoint)) {
|
if (ObjectUtil.isEmpty(sbPoint)) {
|
||||||
throw new BadRequestException("生箔位:" + pointCode + " 不存在,请检查是否被锁住!");
|
throw new BadRequestException("生箔位:" + pointCode + " 不存在,请检查是否被锁住!");
|
||||||
}
|
}
|
||||||
// todo: 暂时写死,创建工单
|
PdmBiRawfoilworkorder order = rawfoilworkorderService.getByContainerName(orderCode);
|
||||||
PdmBiRawfoilworkorder rawOrder = new PdmBiRawfoilworkorder();
|
|
||||||
rawOrder.setWorkorder_id(IdUtil.getSnowflake(1,1).nextIdStr());
|
if (ObjectUtil.isNotEmpty(order)) {
|
||||||
rawOrder.setContainer_name(ObjectUtil.isNotEmpty(orderCode) ? orderCode : createVirtualContainer(rollCode, "yyMMddHHmmss", sbPoint.getExt_code()));
|
order.setTheory_height(new BigDecimal(theory_height));
|
||||||
rawOrder.setResource_name(sbPoint.getExt_code());
|
order.setProductin_qty(new BigDecimal(productin_qty));
|
||||||
rawOrder.setMfg_order_name("$$$$");
|
order.setUp_coiler_date(DateUtil.now());
|
||||||
rawOrder.setProduct_name("锂电");
|
rawfoilworkorderService.updateById(order);
|
||||||
rawOrder.setDescription("锂电");
|
param.put("order_code", order.getContainer_name());
|
||||||
rawOrder.setTheory_height(new BigDecimal(theory_height));
|
param.put("workorder_id", order.getWorkorder_id());
|
||||||
rawOrder.setProductin_qty(new BigDecimal(productin_qty));
|
}else {
|
||||||
rawOrder.setUp_coiler_date(DateUtil.now());
|
// todo: 暂时写死,创建工单
|
||||||
rawOrder.setStatus("01");
|
PdmBiRawfoilworkorder rawOrder = new PdmBiRawfoilworkorder();
|
||||||
rawOrder.setWind_roll(rollCode);
|
rawOrder.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
TaskUtils.setRawOrderCreateByDefault(rawOrder);
|
rawOrder.setContainer_name(ObjectUtil.isNotEmpty(orderCode) ? orderCode : createVirtualContainer(rollCode, "yyMMddHHmmss", sbPoint.getExt_code()));
|
||||||
rawOrder.setProduct_area(sbPoint.getProduct_area());
|
rawOrder.setResource_name(sbPoint.getExt_code());
|
||||||
rawOrder.setOrder_type("1");
|
rawOrder.setMfg_order_name("$$$$");
|
||||||
rawfoilworkorderService.save(rawOrder);
|
rawOrder.setProduct_name("锂电");
|
||||||
|
rawOrder.setDescription("锂电");
|
||||||
|
rawOrder.setTheory_height(new BigDecimal(theory_height));
|
||||||
|
rawOrder.setProductin_qty(new BigDecimal(productin_qty));
|
||||||
|
rawOrder.setUp_coiler_date(DateUtil.now());
|
||||||
|
rawOrder.setStatus("01");
|
||||||
|
rawOrder.setWind_roll(rollCode);
|
||||||
|
TaskUtils.setRawOrderCreateByDefault(rawOrder);
|
||||||
|
rawOrder.setProduct_area(sbPoint.getProduct_area());
|
||||||
|
rawOrder.setOrder_type("1");
|
||||||
|
rawfoilworkorderService.save(rawOrder);
|
||||||
|
param.put("order_code", rawOrder.getContainer_name());
|
||||||
|
param.put("workorder_id", rawOrder.getWorkorder_id());
|
||||||
|
}
|
||||||
// 组织请求任务参数
|
// 组织请求任务参数
|
||||||
// 当前生箔的点位
|
// 当前生箔的点位
|
||||||
param.put("device_code", pointCode);
|
param.put("device_code", pointCode);
|
||||||
param.put("order_code", rawOrder.getContainer_name());
|
|
||||||
param.put("workorder_id", rawOrder.getWorkorder_id());
|
|
||||||
param.put("ext_code", sbPoint.getExt_code());
|
param.put("ext_code", sbPoint.getExt_code());
|
||||||
param.put("vehicle_code2", rollCode);
|
param.put("vehicle_code2", rollCode);
|
||||||
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
|
|||||||
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
||||||
// 判断空轴位状态
|
// 判断空轴位状态
|
||||||
// 标记一下, 0: 只做呼叫母卷,1:呼叫母卷还要送空辊
|
// 标记一下, 0: 只做呼叫母卷,1:呼叫母卷还要送空辊
|
||||||
param.put("is_flag", "01".equals(cutPoint.getFull_point_status()) ? "0" : "1");
|
// 只做四个点任务
|
||||||
|
// param.put("is_flag", "01".equals(cutPoint.getFull_point_status()) ? "0" : "1");
|
||||||
param.put("vehicle_code", cutPoint.getFull_vehicle_code());
|
param.put("vehicle_code", cutPoint.getFull_vehicle_code());
|
||||||
param.put("vehicle_code2", one.getWind_roll());
|
param.put("vehicle_code2", one.getWind_roll());
|
||||||
slitterUpTrussTask.apply(param);
|
slitterUpTrussTask.apply(param);
|
||||||
|
|||||||
@@ -238,10 +238,11 @@ public class OtherPdaServiceImpl implements OtherPdaService {
|
|||||||
log.info("手持呼叫AGV送样品检测 - {}", param);
|
log.info("手持呼叫AGV送样品检测 - {}", param);
|
||||||
// point_code1, point_code2
|
// point_code1, point_code2
|
||||||
String pointCode1 = param.getString("point_code1");
|
String pointCode1 = param.getString("point_code1");
|
||||||
List<SchBaseTask> schBaseTasks = taskService.checkHaveTask(pointCode1);
|
//不判断是否有执行的任务
|
||||||
if (schBaseTasks.size() > 0) {
|
// List<SchBaseTask> schBaseTasks = taskService.checkHaveTask(pointCode1);
|
||||||
throw new BadRequestException("点位[" + pointCode1 + "]已经存在任务!");
|
// if (schBaseTasks.size() > 0) {
|
||||||
}
|
// throw new BadRequestException("点位[" + pointCode1 + "]已经存在任务!");
|
||||||
|
// }
|
||||||
param.put("device_code", pointCode1);
|
param.put("device_code", pointCode1);
|
||||||
param.put("config_code", "CallToSamplingAGVTask");
|
param.put("config_code", "CallToSamplingAGVTask");
|
||||||
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ public interface OtherOperationService {
|
|||||||
*/
|
*/
|
||||||
JSONObject takeUpRollExceptionHandling(JSONObject param);
|
JSONObject takeUpRollExceptionHandling(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存点位状态
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject getSJGHCPointStatus(JSONObject param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ACS反馈管芯入库完成
|
* ACS反馈管芯入库完成
|
||||||
* @param param /
|
* @param param /
|
||||||
|
|||||||
@@ -147,6 +147,20 @@ public class OtherOperationServiceImpl implements OtherOperationService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getSJGHCPointStatus(JSONObject param) {
|
||||||
|
// 获取收卷辊货位状态
|
||||||
|
log.info("获取收卷辊货位状态:{}", param);
|
||||||
|
String deviceCode = param.getString("device_code");
|
||||||
|
SchBasePoint point = pointService.getById(deviceCode);
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
result.put("point_status", point.getPoint_status());
|
||||||
|
result.put("message", "获取收卷辊货位状态成功!");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsFeedbackTubeInStorageComplete(JSONObject param) {
|
public JSONObject acsFeedbackTubeInStorageComplete(JSONObject param) {
|
||||||
MDC.put(GeneralDefinition.MDC_KEY, TagNameEnum.ACS_FEEDBACK_TUBE_COMPLETE.getTag());
|
MDC.put(GeneralDefinition.MDC_KEY, TagNameEnum.ACS_FEEDBACK_TUBE_COMPLETE.getTag());
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public class CallToSamplingAGVTask extends AbstractTask {
|
|||||||
task.setHandle_class(THIS_CLASS);
|
task.setHandle_class(THIS_CLASS);
|
||||||
task.setTask_status(TaskStatus.START_AND_POINT.getCode());
|
task.setTask_status(TaskStatus.START_AND_POINT.getCode());
|
||||||
setUpdateByPC(task);
|
setUpdateByPC(task);
|
||||||
|
// 设置车号
|
||||||
|
task.setCar_no("3");
|
||||||
taskService.save(task);
|
taskService.save(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.sch.task_manage.tasks.slitter;
|
package org.nl.wms.sch.task_manage.tasks.slitter;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||||
@@ -15,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.nl.wms.util.PointUtils.setUpdateByType;
|
import static org.nl.wms.util.PointUtils.setUpdateByType;
|
||||||
@@ -65,12 +67,25 @@ public class SlitterSendRollTrussTask extends AbstractTask {
|
|||||||
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
checkTaskOptionStatus(taskObj);
|
checkTaskOptionStatus(taskObj);
|
||||||
// 点位更新需要将载具编码设置到终点
|
// 点位更新需要将载具编码设置到终点
|
||||||
|
// 收卷锟缓存架更新
|
||||||
String endPointCode = taskObj.getPoint_code2();
|
String endPointCode = taskObj.getPoint_code2();
|
||||||
SchBasePoint endPoint = pointService.getById(endPointCode);
|
String startPointCode = taskObj.getPoint_code1();
|
||||||
endPoint.setVehicle_code(taskObj.getVehicle_code());
|
QueryWrapper<SchBasePoint> queryWrapper = new QueryWrapper<>();
|
||||||
endPoint.setPoint_status("2");
|
queryWrapper.in("point_code", Arrays.asList(endPointCode, startPointCode)); // 假设这是你要查询的 point_code 列表
|
||||||
setUpdateByType(endPoint, taskFinishedType);
|
List<SchBasePoint> points = pointService.list(queryWrapper);
|
||||||
pointService.updateById(endPoint);
|
for (SchBasePoint point : points) {
|
||||||
|
if (point.getPoint_code().equals(endPointCode)){
|
||||||
|
point.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
point.setPoint_status("2");
|
||||||
|
setUpdateByType(point, taskFinishedType);
|
||||||
|
}
|
||||||
|
if (point.getPoint_code().equals(startPointCode)){
|
||||||
|
point.setPoint_status("1");
|
||||||
|
setUpdateByType(point, taskFinishedType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pointService.updateBatchById(points);
|
||||||
|
|
||||||
// 任务更新
|
// 任务更新
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
taskObj.setFinished_type(taskFinishedType.getCode());
|
taskObj.setFinished_type(taskFinishedType.getCode());
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.nl.wms.util.TaskUtils.*;
|
import static org.nl.wms.util.TaskUtils.*;
|
||||||
@@ -57,30 +58,31 @@ public class SlitterUpAGVTask extends AbstractTask {
|
|||||||
// 收卷辊不需要校验点位,因此无需加锁
|
// 收卷辊不需要校验点位,因此无需加锁
|
||||||
String requestParam = task.getRequest_param();
|
String requestParam = task.getRequest_param();
|
||||||
JSONObject requestObj = JSONObject.parseObject(requestParam);
|
JSONObject requestObj = JSONObject.parseObject(requestParam);
|
||||||
String isFlag = requestObj.getString("is_flag");
|
// String isFlag = requestObj.getString("is_flag");
|
||||||
// 分切上料满料对接位
|
// 分切上料满料对接位
|
||||||
String cutPointCode = requestObj.getString("cut_point");
|
String cutPointCode = requestObj.getString("cut_point");
|
||||||
// 烘箱暂存对接位
|
// 烘箱暂存对接位
|
||||||
String deviceCode = requestObj.getString("device_code");
|
String deviceCode = requestObj.getString("device_code");
|
||||||
StIvtCutpointivt cutPoint = cutpointivtService.getByFullCode(cutPointCode, false);
|
StIvtCutpointivt cutPoint = cutpointivtService.getByFullCode(cutPointCode, false);
|
||||||
if ("0".equals(isFlag)) {
|
// if ("0".equals(isFlag)) {
|
||||||
// 两点任务
|
// // 两点任务
|
||||||
task.setPoint_code1(deviceCode);
|
// task.setPoint_code1(deviceCode);
|
||||||
task.setPoint_code2(cutPoint.getFull_point_code());
|
// task.setPoint_code2(cutPoint.getFull_point_code());
|
||||||
} else {
|
// } else {
|
||||||
// 收卷辊的入库不做校验
|
// }
|
||||||
List<SchBasePoint> sjgPoints = pointService.getPointByConditions("A1", "A1-SJGK",
|
// 只做四个点任务
|
||||||
"1", null, null, false);
|
// 收卷辊的入库不做校验
|
||||||
if (sjgPoints.size() == 0) {
|
List<SchBasePoint> sjgPoints = pointService.getPointByConditions("A1", "A1-SJGK",
|
||||||
throw new BadRequestException("收卷辊库找不到入口!");
|
"1", null, null, false);
|
||||||
}
|
if (sjgPoints.size() == 0) {
|
||||||
SchBasePoint sjgPoint = sjgPoints.get(0);
|
throw new BadRequestException("收卷辊库找不到入口!");
|
||||||
// 四点任务
|
|
||||||
task.setPoint_code1(deviceCode);
|
|
||||||
task.setPoint_code2(cutPoint.getFull_point_code());
|
|
||||||
task.setPoint_code3(cutPoint.getEmpty_point_code());
|
|
||||||
task.setPoint_code4(sjgPoint.getPoint_code());
|
|
||||||
}
|
}
|
||||||
|
SchBasePoint sjgPoint = sjgPoints.get(0);
|
||||||
|
// 四点任务
|
||||||
|
task.setPoint_code1(deviceCode);
|
||||||
|
task.setPoint_code2(cutPoint.getFull_point_code());
|
||||||
|
task.setPoint_code3(cutPoint.getEmpty_point_code());
|
||||||
|
task.setPoint_code4(sjgPoint.getPoint_code());
|
||||||
// 创建任务
|
// 创建任务
|
||||||
task.setHandle_class(THIS_CLASS);
|
task.setHandle_class(THIS_CLASS);
|
||||||
task.setTask_status(TaskStatus.START_AND_POINT.getCode());
|
task.setTask_status(TaskStatus.START_AND_POINT.getCode());
|
||||||
@@ -110,6 +112,11 @@ public class SlitterUpAGVTask extends AbstractTask {
|
|||||||
cutPoint.setEmpty_point_status("02");
|
cutPoint.setEmpty_point_status("02");
|
||||||
setCutUpdateByType(cutPoint, taskFinishedType);
|
setCutUpdateByType(cutPoint, taskFinishedType);
|
||||||
cutpointivtService.updateById(cutPoint);
|
cutpointivtService.updateById(cutPoint);
|
||||||
|
//更新收卷锟缓存位库存
|
||||||
|
String pointCode4 = taskObj.getPoint_code4();
|
||||||
|
SchBasePoint point4 = pointService.query().eq("point_code", pointCode4).one();
|
||||||
|
point4.setPoint_status("2");
|
||||||
|
pointService.updateById(point4);
|
||||||
if (ObjectUtil.isNotEmpty(taskObj.getPoint_code3())) {
|
if (ObjectUtil.isNotEmpty(taskObj.getPoint_code3())) {
|
||||||
// 四点任务,还需要创建收卷辊桁架任务
|
// 四点任务,还需要创建收卷辊桁架任务
|
||||||
JSONObject taskParam = new JSONObject();
|
JSONObject taskParam = new JSONObject();
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class SlitterUpTrussTask extends AbstractTask {
|
|||||||
JSONObject requestObj = JSONObject.parseObject(requestParam);
|
JSONObject requestObj = JSONObject.parseObject(requestParam);
|
||||||
|
|
||||||
// 分切机满料位
|
// 分切机满料位
|
||||||
String isFlag = requestObj.getString("is_flag");
|
// String isFlag = requestObj.getString("is_flag");
|
||||||
String workorderId = requestObj.getString("workorder_id");
|
String workorderId = requestObj.getString("workorder_id");
|
||||||
String startPointCode = taskObj.getPoint_code1();
|
String startPointCode = taskObj.getPoint_code1();
|
||||||
String endPointCode = taskObj.getPoint_code2();
|
String endPointCode = taskObj.getPoint_code2();
|
||||||
@@ -98,7 +98,7 @@ public class SlitterUpTrussTask extends AbstractTask {
|
|||||||
taskParam.put("device_code", endPointCode);
|
taskParam.put("device_code", endPointCode);
|
||||||
taskParam.put("cut_point", requestObj.getString("device_code"));
|
taskParam.put("cut_point", requestObj.getString("device_code"));
|
||||||
// 标记一下, 0: 只做呼叫母卷,1:呼叫母卷还要送空辊
|
// 标记一下, 0: 只做呼叫母卷,1:呼叫母卷还要送空辊
|
||||||
taskParam.put("is_flag", isFlag);
|
// taskParam.put("is_flag", isFlag);
|
||||||
// 空轴的编码
|
// 空轴的编码
|
||||||
taskParam.put("vehicle_code", taskObj.getVehicle_code());
|
taskParam.put("vehicle_code", taskObj.getVehicle_code());
|
||||||
// 满轴的载具号
|
// 满轴的载具号
|
||||||
|
|||||||
Reference in New Issue
Block a user