diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/double_station_stacker/DoubleStationStackerDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/double_station_stacker/DoubleStationStackerDeviceDriver.java index 80e3756..8673652 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/double_station_stacker/DoubleStationStackerDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/double_station_stacker/DoubleStationStackerDeviceDriver.java @@ -91,8 +91,8 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im Integer lastFrontTask = 0; //行走激光数值 - Integer distancex = 0; - Integer lastDistancex = 0; + Integer distanceX = 0; + Integer lastDistanceX = 0; //特殊开关量1 Float special1 = 0F; @@ -173,8 +173,8 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im private int instructionUpdateTimeOut = 3000; private Date instructionRequireTime = new Date(); private Date instructionUpdateTime = new Date(); - List getdevice_codeList = null; - List putdevice_codeList = null; + List getDeviceCodeList = null; + List putDeviceCodeList = null; //请求成功标记 Boolean requireSucess = false; @@ -219,14 +219,14 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im LinkedList inst = new LinkedList<>(); getIns(inst); if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isNotEmpty(inst.get(0))) { - String startdevice_code = inst.get(0).getStart_device_code(); - Device startDevice = deviceAppService.findDeviceByCode(startdevice_code); - writeStorageOrConveyor(inst,startdevice_code,startDevice,map); + String startDeviceCode = inst.get(0).getStart_device_code(); + Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode); + writeStorageOrConveyor(inst,startDeviceCode,startDevice,map); } if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isEmpty(inst.get(0))) { - String startdevice_code = inst.get(1).getStart_device_code(); - Device startDevice = deviceAppService.findDeviceByCode(startdevice_code); - writeStorageOrConveyor(inst,startdevice_code,startDevice,map); + String startDeviceCode = inst.get(1).getStart_device_code(); + Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode); + writeStorageOrConveyor(inst,startDeviceCode,startDevice,map); } map.put("to_command", CommandEnum.PICKUP_COMPLETE.getStatus()); requireSucess = true; @@ -239,16 +239,16 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im LinkedList inst = new LinkedList<>(); getIns(inst); if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isNotEmpty(inst.get(0))) { - String nextdevice_code = inst.get(0).getNext_device_code(); - Device nextDevice = deviceAppService.findDeviceByCode(nextdevice_code); + String nextDeviceCode = inst.get(0).getNext_device_code(); + Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode); //指令为执行 if (unloadCheck(nextDevice)) return; map.put("to_command", 3); requireSucess = true; } if (CollectionUtil.isNotEmpty(inst)&&ObjectUtil.isEmpty(inst.get(0))) { - String nextdevice_code = inst.get(1).getNext_device_code(); - Device nextDevice = deviceAppService.findDeviceByCode(nextdevice_code); + String nextDeviceCode = inst.get(1).getNext_device_code(); + Device nextDevice = deviceAppService.findDeviceByCode(nextDeviceCode); if (unloadCheck(nextDevice)) return; map.put("to_command", 3); requireSucess = true; @@ -308,7 +308,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im lastFrontY = frontY; lastBackY = backY; lastAction = action; - lastDistancex = distancex; + lastDistanceX = distanceX; lastFrontForkCargo = frontForkCargo; lastBackForkCargo = backForkCargo; lastFrontForkLocation = frontForkLocation; @@ -446,17 +446,17 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im return true; } for (Instruction instruction : instructions) { - List routeLineDtos = routeLineService.selectDeviceCodeList(instruction.getStart_device_code()); - if (CollUtil.isEmpty(routeLineDtos) || routeLineDtos.size() < 1) { + List routeLines = routeLineService.selectDeviceCodeList(instruction.getStart_device_code()); + if (CollUtil.isEmpty(routeLines) || routeLines.size() < 1) { message = "没有输送线到堆垛机的路由"; logServer.deviceExecuteLog(this.device_code, "", "", "没有" + instruction.getStart_device_code() + "->" + this.device_code + "的路由"); continue; } - for (RouteLineDto routeLineDto : routeLineDtos) { + for (RouteLineDto routeLineDto : routeLines) { if (this.getDeviceCode().equals(routeLineDto.getNext_device_code())) { List routeLineDtoList = routeLineService.selectDeviceCodeList(this.getDeviceCode()); - if (CollUtil.isEmpty(routeLineDtos) || routeLineDtos.size() < 1) { + if (CollUtil.isEmpty(routeLines) || routeLines.size() < 1) { message = "没有输送线到堆垛机的路由"; logServer.deviceExecuteLog(this.device_code, "", "", "没有" + instruction.getStart_device_code() + "->" + this.device_code + "的路由"); @@ -475,8 +475,8 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im private boolean wirteData(LinkedList inst) { if (StrUtil.equals(inst.get(0).getInstruction_status(), InstructionStatusEnum.READY.getIndex())) { - String startdevice_code = inst.get(0).getStart_device_code(); - Device startDevice = deviceAppService.findDeviceByCode(startdevice_code); + String startDeviceCode = inst.get(0).getStart_device_code(); + Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode); BeltConveyorDeviceDriver beltConveyorDeviceDriver; if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver(); @@ -504,7 +504,7 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im map.put("to_front_task", inst.get(0).getInstruction_code()); map.put("to_back_task", inst.get(1).getInstruction_code()); } - writeStorageOrConveyor(inst, startdevice_code, startDevice, map); + writeStorageOrConveyor(inst, startDeviceCode, startDevice, map); this.writing(map); } @@ -818,9 +818,9 @@ public class DoubleStationStackerDeviceDriver extends AbstractOpcDeviceDriver im logServer.deviceItemValue(this.device_code, "mode", String.valueOf(action)); logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + lastAction + "->" + action); } - if (!distancex.equals(lastDistancex)) { - logServer.deviceItemValue(this.device_code, "mode", String.valueOf(distancex)); - logServer.deviceExecuteLog(this.device_code, "", "", "信号distancex:" + lastDistancex + "->" + distancex); + if (!distanceX.equals(lastDistanceX)) { + logServer.deviceItemValue(this.device_code, "mode", String.valueOf(distanceX)); + logServer.deviceExecuteLog(this.device_code, "", "", "信号distancex:" + lastDistanceX + "->" + distanceX); } if (!frontForkCargo.equals(lastFrontForkCargo)) {