From 3b4576ef12653ea74c8890d16c79fc55e05014be Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Sun, 26 May 2024 11:14:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=A9=BA=E6=9C=A8=E7=AE=B1=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E3=80=81=E9=80=80=E8=B4=A7=E5=85=A5=E5=BA=93=E5=B0=86?= =?UTF-8?q?=E6=9C=A8=E7=AE=B1=E5=92=8C=E6=89=98=E7=9B=98=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/impl/InBoxManageServiceImpl.java | 69 ++++++++++++------- .../util/impl/LashManageServiceImpl.java | 4 +- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java index 42763c848..14f001daf 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java @@ -163,7 +163,7 @@ public class InBoxManageServiceImpl implements InBoxManageService { // 载具表 WQLObject vehicleTab = WQLObject.getWQLObject("md_pb_storagevehicleinfo"); // 载具扩展属性表 - // WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext"); + WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext"); /* * 查询mes木箱信息,插入木箱信息表 */ @@ -206,17 +206,27 @@ public class InBoxManageServiceImpl implements InBoxManageService { } JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'") .uniqueResult(0); - // if (ObjectUtil.isEmpty(jsonVehicle)) { - // throw new BadRequestException("载具不存在!"); - // } -// JSONObject jsonVeExt = new JSONObject(); -// jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId()); -// jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id")); -// jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code")); -// jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type")); -// jsonVeExt.put("pcsn", whereJson.getString("box_no")); -// jsonVeExt.put("device_uuid", IdUtil.getLongId()); -// veExtTab.insert(jsonVeExt); + if (ObjectUtil.isEmpty(jsonVehicle)) { + throw new BadRequestException("载具不存在!"); + } + JSONObject ext_jo = veExtTab.query("storagevehicle_code = '"+jsonVehicle.getString("storagevehicle_code")+"'").uniqueResult(0); + if (ObjectUtil.isEmpty(ext_jo)) { + JSONObject jsonVeExt = new JSONObject(); + jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId()); + jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id")); + jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code")); + jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type")); + jsonVeExt.put("pcsn", whereJson.getString("box_no")); + jsonVeExt.put("device_uuid", IdUtil.getLongId()); + jsonVeExt.put("update_time", DateUtil.now()); + veExtTab.insert(jsonVeExt); + }else { + ext_jo.put("pcsn", whereJson.getString("box_no")); + ext_jo.put("device_uuid", IdUtil.getLongId()); + ext_jo.put("update_time", DateUtil.now()); + veExtTab.update(ext_jo); + } + // 下发桁架任务 //查询当前入库拆叠盘位的托盘类型是否一致如果一致 @@ -297,7 +307,7 @@ public class InBoxManageServiceImpl implements InBoxManageService { // 载具表 WQLObject vehicleTab = WQLObject.getWQLObject("md_pb_storagevehicleinfo"); // 载具扩展属性表 - // WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext"); + WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext"); /* * 查询mes木箱信息,插入木箱信息表 */ @@ -320,19 +330,30 @@ public class InBoxManageServiceImpl implements InBoxManageService { if (boxDao == null) { throw new BadRequestException("木箱不存在!"); } + JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'") .uniqueResult(0); - // if (ObjectUtil.isEmpty(jsonVehicle)) { - // throw new BadRequestException("载具不存在!"); - // } -// JSONObject jsonVeExt = new JSONObject(); -// jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId()); -// jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id")); -// jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code")); -// jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type")); -// jsonVeExt.put("pcsn", whereJson.getString("box_no")); -// jsonVeExt.put("device_uuid", IdUtil.getLongId()); -// veExtTab.insert(jsonVeExt); + if (ObjectUtil.isEmpty(jsonVehicle)) { + throw new BadRequestException("载具不存在!"); + } + JSONObject ext_jo = veExtTab.query("storagevehicle_code = '"+jsonVehicle.getString("storagevehicle_code")+"'").uniqueResult(0); + if (ObjectUtil.isEmpty(ext_jo)) { + JSONObject jsonVeExt = new JSONObject(); + jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId()); + jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id")); + jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code")); + jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type")); + jsonVeExt.put("pcsn", whereJson.getString("box_no")); + jsonVeExt.put("device_uuid", IdUtil.getLongId()); + jsonVeExt.put("update_time", DateUtil.now()); + veExtTab.insert(jsonVeExt); + }else { + ext_jo.put("pcsn", whereJson.getString("box_no")); + ext_jo.put("device_uuid", IdUtil.getLongId()); + ext_jo.put("update_time", DateUtil.now()); + veExtTab.update(ext_jo); + } + // 下发桁架任务 JSONObject taskParam = new JSONObject(); taskParam.put("task_type", "010713"); diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/LashManageServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/LashManageServiceImpl.java index c5e8eb7e9..a0af0d868 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/LashManageServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/LashManageServiceImpl.java @@ -208,12 +208,12 @@ public class LashManageServiceImpl implements LashManageService { result.put("length", boxDao.getBox_length()); result.put("width", boxDao.getBox_width()); result.put("height", boxDao.getBox_high()); - result.put("isBinding", IOSEnum.IS_SEND.code("是")); + result.put("case", boxDao.getMaterial_code()); + result.put("isBinding", IOSEnum.IS_SEND.code("否")); result.put("isLabeling", IOSEnum.IS_SEND.code("否")); result.put("labelingTemplate", boxDao.getLash_num()); result.put("bindingTemplate", "1"); - result.put("printDevice", "1"); result.put("printQty", "1");