diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index 0f372949e..d3ede9f04 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -71,7 +71,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i @Autowired DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); @Autowired - private LimitRegionalService limitRegionalService=SpringContextHolder.getBean(LimitRegionalService.class); + private LimitRegionalService limitRegionalService = SpringContextHolder.getBean(LimitRegionalService.class); @Autowired LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class); @@ -177,51 +177,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i y_position = this.itemProtocol.getY_position(); iserror = this.itemProtocol.device_status; - if (to_onset != last_to_onset) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_onset:" + last_to_onset + "->" + to_onset); - } - if (to_command != last_to_command) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command); - } - if (to_target != last_to_target) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_target:" + last_to_target + "->" + to_target); - } - if (to_task != last_to_task) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task); - } - if (mode != last_mode) { + if(mode != last_mode){ requireSucess = false; - logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); - } - if (move != last_move) { - logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move); - } - if (action != last_action) { - logServer.deviceItemValue(this.device_code, "action", String.valueOf(action)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action); - } - if (error != last_error) { - logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error); - } - if (walk_y != last_walk_y) { - logServer.deviceItemValue(this.device_code, "walk_y", String.valueOf(walk_y)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号walk_y:" + last_walk_y + "->" + walk_y); - } - if (task != last_task) { - logServer.deviceItemValue(this.device_code, "task", String.valueOf(task)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task); - } - if (x_position != last_x_position) { - logServer.deviceItemValue(this.device_code, "x_position", String.valueOf(x_position)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号x_position:" + last_x_position + "->" + x_position); - } - if (y_position != last_y_position) { - logServer.deviceItemValue(this.device_code, "y_position", String.valueOf(y_position)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号y_position:" + last_y_position + "->" + y_position); } + + update_instruction_status(); } catch (Exception var17) { @@ -356,32 +316,32 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver; - if(startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver(); - if(ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1){ + if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) { notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() + - "无货,无法下发指令或"+standardInspectSiteDeviceDriver.getDevicecode()+ "有货,无法下发指令!" +"!指令号:" + instruction.getInstruction_code(); + "无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!指令号:" + instruction.getInstruction_code(); return false; } //判断经过的烘箱是否关门 boolean hongxiangCloseDoor = this.hongxiangCloseDoor(start_device_code, next_device_code); - if(!hongxiangCloseDoor){ + if (!hongxiangCloseDoor) { notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code(); return false; } } - if(nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + if (nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) nextdevice.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver(); - if(ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1){ + if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) { notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() + - "无货,无法下发指令或"+standardInspectSiteDeviceDriver.getDevicecode()+ "有货,无法下发指令!" +"!指令号:" + instruction.getInstruction_code(); + "无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!指令号:" + instruction.getInstruction_code(); return false; } //判断经过的烘箱是否关门 - boolean hongxiangCloseDoor = this.hongxiangCloseDoor( next_device_code, start_device_code); - if(!hongxiangCloseDoor){ + boolean hongxiangCloseDoor = this.hongxiangCloseDoor(next_device_code, start_device_code); + if (!hongxiangCloseDoor) { notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code(); return false; } @@ -435,9 +395,14 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); - logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" + String msg = "当前设备:" + device_code + ",下发指令:" + instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code() - + ",指令终点:" + instruction.getNext_device_code()); + + ",指令终点:" + instruction.getNext_device_code(); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content(msg) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); List list = new ArrayList<>(); Map map = new HashMap(); map.put("to_onset", start_addr); @@ -482,32 +447,32 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver; - if(startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver(); - if(ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1){ + if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) { notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() + - "无货,无法下发指令或"+standardInspectSiteDeviceDriver.getDevicecode()+ "有货,无法下发指令!" +"!任务号:" + task.getTask_code(); + "无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!任务号:" + task.getTask_code(); return false; } //判断经过的烘箱是否关门 boolean hongxiangCloseDoor = this.hongxiangCloseDoor(task.getStart_device_code(), task.getNext_device_code()); - if(!hongxiangCloseDoor){ + if (!hongxiangCloseDoor) { notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + task.getStart_device_code() + ",放货位:" + task.getNext_device_code() + ",存在关联的同一列烘箱设备未关门!任务号:" + task.getTask_code(); return false; } } - if(nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + if (nextdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) nextdevice.getDeviceDriver(); standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver(); - if(ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1){ + if (ovenInspectSiteDeviceDriver.getMove() != 1 || standardInspectSiteDeviceDriver.getMove() == 1) { notCreateInstMessage = "手动创建指令未下发电气信号原因->烘箱检测站点-普通检测站点:" + ovenInspectSiteDeviceDriver.getDevicecode() + - "无货,无法下发指令或"+standardInspectSiteDeviceDriver.getDevicecode()+ "有货,无法下发指令!" +"!任务号:" + task.getTask_code(); + "无货,无法下发指令或" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!" + "!任务号:" + task.getTask_code(); return false; } //判断经过的烘箱是否关门 boolean hongxiangCloseDoor = this.hongxiangCloseDoor(task.getStart_device_code(), task.getNext_device_code()); - if(!hongxiangCloseDoor){ + if (!hongxiangCloseDoor) { notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + task.getStart_device_code() + ",放货位:" + task.getNext_device_code() + ",存在关联的同一列烘箱设备未关门!任务号:" + task.getTask_code(); return false; } @@ -616,6 +581,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); + if(ObjectUtil.isEmpty(start_addr) || ObjectUtil.isEmpty(next_addr)){ + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "或设备:" + nextDevice.getDevice_code() + "地址值!"); + } String msg = "当前设备:" + device_code + ",下发指令:" + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() + ",指令终点:" + instdto.getNext_device_code(); @@ -627,16 +595,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i List list = new ArrayList<>(); Map map = new HashMap(); map.put("code", "to_onset"); - map.put("value",StrUtil.isNotBlank(start_addr)? start_addr : "0"); + map.put("value", StrUtil.isNotBlank(start_addr) ? start_addr : "0"); Map map1 = new HashMap(); map1.put("code", "to_target"); - map1.put("value",StrUtil.isNotBlank(next_addr)? next_addr : "0"); + map1.put("value", StrUtil.isNotBlank(next_addr) ? next_addr : "0"); Map map2 = new HashMap(); map2.put("code", "to_task"); - map2.put("value",instdto.getInstruction_code()); + map2.put("value", instdto.getInstruction_code()); Map map3 = new HashMap(); map3.put("code", "to_command"); - map3.put("value","1"); + map3.put("value", "1"); list.add(map); list.add(map1); list.add(map2); @@ -667,7 +635,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i /** * 判断经过的烘箱是否关门 */ - private boolean hongxiangCloseDoor(String start_device_code,String next_device_code) { + private boolean hongxiangCloseDoor(String start_device_code, String next_device_code) { boolean flag = true; List ovenDeviceCodeList = null; Device startDevice = deviceAppService.findDeviceByCode(start_device_code); @@ -682,14 +650,14 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i ovenDeviceCodeList = ovenInspectSiteDeviceDriver.getExtraDeviceCodes("link_device_code"); } HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; - if(CollUtil.isNotEmpty(ovenDeviceCodeList)){ + if (CollUtil.isNotEmpty(ovenDeviceCodeList)) { for (String s : ovenDeviceCodeList) { Device device = deviceAppService.findDeviceByCode(s); if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver(); //判断关联设备是否开门 if (hongXiangConveyorDeviceDriver.getDoor() == 1) { - notCreateInstMessage = "关联设备->" + device + "烘箱门未关闭!"; + notCreateInstMessage = "关联设备->" + device + "烘箱门未关闭!"; flag = false; break; } @@ -701,6 +669,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i /** * 判断取货位或放货位为烘箱设备时关联的同一列烘箱设备是否有开门 + * * @param start_device_code * @param next_device_code * @return @@ -1087,7 +1056,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else if (this.getAction() == 4) { action = "放货完成"; } - if(error == 0 && iserror){ + if (error == 0 && iserror) { this.setMessage(LangProcess.msg("universal_message4")); } jo.put("device_name", this.getDevice().getDevice_name()); @@ -1195,4 +1164,51 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i return null; } + + + /*if (to_onset != last_to_onset) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_onset:" + last_to_onset + "->" + to_onset); + } + if (to_command != last_to_command) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command); + } + if (to_target != last_to_target) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_target:" + last_to_target + "->" + to_target); + } + if (to_task != last_to_task) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task); + } + if (mode != last_mode) { + requireSucess = false; + logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); + } + if (move != last_move) { + logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move); + } + if (action != last_action) { + logServer.deviceItemValue(this.device_code, "action", String.valueOf(action)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action); + } + if (error != last_error) { + logServer.deviceItemValue(this.device_code, "error", String.valueOf(error)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error); + } + if (walk_y != last_walk_y) { + logServer.deviceItemValue(this.device_code, "walk_y", String.valueOf(walk_y)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号walk_y:" + last_walk_y + "->" + walk_y); + } + if (task != last_task) { + logServer.deviceItemValue(this.device_code, "task", String.valueOf(task)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task); + } + if (x_position != last_x_position) { + logServer.deviceItemValue(this.device_code, "x_position", String.valueOf(x_position)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号x_position:" + last_x_position + "->" + x_position); + } + if (y_position != last_y_position) { + logServer.deviceItemValue(this.device_code, "y_position", String.valueOf(y_position)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号y_position:" + last_y_position + "->" + y_position); + }*/ } 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 4ff008f2d..b79e13b8a 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 @@ -540,6 +540,9 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl } if(this.itemProtocol.getIsError() && error == 0){ this.setMessage(LangProcess.msg("universal_message4")); + iserror = true; + }else if(error == 0) { + iserror = false; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); 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 ba6e847f8..e514d3575 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 @@ -159,6 +159,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl task = this.itemProtocol.getTask(); x_position = this.itemProtocol.getX_position(); y_position = this.itemProtocol.getY_position(); + heartbeat = this.itemProtocol.getHeartbeat(); if (mode != last_mode) { requireSucess = false; logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/history/rest/DeviceErrorLogController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/history/rest/DeviceErrorLogController.java index 8bbae3c41..5299f9aba 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/history/rest/DeviceErrorLogController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/history/rest/DeviceErrorLogController.java @@ -40,7 +40,6 @@ public class DeviceErrorLogController { */ @GetMapping @Log("查询设备报警记录") - public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ return new ResponseEntity<>(acsDeviceErrorLogService.queryAll(whereJson,page),HttpStatus.OK); } @@ -52,7 +51,6 @@ public class DeviceErrorLogController { */ @PostMapping @Log("新增设备报警记录") - public ResponseEntity create(@Validated @RequestBody DeviceErrorLogDto dto){ acsDeviceErrorLogService.create(dto); return new ResponseEntity<>(HttpStatus.CREATED); @@ -65,7 +63,6 @@ public class DeviceErrorLogController { */ @PutMapping @Log("修改设备报警记录") - public ResponseEntity update(@Validated @RequestBody DeviceErrorLogDto dto){ acsDeviceErrorLogService.update(dto); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -77,7 +74,6 @@ public class DeviceErrorLogController { * @return */ @Log("删除设备报警记录") - @DeleteMapping public ResponseEntity delete(@RequestBody String[] ids) { acsDeviceErrorLogService.deleteAll(ids); @@ -91,7 +87,6 @@ public class DeviceErrorLogController { * @throws IOException */ @Log("导出设备报警记录") - @GetMapping(value = "/download") public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException { acsDeviceErrorLogService.download(acsDeviceErrorLogService.queryAll(whereJson), response); 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 eabfca7d5..defa95fa2 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 @@ -526,7 +526,9 @@ public class InstructionServiceImpl extends CommonServiceImpl dataList; + public List dataList; @Override @@ -82,7 +85,7 @@ public class LimitRegionalServiceImpl extends CommonServiceImpl CollUtil.contains(Arrays.asList(ids), limitRegional.getId())); } @Override public void update(JSONObject json) { + if(StrUtil.isEmpty(json.getString("id"))){ + throw new BadRequestException(LangProcess.msg("error_checkNull", "流量限制id")); + } + LimitRegional id = limitRegionalMapper.selectById(json.getString("id")); + if(ObjectUtil.isNull(id)){ + throw new BadRequestException(LangProcess.msg("error_isNull", "流量限制id="+json.getString("id"))); + } LimitRegional limitRegional = new LimitRegional(); String currentUsername = SecurityUtils.getCurrentUsername(); limitRegional.setId(json.getString("id")); @@ -124,19 +141,30 @@ public class LimitRegionalServiceImpl extends CommonServiceImpl { + if (limitRegional.getId().equals(limitRegional1.getId())) { + limitRegional1.setStart_regional(limitRegional.getStart_regional()); + limitRegional1.setNext_regional(limitRegional.getNext_regional()); + limitRegional1.setStart_exclude_device(limitRegional.getStart_exclude_device()); + limitRegional1.setNext_exclude_device(limitRegional.getNext_exclude_device()); + limitRegional1.setMax_num(limitRegional.getMax_num()); + limitRegional1.setUpdate_by(limitRegional.getUpdate_by()); + limitRegional1.setUpdate_time(limitRegional.getUpdate_time()); + } + }); } @Override public void updateStatusById(Map whereJson) { String id = whereJson.get("id").toString(); if(StrUtil.isEmpty(id)){ - return; + throw new BadRequestException("id为空"); } LimitRegional limitRegional = new LimitRegional(); limitRegional.setId(id); @@ -144,6 +172,12 @@ public class LimitRegionalServiceImpl extends CommonServiceImpl {if (limitRegional.getId().equals(limitRegional1.getId())) { + limitRegional1.setIs_active(limitRegional.getIs_active()); + limitRegional1.setUpdate_by(limitRegional.getUpdate_by()); + limitRegional1.setUpdate_time(limitRegional.getUpdate_time()); + } + }); } @Override diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index b145d827f..014c86909 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -290,6 +290,7 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC } + private void runNew() { Async20Access accessor = null; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/logging/aspect/LogAspect.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/logging/aspect/LogAspect.java index 228e6c057..69e429497 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/logging/aspect/LogAspect.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/logging/aspect/LogAspect.java @@ -138,14 +138,14 @@ public class LogAspect { - @AfterThrowing(pointcut = "logPointcut()", throwing = "e") + /*@AfterThrowing(pointcut = "logPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { SysLog log = new SysLog("ERROR",System.currentTimeMillis() - currentTime.get()); currentTime.remove(); log.setException_detail(ThrowableUtil.getStackTrace(e).getBytes()); HttpServletRequest request = RequestHolder.getHttpServletRequest(); logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint)joinPoint, log); - } + }*/ public String getUsername() { try { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logging/SysLogController.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logging/SysLogController.java index e99c5b6f1..8109a8a91 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logging/SysLogController.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/logging/SysLogController.java @@ -30,15 +30,12 @@ public class SysLogController { @Autowired private ISysLogService logService; @GetMapping - - //@SaCheckPermission("@el.check()") public ResponseEntity query(@RequestParam Map criteria, PageQuery pageable){ criteria.put("log_type","INFO"); return new ResponseEntity<>(TableDataInfo.build(logService.queryAll(criteria,pageable)), HttpStatus.OK); } @GetMapping(value = "/user") - // public ResponseEntity queryUserLog(@RequestParam Map criteria, PageQuery pageable){ criteria.put("log_type","INFO"); criteria.put("username", SecurityUtils.getCurrentUsername()); @@ -46,7 +43,6 @@ public class SysLogController { } @GetMapping(value = "/error") - // @SaCheckPermission("@el.check()") public ResponseEntity queryErrorLog(@RequestParam Map criteria, PageQuery pageable){ criteria.put("log_type","ERROR"); @@ -54,7 +50,6 @@ public class SysLogController { } @GetMapping(value = "/error/{id}") - // @SaCheckPermission("@el.check()") public ResponseEntity queryErrorLogs(@PathVariable String id){ return new ResponseEntity<>(logService.findByErrDetail(id), HttpStatus.OK); @@ -62,7 +57,6 @@ public class SysLogController { @DeleteMapping(value = "/del/error") @Log("删除所有ERROR日志") - // @SaCheckPermission("@el.check()") public ResponseEntity delAllErrorLog(){ logService.delAllByError(); @@ -71,7 +65,6 @@ public class SysLogController { @DeleteMapping(value = "/del/info") @Log("删除所有INFO日志") - // @SaCheckPermission("@el.check()") public ResponseEntity delAllInfoLog(){ logService.delAllByInfo(); diff --git a/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue b/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue index f1f06f7a2..06257468d 100644 --- a/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue +++ b/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue @@ -135,7 +135,7 @@ export default { props: { parentForm: { type: Object, - required: true + require: true } }, cruds() { diff --git a/acs2/nladmin-ui/src/views/acs/monitor/device/index.vue b/acs2/nladmin-ui/src/views/acs/monitor/device/index.vue index c55970dee..56578cdde 100644 --- a/acs2/nladmin-ui/src/views/acs/monitor/device/index.vue +++ b/acs2/nladmin-ui/src/views/acs/monitor/device/index.vue @@ -286,7 +286,7 @@ export default { this.$refs.child1.setForm(clickObj) } else if (clickObj.data.driver_type === 'standard_stacker') { this.dialogFormVisible4 = true - }else { + } else { this.dialogFormVisible = true } } diff --git a/acs2/nladmin-ui/src/views/acs/task/index.vue b/acs2/nladmin-ui/src/views/acs/task/index.vue index 71f32ca3a..72d9fcfab 100644 --- a/acs2/nladmin-ui/src/views/acs/task/index.vue +++ b/acs2/nladmin-ui/src/views/acs/task/index.vue @@ -759,7 +759,11 @@ export default { this.dialogVisible = false }, saveBtn() { + // 禁用按钮 + this.isDisabled = true crudTask.add(this.form).then(res => { + // 请求完成后启用按钮 + this.isDisabled = false this.crud.toQuery() this.formDia = false this.isDisabled = true @@ -767,6 +771,10 @@ export default { this.extension = [{ name: '', value: '' }] + // 设置定时器,等待一定时间后再次允许请求 + setTimeout(() => { + this.isDisabled = false // 可根据具体需求进行调整 + }, 1000) // 5000 毫秒,即 5 秒钟 }, openDialog() { this.dialogVisible = true diff --git a/acs2/nladmin-ui/src/views/system/monitor/device/index.vue b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue index 5e95fff17..411bf4fe5 100644 --- a/acs2/nladmin-ui/src/views/system/monitor/device/index.vue +++ b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue @@ -186,7 +186,7 @@ - {{ $t('monitor.click.recall') }} + {{ $t('monitor.click.recall') }} {{ $t('monitor.click.scram') }} {{ $t('monitor.click.police_clearance') }} @@ -200,7 +200,7 @@ - + {{ $t('auto.common.false') }} {{ $t('auto.common.true') }} @@ -232,6 +232,7 @@ export default { name: 'MonitorDevice', data() { return { + // stageParam: 'stage_code', // 舞台参数 stageParam: 'age', // 舞台参数 dialogDeviceMsgVisible: false, // 显示设备信息的dialog device_code: null, @@ -760,6 +761,7 @@ body { ::v-deep.el-radio-button{ margin-right: 15px; border-radius:4px; +} .el-radio-button__inner { width: 90px; height: 30px; @@ -773,5 +775,5 @@ body { border-color: blue; box-shadow: -1px 0 0 0 blue; } -} +