From 8e5fcb10067a8813fb1570681935175e7c500942 Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Wed, 22 May 2024 16:09:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=AB=98=E5=BA=A6=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/ext/acs/rest/AcsToWmsController.java | 7 +++ .../wms/ext/acs/service/AcsToWmsService.java | 7 +++ .../acs/service/impl/AcsToWmsServiceImpl.java | 44 +++++++++++++++++++ 3 files changed, 58 insertions(+) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java index 97a50d95f..4032ef931 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java @@ -204,4 +204,11 @@ public class AcsToWmsController { public ResponseEntity applicationForLabeling(@RequestBody JSONObject param) { return new ResponseEntity<>(acsToWmsService.applicationForLabeling(param), HttpStatus.OK); } + + @PostMapping("/getBoxInfo") + @Log(value = "二期获取木箱高度", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS) + @SaIgnore + public ResponseEntity getBoxInfo(@RequestBody JSONObject param) { + return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK); + } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java index 18fce050c..dae95f7a0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java @@ -195,4 +195,11 @@ public interface AcsToWmsService { * @return / */ JSONObject applicationForLabeling(JSONObject param); + + /** + * 二期输送机申请贴标 + * @param param / + * @return / + */ + JSONObject getBoxInfo(JSONObject param); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 3ffdf3e5a..586bae0e0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -27,6 +27,8 @@ import org.nl.b_lms.sch.task.service.IschBaseTaskService; import org.nl.b_lms.sch.tasks.TwoBoxExcepTask; import org.nl.b_lms.sch.tasks.first_floor_area.MzhcwTask; import org.nl.b_lms.sch.tasks.slitter.service.SlitterService; +import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService; +import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo; import org.nl.b_lms.storage_manage.ios.enums.IOSEnum; import org.nl.b_lms.storage_manage.ios.enums.TASKEnum; import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.*; @@ -38,6 +40,7 @@ import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.system.service.notice.ISysNoticeService; +import org.nl.system.service.param.ISysParamService; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.ext.acs.service.AcsToWmsService; import org.nl.wms.pda.mps.service.CasingService; @@ -125,6 +128,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { */ private final OutBoxManageService outBoxManageService; + private final IBstIvtBoxinfoService iBstIvtBoxinfoService; + @Resource private IschBaseTaskService taskService; @@ -134,6 +139,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { @Resource private MzhcwTask mzhcwTask; + @Autowired + private ISysParamService iSysParamService; + private final SlitterService slitterService; private final IPdmBiSlittingproductionplanService slittingproductionplanService; @@ -2169,4 +2177,40 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { return param; } + @Override + public JSONObject getBoxInfo(JSONObject param) { + String device_code = param.getString("device_code"); + String material_barcode = param.getString("material_barcode"); + String vehicle_code = param.getString("vehicle_code"); + + if (device_code.equals("RK1005")) { + JSONObject vehicle_info = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(vehicle_info)) { + throw new BadRequestException("未查询到载具号【" + vehicle_code + "】对应的载具信息!"); + } + material_barcode = vehicle_info.getString("pcsn"); + } + + // 查询木箱信息 + BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( + new QueryWrapper().lambda() + .eq(BstIvtBoxinfo::getBox_no, material_barcode) + ); + + //根据木箱高度,判断入库仓位的高度 + String height = ""; + String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue(); + String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue(); + String box_high = boxDao.getBox_high(); + if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) { + height = "1"; + } else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) { + height = "2"; + } else { + height = "3"; + } + JSONObject jsonObject = new JSONObject(); + jsonObject.put("heightLevel", height); + return jsonObject; + } }