Browse Source

修改备货货位查询

training
caoyizhong 1 year ago
parent
commit
2efe156889
  1. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  3. 27
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  4. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  5. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -87,6 +87,7 @@ public class DistributionStockupAppController extends BladeController {
private final IDistributionStockArticleService distributionStockArticleService;
private final IDistributionParcelListService distributionParcelListService;
private final IDistributionReservationPackageService distributionReservationPackageService;
private final IDistributionReservationStocklistService distributionReservationStocklistService;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient;
private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient;
@ -465,6 +466,12 @@ public class DistributionStockupAppController extends BladeController {
log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId());
return R.fail(3002, "备货库存品ID不能为空");
}
//查询库存品信息
DistributionReservationStocklistEntity byId = distributionReservationStocklistService.getById(stockupDTO.getDeliveryDetailsId());
if(ObjectUtils.isNotNull(byId)){
DistributionStockListEntity byId1 = iDistributionStockListService.getById(byId.getStocklistId());
if(byId1.getSourceType().equals("2")){
//导入
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO); //自提
if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){
return R.data(list);
@ -473,6 +480,21 @@ public class DistributionStockupAppController extends BladeController {
if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){
return R.data(listMarket);
}
}else{
//订单
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelectionOrder(stockupDTO); //自提
if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){
return R.data(list);
}
List<DistributionStockupTrayVO> listMarket = distributionStockupService.getLocationMarketSelectionOrder(stockupDTO); //商配
if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){
return R.data(listMarket);
}
}
}
return Resp.scanFail("当前待备货的库存品未上架,请上架后在继续备货操作!!!","当前待备货的库存品未上架,请上架后在继续备货操作!!!");
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java

@ -181,14 +181,22 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
List<DistributionStockupSelfVO> stockupOffShelf(@Param("param")StockupDTO stockupDTO);
/**
* 自提
* 自提查询导入查询
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(@Param("param") StockupDTO stockupDTO);
/**
* 自提查询订单查询
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelectionOrder(@Param("param") StockupDTO stockupDTO);
List<DistributionStockupTrayVO> getLocationMarketSelection(@Param("param")StockupDTO stockupDTO);
List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(@Param("param")StockupDTO stockupDTO);
/**
* 零担没有货位的查询
* @param stockupDTO

27
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -155,6 +155,18 @@
</where>
</select>
<select id="getLocationMarketSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select DISTINCT lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
from logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl on ldrs.stocklist_id = ldsl.id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods lwug
on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldsl.warehouse_id = lwug.warehouse_id
where ldrs.id = #{param.deliveryDetailsId}
</select>
<select id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select lwug.position_code positionCode,
@ -183,6 +195,21 @@
where lddd.id = #{param.deliveryDetailsId}
GROUP BY lwug.position_code, lwug.allocation_id, lwug.allocation_title, lwug.num
</select>
<select id="getLocationSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select DISTINCT lwug.position_code positionCode,
lwug.allocation_id allocationId,
lwug.allocation_title allocationTitle,
lwug.num
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods lwug
on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldsl.warehouse_id = lwug.warehouse_id
where lddd.id = #{param.deliveryDetailsId}
</select>
<select id="stockupOffShelf" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO">
select lwug.id lwugId,lds.id ldsId,ldrp.packet_bar_code orderPackageCode,lwug.allocation_id allocationId
from logpm_distribution_reservation ldr

18
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -185,19 +185,33 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
Integer selectPackagePrint(StockupDTO stockupDTO);
/**
* 库存品选择货位展示
* 库存品选择货位展示 导入
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
/**
* 库存品选择货位展示
* 库存品选择货位展示 订单
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelectionOrder(StockupDTO stockupDTO);
/**
* 库存品选择货位展示 导入
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO);
/**
* 库存品选择货位展示 订单
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(StockupDTO stockupDTO);
/**
* @return

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -2275,11 +2275,21 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return baseMapper.getLocationSelection(stockupDTO);
}
@Override
public List<DistributionStockupTrayVO> getLocationSelectionOrder(StockupDTO stockupDTO) {
return baseMapper.getLocationSelectionOrder(stockupDTO);
}
@Override
public List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO) {
return baseMapper.getLocationMarketSelection(stockupDTO);
}
@Override
public List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(StockupDTO stockupDTO) {
return baseMapper.getLocationMarketSelectionOrder(stockupDTO);
}
/**
* @return
*/

Loading…
Cancel
Save