diff --git a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IMtOrderMainClinet.java b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IMtOrderMainClinet.java index bb3507b2f..7db9695fd 100644 --- a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IMtOrderMainClinet.java +++ b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IMtOrderMainClinet.java @@ -23,7 +23,7 @@ public interface IMtOrderMainClinet { * * @return */ - @GetMapping(TOP) + @GetMapping(TOP+"/mtOrderPackageRelation") R> mtOrderPackageRelation(); } diff --git a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IStationLineNumClient.java b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IStationLineNumClient.java index ab1d65c8c..9af64ecf1 100644 --- a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IStationLineNumClient.java +++ b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/feign/IStationLineNumClient.java @@ -42,7 +42,7 @@ public interface IStationLineNumClient { * * @return */ - @GetMapping(TOP) + @GetMapping(TOP+"/stationLineNum") R> stationLineNumByAll(); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java index 4ac7c91e9..00628467b 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAllocationController.java @@ -199,6 +199,14 @@ public class BasicdataGoodsAllocationController extends BladeController { return R.data(pages); } + @GetMapping("/getStockUpAllocation") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询备货库位信息", notes = "传入BasicdataGoodsAllocation") + public R> getStockUpAllocation() { + List pages = basicdataGoodsAllocationService.getStockUpAllocation(); + return R.data(pages); + } + /** * 货位获取模板信息 @@ -209,7 +217,6 @@ public class BasicdataGoodsAllocationController extends BladeController { public R getPrintTemplate(@ApiIgnore @RequestParam("ids") String ids) { FreightSpaceVO result = basicdataGoodsAllocationService.getPrintTemplate(ids); return R.data(result); - } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.java index 6af8f3cbd..3dba03979 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.java @@ -55,7 +55,7 @@ public interface BasicdataGoodsAllocationMapper extends BaseMapper exportBasicdataGoodsAllocation(@Param("ew") Wrapper queryWrapper); - List selectSecondNode(@Param("warehouseId")String warehouseId); + List selectSecondNode(@Param("warehouseId")String warehouseId,@Param("areaType") String areaType); List selectThirdNode(@Param("warehouseId")String warehouseId,@Param("areaId") String areaId); @@ -68,4 +68,13 @@ public interface BasicdataGoodsAllocationMapper extends BaseMapper selectFourthNode(@Param("warehouseId") String warehouseId,@Param("areaId") String areaId,@Param("goodsShelfId") String goodsShelfId); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml index 022653660..bf2139d2e 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml @@ -50,6 +50,9 @@ is_deleted = 0 AND warehouse_id = #{warehouseId} + + and area_type = #{areaType} + + diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java index 481f57ebb..a0874813e 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAllocationService.java @@ -103,4 +103,25 @@ public interface IBasicdataGoodsAllocationService extends BaseService findListStockUpAllocationByName(String fragment); + + /** + * + * @param stockUpAreaCode + * @return + */ + BasicdataGoodsAllocationEntity scanStockUpAllocationByCode(String stockUpAreaCode); + + /** + * 查询当前仓库的备货库位 + * @return + */ + List getStockUpAllocation(); + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java index c134b013d..4757745cc 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAllocationServiceImpl.java @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.feign.IBasicPrintTemplateClient; @@ -137,7 +138,7 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl basicdataWarehouseVOList = goodsAreaMapper.selectFirstNode(collect); //遍历仓库节点查询货区节点信息 for (BasicdataNodeVO basicdataNodeVO : basicdataWarehouseVOList) { - List goodeAreaNodes = goodsAllocationMapper.selectSecondNode(basicdataNodeVO.getValue()); + List goodeAreaNodes = goodsAllocationMapper.selectSecondNode(basicdataNodeVO.getValue(), null); //判断仓库下是否存在货区节点,存在则添加,不存在则设置没有下级节点 if (!Func.isEmpty(goodeAreaNodes)) { basicdataNodeVO.setChildren(goodeAreaNodes); @@ -163,7 +164,7 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl collect = myWatchWarehouse.stream() .map(BasicdataWarehouseEntity::getId) .collect(Collectors.toList()); - basicdataGoodsAllocation.put("warehouseList",collect); - return goodsAllocationMapper.selectGoodsAllocationList(page, basicdataGoodsAllocation); + basicdataGoodsAllocation.put("warehouseList", collect); + return goodsAllocationMapper.selectGoodsAllocationList(page, basicdataGoodsAllocation); } @@ -205,7 +206,7 @@ public class BasicdataGoodsAllocationServiceImpl extends BaseServiceImpl().lambda() .set(BasicdataGoodsAllocationEntity::getEnableStatus, 1) .in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); - return update?R.success("成功"):R.fail("失败"); + return update ? R.success("成功") : R.fail("失败"); } @Override public R disableGoodsAllocation(String ids) { - log.info("传入参数>>>>>>>>>>{}",ids); + log.info("传入参数>>>>>>>>>>{}", ids); //查询该货位有无货物 // List longs = Func.toLongList(ids); Integer integer = warehouseUpdownGoodsClient.selectCountByAllo(ids); - if (integer>0){ + if (integer > 0) { return R.fail("有货物,无法禁用"); } boolean update = this.update(new UpdateWrapper().lambda() .set(BasicdataGoodsAllocationEntity::getEnableStatus, 2) .in(BasicdataGoodsAllocationEntity::getId, Func.toLongList(ids))); - return update?R.success("成功"):R.fail("失败"); + return update ? R.success("成功") : R.fail("失败"); } + @Override + public List findListStockUpAllocationByName(String fragment) { + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if (Func.isEmpty(myCurrentWarehouse)) { + + return null; + } + return this.list(Wrappers.query().lambda() + .like(BasicdataGoodsAllocationEntity::getGoodsAllocationName, fragment) + .eq(BasicdataGoodsAllocationEntity::getWarehouseId, myCurrentWarehouse.getId()) + .eq(BasicdataGoodsAllocationEntity::getEnableStatus, "1") + ); + } + + @Override + public BasicdataGoodsAllocationEntity scanStockUpAllocationByCode(String stockUpAreaCode) { + + return this.getById(stockUpAreaCode); + } + + + @Override + public List getStockUpAllocation() { + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseService.getMyCurrentWarehouse(); + if (Func.isEmpty(myCurrentWarehouse)) { + return null; + } + List nodeS = new ArrayList<>(); + List goodeAreaNodes = goodsAllocationMapper.selectSecondNode(myCurrentWarehouse.getId().toString(), "1"); + if (Func.isNotEmpty(goodeAreaNodes)) { + for (BasicdataNodeVO goodeAreaNode : goodeAreaNodes) { + List goodsShelfNode = goodsAllocationMapper.selectThirdNode(myCurrentWarehouse.getId().toString(), goodeAreaNode.getValue()); + if (Func.isNotEmpty(goodsShelfNode)) { + for (BasicdataNodeVO basicdataNodeVO : goodsShelfNode) { + List goodsAllocationNode = goodsAllocationMapper.selectFourthNode(myCurrentWarehouse.getId().toString(), goodeAreaNode.getValue(), basicdataNodeVO.getValue()); + if (Func.isNotEmpty(goodsAllocationNode)) { + goodeAreaNode.setChildren(goodsShelfNode); + basicdataNodeVO.setChildren(goodsAllocationNode); + nodeS.add(goodeAreaNode); + } + } + } + } + + } + return null; + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index d2a036d88..9fc377110 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -1598,7 +1598,7 @@ INNER JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id INNER JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id INNER JOIN logpm_distribution_reservation_stockarticle As ldrs ON ldrs.reservation_id = ldr.id - INNER JOIN logpm_distribution_stock_article As ldsa ON ldsa.id = ldrs.stockarticle_id + INNER JOIN logpm_distribution_stock_article As ldsa ON ldsa.id = ldrs.stock_article_id WHERE lddl.id = #{delivaryListId} and ldrs.stock_article_status != 2