From 47f0f258d047f5a4477f8996a00b2a08cf9379a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Thu, 8 Dec 2022 14:59:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DeviceServiceImpl.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java index 4f934ee..40a34a3 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java @@ -1162,6 +1162,27 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial standardInspectSiteDeviceDriver.setBatch(batch); device.setMaterial_type(material_type); device.setBatch(batch); + device.setModel(model); + device.setProcess(process); + device.setWeight(weight); + device.setQc_status(qc_status); + device.setDate(date); + device.setOperation_by(operation_by); + WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint"); + JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0); + if (!ObjectUtil.isEmpty(json)) { + DeviceRunpointDto obj = (DeviceRunpointDto) JSONObject.toBean(json, DeviceRunpointDto.class); + obj.setMaterial_type(material_type); + obj.setBatch(batch); + obj.setModel(model); + obj.setProcess(process); + obj.setWeight(weight); + obj.setQc_status(qc_status); + obj.setDate(date); + obj.setOperation_by(operation_by); + JSONObject updatejson = JSONObject.fromObject(obj); + runpointwo.update(updatejson, "device_code = '" + device_code + "'"); + } } else if (device.getDeviceDriver() instanceof YkbkSpecialDeviceDriver) { ykbkSpecialDeviceDriver = (YkbkSpecialDeviceDriver) device.getDeviceDriver(); ykbkSpecialDeviceDriver.setMaterial(material_type); From 27c4b5876de3a89e638af7894136d993bd1a3fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Fri, 9 Dec 2022 14:13:21 +0800 Subject: [PATCH 2/2] bug --- .../service/impl/InstructionServiceImpl.java | 30 +++++++++---------- .../resources/config/application-prod.yml | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index f78c270..1e1455d 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -772,6 +772,21 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu // } // 如果是无光电的设备 指令完成变更起点、终点状态 + Device start_device = appService.findDeviceByCode(dto.getStart_point_code()); + JSONObject jo1 = new JSONObject(); + jo1.put("device_code", dto.getNext_point_code()); + jo1.put("hasGoodStatus", "1"); + jo1.put("material_type", start_device.getMaterial_type()); + jo1.put("batch", start_device.getBatch()); + jo1.put("vehicle_code", dto.getVehicle_code()); + jo1.put("model", start_device.getModel()); + jo1.put("process", start_device.getProcess()); + jo1.put("weight", start_device.getWeight()); + jo1.put("qc_status", start_device.getQc_status()); + jo1.put("date", start_device.getDate()); + jo1.put("operation_by", start_device.getOperation_by()); + deviceService.changeDeviceStatus(jo1); + JSONObject jo = new JSONObject(); jo.put("device_code", dto.getStart_point_code()); jo.put("hasGoodStatus", "0"); @@ -785,21 +800,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu jo.put("operation_by", ""); deviceService.changeDeviceStatus(jo); - JSONObject jo1 = new JSONObject(); - jo1.put("device_code", dto.getNext_point_code()); - jo1.put("hasGoodStatus", "1"); - jo1.put("material_type", dto.getMaterial()); - jo1.put("batch", dto.getBatch()); - jo1.put("vehicle_code", dto.getVehicle_code()); - Device start_device = appService.findDeviceByCode(dto.getStart_point_code()); - jo1.put("model", start_device.getModel()); - jo1.put("process", start_device.getProcess()); - jo1.put("weight", start_device.getWeight()); - jo1.put("qc_status", start_device.getQc_status()); - jo1.put("date", start_device.getDate()); - jo1.put("operation_by", start_device.getOperation_by()); - - deviceService.changeDeviceStatus(jo1); LampThreecolorDeviceDriver lampThreecolorDeviceDriver; diff --git a/hd/nladmin-system/src/main/resources/config/application-prod.yml b/hd/nladmin-system/src/main/resources/config/application-prod.yml index a3bf6e3..3e77ec5 100644 --- a/hd/nladmin-system/src/main/resources/config/application-prod.yml +++ b/hd/nladmin-system/src/main/resources/config/application-prod.yml @@ -8,7 +8,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:njyf_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:ssj1_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数