From 5b096969a2de48f5cd0e62cad37363a9196654e8 Mon Sep 17 00:00:00 2001 From: tuqiang <437016993@qq.com> Date: Wed, 21 Feb 2024 09:11:29 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E4=BC=98=E5=8C=96kep=E4=BF=A1=E5=8F=B7?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/server/impl/NDCAgvServiceImpl.java | 41 ++- .../run/OneNDCSocketConnectionAutoRun.java | 4 +- .../run/TwoNDCSocketConnectionAutoRun.java | 4 +- .../device/rest/DeviceAssignedController.java | 6 +- .../nl/acs/device/rest/DeviceController.java | 19 +- .../agv/ndctwo/AgvNdcTwoDeviceDriver.java | 279 +++++------------- .../device_driver/rgv/RgvDeviceDriver.java | 92 ++++-- .../PlugPullDeviceSiteDeviceDriver.java | 2 + .../SlitTwoManipulatorDeviceDriver.java | 8 +- .../SubRollConveyorSiteDeviceDriver.java | 3 +- .../rest/InstructionController.java | 1 - .../service/impl/InstructionServiceImpl.java | 2 +- .../nl/acs/opc/DeviceOpcProtocolRunable.java | 74 ++--- .../org/nl/acs/task/rest/TaskController.java | 1 - .../acs/task/rest/TaskFeedbackController.java | 5 - .../quartz/SysQuartzJobController.java | 9 +- .../monitor/two_device/two_device.properties | 29 ++ .../two_device/two_device_en_US.properties | 25 ++ .../two_device/two_device_in_ID.properties | 25 ++ .../two_device/two_device_zh_CN.properties | 25 ++ 20 files changed, 325 insertions(+), 329 deletions(-) create mode 100644 acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties create mode 100644 acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties create mode 100644 acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties create mode 100644 acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties 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 f865d6aa9..5d89569a3 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 @@ -7,6 +7,7 @@ import org.nl.acs.AcsConfig; import org.nl.acs.agv.server.NDCAgvService; import org.nl.acs.agv.server.dto.AgvDto; import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; +import org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun; import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.impl.DeviceServiceImpl; @@ -39,7 +40,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { Map AGVDeviceStatus = new HashMap(); - + @Override public void deleteAgvInstToNDC(Instruction inst) throws Exception { if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), CommonFinalParam.ONE)) { @@ -66,15 +67,19 @@ public class NDCAgvServiceImpl implements NDCAgvService { log.info("下发删除AGV指令--{}", Bytes2HexString(b)); // NDCSocketConnectionAutoRun.write(b); + TwoNDCSocketConnectionAutoRun.write(b); System.out.println("下发删除agv指令数据:" + Bytes2HexString(b)); } } - + @Override public void sendAgvInstToNDC(String agv_system_type, Instruction inst) { + log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() + + ",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() + + ",nextAddress:" + inst.getNext_point_code()); if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), CommonFinalParam.ONE)) { String instcode = inst.getInstruction_code(); int type = Integer.parseInt(inst.getInstruction_type()); @@ -121,7 +126,8 @@ public class NDCAgvServiceImpl implements NDCAgvService { (byte) fhdhigh, (byte) fhdlow }; log.info("下发AGV作业指令--{}", str1); - OneNDCSocketConnectionAutoRun.write(b); +// OneNDCSocketConnectionAutoRun.write(b); + TwoNDCSocketConnectionAutoRun.write(b); System.out.println("下发agv指令数据:" + Bytes2HexString(b)); } } @@ -169,7 +175,29 @@ public class NDCAgvServiceImpl implements NDCAgvService { @Override public byte[] sendAgvTwoModeInst(int phase, int index, int result) { - return new byte[0]; + if (phase < 0 || index < 0) + return null; + byte indexhigh = (byte) IntToHexHigh(index); + byte indexlow = (byte) IntToHexLow(index); + byte phasehigh = (byte) IntToHexHigh(phase); + byte phaselow = (byte) IntToHexLow(phase); + + byte[] b = new byte[]{(byte) 0X87, (byte) 0XCD, + (byte) 0X00, (byte) 0X08, + (byte) 0X00, (byte) 0X0A, + (byte) 0X00, (byte) 0X01, + (byte) 0X00, (byte) 0X6D, + (byte) 0X00, (byte) 0X06, + (byte) indexhigh, (byte) indexlow, + (byte) 0X01, (byte) 0X12, + (byte) phasehigh, (byte) phaselow + }; + + + log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:" + hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF)); + + System.out.println("反馈agv动作数据:" + Bytes2HexString(b)); + return b; } @@ -269,7 +297,8 @@ public class NDCAgvServiceImpl implements NDCAgvService { log.info("下发AGV充电任务--{}", str1); try { - OneNDCSocketConnectionAutoRun.write(b); +// OneNDCSocketConnectionAutoRun.write(b); + TwoNDCSocketConnectionAutoRun.write(b); } catch (Exception e) { e.getMessage(); return false; @@ -307,7 +336,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { } - + @Override public Map findAllAgvFromCache() { return AGVDeviceStatus; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java index 6908f907e..19f5de09f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java @@ -86,8 +86,8 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); - ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); - port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); + ip = paramService.findByCode(AcsConfig.AGVURL2).getValue(); + port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT2).getValue()); try { 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 7587a9b3c..404141e60 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 @@ -87,8 +87,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { try { System.out.println("2楼1区域AGV系统链接开始"); - ip = paramService.findByCode(AcsConfig.AGVURL2).getValue(); - port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT2).getValue()); + ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); + port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); // byte[] b = new byte[1024]; // s = new Socket(ip, port); // System.out.println("2楼1区域Agv链接成功"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceAssignedController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceAssignedController.java index 383e9069c..b8eccf97b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceAssignedController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceAssignedController.java @@ -28,14 +28,12 @@ public class DeviceAssignedController { @GetMapping @Log("查询设备任务分配信息") - public ResponseEntity query(DeviceAssignedQueryParam query, Pageable pageable) { return new ResponseEntity<>(deviceAssignedService.queryAll(query, pageable), HttpStatus.OK); } @PostMapping @Log("新增设备任务分配信息") - public ResponseEntity create(@Validated @RequestBody Map resources) { deviceAssignedService.create(resources); return new ResponseEntity<>(HttpStatus.CREATED); @@ -43,7 +41,7 @@ public class DeviceAssignedController { @PutMapping @Log("修改设备任务分配信息") - + public ResponseEntity update(@Validated @RequestBody Map resources) { deviceAssignedService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -51,7 +49,7 @@ public class DeviceAssignedController { @DeleteMapping @Log("删除设备任务分配信息") - + public ResponseEntity delete(@RequestBody Set ids) { deviceAssignedService.removeByIds(ids); return new ResponseEntity<>(HttpStatus.OK); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java index 1e7383cd9..ef85d6dc0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/rest/DeviceController.java @@ -57,7 +57,6 @@ public class DeviceController { @PostMapping @Log("新增设备") - public ResponseEntity create(@Validated @RequestBody DeviceDto dto) { deviceService.create(dto); return new ResponseEntity<>(HttpStatus.CREATED); @@ -73,7 +72,6 @@ public class DeviceController { @Log("删除设备") @DeleteMapping public ResponseEntity delete(@RequestBody String[] ids) { - deviceService.deleteAll(ids); return new ResponseEntity<>(HttpStatus.OK); } @@ -98,14 +96,12 @@ public class DeviceController { @GetMapping("/type/{type}") @Log("根据设备类型查询已配置设备") - public ResponseEntity selectListByType(@PathVariable String type) { return new ResponseEntity<>(deviceService.selectDeviceListByType(type), HttpStatus.OK); } @GetMapping("/selectDeviceDevicerInfo/{status}") @Log("根据状态查询设备信息") - public ResponseEntity selectDeviceDevicerInfo(@PathVariable String status) { return new ResponseEntity<>(deviceService.selectDeviceDevicerInfo(status), HttpStatus.OK); } @@ -126,7 +122,6 @@ public class DeviceController { @PostMapping("/cleanTask") @Log("清除设备状态为空位") - public ResponseEntity cleanTask(@RequestBody JSONObject json) { deviceService.cleanTask(json); return new ResponseEntity<>(HttpStatus.CREATED); @@ -158,7 +153,7 @@ public class DeviceController { // @PutMapping({"/getOpcPlcs"}) // @Log("获取plc列表") -// +// // public ResponseEntity getOpcPlcs(@RequestBody Map map) throws Exception { // final JSONObject model = new JSONObject(); // Map form = (Map) map.get("form"); @@ -171,7 +166,6 @@ public class DeviceController { @PostMapping({"/updateConfig"}) @Log("配置设备驱动") - @Transactional(rollbackFor = Exception.class) public ResponseEntity updateConfig(@RequestBody Map map) { JSONObject jsonObject = (JSONObject) JSONObject.toJSON(map); @@ -181,7 +175,6 @@ public class DeviceController { @PostMapping({"/driverConfig"}) @Log("配置驱动查询") - public ResponseEntity queryDriverConfigByDeviceId(@RequestBody Map map) { return new ResponseEntity(deviceService.queryDriverConfigByDeviceId((String) map.get("device_id"), (String) map.get("driver_code")), HttpStatus.OK); } @@ -208,27 +201,23 @@ public class DeviceController { @GetMapping("/selectConveyorList") @Log("下拉选输送设备") - public ResponseEntity selectConveyorList() { return new ResponseEntity<>(deviceService.selectConveyorList(), HttpStatus.OK); } @Log("查询缓存所有指令") - @PostMapping(value = "/findAllStorageCellFromCache") public ResponseEntity findAllInstFromCache() { return new ResponseEntity<>(deviceService.findAllStorageCellFromCache(), HttpStatus.OK); } @Log("查询缓存所有设备") - @PostMapping(value = "/findCacheDevice") public ResponseEntity findCacheDevice() { return new ResponseEntity<>(deviceService.findCacheDevice(), HttpStatus.OK); } @Log("更新条码") - @PostMapping(value = "/updateBarcode") public ResponseEntity updateBarcode(@RequestBody JSONObject json) throws Exception { deviceService.updateBarcode(json); @@ -237,20 +226,17 @@ public class DeviceController { @GetMapping({"/queryDBInfoByDriverCode/{driverCode}"}) @Log("根据驱动编码获取db信息") - public ResponseEntity queryDBInfoByDriverCode(@PathVariable String driverCode) { return new ResponseEntity(deviceService.queryDBInfoByDriverCode(driverCode), HttpStatus.OK); } @Log("导出设备db") - @PostMapping(value = "/downloadProtocolConfig") public void downloadProtocolConfig(HttpServletResponse response, @RequestBody JSONObject whereJson) throws IOException { deviceService.downloadProtocolConfig(whereJson, response); } - // @GetMapping("/getAllDriverCodeList") // @Log("协议配置下拉选设备驱动") // @ApiOperation("协议配置下拉选设备驱动") @@ -259,14 +245,12 @@ public class DeviceController { // } @Log("导出Smart设备协议CSV") - @GetMapping(value = "/protocol/downloadSmartCSV") public void downDeviceDBloadOumulongCSV(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { deviceService.downDeviceDBloadSmartCSV(deviceService.queryDeviceProtocol(whereJson), response); } @Log("导出FX5U设备协议CSV") - @GetMapping(value = "/protocol/downloadFX5UCSV") public void downDeviceDBloadFX5UCSV(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { deviceService.downDeviceDBloadFX5UCSV(deviceService.queryDeviceProtocol(whereJson), response); @@ -274,7 +258,6 @@ public class DeviceController { @PostMapping("/excelImport") @Log("excel导入") - public ResponseEntity excelImport(@RequestParam("file") MultipartFile file, HttpServletRequest request) { deviceService.excelImport(file, request); return new ResponseEntity<>(HttpStatus.OK); 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 b965f64c0..8011a7485 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 @@ -6,6 +6,7 @@ import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun; import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; @@ -190,37 +191,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) - && StrUtil.equals("true", device.getExtraValue().get("wait").toString()) - && StrUtil.equals(task.getTask_type(), "1")) { - if (standardOrdinarySiteDeviceDriver.getMove() == 1) { - String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); - log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); - if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{},任务号{}", device_code, ikey, task.getTask_code()); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } else { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{}", device_code, ikey); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } - else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); try { @@ -235,8 +210,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction() , standardInspectSiteDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -247,11 +221,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(1); @@ -265,8 +238,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(2); @@ -340,37 +312,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) - && StrUtil.equals("true", device.getExtraValue().get("wait").toString()) - && StrUtil.equals(task.getTask_type(), "1")) { - if (standardOrdinarySiteDeviceDriver.getMove() == 1) { - String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); - log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); - if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{},任务号{}", device_code, ikey, task.getTask_code()); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } else { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{}", device_code, ikey); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -381,11 +327,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(0); @@ -399,8 +344,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(3); @@ -483,37 +427,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if (StrUtil.equals(agv_inst_type, CommonFinalParam.ONE) || StrUtil.equals(agv_inst_type, "3")) { if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) - && StrUtil.equals("true", device.getExtraValue().get("wait").toString()) - && StrUtil.equals(task.getTask_type(), "1")) { - if (standardOrdinarySiteDeviceDriver.getMove() == 1) { - String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); - log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); - if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{},任务号{}", device_code, ikey, task.getTask_code()); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } else { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{}", device_code, ikey); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -524,11 +442,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(2); @@ -542,8 +459,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction() , paperTubePickSiteDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(1); @@ -557,8 +473,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); try { @@ -625,48 +540,23 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if (StrUtil.equals(agv_inst_type, CommonFinalParam.ONE) || StrUtil.equals(agv_inst_type, "3")) { if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) - && StrUtil.equals("true", device.getExtraValue().get("wait").toString()) - && StrUtil.equals(task.getTask_type(), "1")) { - if (standardOrdinarySiteDeviceDriver.getMove() == 1) { - String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); - log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); - if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{},任务号{}", device_code, ikey, task.getTask_code()); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - } - } else { - log.info("等待LMS系统进行确认允许取货,设备号{},指令号{}", device_code, ikey); - message = "等待LMS系统进行确认允许取货,设备号:" + device_code + ",指令号:" + ikey; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(device_code) - .content("等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey) - .build(); - luceneExecuteLogService.deviceExecuteLog(logDto); - } - } 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); - } else { - message = "设备号:" + device_code + "光电信号:" + hongXiangStationDeviceDriver.getMove() + ",动作信号:" + hongXiangStationDeviceDriver.getAction() + "报警信号:" + hongXiangStationDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; - log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() - , hongXiangStationDeviceDriver.getError(), ikey); - } - } else { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } 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); + } else { + message = "设备号:" + device_code + "光电信号:" + hongXiangStationDeviceDriver.getMove() + ",动作信号:" + hongXiangStationDeviceDriver.getAction() + "报警信号:" + hongXiangStationDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件"; + log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() + , hongXiangStationDeviceDriver.getError(), ikey); } } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); @@ -731,9 +621,8 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic //上传称重数据 if (StrUtil.equals(instruction_type, CommonFinalParam.ONE)) { weight = agvaddr; -// inst.setWeight(String.valueOf(weight)); -// instructionService.update(inst); - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + inst.setWeight(String.valueOf(weight)); + instructionService.update(inst); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(device_code) @@ -803,8 +692,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction() , paperTubePickSiteDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -815,11 +703,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(1); @@ -833,16 +720,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver.writing(1); - if ((standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) { + if ((standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - }else { - message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction()+ "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足放货条件"; + } else { + message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足放货条件"; log.info("设备{}当前光电信号{},动作信号{} ,报警信号{},不满足放货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction() - ,standardInspectSiteDeviceDriver.getError(), ikey); + , standardInspectSiteDeviceDriver.getError(), ikey); } } else { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); @@ -903,9 +789,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic // data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); // } data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - this.setPhase(phase); - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -916,11 +803,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(0); @@ -934,8 +820,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(5); @@ -949,8 +834,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction() , paperTubePickSiteDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); standardInspectSiteDeviceDriver.writing(0); if ((standardInspectSiteDeviceDriver.getMove() == 1)) { @@ -1017,10 +901,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic // data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); // } data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - this.setPhase(phase); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -1031,11 +916,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(1); @@ -1049,8 +933,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(4); @@ -1064,8 +947,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction() , paperTubePickSiteDeviceDriver.getError(), ikey); } - } - else { + } else { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } } @@ -1127,10 +1009,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic // data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); // } data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); - this.setPhase(phase); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); - } - else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); try { @@ -1141,11 +1024,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); } - } - else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { + } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); try { paperTubePickSiteDeviceDriver.writing(5); @@ -1159,8 +1041,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, paperTubePickSiteDeviceDriver.getMove(), paperTubePickSiteDeviceDriver.getAction() , paperTubePickSiteDeviceDriver.getError(), ikey); } - } - else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { + } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); try { hongXiangStationDeviceDriver.writing(0); @@ -1174,8 +1055,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, hongXiangStationDeviceDriver.getMove(), hongXiangStationDeviceDriver.getAction() , hongXiangStationDeviceDriver.getError(), ikey); } - } - else { + } else { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } } @@ -1244,8 +1124,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic .build(); luceneExecuteLogService.deviceExecuteLog(logDto); // if (StrUtil.equals(inst.getAgv_system_type(), "2")) { -// TwoNDCSocketConnectionAutoRun.write(data); -// } else if (StrUtil.equals(inst.getAgv_system_type(), "3")) { + TwoNDCSocketConnectionAutoRun.write(data); +// } +// else if (StrUtil.equals(inst.getAgv_system_type(), "3")) { // TwoNDC2SocketConnectionAutoRun.write(data); // } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/RgvDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/RgvDeviceDriver.java index 5a40b6d47..3341e8df7 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/RgvDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/RgvDeviceDriver.java @@ -15,6 +15,12 @@ import org.nl.acs.device_driver.FeedLmsRealFailed; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.ext.wms.data.ApplyManipulatorActionRequest; +import org.nl.acs.ext.wms.data.ApplyManipulatorActionResponse; +import org.nl.acs.ext.wms.data.ApplyPlugPullSitResponse; +import org.nl.acs.ext.wms.data.ApplyPlugPullSiteRequest; +import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.history.ErrorUtil; import org.nl.acs.history.service.DeviceErrorLogService; import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl; @@ -32,7 +38,9 @@ import org.nl.config.language.LangProcess; import org.springframework.beans.factory.annotation.Autowired; import java.util.Date; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; /** * RGV @@ -57,6 +65,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class); @Autowired DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); + @Autowired + AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); //工作模式 int mode = 0; @@ -205,27 +215,6 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task); } - // 更新指令状态 - if (mode == 3 && task > 0) { - Date date = new Date(); - if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) { - log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out); - - } else { - this.instruction_update_time = date; - //更改指令状态 - if (task > 0) { - Instruction inst = checkInst(); - if (inst != null) { - if (StrUtil.equals(inst.getInstruction_status(), "0")) { - inst.setInstruction_status(CommonFinalParam.ONE); - inst.setExecute_device_code(this.device_code); - instructionService.update(inst); - } - } - } - } - } } catch (Exception var17) { var17.printStackTrace(); @@ -249,14 +238,10 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr Instruction instruction = null; List toInstructions; - //行架机械手申请任务 - if (mode == 2 && move == 0 && task == 0 && !requireSucess) { -// boolean res = applyTask(); -// if (res) { -// notCreateInstMessage = ""; -// notCreateTaskMessage = ""; -// feedMessage = ""; -// } + //拔轴完成,RGV工位上有货申请行架任务 + + if (mode == 2 && move == 1 && !requireSucess) { + applyTask(); } else { if (mode == 2) { //if (!requireSucess) { @@ -297,6 +282,55 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr last_container_type = container_type; } + /** + * // * 申请任务 + * // * + * // * @param + * // + */ + public synchronized void applyTask() { + ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest(); + ApplyManipulatorActionResponse applyManipulatorActionResponse; + Instruction inst1 = instructionService.findByCode(String.valueOf(task)); + String task_code1 = inst1.getTask_code(); + applyManipulatorActionRequest.setDevice_code(device_code); + applyManipulatorActionRequest.setTask_code(task_code1); + applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest); + Map map = new LinkedHashMap<>(); + if (applyManipulatorActionResponse.getCode() == 200) { + String barcode = applyManipulatorActionRequest.getBarcode(); + map.put("to_barcode", barcode); + this.writing(map); + logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyManipulatorActionResponse); + message = "申请行架任务成功"; + } else { + message = applyManipulatorActionResponse.getMessage(); + map.put("to_command", 99); + this.writing(map); + requireSucess = true; + message = "申请行架任务失败"; + logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务反馈失败,返回参数:" + applyManipulatorActionResponse); + } + } + + public void writing(Map map) { + DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + Map itemMap = new LinkedHashMap<>(); + map.forEach((key, value) -> { + if (ObjectUtil.isNotEmpty(value)) { + itemMap.put(getToParam() + key, value); + } + }); + if (ObjectUtil.isNotEmpty(itemMap)) { + this.control(itemMap); + logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); + } + } + + public String getToParam() { + return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "."; + } + @Override public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java index 7b01b42db..f8ceb5f8a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java @@ -335,8 +335,10 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl applyPlugPullSiteRequest.setDevice_code(device_code); applyPlugPullSiteRequest.setTask_code(task_code1); applyPlugPullSiteRequest.setType("1"); + //TODO 气涨轴尺寸反馈 applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest); if (applyPlugPullSitResponse.getCode() == 200) { + this.writeSignal(mode); logServer.deviceExecuteLog(this.device_code, "", "", "申请套管,返回参数:" + applyPlugPullSitResponse); message = "申请套管成功"; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index 389447f02..4ccd0d944 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -331,7 +331,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl TaskDto taskDto = taskDtos.get(0); truss_type = taskDto.getTruss_type(); // 9 行架任务 - if (!StrUtil.equals(taskDto.getTask_type(), "9")) { + if (!StrUtil.equals(taskDto.getTask_type(), "6")) { taskDto = null; continue; } @@ -345,7 +345,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl task = taskDtoList.get(j); // 9 行架任务 - if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "9")) { + if (ObjectUtil.isNotEmpty(task) && !StrUtil.equals(task.getTask_type(), "6")) { task = null; continue; } @@ -771,7 +771,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl * * @param map */ - public void writing(Map map) { + public void writing(Map map) throws Exception { DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); Map itemMap = new LinkedHashMap<>(); map.forEach((key, value) -> { @@ -780,7 +780,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } }); if (ObjectUtil.isNotEmpty(itemMap)) { - this.control(itemMap); + this.checkcontrol(itemMap); logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java index 2c8dffa93..613bb3d05 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java @@ -149,7 +149,6 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp Instruction instruction = null; List toInstructions; - //插拔轴机工位申请任务 switch (mode) { case 1: log.debug("弃用(留作兼容)"); @@ -158,7 +157,7 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp log.info("待机"); break; case 3: - //收到行架任务任务号并且有货 + //收到行架任务任务号并且有货下发电气信号 if (task > 0 && move == 1) { Map map = new LinkedHashMap<>(); map.put("to_command", 1); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java index 77b8c14df..5a7a5166a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/rest/InstructionController.java @@ -26,7 +26,6 @@ import java.util.Set; **/ @RestController @RequiredArgsConstructor - @RequestMapping("/api/instruction") public class InstructionController { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index ea19e9757..51dd975b5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -1024,7 +1024,7 @@ public class InstructionServiceImpl extends CommonServiceImpl protocols; OpcServerManageDto OpcServer; @@ -37,9 +28,6 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC private int all_null; private Map itemSearchCache; -// @Autowired -// OpcServerService opcServerService; - public DeviceOpcProtocolRunable() { this.error_num = 0; @@ -96,6 +84,7 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC private void runOld() { + OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService .class); while (true) { start: try { @@ -108,11 +97,11 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC server.disconnect(); log.trace("清理server..."); } - OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService.class); - group = opcServerService.getServer(this.getOpcServer().getOpc_code()); -// this.server = OpcServerUtl.getServerWithOutException(this.OpcServer.getOpc_host(), this.OpcServer.getCls_id(), this.OpcServer.getUser(), this.OpcServer.getPassword(), this.OpcServer.getDomain()); -// this.server.addStateListener(this); -// group = this.server.addGroup(); + +// group =opcServerService.getServer(this.getOpcServer().getOpc_code()); + this.server = OpcServerUtl.getServerWithOutException(this.OpcServer.getOpc_host(), this.OpcServer.getCls_id(), this.OpcServer.getUser(), this.OpcServer.getPassword(), this.OpcServer.getDomain()); + this.server.addStateListener(this); + group = this.server.addGroup(); List itemsString = new ArrayList(); Iterator var3 = this.protocols.iterator(); @@ -207,8 +196,10 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC if (!UnifiedDataAppService.isEquals(value, his)) { OpcItemDto itemDto = this.getItem(itemId); - if (!ObjectUtil.isEmpty(value)) { + if (true) { this.logItemChanged(itemId, accessor_value, value, itemDto); + } + if(!ObjectUtil.isEmpty(value)){ accessor_value.setValue(itemId, value); } } @@ -417,8 +408,6 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC private void logItemChanged(String itemId, UnifiedDataAccessor accessor_value, Object value, OpcItemDto itemDto) { Object his = accessor_value.getValue(itemId); - itemDto.setHis_item_value(his); - itemDto.setItem_value(value); List relate_items = itemDto.getRelate_items(); if (relate_items != null && !relate_items.isEmpty()) { StringBuilder sb = new StringBuilder(); @@ -430,33 +419,22 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC sb.append("key:" + relate + "value:" + obj + ";"); } log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb}); - if (!itemDto.getItem_code().endsWith("heartbeat") && !itemDto.getItem_code().endsWith("time")) { - LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), - String.valueOf(itemDto.getHis_item_value()), String.valueOf(itemDto.getItem_value())); - luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); - log.info("{}", JSON.toJSONString(luceneLogDto)); - } +// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{};信号快照:{}", new Object[]{itemId, his, value, sb}); } else { - if(his instanceof int[]){ - if(!Arrays.equals((long[]) his, (long[]) value)){ - LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), - String.valueOf(itemDto.getHis_item_value()), String.valueOf(itemDto.getItem_value())); - luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); - log.info("{}", JSON.toJSONString(luceneLogDto)); - } - } else if(his instanceof String){ - if(!StrUtil.equals((CharSequence) his, (CharSequence) value)){ - LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), - String.valueOf(itemDto.getHis_item_value()), String.valueOf(itemDto.getItem_value())); - luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); - log.info("{}", JSON.toJSONString(luceneLogDto)); - } - } else { - LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), - String.valueOf(itemDto.getHis_item_value()), String.valueOf(itemDto.getItem_value())); - luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); - log.info("{}", JSON.toJSONString(luceneLogDto)); - } +// if(his instanceof int[]){ +// if(!Arrays.equals((long[]) his, (long[]) value)){ +// log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); +// } +// } else if(his instanceof String){ +// if(!StrUtil.equals((CharSequence) his, (CharSequence) value)){ +// log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); +// } +// } else { +// log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); +// } + + log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); +// this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{}", new Object[]{itemId, his, value}); } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskController.java index e6f3ef178..71891de90 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskController.java @@ -22,7 +22,6 @@ import java.util.Map; **/ @RestController @RequiredArgsConstructor - @RequestMapping("/api/task") public class TaskController { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskFeedbackController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskFeedbackController.java index 785d0afda..04fb44d44 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskFeedbackController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/rest/TaskFeedbackController.java @@ -19,7 +19,6 @@ import java.util.Map; **/ @RestController @RequiredArgsConstructor - @RequestMapping("/api/taskFeedback") public class TaskFeedbackController { @@ -27,14 +26,12 @@ public class TaskFeedbackController { @GetMapping @Log("查询任务反馈") - //@PreAuthorize("@el.check('taskFeedback:list')") public ResponseEntity query(@RequestParam Map whereJson, Pageable page) { return new ResponseEntity<>(taskFeedbackService.queryAll(whereJson, page), HttpStatus.OK); } @Log("导出任务反馈") - @GetMapping(value = "/download") //@PreAuthorize("@el.check('taskFeedback:list')") public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { @@ -42,7 +39,6 @@ public class TaskFeedbackController { } @Log("重置任务反馈") - @PostMapping(value = "/retry/{id}") public ResponseEntity retry(@RequestBody String id) { taskFeedbackService.retry(id); @@ -50,7 +46,6 @@ public class TaskFeedbackController { } @Log("作废任务反馈") - @PostMapping(value = "/invalid/{id}") public ResponseEntity invalid(@RequestBody String id) { taskFeedbackService.invalid(id); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/quartz/SysQuartzJobController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/quartz/SysQuartzJobController.java index 8b0c81bea..449cb967d 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/quartz/SysQuartzJobController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/quartz/SysQuartzJobController.java @@ -38,14 +38,14 @@ public class SysQuartzJobController { @Autowired private ISysQuartzJobService quartzJobService; - + @GetMapping @SaCheckPermission("timing:list") public ResponseEntity query(JobQuery criteria, PageQuery pageable) { return new ResponseEntity<>(TableDataInfo.build(quartzJobService.queryAll(criteria, pageable)), HttpStatus.OK); } - + @GetMapping(value = "/logs") @SaCheckPermission("timing:list") public ResponseEntity queryJobLog(JobQuery criteria, PageQuery pageable) { @@ -53,7 +53,6 @@ public class SysQuartzJobController { } @Log("新增定时任务") - @PostMapping @SaCheckPermission("timing:add") public ResponseEntity create(@Validated @RequestBody SysQuartzJob resources) { @@ -65,7 +64,6 @@ public class SysQuartzJobController { } @Log("修改定时任务") - @PutMapping @SaCheckPermission("timing:edit") public ResponseEntity update(@Validated @RequestBody SysQuartzJob resources) { @@ -74,7 +72,6 @@ public class SysQuartzJobController { } @Log("更改定时任务状态") - @PutMapping(value = "/{id}") @SaCheckPermission("timing:edit") public ResponseEntity update(@PathVariable String id) { @@ -83,7 +80,6 @@ public class SysQuartzJobController { } @Log("执行定时任务") - @PutMapping(value = "/exec/{id}") @SaCheckPermission("timing:edit") public ResponseEntity execution(@PathVariable String id) { @@ -92,7 +88,6 @@ public class SysQuartzJobController { } @Log("删除定时任务") - @DeleteMapping @SaCheckPermission("timing:del") public ResponseEntity delete(@RequestBody Set ids) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties new file mode 100644 index 000000000..c6d273580 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties @@ -0,0 +1,29 @@ +universal_off-line=\u8131\u673A +universal_stand-alone=\u5355\u673A +universal_standby=\u5F85\u673A +universal_operation=\u8FD0\u884C\u4E2D +universal_no=\u65E0\u8D27 +universal_yes=\u6709\u8D27 +universal_two_yes=\u6709\u6258\u76D8\u6709\u8D27 +universal_delivery=\u53D6\u8D27\u4E2D +universal_completed=\u53D6\u8D27\u5B8C\u6210 +universal_releasing=\u653E\u8D27\u4E2D +universal_releasing_completed=\u653E\u8D27\u5B8C\u6210 +universal_remark1=\u672A\u67E5\u627E\u4EFB\u52A1\u539F\u56E0\u4E3A\uFF1A +universal_remark2=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u662F\u5F85\u673A\u72B6\u6001 +universal_remark3=\u5149\u7535\u4FE1\u53F7(move)\u4E3A\u6709\u8D27\u72B6\u6001 +universal_remark4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u5E94\u8BE5\u4E3A0 +universal_remark5=\u53F3\u51FB\u8BE5\u56FE\u6807,\u5C06\u8BF7\u6C42\u4EFB\u52A1\u590D\u4F4D\u6807\u8BB0(requireSucess)\u6539\u4E3A\u5426\u3002 +universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\u4EFB\u52A1\uFF0C\u6307\u4EE4\u65E0\u6CD5\u521B\u5EFA +universal_message1=\u653E\u8D27\u5B8C\u6210 +universal_message2=\u653E\u8D27\u5931\u8D25 +universal_message3=\u6709\u62A5\u8B66 +universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 +universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 +universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 +universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0 +universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B + + + + diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties new file mode 100644 index 000000000..9d34a9d14 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties @@ -0,0 +1,25 @@ +universal_off-line=off-line +universal_stand-alone=stand-alone +universal_standby=standby +universal_operation=operation +universal_no=Out of stock +universal_yes=In stock +universal_two_yes=There are pallets and goods +universal_delivery=Taking delivery +universal_completed=Pick-up completed +universal_releasing=Releasing goods +universal_releasing_completed=Release completed +universal_remark1=The task is not found because +universal_remark2=Working mode (mode) is not standby +universal_remark3=Photoelectric signal (move) is in stock status +universal_remark4=The current report task ID should be 0 +universal_remark5=Right-click the icon and change the Request task reset flag (requireSucess) to No +universal_notCreateInstMessage=Instructions cannot be created because the task for the associated device is not found +universal_message1=Release completed +universal_message2=Delivery failure +universal_message3=Have an alarm +universal_feedMessage1=mode is not in the running state +universal_feedMessage2=action signal (action signal) is not a release completed status +universal_feedMessage3=Photoelectric signal (move) is not out of stock +universal_feedMessage4=The current report task number (task) should not be 0 +universal_feedMessage5=Gantry manipulator diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties new file mode 100644 index 000000000..73b7941ac --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties @@ -0,0 +1,25 @@ +universal_off-line=Akses internet +universal_stand-alone=(s) single-player +universal_standby=siaga +universal_operation=operasi +universal_no=bayar +universal_yes=Yang aku mau +universal_two_yes=Ada nampan dengan barang +universal_delivery=Mengambil barang +universal_completed=Pengambilan barang selesai +universal_releasing=Letakkan barang +universal_releasing_completed=Pengiriman selesai +universal_remark1=Alasan tugas yang tidak dicari adalah +universal_remark2=Mode tidak dalam mode siaga +universal_remark3=Sinyal fotolistrik untuk kondisi pengiriman +universal_remark4=Kita tugaskan tugaskan task +universal_remark5=Klik kanan pada ikon dan ubah not (requicess) untuk penugasan ulang +universal_notCreateInstMessage=Misi untuk divais yang diasosiasikan tidak ditemukan, perintah tidak dapat dibuat +universal_message1=Pengiriman selesai +universal_message2=Gagal memasukkan barang +universal_message3=Alarm berbunyi +universal_feedMessage1=Mode kerja tidak untuk mode dalam mode +universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan +universal_feedMessage3=tidak ada status pengiriman +universal_feedMessage4=Tugaskan tugaskan tugaskan bukan hanya 0 +universal_feedMessage5=Pengemudi-mekanik line diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties new file mode 100644 index 000000000..28932b552 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties @@ -0,0 +1,25 @@ +universal_off-line=\u8131\u673A +universal_stand-alone=\u5355\u673A +universal_standby=\u5F85\u673A +universal_operation=\u8FD0\u884C\u4E2D +universal_no=\u65E0\u8D27 +universal_yes=\u6709\u8D27 +universal_two_yes=\u6709\u6258\u76D8\u6709\u8D27 +universal_delivery=\u53D6\u8D27\u4E2D +universal_completed=\u53D6\u8D27\u5B8C\u6210 +universal_releasing=\u653E\u8D27\u4E2D +universal_releasing_completed=\u653E\u8D27\u5B8C\u6210 +universal_remark1=\u672A\u67E5\u627E\u4EFB\u52A1\u539F\u56E0\u4E3A\uFF1A +universal_remark2=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u662F\u5F85\u673A\u72B6\u6001 +universal_remark3=\u5149\u7535\u4FE1\u53F7(move)\u4E3A\u6709\u8D27\u72B6\u6001 +universal_remark4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u5E94\u8BE5\u4E3A0 +universal_remark5=\u53F3\u51FB\u8BE5\u56FE\u6807,\u5C06\u8BF7\u6C42\u4EFB\u52A1\u590D\u4F4D\u6807\u8BB0(requireSucess)\u6539\u4E3A\u5426\u3002 +universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\u4EFB\u52A1\uFF0C\u6307\u4EE4\u65E0\u6CD5\u521B\u5EFA +universal_message1=\u653E\u8D27\u5B8C\u6210 +universal_message2=\u653E\u8D27\u5931\u8D25 +universal_message3=\u6709\u62A5\u8B66 +universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 +universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 +universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 +universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0 +universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B