add: 管芯库联调修改

This commit is contained in:
ls
2024-11-11 14:48:50 +08:00
parent df04adcf6d
commit b239b13cc7
25 changed files with 434 additions and 315 deletions

View File

@@ -145,7 +145,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) ikeyhigh, (byte) ikeylow, (byte) ikeyhigh, (byte) ikeylow,
(byte) typehigh, (byte) typelow, (byte) typehigh, (byte) typelow,
(byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh, (byte) qhdlow,
(byte) qhdhigh2, (byte) qhdlow2, (byte) fhdhigh, (byte) fhdlow,
(byte) fhdhigh2, (byte) fhdlow2, (byte) fhdhigh2, (byte) fhdlow2,
(byte) 0X00, (byte) 0X00, (byte) 0X00, (byte) 0X00,
(byte) carnohigh, (byte) carnolow (byte) carnohigh, (byte) carnolow
@@ -183,7 +183,8 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh, (byte) qhdlow,
(byte) qhdhigh2, (byte) qhdlow2, (byte) qhdhigh2, (byte) qhdlow2,
(byte) fhdhigh, (byte) fhdlow, (byte) fhdhigh, (byte) fhdlow,
(byte) fhdhigh2, (byte) fhdlow2 (byte) fhdhigh2, (byte) fhdlow2,
(byte) carnohigh, (byte) carnolow
}; };
} }
log.info("下发AGV作业指令 --{}", str1); log.info("下发AGV作业指令 --{}", str1);

View File

@@ -312,6 +312,22 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen(), liftDoorDeviceDriver.getOpen()); log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen(), liftDoorDeviceDriver.getOpen());
} }
} }
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
try {
standardAutodoorDeviceDriver.writing("to_open", "1");
standardAutodoorDeviceDriver.writing("to_close", "0");
} catch (Exception e) {
log.info("下发电气信号失败:" + e.getMessage());
e.printStackTrace();
}
if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1) {
log.info("下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getOpen());
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
}
}
} else { } else {
log.info(agvaddr + "对应设备号为空!"); log.info(agvaddr + "对应设备号为空!");

View File

@@ -1,6 +1,7 @@
package org.nl.acs.device_driver.agv.ndctwo; package org.nl.acs.device_driver.agv.ndctwo;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
@@ -25,6 +26,7 @@ import org.nl.acs.device_driver.driver.AbstractDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver; import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver; import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.ranging_stations.RangingStationsDeviceDriver; import org.nl.acs.device_driver.two_conveyor.ranging_stations.RangingStationsDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.roll_up_roller_manipulator.RollUpRollerManipulatorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.waste_foil_weighing_station.WasteFoilWeighingStationDriver; import org.nl.acs.device_driver.two_conveyor.waste_foil_weighing_station.WasteFoilWeighingStationDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
@@ -307,7 +309,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) {
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())
@@ -324,6 +326,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
try { try {
@@ -556,6 +559,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} }
this.setPhase(phase); this.setPhase(phase);
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
try { try {
manipulatorAgvStationDeviceDriver.writing(3); manipulatorAgvStationDeviceDriver.writing(3);
@@ -998,52 +1002,94 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
String next_device_code2 = inst.getNext_device_code2(); String next_device_code2 = inst.getNext_device_code2();
//取空锟或去烘箱放货的时候需要请求进入 //取空锟或去烘箱放货的时候需要请求进入
if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); if (ObjectUtil.isNotEmpty(start_device_code) && (StrUtil.equals(device_code, start_device_code) || StrUtil.equals(device_code, start_device_code2))) {
try { if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver.writing(6); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
} catch (Exception e) { List<String> linkDeviceCodes = manipulatorAgvStationDeviceDriver.getExtraDeviceCodes("link_device_code");
e.printStackTrace();
} try {
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check")) manipulatorAgvStationDeviceDriver.writing(6);
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check").toString())) { } catch (Exception e) {
if (manipulatorAgvStationDeviceDriver.getAction() == 1 && manipulatorAgvStationDeviceDriver.getMode() == 2 && manipulatorAgvStationDeviceDriver.getMove() == 0) { e.printStackTrace();
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); }
LuceneLogDto logDto = LuceneLogDto.builder() //行架运行时agv不允许进入
.device_code(this.getDeviceCode()) if (CollUtil.isNotEmpty(linkDeviceCodes)) {
.content("agvphase:" + phase + "反馈:" + data) String linkDeviceCode = linkDeviceCodes.get(0);
.build(); Device linkDevice = deviceAppService.findDeviceByCode(linkDeviceCode);
logDto.setLog_level(4); RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver;
luceneExecuteLogService.deviceExecuteLog(logDto); if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
} else { rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver();
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "mode信号:" + manipulatorAgvStationDeviceDriver.getMode() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && manipulatorAgvStationDeviceDriver.getMove() == 1 && rollUpRollerManipulatorDeviceDriver.getMode() != 3)) {
LuceneLogDto logDto = LuceneLogDto.builder() data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) LuceneLogDto logDto = LuceneLogDto.builder()
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "不满足取货条件") .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() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",行架信号:" + rollUpRollerManipulatorDeviceDriver.getMode() + ",指令号:" + ikey + "不满足取货条件";
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "信号不满足条件")
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
}else {
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && manipulatorAgvStationDeviceDriver.getMove() == 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);
}
}
} }
} else { } else if (ObjectUtil.isNotEmpty(start_device_code) && (StrUtil.equals(device_code, next_device_code) || StrUtil.equals(device_code, next_device_code2))) {
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
LuceneLogDto logDto = LuceneLogDto.builder() //放货进入区域请求进入
.device_code(this.getDeviceCode()) try {
.content("agvphase:" + phase + "反馈:" + data) manipulatorAgvStationDeviceDriver.writing(6);
.build(); } catch (Exception e) {
logDto.setLog_level(4); e.printStackTrace();
luceneExecuteLogService.deviceExecuteLog(logDto); }
} else { if ((manipulatorAgvStationDeviceDriver.getAction() == 6)) {
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
LuceneLogDto logDto = LuceneLogDto.builder() LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) .device_code(this.getDeviceCode())
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") .content("agvphase:" + phase + "反馈:" + data)
.build(); .build();
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); 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);
}
} }
} }
} }
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
} }
//请求离开 //请求离开
else if (phase == 0x4E) { else if (phase == 0x4E) {
@@ -1464,11 +1510,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
try {
manipulatorAgvStationDeviceDriver.writing(4);
} catch (Exception e) {
e.printStackTrace();
}
//申请烘箱行架任务 //申请烘箱行架任务
if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task")) if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task"))
&& StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) { && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) {
@@ -1479,7 +1521,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
acsToWmsService.applyOvenGantryTask(jsonObject); acsToWmsService.applyOvenGantryTask(jsonObject);
} }
//行架取货完成后反馈ndc //行架取货完成后反馈ndc
if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) { if ((manipulatorAgvStationDeviceDriver.getAction() == 4)) {
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())
@@ -1497,24 +1539,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
} else { } else {
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { // try {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); // manipulatorAgvStationDeviceDriver.writing(4);
LuceneLogDto logDto = LuceneLogDto.builder() // } catch (Exception e) {
.device_code(this.getDeviceCode()) // e.printStackTrace();
.content("agvphase:" + phase + "反馈:" + data) // }
.build(); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
logDto.setLog_level(4); LuceneLogDto logDto = LuceneLogDto.builder()
luceneExecuteLogService.deviceExecuteLog(logDto); .device_code(this.getDeviceCode())
} else { .content("agvphase:" + phase + "反馈:" + data)
message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; .build();
log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); logDto.setLog_level(4);
LuceneLogDto logDto = LuceneLogDto.builder() luceneExecuteLogService.deviceExecuteLog(logDto);
.device_code(manipulatorAgvStationDeviceDriver.getDeviceCode())
.content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1")
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} }
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
@@ -1745,7 +1782,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
jsonObject.put("device_code", device_code); jsonObject.put("device_code", device_code);
LuceneLogDto logDto1 = LuceneLogDto.builder() LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) .device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
.content("货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) .content("货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode())
.build(); .build();
logDto1.setLog_level(4); logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1); luceneExecuteLogService.deviceExecuteLog(logDto1);
@@ -2013,24 +2050,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} else { } else {
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { 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()) .content("agvphase:" + phase + "反馈:" + data)
.content("agvphase:" + phase + "反馈:" + data) .build();
.build(); logDto.setLog_level(4);
logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto);
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) { } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
@@ -2086,64 +2113,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
}/* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) { } else {
rangingStationsDeviceDriver = (RangingStationsDeviceDriver) device.getDeviceDriver();
ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
String device_code1 = device.getDevice_code();
String length1 = rangingStationsDeviceDriver.getLength1();
String length2 = rangingStationsDeviceDriver.getLength2();
Float len1 = 0.0F;
Float len2 = 0.0F;
if (ObjectUtil.isNotEmpty(length1) && !"null".equals(length1) && ObjectUtil.isNotEmpty(length2) && !"null".equals(length2)) {
len1 = Float.parseFloat(length1);
len2 = Float.parseFloat(length2);
}
if (len1 * len2 < 1) {
if (ObjectUtil.isNotEmpty(device_code1) && device_code1.contains("A")) {
String offSet_A = paramService.findByCode(AcsConfig.OFFSET_A).getValue();
if (ObjectUtil.isNotEmpty(offSet_A) && !"null".equals(offSet_A)) {
Integer integer = Integer.valueOf(offSet_A);
len1 = len1 - integer;
}
} else if (ObjectUtil.isNotEmpty(device_code1) && device_code1.contains("B")) {
String offSet_B = paramService.findByCode(AcsConfig.OFFSET_B).getValue();
if (ObjectUtil.isNotEmpty(offSet_B) && !"null".equals(offSet_B)) {
Integer integer = Integer.valueOf(offSet_B);
len1 = integer + len1;
}
} else {
log.info("{}设备名不符合条件,指令号{}", device_code, ikey);
}
int roundedNumber = ObjectUtil.isNotEmpty(len1) ? NumberUtil.round(len1, 0).intValue() : 0;
if (roundedNumber == 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, roundedNumber);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else if (roundedNumber > -50 || roundedNumber < 50) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 1, roundedNumber);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else if (roundedNumber > 50 || roundedNumber < -50) {
log.info("设备{},偏移数据超出范围导致未反馈{},指令号{}", device_code, roundedNumber, ikey);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("设备" + device_code + "偏移数据超出范围导致未反馈" + roundedNumber + "指令号" + ikey)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
log.info("设备{},偏移数据出错导致未反馈{},指令号{}", device_code, rangingStationsDeviceDriver.getLength1() + "," + rangingStationsDeviceDriver.getLength2(), ikey);
}
}*/ else {
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())

View File

@@ -0,0 +1,25 @@
package org.nl.acs.device_driver.two_conveyor.pipe_core_rack_manipulator;
import lombok.Data;
@Data
public class InteractionJsonDTO {
/**
* 管芯长度
*/
private String len;
/**
* 管芯壁厚
*/
private String thickness;
/**
* 管芯尺寸
*/
private String size;
}

View File

@@ -80,12 +80,15 @@ public class ItemProtocol {
public static String item_to_task = "to_task"; public static String item_to_task = "to_task";
//管芯长度
public static String item_to_length = "to_length";
//管芯壁厚
public static String item_to_thickness = "to_thickness";
//管芯尺寸
public static String item_to_size = "to_size";
@@ -219,6 +222,9 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4")); list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4"));
list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2")); list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2"));
list.add(new ItemDto(item_to_task, "下发任务号", "DB12.D6")); list.add(new ItemDto(item_to_task, "下发任务号", "DB12.D6"));
list.add(new ItemDto(item_to_length, "下发管芯长度", "DB2.W4"));
list.add(new ItemDto(item_to_thickness, "下发管芯壁厚", "DB2.W2"));
list.add(new ItemDto(item_to_size, "下发管芯尺寸", "DB12.D6"));
return list; return list;
} }
} }

View File

@@ -16,8 +16,6 @@ import org.nl.acs.device.service.impl.DeviceExtraServiceImpl;
import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.FeedLmsRealFailed; import org.nl.acs.device_driver.FeedLmsRealFailed;
import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver;
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.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.enums.PointErrorTypeEnum; import org.nl.acs.enums.PointErrorTypeEnum;
@@ -206,23 +204,29 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
//入库任务完成 //入库任务完成
if (action == 5 && move == 0) { if (action == 5 && move == 0) {
try { try {
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成"); // logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
JSONObject jsonObject = new JSONObject(); // JSONObject jsonObject = new JSONObject();
jsonObject.put("device_code", target); // jsonObject.put("device_code", target);
jsonObject.put("barcode", barcode); // jsonObject.put("barcode", barcode);
String response = acsToWmsService.feedbackTubeInStorageComplete(jsonObject); // String response = acsToWmsService.feedbackTubeInStorageComplete(jsonObject);
JSONObject jo = JSON.parseObject(response); // JSONObject jo = JSON.parseObject(response);
if (jo.getInteger("status") == 200) { // if (jo.getInteger("status") == 200) {
log.info("管芯入库申请放货完成成功:" + jo); // log.info("管芯入库申请放货完成成功:" + jo);
Map<String, Object> map1 = new HashMap<>(); // Map<String, Object> map1 = new HashMap<>();
List list = new ArrayList(); // List list = new ArrayList();
map1.put("code", "to_command"); // map1.put("code", "to_command");
map1.put("value", 6); // map1.put("value", 6);
list.add(map1); // list.add(map1);
this.writing(list); // this.writing(list);
message = "universal_message1"; // message = "universal_message1";
this.actionRequireSucess = true; // this.actionRequireSucess = true;
} // }
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);
} catch (Exception e) { } catch (Exception e) {
message = "universal_message2"; message = "universal_message2";
@@ -346,7 +350,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
.build(); .build();
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.secondaryAllocationPoint(param); String response = acsToWmsService.applyPipeCoreRackNewPoint(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
if (jo.getInteger("status") == 200) { if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
@@ -527,34 +531,17 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
String next_point_code = taskDtoIns.getNext_point_code(); String next_point_code = taskDtoIns.getNext_point_code();
String next_addr = nextDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString();
String start_addr = startDevice.getExtraValue().get("address").toString(); String start_addr = startDevice.getExtraValue().get("address").toString();
String interactionJson = taskDtoIns.getInteraction_json();
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
if (ObjectUtil.isEmpty(start_addr)) {
if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { notCreateInstMessage = "universal_notCreateInstMessage1";
if (ObjectUtil.isEmpty(next_addr)) { throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() != 0) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-管芯放货对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code();
return false;
}
} }
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) {
if (ObjectUtil.isEmpty(start_addr)) { notCreateInstMessage = "universal_notCreateInstMessage1";
notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号");
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
}
} }
if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
if (ObjectUtil.isEmpty(next_addr)) {
notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
}
Map<String, Object> map1 = new HashMap<>(); Map<String, Object> map1 = new HashMap<>();
Map<String, Object> map2 = new HashMap<>(); Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>(); Map<String, Object> map3 = new HashMap<>();
@@ -562,7 +549,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
try { try {
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code()); pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), interactionJsonDTO);
} catch (Exception e) { } catch (Exception e) {
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code() + instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
@@ -582,32 +569,19 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
String start_addr = startDevice.getExtraValue().get("address").toString(); String start_addr = startDevice.getExtraValue().get("address").toString();
String next_addr = nextDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString();
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; if (ObjectUtil.isEmpty(start_addr)) {
notCreateInstMessage = "universal_notCreateInstMessage1";
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
if (ObjectUtil.isEmpty(next_addr)) {
notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver();
if (standardInspectSiteDeviceDriver.getMove() != 0) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-管芯放货对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + taskDto.getTask_code();
return false;
}
} }
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) {
if (ObjectUtil.isEmpty(start_addr)) { notCreateInstMessage = "universal_notCreateInstMessage1";
notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号");
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
}
} }
if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { String interactionJson = taskDto.getInteraction_json();
if (ObjectUtil.isEmpty(next_addr)) { InteractionJsonDTO interactionJsonDTO = null;
notCreateInstMessage = "未设置电气调度号!"; if (StrUtil.isNotEmpty(interactionJson)) {
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
}
} }
String taskid = taskDto.getTask_id(); String taskid = taskDto.getTask_id();
@@ -640,7 +614,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
Map<String, Object> map3 = new HashMap<>(); Map<String, Object> map3 = new HashMap<>();
Map<String, Object> map4 = new HashMap<>(); Map<String, Object> map4 = new HashMap<>();
try { try {
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code()); pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(),interactionJsonDTO);
} catch (Exception e) { } catch (Exception e) {
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
@@ -676,7 +650,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
instdto.setExecute_device_code(device_code); instdto.setExecute_device_code(device_code);
} }
private void pushPLC(Map<String, Object> map1, Map<String, Object> map2, String next_addr, Map<String, Object> map3, String start_addr, Map<String, Object> map4, String task) { private void pushPLC(Map<String, Object> map1, Map<String, Object> map2, String next_addr, Map<String, Object> map3, String start_addr, Map<String, Object> map4, String task, InteractionJsonDTO interactionJsonDTO) {
List list = new ArrayList(); List list = new ArrayList();
map1.put("code", "to_command"); map1.put("code", "to_command");
@@ -691,6 +665,26 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver
map4.put("code", "to_task"); map4.put("code", "to_task");
map4.put("value", task); map4.put("value", task);
list.add(map4); list.add(map4);
if (interactionJsonDTO != null){
Map<String, Object> map5 = new HashMap<>();
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getLen())) {
map5.put("code", "to_length");
map5.put("value", interactionJsonDTO.getLen());
list.add(map5);
}
Map<String, Object> map6 = new HashMap<>();
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getThickness())) {
map6.put("code", "to_thickness");
map6.put("value", interactionJsonDTO.getThickness());
list.add(map6);
}
Map<String, Object> map7 = new HashMap<>();
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getSize())) {
map7.put("code", "to_size");
map7.put("value", interactionJsonDTO.getSize());
list.add(map7);
}
}
this.writing(list); this.writing(list);
} }

View File

@@ -493,10 +493,6 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
notCreateInstMessage = "未设置电气调度号!"; notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
} }
if (manipulatorAgvStationDeviceDriver.getMove() != 1) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code();
return false;
}
} }
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
if (ObjectUtil.isEmpty(start_addr)) { if (ObjectUtil.isEmpty(start_addr)) {
@@ -557,10 +553,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
notCreateInstMessage = "未设置电气调度号!"; notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
} }
if ( manipulatorAgvStationDeviceDriver.getMove() != 1) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!任务号:" + taskDto.getTask_code();
return false;
}
} }
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
if (ObjectUtil.isEmpty(start_addr)) { if (ObjectUtil.isEmpty(start_addr)) {
@@ -578,6 +571,10 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver(); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver();
if (ObjectUtil.isEmpty(next_addr)) {
notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
if ( manipulatorAgvStationDeviceDriver.getMove() != 0) { if ( manipulatorAgvStationDeviceDriver.getMove() != 0) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + taskDto.getTask_code();
return false; return false;

View File

@@ -207,8 +207,19 @@ public interface AcsToWmsService {
*/ */
HttpResponse callShaftFromCache(JSONObject param); HttpResponse callShaftFromCache(JSONObject param);
/**
* 收卷辊二次分配点位
* @param param
* @return
*/
String secondaryAllocationPoint(JSONObject param); String secondaryAllocationPoint(JSONObject param);
/**
* 管芯库二次分配点位
* @param param
* @return
*/
String applyPipeCoreRackNewPoint(JSONObject param);
/** /**
* 行架-agv对接位取货完成反馈 * 行架-agv对接位取货完成反馈
* @param jsonObject * @param jsonObject
@@ -223,4 +234,5 @@ public interface AcsToWmsService {
String feedbackTubeInStorageComplete(JSONObject jsonObject); String feedbackTubeInStorageComplete(JSONObject jsonObject);
} }

View File

@@ -652,9 +652,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public String secondaryAllocationPoint(JSONObject param) { public String secondaryAllocationPoint(JSONObject param) {
try { try {
MDC.put(log_file_type, log_type); MDC.put(log_file_type, log_type);
log.info("secondaryAllocationPoint-----输入参数{}", param); log.info("applyRollUpRollerNewPoint-----输入参数{}", param);
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue(); String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("secondaryAllocationPoint"); AddressDto addressDto = addressService.findByCode("applyRollUpRollerNewPoint");
String url = wmsurl + addressDto.getMethods_url(); String url = wmsurl + addressDto.getMethods_url();
HttpResponse result2 = null; HttpResponse result2 = null;
try { try {
@@ -664,11 +664,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
.execute(); .execute();
} catch (Exception e) { } catch (Exception e) {
String msg = e.getMessage(); String msg = e.getMessage();
log.info("secondaryAllocationPoint-----输出参数{}", msg); log.info("applyRollUpRollerNewPoint-----输出参数{}", msg);
//网络不通 //网络不通
} }
if(ObjectUtil.isEmpty(result2)){ if(ObjectUtil.isEmpty(result2)){
log.info("secondaryAllocationPoint-----输出参数{}", "返回结果为空"); log.info("applyRollUpRollerNewPoint-----输出参数{}", "返回结果为空");
return null; return null;
} }
String type = ""; String type = "";
@@ -677,9 +677,49 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} else { } else {
type = "error"; type = "error";
} }
log.info("secondaryAllocationPoint-----输出参数{}", result2.body()); log.info("applyRollUpRollerNewPoint-----输出参数{}", result2.body());
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"secondaryAllocationPoint", String.valueOf(result2.getStatus()), LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyRollUpRollerNewPoint", String.valueOf(result2.getStatus()),
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标"); JSON.toJSONString(param), String.valueOf(result2.body()), "收卷辊更新点位");
luceneLogService.interfaceExecuteLog(luceneLogDto);
return result2.body();
} finally {
MDC.remove(log_file_type);
}
}
@Override
public String applyPipeCoreRackNewPoint(JSONObject param) {
try {
MDC.put(log_file_type, log_type);
log.info("applyPipeCoreRackNewPoint-----输入参数{}", param);
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("applyPipeCoreRackNewPoint");
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("applyPipeCoreRackNewPoint-----输出参数{}", msg);
//网络不通
}
if(ObjectUtil.isEmpty(result2)){
log.info("applyPipeCoreRackNewPoint-----输出参数{}", "返回结果为空");
return null;
}
String type = "";
if (result2.getStatus() == 200) {
type = "info";
} else {
type = "error";
}
log.info("applyPipeCoreRackNewPoint-----输出参数{}", result2.body());
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyPipeCoreRackNewPoint", String.valueOf(result2.getStatus()),
JSON.toJSONString(param), String.valueOf(result2.body()), "管芯库更新点位");
luceneLogService.interfaceExecuteLog(luceneLogDto); luceneLogService.interfaceExecuteLog(luceneLogDto);
return result2.body(); return result2.body();

View File

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import lombok.Builder; import lombok.Builder;
@@ -45,6 +46,7 @@ import org.nl.acs.instruction.domain.Instruction;
import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.storage_cell.domain.StorageCell; import org.nl.acs.storage_cell.domain.StorageCell;
import org.nl.acs.storage_cell.service.StorageCellService;
import org.nl.acs.storage_cell.service.mapper.StorageCellMapper; import org.nl.acs.storage_cell.service.mapper.StorageCellMapper;
import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto; import org.nl.acs.task.service.dto.TaskDto;
@@ -81,6 +83,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Autowired @Autowired
private LuceneExecuteLogService luceneLogService; private LuceneExecuteLogService luceneLogService;
@Autowired
private StorageCellService storageCellService;
@Autowired @Autowired
private AcsToLiKuService acsToLiKuService; private AcsToLiKuService acsToLiKuService;
@@ -680,12 +684,16 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String to_target5 = data.getString("target5"); String to_target5 = data.getString("target5");
String num = data.getString("num"); String num = data.getString("num");
Device device = deviceAppService.findDeviceByCode(device_code); Device device = deviceAppService.findDeviceByCode(device_code);
if (ObjectUtil.isEmpty(num)) {
num = "0";
}
if (ObjectUtil.isEmpty(device)) { if (ObjectUtil.isEmpty(device)) {
throw new Exception("未找到对应设备:" + device_code); throw new Exception("未找到对应设备:" + device_code);
} }
PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver;
if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) {
pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver(); pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver();
List<String> targets = new ArrayList<>();
if (!ObjectUtil.isEmpty(to_barcode1)) { if (!ObjectUtil.isEmpty(to_barcode1)) {
map.put("to_barcode1", to_barcode1); map.put("to_barcode1", to_barcode1);
} }
@@ -702,24 +710,31 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
map.put("to_barcode5", to_barcode5); map.put("to_barcode5", to_barcode5);
} }
if (!ObjectUtil.isEmpty(to_target1)) { if (!ObjectUtil.isEmpty(to_target1)) {
map.put("to_target1", to_target1); targets.add(to_target1);
} }
if (!ObjectUtil.isEmpty(to_target2)) { if (!ObjectUtil.isEmpty(to_target2)) {
map.put("to_target2", to_target2); targets.add(to_target2);
} }
if (!ObjectUtil.isEmpty(to_target3)) { if (!ObjectUtil.isEmpty(to_target3)) {
map.put("to_target3", to_target3); targets.add(to_target3);
} }
if (!ObjectUtil.isEmpty(to_target4)) { if (!ObjectUtil.isEmpty(to_target4)) {
map.put("to_target4", to_target4); targets.add(to_target4);
} }
if (!ObjectUtil.isEmpty(to_target5)) { if (!ObjectUtil.isEmpty(to_target5)) {
map.put("to_target5", to_target5); targets.add(to_target5);
} }
if (!ObjectUtil.isEmpty(num)) { if (!ObjectUtil.isEmpty(num)) {
map.put("to_num", num); map.put("to_num", num);
} }
pipeCoreRackStationDeviceDriver.writing(map); List<StorageCell> storageCodes = storageCellMapper.selectList(new QueryWrapper<StorageCell>().in("storage_code", targets));
if (!storageCodes.isEmpty()) {
for (int i = 0; i < storageCodes.size(); i++){
map.put("to_target" + (i + 1), storageCodes.get(i).getAddress());
}
map.put("to_command", 1);
pipeCoreRackStationDeviceDriver.writing(map);
}
} }
JSONObject resultJson = new JSONObject(); JSONObject resultJson = new JSONObject();
resultJson.put("status", HttpStatus.OK.value()); resultJson.put("status", HttpStatus.OK.value());

View File

@@ -177,10 +177,12 @@ public class AutoCreateInst {
//5、输送任务 //5、输送任务
//6、行架 //6、行架
//7、立库 //7、立库
if (StrUtil.equals(task_type, CommonFinalParam.ONE) || StrUtil.equals(task_type, "2")) { if (StrUtil.equals(task_type, CommonFinalParam.ONE) ) {
instdto.setAgv_inst_type(CommonFinalParam.ONE); instdto.setAgv_inst_type(CommonFinalParam.ONE);
} 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")) {
instdto.setAgv_inst_type("3");
} else if (StrUtil.equals(task_type, "8")) { } else if (StrUtil.equals(task_type, "8")) {
instdto.setAgv_inst_type("2"); instdto.setAgv_inst_type("2");
} else { } else {

View File

@@ -1,22 +1,29 @@
server: server:
port: 8010 port: 8011
#配置数据源 #配置数据源
spring: spring:
messages:
basename: language/login/login,language/error/error,language/buss/buss,language/monitor/universal/universal,language/monitor/one_device/one_device,language/monitor/two_device/two_device,language/task/task
datasource: datasource:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.4.121}:${DB_PORT:3306}/${DB_NAME:yy_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true # url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.20.15}:${DB_PORT:3306}/${DB_NAME:longdian_acs}?serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:NLABC&ld123}
# password: ${DB_PWD:p@ssw0rd}
# 初始连接数 # 初始连接数
initial-size: 5 initial-size: 5
# 最小连接数 # 最小连接数
min-idle: 15 min-idle: 15
# 最大连接数 # 最大连接数
max-active: 60 max-active: 30
# 超时时间(以秒数为单位)
remove-abandoned-timeout: 180
# 获取连接超时时间 # 获取连接超时时间
max-wait: 5000 max-wait: 3000
# 连接有效性检测时间 # 连接有效性检测时间
time-between-eviction-runs-millis: 60000 time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间 # 连接在池中最小生存的时间
@@ -36,11 +43,8 @@ spring:
enabled: true enabled: true
stat-view-servlet: stat-view-servlet:
enabled: true enabled: true
# 控制台管理用户名和密码
url-pattern: /druid/* url-pattern: /druid/*
reset-enable: false reset-enable: false
login-username: admin
login-password: 123456
filter: filter:
stat: stat:
enabled: true enabled: true
@@ -51,24 +55,30 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true multi-statement-allow: true
flyway:
# 是否启用flyway
enabled: true
# 编码格式默认UTF-8
encoding: UTF-8
# 迁移sql脚本文件存放路径默认db/migration
locations: classpath:db/migration
# 迁移sql脚本文件名称的前缀默认V
sql-migration-prefix: V
# 迁移sql脚本文件名称的分隔符默认2个下划线__
sql-migration-separator: __
# 迁移sql脚本文件名称的后缀
sql-migration-suffixes: .sql
# 迁移时是否进行校验默认true
validate-on-migrate: true
# 当迁移发现数据库非空且存在没有元数据的表时自动执行基准迁移新建schema_version表
baseline-on-migrate: true
redis: redis:
#数据库索引 #数据库索引
host: ${REDIS_HOST:127.0.0.1} database: ${REDIS_DB:2}
host: ${REDIS_HOST:192.168.20.15}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PWD:} # password: ${REDIS_PWD:}
#连接超时时间
timeout: 5000
redisson:
config: |
threads: 4
nettyThreads: 4
singleServerConfig:
database: 1
connectionMinimumIdleSize: 8
connectionPoolSize: 8
address: redis://127.0.0.1:6379
idleConnectionTimeout: 10000
timeout: 3000
# 登录相关配置 # 登录相关配置
login: login:
# 登录缓存 # 登录缓存
@@ -87,36 +97,19 @@ login:
heigth: 36 heigth: 36
# 内容长度 # 内容长度
length: 2 length: 2
# 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可 # 字体名称,为空则使用默认字体
font-name: font-name:
# 字体大小 # 字体大小
font-size: 25 font-size: 25
#jwt #是否允许生成代码生产环境设置为false
jwt: generator:
header: Authorization enabled: true
# 令牌前缀
token-start-with: Bearer
# 必须使用最少88位的Base64对该令牌进行编码
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
# 令牌过期时间 此处单位/毫秒 默认2小时可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
token-validity-in-seconds: 7200000
# 在线用户key
online-key: online-token-
# 验证码
code-key: code-key-
# token 续期检查时间范围默认30分钟单位默认毫秒在token即将过期的一段时间内用户操作了则给用户的token续期
detect: 1800000
# 续期时间范围,默认 1小时这里单位毫秒
renew: 3600000
# IP 本地解析 # IP 本地解析
ip: ip:
local-parsing: true local-parsing: true
#是否允许生成代码生产环境设置为false
generator:
enabled: false
# 文件存储路径 # 文件存储路径
file: file:
mac: mac:
@@ -133,8 +126,11 @@ file:
avatarMaxSize: 5 avatarMaxSize: 5
logging: logging:
file: file:
path: /app/jar/logs path: C:\acs_log # /Users/onepiece/myFile/acs_logs
config: classpath:logback-spring.xml config: classpath:logback-spring.xml
lucene:
index:
path: /lucene
# Sa-Token配置 # Sa-Token配置
sa-token: sa-token:
@@ -155,10 +151,35 @@ sa-token:
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# token 前缀 # token 前缀
token-prefix: Bearer token-prefix: Bearer
is-read-cookie: false sso:
is-read-body: false # Ticket有效期 (单位: 秒),默认五分钟
ticket-timeout: 300
# 所有允许的授权回调地址
allow-url: "*"
# 是否打开单点注销功能
is-slo: true
# ------- SSO-模式三相关配置 下面的配置在SSO模式三并且 is-slo=true 时打开)
# 是否打开模式三
isHttp: true
# 接口调用秘钥用于SSO模式三的单点注销功能
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器文档有步骤说明
is-read-cookie: true
is-print: false
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
token-session-check-login: false
alone-redis:
# Redis数据库索引默认为0
database: 2
# Redis服务器地址
host: 192.168.20.15
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
password:
# 连接超时时间
timeout: 10s
agvToAcs:
agvToAcs: addr: http://localhost:8011
addr: http://http://10.1.3.96:8011

View File

@@ -115,6 +115,7 @@ https://juejin.cn/post/6844903775631572999
<root level="info"> <root level="info">
<appender-ref ref="asyncLuceneAppender"/> <appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>
<appender-ref ref="CONSOLE"/>
</root> </root>
<logger name="jdbc" level="ERROR" additivity="true"> <logger name="jdbc" level="ERROR" additivity="true">
<appender-ref ref="asyncLuceneAppender"/> <appender-ref ref="asyncLuceneAppender"/>

View File

@@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http # 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'http://10.1.3.96:8011' VUE_APP_BASE_API = 'http://192.168.20.11:8011'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://10.1.3.96:8011' VUE_APP_WS_API = 'ws://192.168.20.11:8011'

Binary file not shown.

View File

@@ -3,7 +3,7 @@ window.g = {
VUE_APP_BASE_API: 'http://127.0.0.1:8012' VUE_APP_BASE_API: 'http://127.0.0.1:8012'
}, },
prod: { prod: {
VUE_APP_BASE_API: 'http://10.1.3.96:8011' VUE_APP_BASE_API: 'http://192.168.20.11:8011'
} }
} }

View File

@@ -55,7 +55,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Override @Override
public JSONObject toAcsGxInStorage(JSONArray param) { public JSONObject toAcsGxInStorage(JSONArray param) {
return AcsUtil.notifyAcs4("/api/wms/getTubeMsg", param); return AcsUtil.notifyAcs4("api/wms/getTubeMsg", param);
} }
} }

View File

@@ -11,6 +11,7 @@ import org.nl.config.lucene.TagNameEnum;
import org.nl.wms.basedata.master.classification.service.IMdBaseClassstandardService; import org.nl.wms.basedata.master.classification.service.IMdBaseClassstandardService;
import org.nl.wms.basedata.master.classification.service.dao.MdBaseClassstandard; import org.nl.wms.basedata.master.classification.service.dao.MdBaseClassstandard;
import org.nl.wms.basedata.material.dao.MdMeMaterialbase; import org.nl.wms.basedata.material.dao.MdMeMaterialbase;
import org.nl.wms.basedata.material.dao.mapper.MdMeMaterialbaseMapper;
import org.nl.wms.basedata.material.service.ImdMeMaterialbaseService; import org.nl.wms.basedata.material.service.ImdMeMaterialbaseService;
import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.st.service.GxPdaService; import org.nl.wms.pda.st.service.GxPdaService;
@@ -48,19 +49,17 @@ public class GxPdaServiceImpl implements GxPdaService {
private GxOutStorageTask gxOutStorageTask; private GxOutStorageTask gxOutStorageTask;
@Autowired @Autowired
private WmsToAcsService wmsToAcsService; private WmsToAcsService wmsToAcsService;
@Autowired
private MdMeMaterialbaseMapper mdMeMaterialbaseMapper;
@Override @Override
public JSONArray getGxSpecification() { public JSONArray getGxSpecification() {
// todo: 可能维护到物料表中!!! List<MdMeMaterialbase> list = mdMeMaterialbaseMapper.selectList(new LambdaQueryWrapper<MdMeMaterialbase>().eq(MdMeMaterialbase::getMaterial_code, "GX"));
MdBaseClassstandard one = classstandardService.getOne(new LambdaQueryWrapper<MdBaseClassstandard>()
.eq(MdBaseClassstandard::getClass_code, "0002"));
List<MdBaseClassstandard> list = classstandardService.list(new LambdaQueryWrapper<MdBaseClassstandard>()
.eq(MdBaseClassstandard::getParent_class_id, one.getClass_id()));
JSONArray jsonArray = list.stream() JSONArray jsonArray = list.stream()
.map(item -> { .map(item -> {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("text", item.getClass_name()); jsonObject.put("text", item.getMaterial_spec());
jsonObject.put("value", item.getClass_code()); jsonObject.put("value", item.getMaterial_model());
return jsonObject; return jsonObject;
}) })
.collect(Collectors.toCollection(JSONArray::new)); .collect(Collectors.toCollection(JSONArray::new));
@@ -156,6 +155,7 @@ public class GxPdaServiceImpl implements GxPdaService {
List<SchBasePoint> allGxPoints = pointService.getGxPointNotLock(); List<SchBasePoint> allGxPoints = pointService.getGxPointNotLock();
if (allGxPoints.size() < gxNumber) { if (allGxPoints.size() < gxNumber) {
log.warn("管芯库不够存放,只够存放{}个管芯", allGxPoints.size()); log.warn("管芯库不够存放,只够存放{}个管芯", allGxPoints.size());
throw new BadRequestException("管芯库不够存放,只够存放"+allGxPoints.size()+"个管芯");
} }
int actualQuantity = Math.min(gxNumber, allGxPoints.size()); int actualQuantity = Math.min(gxNumber, allGxPoints.size());
// 更新点位信息 // 更新点位信息
@@ -174,12 +174,13 @@ public class GxPdaServiceImpl implements GxPdaService {
acs.put("product_area", URLEnum.ACS_URL_A1.getProduct_area()); acs.put("product_area", URLEnum.ACS_URL_A1.getProduct_area());
acs.put("device_code", gxRks.get(0).getPoint_code()); acs.put("device_code", gxRks.get(0).getPoint_code());
acs.put("num", gxNumber); acs.put("num", gxNumber);
for (int i = 0; i < actualQuantity; i++) { for (int i = 0; i < actualQuantity; i++) {
// 查找点位最终一次性发给ACS // 查找点位最终一次性发给ACS
acs.put("barcode" + (i + 1), materialCode); acs.put("barcode" + (i + 1), materialCode);
acs.put("target" + (i + 1), allGxPoints.get(i).getPoint_code()); acs.put("target" + (i + 1), allGxPoints.get(i).getPoint_code());
acsArray.add(acs);
} }
acsArray.add(acs);
// 调用ACS // 调用ACS
log.info("调用ACS管芯入库的参数 - {}", acsArray); log.info("调用ACS管芯入库的参数 - {}", acsArray);
JSONObject jsonObject = wmsToAcsService.toAcsGxInStorage(acsArray); JSONObject jsonObject = wmsToAcsService.toAcsGxInStorage(acsArray);
@@ -240,6 +241,11 @@ public class GxPdaServiceImpl implements GxPdaService {
} }
SchBasePoint endPoint = endPoints.get(0); SchBasePoint endPoint = endPoints.get(0);
List<SchBasePoint> updatePoints = new ArrayList<>(); List<SchBasePoint> updatePoints = new ArrayList<>();
String[] split = materialSpec.split("/");
JSONObject interaction_json = new JSONObject();
interaction_json.put("size", split[1]);
interaction_json.put("len", split[2]);
interaction_json.put("thickness", split[3]);
for (int i = 0; i < number; i++) { for (int i = 0; i < number; i++) {
// 由任务完成来清除点位 // 由任务完成来清除点位
SchBasePoint point = allPoint.get(i); SchBasePoint point = allPoint.get(i);
@@ -251,6 +257,7 @@ public class GxPdaServiceImpl implements GxPdaService {
taskParam.put("vehicle_code", point.getVehicle_code()); taskParam.put("vehicle_code", point.getVehicle_code());
taskParam.put("vehicle_type", point.getVehicle_type()); taskParam.put("vehicle_type", point.getVehicle_type());
taskParam.put("config_code", "GxOutStorageTask"); taskParam.put("config_code", "GxOutStorageTask");
taskParam.put("interaction_json", interaction_json);
taskParam.put("create_mode", GeneralDefinition.PDA_CREATION); taskParam.put("create_mode", GeneralDefinition.PDA_CREATION);
String task = gxOutStorageTask.createTask(taskParam); String task = gxOutStorageTask.createTask(taskParam);
log.info("任务创建成功 - {}", task); log.info("任务创建成功 - {}", task);

View File

@@ -282,7 +282,6 @@ public abstract class AbstractTask {
List<SchBaseTask> unFinishTasksByTaskConfig = taskService.findUnFinishTasksByTaskConfig( List<SchBaseTask> unFinishTasksByTaskConfig = taskService.findUnFinishTasksByTaskConfig(
taskConfig.getConfig_code(), taskConfig.getTask_direction()); taskConfig.getConfig_code(), taskConfig.getTask_direction());
Assert.isFalse(unFinishTasksByTaskConfig.size() >= tcmn, LangProcess.msg("common_maxTaskTip", applyPointCode)); Assert.isFalse(unFinishTasksByTaskConfig.size() >= tcmn, LangProcess.msg("common_maxTaskTip", applyPointCode));
// 校验同个点位,同种任务是否多次请求创建任务固定只能1个任务此处不判断调用此处前判断 // 校验同个点位,同种任务是否多次请求创建任务固定只能1个任务此处不判断调用此处前判断
// List<SchBaseTask> applyPointTask = taskService.findUnFinishTasksByTaskConfig( // List<SchBaseTask> applyPointTask = taskService.findUnFinishTasksByTaskConfig(
// taskConfig.getConfig_code(), applyPointCode, taskConfig.getTask_direction()); // taskConfig.getConfig_code(), applyPointCode, taskConfig.getTask_direction());

View File

@@ -1,5 +1,6 @@
package org.nl.wms.sch.task_manage; package org.nl.wms.sch.task_manage;
import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@@ -139,6 +140,11 @@ public class AcsTaskDto {
* 扩展属性 * 扩展属性
*/ */
Map<String,String> params; Map<String,String> params;
/**
* 扩展属性
*/
JSONObject interaction_json;
/** /**
* 区域 * 区域
*/ */

View File

@@ -19,6 +19,8 @@ import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Objects;
import static org.nl.wms.util.TaskUtils.checkTaskOptionStatus; import static org.nl.wms.util.TaskUtils.checkTaskOptionStatus;
import static org.nl.wms.util.TaskUtils.setUpdateByType; import static org.nl.wms.util.TaskUtils.setUpdateByType;
@@ -42,8 +44,12 @@ public class GxOutStorageTask extends AbstractTask {
@Override @Override
public void deliveryBeforeProcessing(SchBaseTask task, AcsTaskDto acsTaskDto) { public void deliveryBeforeProcessing(SchBaseTask task, AcsTaskDto acsTaskDto) {
acsTaskDto.setVehicle_code(""); JSONObject param = JSONObject.parseObject(task.getRequest_param());
acsTaskDto.setVehicle_code2(""); Object interactionObject = param.get("interaction_json");
if (!Objects.isNull(interactionObject)){
JSONObject interactionJson = (JSONObject)param.get("interaction_json");
acsTaskDto.setInteraction_json(interactionJson);
}
} }
@Override @Override

View File

@@ -4,13 +4,13 @@ server:
nl: nl:
config: config:
mysql: mysql:
ip: 127.0.0.1 ip: 192.168.20.15
port: 3306 port: 3306
username: root username: root
password: 12356 password: NLABC&ld123
database: nl-platform database: ldnx_lms2
redis: redis:
ip: 127.0.0.1 ip: 192.168.20.15
port: 6379 port: 6379
password: null password: null
database: 1 database: 1

View File

@@ -176,6 +176,7 @@ https://juejin.cn/post/6844903775631572999
<root level="INFO"> <root level="INFO">
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>
<appender-ref ref="asyncLuceneAppender"/> <appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="CONSOLE"/>
</root> </root>
<logger name="org.springframework" level="ERROR" additivity="false"> <logger name="org.springframework" level="ERROR" additivity="false">
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>

View File

@@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http # 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'http://10.93.41.201:8010' VUE_APP_BASE_API = 'http://192.168.20.13:8011'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://10.93.41.201:8010' VUE_APP_WS_API = 'ws://192.168.20.13:8011'

View File

@@ -3,7 +3,7 @@ window.g = {
VUE_APP_BASE_API: 'http://127.0.0.1:8010' VUE_APP_BASE_API: 'http://127.0.0.1:8010'
}, },
prod: { prod: {
VUE_APP_BASE_API: 'http://127.0.0.1:8010' VUE_APP_BASE_API: 'http://192.168.20.13:8011'
} }
} }