diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java index 264cdce3a..f250be2e6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java @@ -145,7 +145,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) ikeyhigh, (byte) ikeylow, (byte) typehigh, (byte) typelow, (byte) qhdhigh, (byte) qhdlow, - (byte) qhdhigh2, (byte) qhdlow2, + (byte) fhdhigh, (byte) fhdlow, (byte) fhdhigh2, (byte) fhdlow2, (byte) 0X00, (byte) 0X00, (byte) carnohigh, (byte) carnolow @@ -183,7 +183,8 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh2, (byte) qhdlow2, (byte) fhdhigh, (byte) fhdlow, - (byte) fhdhigh2, (byte) fhdlow2 + (byte) fhdhigh2, (byte) fhdlow2, + (byte) carnohigh, (byte) carnolow }; } log.info("下发AGV作业指令 --{}", str1); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index 19e4a904f..a95b26b33 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -312,6 +312,22 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { 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 { log.info(agvaddr + "对应设备号为空!"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index 77057f04d..3a3db465b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -1,6 +1,7 @@ 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.StrUtil; 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.manipulator_agv_station.ManipulatorAgvStationDeviceDriver; 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.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; @@ -307,7 +309,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -324,6 +326,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { @@ -556,6 +559,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } this.setPhase(phase); } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { manipulatorAgvStationDeviceDriver.writing(3); @@ -998,52 +1002,94 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic String next_device_code2 = inst.getNext_device_code2(); //取空锟或去烘箱放货的时候需要请求进入 if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { - manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); - try { - manipulatorAgvStationDeviceDriver.writing(6); - } catch (Exception e) { - e.printStackTrace(); - } - if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check")) - && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check").toString())) { - if (manipulatorAgvStationDeviceDriver.getAction() == 1 && manipulatorAgvStationDeviceDriver.getMode() == 2 && manipulatorAgvStationDeviceDriver.getMove() == 0) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "mode信号:" + manipulatorAgvStationDeviceDriver.getMode() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "不满足取货条件") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if (ObjectUtil.isNotEmpty(start_device_code) && (StrUtil.equals(device_code, start_device_code) || StrUtil.equals(device_code, start_device_code2))) { + if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); + List linkDeviceCodes = manipulatorAgvStationDeviceDriver.getExtraDeviceCodes("link_device_code"); + + try { + manipulatorAgvStationDeviceDriver.writing(6); + } catch (Exception e) { + e.printStackTrace(); + } + //行架运行时agv不允许进入 + if (CollUtil.isNotEmpty(linkDeviceCodes)) { + String linkDeviceCode = linkDeviceCodes.get(0); + Device linkDevice = deviceAppService.findDeviceByCode(linkDeviceCode); + RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver; + if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) { + rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver(); + if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && manipulatorAgvStationDeviceDriver.getMove() == 1 && rollUpRollerManipulatorDeviceDriver.getMode() != 3)) { + 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() + ",行架信号:" + 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 { - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + } 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) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); + //放货进入区域请求进入 + try { + manipulatorAgvStationDeviceDriver.writing(6); + } catch (Exception e) { + e.printStackTrace(); + } + if ((manipulatorAgvStationDeviceDriver.getAction() == 6)) { + 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); + } } } + } - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); } //请求离开 else if (phase == 0x4E) { @@ -1464,11 +1510,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); - try { - manipulatorAgvStationDeviceDriver.writing(4); - } catch (Exception e) { - e.printStackTrace(); - } + //申请烘箱行架任务 if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task")) && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) { @@ -1479,7 +1521,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic acsToWmsService.applyOvenGantryTask(jsonObject); } //行架取货完成后反馈ndc - if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) { + if ((manipulatorAgvStationDeviceDriver.getAction() == 4)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1497,24 +1539,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic luceneExecuteLogService.deviceExecuteLog(logDto); } } else { - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } +// try { +// manipulatorAgvStationDeviceDriver.writing(4); +// } catch (Exception e) { +// e.printStackTrace(); +// } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); @@ -1745,7 +1782,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic jsonObject.put("device_code", device_code); LuceneLogDto logDto1 = LuceneLogDto.builder() .device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) - .content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) + .content("放货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) .build(); logDto1.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto1); @@ -2013,24 +2050,14 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } else { - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { @@ -2086,64 +2113,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } - }/* else if (device.getDeviceDriver() instanceof RangingStationsDeviceDriver) { - 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 { + } else { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/InteractionJsonDTO.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/InteractionJsonDTO.java new file mode 100644 index 000000000..41b235dc0 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/InteractionJsonDTO.java @@ -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; + + +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java index 27dce7a7e..04fdc295d 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java @@ -80,12 +80,15 @@ public class ItemProtocol { 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_onset, "下发起始站", "DB2.W2")); 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; } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java index 45ab88ece..ba24db3e8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java @@ -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.FeedLmsRealFailed; 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.ExecutableDeviceDriver; import org.nl.acs.enums.PointErrorTypeEnum; @@ -206,23 +204,29 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver //入库任务完成 if (action == 5 && move == 0) { try { - logServer.deviceExecuteLog(this.device_code, "", "", "放货完成"); - JSONObject jsonObject = new JSONObject(); - jsonObject.put("device_code", target); - jsonObject.put("barcode", barcode); - String response = acsToWmsService.feedbackTubeInStorageComplete(jsonObject); - JSONObject jo = JSON.parseObject(response); - if (jo.getInteger("status") == 200) { - log.info("管芯入库申请放货完成成功:" + jo); - Map map1 = new HashMap<>(); - List list = new ArrayList(); - map1.put("code", "to_command"); - map1.put("value", 6); - list.add(map1); - this.writing(list); - message = "universal_message1"; - this.actionRequireSucess = true; - } +// logServer.deviceExecuteLog(this.device_code, "", "", "放货完成"); +// JSONObject jsonObject = new JSONObject(); +// jsonObject.put("device_code", target); +// jsonObject.put("barcode", barcode); +// String response = acsToWmsService.feedbackTubeInStorageComplete(jsonObject); +// JSONObject jo = JSON.parseObject(response); +// if (jo.getInteger("status") == 200) { +// log.info("管芯入库申请放货完成成功:" + jo); +// Map map1 = new HashMap<>(); +// List list = new ArrayList(); +// map1.put("code", "to_command"); +// map1.put("value", 6); +// list.add(map1); +// this.writing(list); +// message = "universal_message1"; +// this.actionRequireSucess = true; +// } + Map 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) { message = "universal_message2"; @@ -346,7 +350,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver .build(); logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); - String response = acsToWmsService.secondaryAllocationPoint(param); + String response = acsToWmsService.applyPipeCoreRackNewPoint(param); JSONObject jo = JSON.parseObject(response); if (jo.getInteger("status") == 200) { LuceneLogDto logDto2 = LuceneLogDto.builder() @@ -527,34 +531,17 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver String next_point_code = taskDtoIns.getNext_point_code(); String next_addr = nextDevice.getExtraValue().get("address").toString(); String start_addr = startDevice.getExtraValue().get("address").toString(); - - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - - 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() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code(); - return false; - } + String interactionJson = taskDtoIns.getInteraction_json(); + InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class); + if (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - if (ObjectUtil.isEmpty(start_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); - } + if (ObjectUtil.isEmpty(next_addr)) { + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } - - if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - if (ObjectUtil.isEmpty(next_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); - } - } Map map1 = new HashMap<>(); Map map2 = new HashMap<>(); Map map3 = new HashMap<>(); @@ -562,7 +549,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver 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) { logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + 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); String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - - - 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 (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - if (ObjectUtil.isEmpty(start_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); - } + if (ObjectUtil.isEmpty(next_addr)) { + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } - if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - if (ObjectUtil.isEmpty(next_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); - } + String interactionJson = taskDto.getInteraction_json(); + InteractionJsonDTO interactionJsonDTO = null; + if (StrUtil.isNotEmpty(interactionJson)) { + interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class); } String taskid = taskDto.getTask_id(); @@ -640,7 +614,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver Map map3 = new HashMap<>(); Map map4 = new HashMap<>(); 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) { logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() @@ -676,7 +650,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver instdto.setExecute_device_code(device_code); } - private void pushPLC(Map map1, Map map2, String next_addr, Map map3, String start_addr, Map map4, String task) { + private void pushPLC(Map map1, Map map2, String next_addr, Map map3, String start_addr, Map map4, String task, InteractionJsonDTO interactionJsonDTO) { List list = new ArrayList(); map1.put("code", "to_command"); @@ -691,6 +665,26 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver map4.put("code", "to_task"); map4.put("value", task); list.add(map4); + if (interactionJsonDTO != null){ + Map map5 = new HashMap<>(); + if (ObjectUtil.isNotEmpty(interactionJsonDTO.getLen())) { + map5.put("code", "to_length"); + map5.put("value", interactionJsonDTO.getLen()); + list.add(map5); + } + Map map6 = new HashMap<>(); + if (ObjectUtil.isNotEmpty(interactionJsonDTO.getThickness())) { + map6.put("code", "to_thickness"); + map6.put("value", interactionJsonDTO.getThickness()); + list.add(map6); + } + Map map7 = new HashMap<>(); + if (ObjectUtil.isNotEmpty(interactionJsonDTO.getSize())) { + map7.put("code", "to_size"); + map7.put("value", interactionJsonDTO.getSize()); + list.add(map7); + } + } this.writing(list); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java index 1da2810eb..c86c015dc 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java @@ -493,10 +493,6 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if (manipulatorAgvStationDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code(); - return false; - } } if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(start_addr)) { @@ -557,10 +553,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if ( manipulatorAgvStationDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!任务号:" + taskDto.getTask_code(); - return false; - } + } if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(start_addr)) { @@ -578,6 +571,10 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver(); + if (ObjectUtil.isEmpty(next_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); + } if ( manipulatorAgvStationDeviceDriver.getMove() != 0) { notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); return false; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java index 3aa1463d8..ef2d39d00 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java @@ -207,8 +207,19 @@ public interface AcsToWmsService { */ HttpResponse callShaftFromCache(JSONObject param); + /** + * 收卷辊二次分配点位 + * @param param + * @return + */ String secondaryAllocationPoint(JSONObject param); + /** + * 管芯库二次分配点位 + * @param param + * @return + */ + String applyPipeCoreRackNewPoint(JSONObject param); /** * 行架-agv对接位取货完成反馈 * @param jsonObject @@ -223,4 +234,5 @@ public interface AcsToWmsService { String feedbackTubeInStorageComplete(JSONObject jsonObject); + } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index b0e93ccc0..6defffcea 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -652,9 +652,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { public String secondaryAllocationPoint(JSONObject param) { try { MDC.put(log_file_type, log_type); - log.info("secondaryAllocationPoint-----输入参数{}", param); + log.info("applyRollUpRollerNewPoint-----输入参数{}", param); String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue(); - AddressDto addressDto = addressService.findByCode("secondaryAllocationPoint"); + AddressDto addressDto = addressService.findByCode("applyRollUpRollerNewPoint"); String url = wmsurl + addressDto.getMethods_url(); HttpResponse result2 = null; try { @@ -664,11 +664,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { .execute(); } catch (Exception e) { String msg = e.getMessage(); - log.info("secondaryAllocationPoint-----输出参数{}", msg); + log.info("applyRollUpRollerNewPoint-----输出参数{}", msg); //网络不通 } if(ObjectUtil.isEmpty(result2)){ - log.info("secondaryAllocationPoint-----输出参数{}", "返回结果为空"); + log.info("applyRollUpRollerNewPoint-----输出参数{}", "返回结果为空"); return null; } String type = ""; @@ -677,9 +677,49 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { } else { type = "error"; } - log.info("secondaryAllocationPoint-----输出参数{}", result2.body()); - LuceneLogDto luceneLogDto = new LuceneLogDto(4,"secondaryAllocationPoint", String.valueOf(result2.getStatus()), - JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标"); + log.info("applyRollUpRollerNewPoint-----输出参数{}", result2.body()); + LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyRollUpRollerNewPoint", String.valueOf(result2.getStatus()), + 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); return result2.body(); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 697965df7..72a6ec9f2 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; 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.extension.conditions.query.LambdaQueryChainWrapper; 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.opc.DeviceAppService; 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.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; @@ -81,6 +83,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { @Autowired private LuceneExecuteLogService luceneLogService; + @Autowired + private StorageCellService storageCellService; @Autowired private AcsToLiKuService acsToLiKuService; @@ -680,12 +684,16 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String to_target5 = data.getString("target5"); String num = data.getString("num"); Device device = deviceAppService.findDeviceByCode(device_code); + if (ObjectUtil.isEmpty(num)) { + num = "0"; + } if (ObjectUtil.isEmpty(device)) { throw new Exception("未找到对应设备:" + device_code); } PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver(); + List targets = new ArrayList<>(); if (!ObjectUtil.isEmpty(to_barcode1)) { map.put("to_barcode1", to_barcode1); } @@ -702,24 +710,31 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { map.put("to_barcode5", to_barcode5); } if (!ObjectUtil.isEmpty(to_target1)) { - map.put("to_target1", to_target1); + targets.add(to_target1); } if (!ObjectUtil.isEmpty(to_target2)) { - map.put("to_target2", to_target2); + targets.add(to_target2); } if (!ObjectUtil.isEmpty(to_target3)) { - map.put("to_target3", to_target3); + targets.add(to_target3); } if (!ObjectUtil.isEmpty(to_target4)) { - map.put("to_target4", to_target4); + targets.add(to_target4); } if (!ObjectUtil.isEmpty(to_target5)) { - map.put("to_target5", to_target5); + targets.add(to_target5); } if (!ObjectUtil.isEmpty(num)) { map.put("to_num", num); } - pipeCoreRackStationDeviceDriver.writing(map); + List storageCodes = storageCellMapper.selectList(new QueryWrapper().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(); resultJson.put("status", HttpStatus.OK.value()); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java index 85dc4838a..a0de35dd9 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java @@ -177,10 +177,12 @@ public class AutoCreateInst { //5、输送任务 //6、行架 //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); } else if (StrUtil.equals(task_type, "3")) { instdto.setAgv_inst_type("2"); + }else if (StrUtil.equals(task_type, "2")) { + instdto.setAgv_inst_type("3"); } else if (StrUtil.equals(task_type, "8")) { instdto.setAgv_inst_type("2"); } else { diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml b/acs2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml index 0e1081552..10ee45fce 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml @@ -1,22 +1,29 @@ server: - port: 8010 + port: 8011 #配置数据源 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: druid: db-type: com.alibaba.druid.pool.DruidDataSource 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} - password: ${DB_PWD:123456} + password: ${DB_PWD:NLABC&ld123} + # password: ${DB_PWD:p@ssw0rd} # 初始连接数 initial-size: 5 # 最小连接数 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 # 连接在池中最小生存的时间 @@ -36,11 +43,8 @@ spring: enabled: true stat-view-servlet: enabled: true - # 控制台管理用户名和密码 url-pattern: /druid/* reset-enable: false - login-username: admin - login-password: 123456 filter: stat: enabled: true @@ -51,24 +55,30 @@ spring: wall: config: 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: #数据库索引 - host: ${REDIS_HOST:127.0.0.1} + database: ${REDIS_DB:2} + host: ${REDIS_HOST:192.168.20.15} port: ${REDIS_PORT:6379} - 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 +# password: ${REDIS_PWD:} + # 登录相关配置 login: # 登录缓存 @@ -87,36 +97,19 @@ login: heigth: 36 # 内容长度 length: 2 - # 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可 + # 字体名称,为空则使用默认字体 font-name: # 字体大小 font-size: 25 -#jwt -jwt: - header: Authorization - # 令牌前缀 - 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 +#是否允许生成代码,生产环境设置为false +generator: + enabled: true # IP 本地解析 ip: local-parsing: true -#是否允许生成代码,生产环境设置为false -generator: - enabled: false # 文件存储路径 file: mac: @@ -133,8 +126,11 @@ file: avatarMaxSize: 5 logging: file: - path: /app/jar/logs + path: C:\acs_log # /Users/onepiece/myFile/acs_logs config: classpath:logback-spring.xml +lucene: + index: + path: /lucene # Sa-Token配置 sa-token: @@ -155,10 +151,35 @@ sa-token: jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq # token 前缀 token-prefix: Bearer - is-read-cookie: false - is-read-body: false + sso: + # 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: - addr: http://http://10.1.3.96:8011 +agvToAcs: + addr: http://localhost:8011 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index 229eeefe3..1f5c7d581 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -115,6 +115,7 @@ https://juejin.cn/post/6844903775631572999 + diff --git a/acs2/nladmin-ui/.env.production b/acs2/nladmin-ui/.env.production index 8ff970ab4..e090d310a 100644 --- a/acs2/nladmin-ui/.env.production +++ b/acs2/nladmin-ui/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 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 -VUE_APP_WS_API = 'ws://10.1.3.96:8011' +VUE_APP_WS_API = 'ws://192.168.20.11:8011' diff --git a/acs2/nladmin-ui/dist.zip b/acs2/nladmin-ui/dist.zip index 6ec00622e..c5ddd3937 100644 Binary files a/acs2/nladmin-ui/dist.zip and b/acs2/nladmin-ui/dist.zip differ diff --git a/acs2/nladmin-ui/public/config.js b/acs2/nladmin-ui/public/config.js index 7e53e8eb6..c46539a79 100644 --- a/acs2/nladmin-ui/public/config.js +++ b/acs2/nladmin-ui/public/config.js @@ -3,7 +3,7 @@ window.g = { VUE_APP_BASE_API: 'http://127.0.0.1:8012' }, prod: { - VUE_APP_BASE_API: 'http://10.1.3.96:8011' + VUE_APP_BASE_API: 'http://192.168.20.11:8011' } } diff --git a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java index 16af13aac..6090b1bb4 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java +++ b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java @@ -55,7 +55,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { @Override public JSONObject toAcsGxInStorage(JSONArray param) { - return AcsUtil.notifyAcs4("/api/wms/getTubeMsg", param); + return AcsUtil.notifyAcs4("api/wms/getTubeMsg", param); } } diff --git a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/st/service/impl/GxPdaServiceImpl.java b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/st/service/impl/GxPdaServiceImpl.java index b185ffeb6..956fd174c 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/st/service/impl/GxPdaServiceImpl.java +++ b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/st/service/impl/GxPdaServiceImpl.java @@ -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.dao.MdBaseClassstandard; 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.ext.acs.service.WmsToAcsService; import org.nl.wms.pda.st.service.GxPdaService; @@ -48,19 +49,17 @@ public class GxPdaServiceImpl implements GxPdaService { private GxOutStorageTask gxOutStorageTask; @Autowired private WmsToAcsService wmsToAcsService; + @Autowired + private MdMeMaterialbaseMapper mdMeMaterialbaseMapper; @Override public JSONArray getGxSpecification() { - // todo: 可能维护到物料表中!!! - MdBaseClassstandard one = classstandardService.getOne(new LambdaQueryWrapper() - .eq(MdBaseClassstandard::getClass_code, "0002")); - List list = classstandardService.list(new LambdaQueryWrapper() - .eq(MdBaseClassstandard::getParent_class_id, one.getClass_id())); + List list = mdMeMaterialbaseMapper.selectList(new LambdaQueryWrapper().eq(MdMeMaterialbase::getMaterial_code, "GX")); JSONArray jsonArray = list.stream() .map(item -> { JSONObject jsonObject = new JSONObject(); - jsonObject.put("text", item.getClass_name()); - jsonObject.put("value", item.getClass_code()); + jsonObject.put("text", item.getMaterial_spec()); + jsonObject.put("value", item.getMaterial_model()); return jsonObject; }) .collect(Collectors.toCollection(JSONArray::new)); @@ -156,6 +155,7 @@ public class GxPdaServiceImpl implements GxPdaService { List allGxPoints = pointService.getGxPointNotLock(); if (allGxPoints.size() < gxNumber) { log.warn("管芯库不够存放,只够存放{}个管芯", allGxPoints.size()); + throw new BadRequestException("管芯库不够存放,只够存放"+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("device_code", gxRks.get(0).getPoint_code()); acs.put("num", gxNumber); + for (int i = 0; i < actualQuantity; i++) { // 查找点位最终一次性发给ACS acs.put("barcode" + (i + 1), materialCode); acs.put("target" + (i + 1), allGxPoints.get(i).getPoint_code()); - acsArray.add(acs); } + acsArray.add(acs); // 调用ACS log.info("调用ACS管芯入库的参数 - {}", acsArray); JSONObject jsonObject = wmsToAcsService.toAcsGxInStorage(acsArray); @@ -240,6 +241,11 @@ public class GxPdaServiceImpl implements GxPdaService { } SchBasePoint endPoint = endPoints.get(0); List 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++) { // 由任务完成来清除点位 SchBasePoint point = allPoint.get(i); @@ -251,6 +257,7 @@ public class GxPdaServiceImpl implements GxPdaService { taskParam.put("vehicle_code", point.getVehicle_code()); taskParam.put("vehicle_type", point.getVehicle_type()); taskParam.put("config_code", "GxOutStorageTask"); + taskParam.put("interaction_json", interaction_json); taskParam.put("create_mode", GeneralDefinition.PDA_CREATION); String task = gxOutStorageTask.createTask(taskParam); log.info("任务创建成功 - {}", task); diff --git a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java index 2ad8b6f8d..24924a14f 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java +++ b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java @@ -282,7 +282,6 @@ public abstract class AbstractTask { List unFinishTasksByTaskConfig = taskService.findUnFinishTasksByTaskConfig( taskConfig.getConfig_code(), taskConfig.getTask_direction()); Assert.isFalse(unFinishTasksByTaskConfig.size() >= tcmn, LangProcess.msg("common_maxTaskTip", applyPointCode)); - // 校验同个点位,同种任务是否多次请求创建任务(固定只能1个任务)此处不判断,调用此处前判断 // List applyPointTask = taskService.findUnFinishTasksByTaskConfig( // taskConfig.getConfig_code(), applyPointCode, taskConfig.getTask_direction()); diff --git a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java index 1e8d7f58d..521c6f96b 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java +++ b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java @@ -1,5 +1,6 @@ package org.nl.wms.sch.task_manage; +import com.alibaba.fastjson.JSONObject; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -139,6 +140,11 @@ public class AcsTaskDto { * 扩展属性 */ Map params; + + /** + * 扩展属性 + */ + JSONObject interaction_json; /** * 区域 */ diff --git a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/tasks/nbj/GxOutStorageTask.java b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/tasks/nbj/GxOutStorageTask.java index 1b01ba1d8..d9d2dfdde 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/tasks/nbj/GxOutStorageTask.java +++ b/lms2/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/tasks/nbj/GxOutStorageTask.java @@ -19,6 +19,8 @@ import org.nl.wms.util.TaskUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.util.Objects; + import static org.nl.wms.util.TaskUtils.checkTaskOptionStatus; import static org.nl.wms.util.TaskUtils.setUpdateByType; @@ -42,8 +44,12 @@ public class GxOutStorageTask extends AbstractTask { @Override public void deliveryBeforeProcessing(SchBaseTask task, AcsTaskDto acsTaskDto) { - acsTaskDto.setVehicle_code(""); - acsTaskDto.setVehicle_code2(""); + JSONObject param = JSONObject.parseObject(task.getRequest_param()); + Object interactionObject = param.get("interaction_json"); + if (!Objects.isNull(interactionObject)){ + JSONObject interactionJson = (JSONObject)param.get("interaction_json"); + acsTaskDto.setInteraction_json(interactionJson); + } } @Override diff --git a/lms2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml b/lms2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml index 5e418f14e..8748f5319 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml +++ b/lms2/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml @@ -4,13 +4,13 @@ server: nl: config: mysql: - ip: 127.0.0.1 + ip: 192.168.20.15 port: 3306 username: root - password: 12356 - database: nl-platform + password: NLABC&ld123 + database: ldnx_lms2 redis: - ip: 127.0.0.1 + ip: 192.168.20.15 port: 6379 password: null database: 1 diff --git a/lms2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/lms2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index a02af0e3a..2773ffd6e 100644 --- a/lms2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/lms2/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -176,6 +176,7 @@ https://juejin.cn/post/6844903775631572999 + diff --git a/lms2/nladmin-ui/.env.production b/lms2/nladmin-ui/.env.production index 65580f084..0cd3a2d88 100644 --- a/lms2/nladmin-ui/.env.production +++ b/lms2/nladmin-ui/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 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 -VUE_APP_WS_API = 'ws://10.93.41.201:8010' +VUE_APP_WS_API = 'ws://192.168.20.13:8011' diff --git a/lms2/nladmin-ui/public/config.js b/lms2/nladmin-ui/public/config.js index 441302a40..a8414e003 100644 --- a/lms2/nladmin-ui/public/config.js +++ b/lms2/nladmin-ui/public/config.js @@ -3,7 +3,7 @@ window.g = { VUE_APP_BASE_API: 'http://127.0.0.1:8010' }, prod: { - VUE_APP_BASE_API: 'http://127.0.0.1:8010' + VUE_APP_BASE_API: 'http://192.168.20.13:8011' } }