From 2942b5d65e5f2fa4aa6f584d9f635120cbddb3fc Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Mon, 1 Dec 2025 16:20:35 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E5=87=BA=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UnpackingConveyorDefination.java | 1 + .../sch_manage/service/GroupInfoPdaVo.java | 1 + .../service/impl/PdaJBServiceImpl.java | 89 ++++++++++++++++++- .../sch_manage/service/mapper/PdaJBMapper.xml | 1 + 4 files changed, 90 insertions(+), 2 deletions(-) diff --git a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/zz_driver/unpacking_conveyor/UnpackingConveyorDefination.java b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/zz_driver/unpacking_conveyor/UnpackingConveyorDefination.java index 57940aa..54afe11 100644 --- a/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/zz_driver/unpacking_conveyor/UnpackingConveyorDefination.java +++ b/acs/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/zz_driver/unpacking_conveyor/UnpackingConveyorDefination.java @@ -11,6 +11,7 @@ import java.util.LinkedList; import java.util.List; /** + * hint: 解包机已经没有输送线 * @Author: lyd * @Date: 2025/8/11 */ diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/GroupInfoPdaVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/GroupInfoPdaVo.java index 92bec2a..d9588c9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/GroupInfoPdaVo.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/GroupInfoPdaVo.java @@ -11,6 +11,7 @@ import java.math.BigDecimal; */ @Data public class GroupInfoPdaVo implements Serializable { + private String group_id; private String storagevehicle_code; private String pcsn; private BigDecimal qty; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/impl/PdaJBServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/impl/PdaJBServiceImpl.java index 5bfbd3f..295abe0 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/impl/PdaJBServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/impl/PdaJBServiceImpl.java @@ -480,7 +480,7 @@ public class PdaJBServiceImpl implements PdaJBService { ioStorInv.setStor_code(structattr.getStor_code()); ioStorInv.setStor_name(structattr.getStor_name()); ioStorInv.setBill_status(IOSEnum.BILL_STATUS.code("完成")); - ioStorInv.setBill_type("0009"); + ioStorInv.setBill_type("1009"); ioStorInv.setIs_delete(BaseDataEnum.IS_YES_NOT.code("否")); ioStorInv.setIs_upload(BaseDataEnum.IS_YES_NOT.code("否")); ioStorInv.setInput_optid(currentUserId); @@ -703,7 +703,92 @@ public class PdaJBServiceImpl implements PdaJBService { } List groups = pdaJBMapper.getGroupInfoByVehicle(structattr.getStoragevehicle_code(), "02"); if (groups.size() > 0) { - throw new BadRequestException("当前位置是满桶,无法取出,请确认库存信息!"); + GroupInfoPdaVo groupInfoPdaVo = groups.get(0); + GroupPlate groupPlate = groupplateService.getById(groupInfoPdaVo.getGroup_id()); + MdMeMaterialbase materialbase = materialbaseService.getByCode(groupPlate.getMaterial_code(), true); + MdPbStoragevehicleinfo vehicleVo = storagevehicleinfoService.getByCode(groupPlate.getStoragevehicle_code()); + if (ObjectUtil.isEmpty(vehicleVo)) { + throw new BadRequestException("载具" + groupPlate.getStoragevehicle_code() + "不存在!"); + } + // 1、创建出库单、明细、分配明细 + // 1.1 单据表 + String invId = IdUtil.getStringId(); + IOStorInv ioStorInv = new IOStorInv(); + ioStorInv.setIostorinv_id(invId); + ioStorInv.setBill_code(CodeUtil.getNewCode("OUT_STORE_CODE")); + ioStorInv.setBiz_date(DateUtil.format(new Date(), "yyyy-MM-dd")); + ioStorInv.setIo_type(IOSEnum.IO_TYPE.code("出库")); + ioStorInv.setDetail_count(1); + ioStorInv.setCreate_mode(IOSEnum.CREATE_MODE.code("终端产生")); + ioStorInv.setStor_id(structattr.getStor_id()); + ioStorInv.setStor_code(structattr.getStor_code()); + ioStorInv.setStor_name(structattr.getStor_name()); + ioStorInv.setBill_status(IOSEnum.BILL_STATUS.code("完成")); + ioStorInv.setBill_type("0009"); + ioStorInv.setIs_delete(BaseDataEnum.IS_YES_NOT.code("否")); + ioStorInv.setIs_upload(BaseDataEnum.IS_YES_NOT.code("否")); + ioStorInv.setInput_optid(currentUserId); + ioStorInv.setInput_optname(nickName); + ioStorInv.setInput_time(now); + ioStorInv.setUpdate_optid(currentUserId); + ioStorInv.setUpdate_optname(nickName); + ioStorInv.setUpdate_time(now); + ioStorInv.setTotal_qty(groupPlate.getQty()); + ioStorInv.setDetail_count(1); + outBillService.save(ioStorInv); + // 1.2 单据明细 + IOStorInvDtl dtl = new IOStorInvDtl(); + dtl.setIostorinvdtl_id(IdUtil.getStringId()); + dtl.setIostorinv_id(invId); + dtl.setSeq_no("1"); + dtl.setMaterial_id(materialbase.getMaterial_id()); + dtl.setMaterial_code(groupPlate.getMaterial_code()); + dtl.setPcsn(groupPlate.getPcsn()); + dtl.setBill_status(IOSEnum.BILL_STATUS.code("完成")); + dtl.setQty_unit_id(groupPlate.getQty_unit_id()); + dtl.setQty_unit_name(groupPlate.getQty_unit_name()); + dtl.setPlan_qty(groupPlate.getQty()); + dtl.setAssign_qty(groupPlate.getQty()); + dtl.setUnassign_qty(BigDecimal.ZERO); + ioStorInvDtlMapper.insert(dtl); + // 1.3 分配明细 + IOStorInvDis ioStorInvDis = new IOStorInvDis(); + ioStorInvDis.setIostorinvdis_id(IdUtil.getStringId()); + ioStorInvDis.setIostorinv_id(dtl.getIostorinv_id()); + ioStorInvDis.setIostorinvdtl_id(dtl.getIostorinvdtl_id()); + ioStorInvDis.setSeq_no("1"); + ioStorInvDis.setSect_id(structattr.getSect_id()); + ioStorInvDis.setPcsn(groupPlate.getPcsn()); + ioStorInvDis.setMaterial_id(materialbase.getMaterial_id()); + ioStorInvDis.setMaterial_code(materialbase.getMaterial_code()); + ioStorInvDis.setSect_name(structattr.getSect_name()); + ioStorInvDis.setSect_code(structattr.getSect_code()); + ioStorInvDis.setStruct_id(structattr.getStruct_id()); + ioStorInvDis.setStruct_name(structattr.getStruct_name()); + ioStorInvDis.setStruct_code(structattr.getStruct_code()); + ioStorInvDis.setStoragevehicle_code(groupPlate.getStoragevehicle_code()); + ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否")); + ioStorInvDis.setQty_unit_id(groupPlate.getQty_unit_id()); + ioStorInvDis.setQty_unit_name(groupPlate.getQty_unit_name()); + ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("完成")); + ioStorInvDis.setPlan_qty(groupPlate.getQty()); + ioStorInvDisMapper.insert(ioStorInvDis); + + // 1.3 仓位赋值 + structattr.setStoragevehicle_code(groupPlate.getStoragevehicle_code()); + structattr.setStoragevehicle_type(vehicleVo.getStoragevehicle_type()); + structattr.setOccupancy_state(3); + structattr.setUpdate_id(currentUserId); + structattr.setUpdate_name(nickName); + structattr.setUpdate_time(now); + structattrService.updateById(structattr); + + // 1.4 组盘设置入库 + groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库")); + groupPlate.setUpdate_time(now); + groupplateService.updateById(groupPlate); + return PdaResponse.requestOk(); +// throw new BadRequestException("当前位置是满桶,无法取出,请确认库存信息!"); } // 1.3 仓位赋值 structattr.setStoragevehicle_code(null); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/mapper/PdaJBMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/mapper/PdaJBMapper.xml index 94751a5..24cb22b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/mapper/PdaJBMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda_manage/sch_manage/service/mapper/PdaJBMapper.xml @@ -39,6 +39,7 @@