From 4b489d6ddbcdacf31aae72defb2915045261297b Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 23 Feb 2024 11:02:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E6=8C=87=E6=A0=87=E9=A1=B9?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=8F=8F=E8=BF=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/supervise/vo/IndicatorsVO.java | 2 + .../com/logpm/supervise/api/ClassifyApi.java | 6 +- .../supervise/service/IClassifyService.java | 2 +- .../service/impl/ClassifyServiceImpl.java | 18 ++++- ...rehouseUpdownStockupAreaApiController.java | 50 ++++++------ .../IWarehouseUpdownStockupAreaService.java | 8 -- ...WarehouseUpdownStockupAreaServiceImpl.java | 81 ------------------- 7 files changed, 47 insertions(+), 120 deletions(-) diff --git a/blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java b/blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java index f6d120129..b4b2fd57f 100644 --- a/blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java +++ b/blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java @@ -29,6 +29,8 @@ public class IndicatorsVO extends IndicatorsEntity { private String examineDeptName; + private String deduction; + private List PointsVOS = new ArrayList<>(); diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java index cd051804f..c42b91c0b 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java @@ -70,15 +70,15 @@ public class ClassifyApi { @GetMapping("/myApiIndicatorsDetail") @ApiOperationSupport(order = 1) @ApiOperation(value = "我的考核列表") - public R myApiIndicatorsDetail(@RequestParam Long id) { - R r = classifyService.myApiIndicatorsDetail(id); + public R myApiIndicatorsDetail(@RequestParam Long id,@RequestParam Long classifyId) { + R r = classifyService.myApiIndicatorsDetail(id,classifyId); return r; } @PostMapping("/updateApiIndicators") @ApiOperationSupport(order = 1) - @ApiOperation(value = "小程序保存考核内容", notes = "传入classify") + @ApiOperation(value = "修改考核列表", notes = "传入classify") public R updateApiIndicators(@RequestBody IndicatorsDTO instanceofDTO) { R r = classifyService.updateApiIndicators(instanceofDTO); return r; diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java index 32d47e34c..57638bd72 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java @@ -79,7 +79,7 @@ public interface IClassifyService extends BaseService { * @param id * @return */ - R myApiIndicatorsDetail(Long id); + R myApiIndicatorsDetail(Long id,Long classifyId); /** * 修改我的考核 diff --git a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java index d594ef894..ea4c62994 100644 --- a/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java +++ b/blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java @@ -369,7 +369,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl list = indicatorsAnnexService.list(Wrappers.query().lambda().eq(IndicatorsAnnexEntity::getIndicatorsId, id)); @@ -378,13 +378,18 @@ public class ClassifyServiceImpl extends BaseServiceImpl pointsEntities = pointsService.list(Wrappers.query().lambda() .eq(PointsEntity::getClassifyId, byId.getId()) ); @@ -398,6 +403,13 @@ public class ClassifyServiceImpl extends BaseServiceImpl> resourceMap = list.stream().filter(item -> !Objects.isNull(item.getType())).collect(Collectors.groupingBy(IndicatorsAnnexEntity::getType)); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java index 5beba1513..dd1c48813 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java @@ -352,45 +352,47 @@ public class WarehouseUpdownStockupAreaApiController { } - @ResponseBody - @PostMapping("/upShelfTray") + @PostMapping("/upShelfScanTray") @ApiOperationSupport(order = 1) - @ApiOperation(value = "上架托盘维度", notes = "传入trayTypeDTO") - public R upShelfTray(@RequestBody UpdownTypeDTO updownTypeDTO ) { - String method = "###########upShelfTray: "; - log.info(method + "上架托盘维度 updownTypeDTO={}", updownTypeDTO); - String trayCode = updownTypeDTO.getTrayCode();//托盘码 - Long allocationId = updownTypeDTO.getAllocationId(); + @ApiOperation(value = "备货库位上架扫描托盘", notes = "传入trayTypeDTO") + public R upShelfScanTray(@RequestBody UpdownTypeDTO updownTypeDTO ) { + String method = "###########upShelfScanTray: "; + log.info(method + "上架扫描托盘 updownTypeDTO={}", updownTypeDTO); 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,"库位信息不能为空"); - } - if(StringUtil.isBlank(trayCode)){ - log.warn(method+"托盘码不能为空 trayCode={}",trayCode); - return R.fail(403,"托盘码不能为空"); + //查询该库位的货物信息 + UpDownStockupAreaVO upDownStockupAreaVO = warehouseUpdownStockupAreaService.upShelfScanPackage(myCurrentWarehouse.getId(), updownTypeDTO.getOrderPackageCode()); + //此包件是否已经完成上架了 + if (Func.isNotEmpty(upDownStockupAreaVO)){ + //查询是否上架 + WarehouseUpdownStockupAreaEntity updownStockupAreaEntity = warehouseUpdownStockupAreaService.getOne(Wrappers.query().lambda() + .eq(WarehouseUpdownStockupAreaEntity::getWarehouseId, myCurrentWarehouse.getId()) + .eq(WarehouseUpdownStockupAreaEntity::getAssociationValue, upDownStockupAreaVO.getAssociationValue()) + .eq(WarehouseUpdownStockupAreaEntity::getAllocationId, upDownStockupAreaVO.getAssociationId()) + .eq(WarehouseUpdownStockupAreaEntity::getGoodsType, upDownStockupAreaVO.getGoodsType()) + ); + if (Func.isNotEmpty(updownStockupAreaEntity)){ + //已经在备货库位进行上架了 + return Resp.scanFail("该包件已上架","该包件已上架"); + } + return R.data(upDownStockupAreaVO); + }else { + return Resp.scanFail("该包件不存在","该包件不存在"); } - - //上架托盘维度 - R r = warehouseUpdownStockupAreaService.upShelfTray(trayCode, allocationId, myCurrentWarehouse.getId()); -/* if (r.getCode() == 200) { - warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); - }*/ - return r; }catch (CustomerException e){ log.warn(e.message); - return R.fail(e.code,e.message); + return Resp.scanFail(e.code,e.message,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/IWarehouseUpdownStockupAreaService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java index f493ab1b9..244efab19 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java @@ -120,12 +120,4 @@ public interface IWarehouseUpdownStockupAreaService extends BaseService upShelfZeroOrderList, Long allocationId, Long id); - /** - * 上架托盘 - * @param trayCode - * @param allocationId - * @param id - * @return - */ - R upShelfTray(String trayCode, Long allocationId, Long id); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java index 47ba2b79f..48caacb5a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java @@ -651,87 +651,6 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl updownTypeEntityQueryWrapper = new QueryWrapper<>(); -// updownTypeEntityQueryWrapper.eq("allocation_id",allocationId) -// .eq("is_deleted",0); -// WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectOne(updownTypeEntityQueryWrapper); -// if(!Objects.isNull(updownTypeEntity)){ -// log.warn("##############upShelfTray: 库位上已存在货物 allocationId={}",allocationId); -// return R.fail(403,"库位上已存在货物"); -// } - - BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId); - if(Objects.isNull(goodsAllocationEntity)){ - log.warn("##############upShelfTray: 库位不存在 allocationId={}",allocationId); - return R.fail(403,"库位不存在"); - } - String enableStatus = goodsAllocationEntity.getEnableStatus(); - Long goodsShelfId = goodsAllocationEntity.getGoodsShelfId(); - if("2".equals(enableStatus)){ - log.warn("##############upShelfTray: 库位已被禁用 allocationId={}",allocationId); - return R.fail(403,"库位已被禁用"); - } - BasicdataGoodsShelfEntity goodsShelfEntity = basicdataGoodsShelfClient.getEntityByGoodsShelfId(goodsShelfId); - if(Objects.isNull(goodsShelfEntity)){ - log.warn("##############upShelfTray: 货架不存在 goodsShelfId={}",goodsShelfId); - return R.fail(403,"货架不存在"); - } - Long goodsAreaId = goodsShelfEntity.getGoodsAreaId(); - BasicdataGoodsAreaEntity goodsAreaEntity = basicdataGoodsAreaClient.getEntityByGoodsAreaId(goodsAreaId); - if(Objects.isNull(goodsAreaEntity)){ - log.warn("##############upShelfTray: 货区不存在 goodsAreaId={}",goodsAreaId); - return R.fail(403,"货区不存在"); - } -// String areaType = goodsAreaEntity.getAreaType(); -// if("1".equals(areaType)){ -// log.warn("#################upShelfTray: 备货区不能上下架 goodsAreaId={}",goodsAreaId); -// throw new CustomerException(403,"备货区不能上下架"); -// } - Long wid = goodsAreaEntity.getWarehouseId(); - BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(wid); - if(Objects.isNull(warehouseEntity)){ - log.warn("##############upShelfTray: 仓库不存在 warehouseId={}",wid); - return R.fail(403,"仓库不存在"); - } - if(!wid.equals(warehouseId)){ - log.warn("##############upShelfTray: 库位不在本仓库中 warehouseId={}",warehouseId); - return R.fail(403,"库位不在本仓库中"); - } - - //查询托盘上有哪些货物,存入相同的绑定关系和记录 - QueryWrapper trayTypeEntityQueryWrapper = new QueryWrapper<>(); - trayTypeEntityQueryWrapper.eq("tray_code",trayCode) - .eq("is_deleted",0); - WarehouseTrayTypeEntity trayTypeEntity = warehouseTrayTypeService.getOne(trayTypeEntityQueryWrapper); - if(Objects.isNull(trayTypeEntity)){ - log.warn("##############upShelfTray: 托盘上没有货物信息 trayCode={}",trayCode); - return R.fail(403,"托盘上没有货物信息"); - } - //处理托盘上的货物到库位上 - return saveTrayGoodsToAllocation(trayTypeEntity,goodsAllocationEntity,goodsShelfEntity,goodsAreaEntity,warehouseId); -// return null; - } - - private R saveTrayGoodsToAllocation(WarehouseTrayTypeEntity trayTypeEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAreaEntity goodsAreaEntity, Long warehouseId) { - - return null; - } private WarehouseUpdownStockupAreaEntity createdNewUpShelfInventory(Long allocationId, Long warehouseId, UpShelfStockDTO upShelfStockDTO, WarehouseUpdownStockupAreaEntity updownTypeEntity, Long goodsAreaId, BasicdataGoodsAreaEntity goodsAreaEntity, Long goodsShelfId, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity) { WarehouseUpdownStockupAreaEntity updownStockupAreaEntity = new WarehouseUpdownStockupAreaEntity();