From b2180dfc5d9f6fe5556c97809f82149daa311c6f Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Tue, 28 Jun 2022 16:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/acs/device/service/impl/DeviceServiceImpl.java | 2 ++ .../service/impl/InstructionServiceImpl.java | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java index 4e9c542b..0ce84a6f 100644 --- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java +++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java @@ -941,6 +941,8 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial if (hailiangEngravingCacheDeviceDriver.getMove() != Integer.parseInt(hasGoodStatus)){ hailiangEngravingCacheDeviceDriver.writing("to_cache_write",hasGoodStatus); } + hailiangEngravingCacheDeviceDriver.setHasGoods(Integer.parseInt(hasGoodStatus)); + device.setHas_goods(Integer.parseInt(hasGoodStatus)); device.setMaterial_type(material_type); hailiangEngravingCacheDeviceDriver.setMaterial(material_type); JSONObject updatejson = (JSONObject) JSONObject.toJSON(obj); diff --git a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index a96a2486..a2dc616b 100644 --- a/wcs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/wcs/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -17,6 +17,7 @@ import org.nl.acs.config.AcsConfig; import org.nl.acs.config.server.AcsConfigService; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.impl.DeviceServiceImpl; +import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_machine.HailiangEngravingMachineDeviceDriver; import org.nl.acs.device_driver.basedriver.lamp_three_color.LampThreecolorDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_conveyor_control.StandardCoveyorControlDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_plcscanner.StandardCoveyorControlWithPlcScannerDeviceDriver; @@ -742,10 +743,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu JSONObject jo1 = new JSONObject(); jo1.put("device_code", instnextdevice); - if (StrUtil.equals(entity.getMaterial(), "1")) { - jo1.put("hasGoodStatus", "1"); - } else { + + String start_point_code = entity.getStart_point_code(); + Device deviceByCode = deviceAppService.findDeviceByCode(start_point_code); + if(deviceByCode.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver){ jo1.put("hasGoodStatus", "2"); + } else { + jo1.put("hasGoodStatus", "1"); } jo1.put("material_type", startdevice.getMaterial_type()); jo1.put("quantity", startdevice.getQuantity());