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");