From 8cb62fd63652628d98dd716df7a5b31f63ccb27d Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 20 Sep 2023 16:18:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=95=B4=E5=BA=93=E7=A7=BB=E5=BA=93=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/WarehouseUpdownTypeApiController.java | 35 +++++++++++ .../service/IWarehouseUpdownTypeService.java | 1 + .../impl/WarehouseUpdownTypeServiceImpl.java | 61 +++++++++++++++++++ 3 files changed, 97 insertions(+) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java index b37295560..48312aacf 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java @@ -874,4 +874,39 @@ public class WarehouseUpdownTypeApiController { } } + + @ResponseBody + @PostMapping("/moveAllocationScanAllocation") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "移库扫描库位", notes = "传入trayTypeDTO") + public R moveAllocationScanAllocation(@RequestBody UpdownTypeDTO updownTypeDTO) { + String method = "###########moveAllocationScanAllocation: "; + log.info(method + "移库扫描目标库位 updownTypeDTO={}", updownTypeDTO); + Long allocationId = updownTypeDTO.getAllocationId();//目标库位码 + + try{ + + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息不能为空"); + return R.fail(403,"仓库信息不能为空"); + } + + if(Objects.isNull(allocationId)){ + log.warn(method+"库位码不能为空 allocationId={}",allocationId); + return R.fail(403,"库位码不能为空"); + } + //查询该库位的货物信息 + UpShelfAllocationVO upShelfAllocationVO = warehouseUpdownTypeService.moveAllocationScanAllocation(allocationId,myCurrentWarehouse.getId()); + return R.data(upShelfAllocationVO); + }catch (CustomerException e){ + log.warn(e.message); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常,联系管理员",e); + return R.fail(500,"系统异常,联系管理员"); + } + } + + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java index e531e0741..7d79268b9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java @@ -61,4 +61,5 @@ public interface IWarehouseUpdownTypeService extends BaseService updownTypeEntityQueryWrapper = new QueryWrapper<>(); + updownTypeEntityQueryWrapper.eq("area_id",goodsAreaId) + .eq("shelf_id",goodsShelfId) + .eq("allocation_id",allocationId) + .eq("is_deleted",0); + WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectOne(updownTypeEntityQueryWrapper); + if(Objects.isNull(updownTypeEntity)){ + log.warn("#############moveAllocationScanAllocation: 库位暂无数据 allocationId={}",allocationId); + return upShelfAllocationVO; + }else{ + log.warn("#############moveAllocationScanAllocation: 库位已有绑定货物 allocationId={}",allocationId); + throw new CustomerException(403,"库位已有绑定货物"); + } + } + private void saveUpdownGoodsLogPart(List updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark,Long warehouseId) { List updownGoodsLogList = new ArrayList<>();