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 4c375b9..b600296 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 @@ -353,194 +353,194 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic // 取货完毕 //(Itype=1、3,需要WCS反馈) - else if (phase == 0x0A) { - if (agvaddr == 0) { - agvaddr = agvaddr_copy; - } - if (agvaddr < 1) { - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("agv地址参数有误,phase:" + phase) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - return; - } - if (agvaddr != 0) { - CommonFinalParam commonFinalParam = new CommonFinalParam(); - old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); - if (StrUtil.contains(old_device_code, commonFinalParam.getBARRE())) { - String[] point = old_device_code.split(commonFinalParam.getBARRE()); - device_code = point[0]; - } else if (StrUtil.contains(old_device_code, commonFinalParam.getPOINT())) { - String[] point = old_device_code.split("\\."); - device_code = point[0]; - emptyNum = point[1]; - } else { - device_code = old_device_code; - } - } - - device = deviceAppService.findDeviceByCode(device_code); - if (ObjectUtil.isEmpty(device_code)) { - log.info(agvaddr + "对应设备号为空!"); - return; - } - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到指令号{}对应的指令", ikey); - return; - } - String agv_inst_type = inst.getAgv_inst_type(); - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) - && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())) { - standardOrdinarySiteDeviceDriver.setOption(0); - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - standardOrdinarySiteDeviceDriver.setAgvphase(phase); - standardOrdinarySiteDeviceDriver.setIndex(index); - standardOrdinarySiteDeviceDriver.setInst(inst); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - String task_code = inst.getTask_code(); - if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) - && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { - JSONObject jsonObject = new JSONObject(); - jsonObject.put("task_code", task_code); - LuceneLogDto logDto1 = LuceneLogDto.builder() - .device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) - .content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) - .build(); - logDto1.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto1); - acsToWmsService.actionFinishRequest2(jsonObject); - } - - } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { - hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); - try { - hongXiangStationDeviceDriver.writing(0); - } catch (Exception e) { - e.printStackTrace(); - } - if (hongXiangStationDeviceDriver.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 + "光电信号:" + hongXiangStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content(message) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { - manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); - try { - manipulatorAgvStationDeviceDriver.writing(3); - } 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); - String task_code = inst.getTask_code(); - if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) - && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { - JSONObject jsonObject = new JSONObject(); - jsonObject.put("task_code", task_code); - LuceneLogDto logDto1 = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDevice_code()) - .content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDeviceCode()) - .build(); - logDto1.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto1); - acsToWmsService.actionFinishRequest2(jsonObject); - } - } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { - paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); - try { - paperTubePickSiteDeviceDriver.writing(3); - } catch (Exception e) { - e.printStackTrace(); - } - if (paperTubePickSiteDeviceDriver.getAction() == 1 - && paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) { - 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 + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content(message) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); - - try { - standardInspectSiteDeviceDriver.writing(1); - } catch (Exception e) { - e.printStackTrace(); - } - if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content(message) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - - } +// else if (phase == 0x0A) { +// if (agvaddr == 0) { +// agvaddr = agvaddr_copy; +// } +// if (agvaddr < 1) { +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(device_code) +// .content("agv地址参数有误,phase:" + phase) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// return; +// } +// if (agvaddr != 0) { +// CommonFinalParam commonFinalParam = new CommonFinalParam(); +// old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); +// if (StrUtil.contains(old_device_code, commonFinalParam.getBARRE())) { +// String[] point = old_device_code.split(commonFinalParam.getBARRE()); +// device_code = point[0]; +// } else if (StrUtil.contains(old_device_code, commonFinalParam.getPOINT())) { +// String[] point = old_device_code.split("\\."); +// device_code = point[0]; +// emptyNum = point[1]; +// } else { +// device_code = old_device_code; +// } +// } +// +// device = deviceAppService.findDeviceByCode(device_code); +// if (ObjectUtil.isEmpty(device_code)) { +// log.info(agvaddr + "对应设备号为空!"); +// return; +// } +// if (ObjectUtil.isEmpty(inst)) { +// log.info("未找到指令号{}对应的指令", ikey); +// return; +// } +// String agv_inst_type = inst.getAgv_inst_type(); +// if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { +// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); +// if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) +// && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())) { +// standardOrdinarySiteDeviceDriver.setOption(0); +// } else { +// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content("agvphase:" + phase + "反馈:" + data) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } +// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); +// standardOrdinarySiteDeviceDriver.setAgvphase(phase); +// standardOrdinarySiteDeviceDriver.setIndex(index); +// standardOrdinarySiteDeviceDriver.setInst(inst); +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content("agvphase:" + phase + "反馈:" + data) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// String task_code = inst.getTask_code(); +// if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) +// && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { +// JSONObject jsonObject = new JSONObject(); +// jsonObject.put("task_code", task_code); +// LuceneLogDto logDto1 = LuceneLogDto.builder() +// .device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) +// .content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) +// .build(); +// logDto1.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto1); +// acsToWmsService.actionFinishRequest2(jsonObject); +// } +// +// } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { +// hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); +// try { +// hongXiangStationDeviceDriver.writing(0); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// if (hongXiangStationDeviceDriver.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 + "光电信号:" + hongXiangStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content(message) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } +// } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { +// manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); +// try { +// manipulatorAgvStationDeviceDriver.writing(3); +// } 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); +// String task_code = inst.getTask_code(); +// if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) +// && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { +// JSONObject jsonObject = new JSONObject(); +// jsonObject.put("task_code", task_code); +// LuceneLogDto logDto1 = LuceneLogDto.builder() +// .device_code(manipulatorAgvStationDeviceDriver.getDevice_code()) +// .content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDeviceCode()) +// .build(); +// logDto1.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto1); +// acsToWmsService.actionFinishRequest2(jsonObject); +// } +// } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { +// paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); +// try { +// paperTubePickSiteDeviceDriver.writing(3); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// if (paperTubePickSiteDeviceDriver.getAction() == 1 +// && paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) { +// 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 + ",动作信号:" + paperTubePickSiteDeviceDriver.getAction() + "报警信号:" + paperTubePickSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content(message) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } +// } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { +// standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); +// +// try { +// standardInspectSiteDeviceDriver.writing(1); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) { +// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content("agvphase:" + phase + "反馈:" + data) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } else { +// message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content(message) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } +// } else { +// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); +// LuceneLogDto logDto = LuceneLogDto.builder() +// .device_code(this.getDeviceCode()) +// .content("agvphase:" + phase + "反馈:" + data) +// .build(); +// logDto.setLog_level(4); +// luceneExecuteLogService.deviceExecuteLog(logDto); +// } +// +// } // 到达放货点 //(Itype=1/2/3,需要WCS反馈) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/region/service/impl/RegionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/region/service/impl/RegionServiceImpl.java index b161cda..e7d2e77 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/region/service/impl/RegionServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/region/service/impl/RegionServiceImpl.java @@ -15,6 +15,7 @@ import org.nl.acs.region.service.mapper.RegionMapper; import org.nl.common.exception.BadRequestException; import org.nl.config.language.LangProcess; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -27,15 +28,14 @@ import java.util.List; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class RegionServiceImpl extends CommonServiceImpl implements RegionService{ + @Autowired - RegionService regionService; - @Autowired - RegionMapper regionMapper; + private RegionMapper regionMapper; @Override public JSONArray queryAllRegions() { //查询所有区域 - List list = regionService.lambdaQuery().list(); + List list = this.lambdaQuery().list(); if (CollectionUtil.isEmpty(list)) { throw new BadRequestException(LangProcess.msg("error_no_regional")); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java index 983fdce..75f1ff0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java @@ -28,6 +28,7 @@ import org.nl.hand.service.PdaService; import org.nl.system.service.dict.dao.Dict; import org.nl.system.service.dict.dao.mapper.SysDictMapper; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; @@ -49,7 +50,7 @@ public class PdaServiceImpl implements PdaService { DeviceAppService deviceAppService; @Autowired - RegionService regionService; + private RegionService regionService; @Autowired private TaskService taskserver; diff --git a/acs2/nladmin-ui/src/assets/images/newloge.png b/acs2/nladmin-ui/src/assets/images/background333.png similarity index 100% rename from acs2/nladmin-ui/src/assets/images/newloge.png rename to acs2/nladmin-ui/src/assets/images/background333.png diff --git a/acs2/nladmin-ui/src/assets/images/newlogo.png b/acs2/nladmin-ui/src/assets/images/newlogo.png new file mode 100644 index 0000000..9ee7e04 Binary files /dev/null and b/acs2/nladmin-ui/src/assets/images/newlogo.png differ diff --git a/acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue b/acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue index f8b5da9..d876549 100644 --- a/acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue +++ b/acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue @@ -14,7 +14,7 @@