Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
1c8ee62237
  1. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  3. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  4. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  5. 27
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  6. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  7. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  8. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

24
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 IDistributionStockArticleService distributionStockArticleService;
private final IDistributionParcelListService distributionParcelListService; private final IDistributionParcelListService distributionParcelListService;
private final IDistributionReservationPackageService distributionReservationPackageService; private final IDistributionReservationPackageService distributionReservationPackageService;
private final IDistributionReservationStocklistService distributionReservationStocklistService;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient; private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient;
private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient; private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient;
@ -465,6 +466,12 @@ public class DistributionStockupAppController extends BladeController {
log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId()); log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId());
return R.fail(3002, "备货库存品ID不能为空"); 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); //自提 List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO); //自提
if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){
return R.data(list); return R.data(list);
@ -473,6 +480,21 @@ public class DistributionStockupAppController extends BladeController {
if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){
return R.data(listMarket); 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("当前待备货的库存品未上架,请上架后在继续备货操作!!!","当前待备货的库存品未上架,请上架后在继续备货操作!!!"); return Resp.scanFail("当前待备货的库存品未上架,请上架后在继续备货操作!!!","当前待备货的库存品未上架,请上架后在继续备货操作!!!");
} }
@ -733,7 +755,7 @@ public class DistributionStockupAppController extends BladeController {
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
warehouseUpdownGoodsEntity.setAssociationId(list.get(0).getId()); warehouseUpdownGoodsEntity.setAssociationId(list.get(0).getId());
warehouseUpdownGoodsEntity.setAssociationType("4"); warehouseUpdownGoodsEntity.setAssociationType("3");
warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId()); warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId());
locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
if(locationInformation.isEmpty()){ if(locationInformation.isEmpty()){

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -60,8 +60,7 @@
</delete> </delete>
<select id="selectDistributionDeliveryListPage" <select id="selectDistributionDeliveryListPage" resultType="com.logpm.distribution.entity.DistributionDeliveryListEntity">
resultType="com.logpm.distribution.entity.DistributionDeliveryListEntity">
SELECT SELECT
lddl.id id, lddl.id id,
lddl.train_number trainNumber, lddl.train_number trainNumber,
@ -167,7 +166,6 @@
lddl.loading_time loadingTime, lddl.loading_time loadingTime,
lddl.note_number noteNumber, lddl.note_number noteNumber,
lddl.source source, lddl.source source,
lddl.vehicle_name vehicleName,
( (
SELECT SELECT
COALESCE ( COALESCE (
@ -189,8 +187,11 @@
logpm_distribution_signfor lds logpm_distribution_signfor lds
WHERE WHERE
lddl.id = lds.delivery_id lddl.id = lds.delivery_id
) scannedNumber ) scannedNumber,
GROUP_CONCAT(DISTINCT ldr.consignee SEPARATOR ',') clineName
FROM logpm_distribution_delivery_list lddl FROM logpm_distribution_delivery_list lddl
left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id
<where> <where>
lddl.is_deleted = 0 lddl.is_deleted = 0
<if test="param.trainNumber != null and param.trainNumber!=''"> <if test="param.trainNumber != null and param.trainNumber!=''">
@ -205,6 +206,9 @@
<if test="param.warehouseName != null and param.warehouseName!=''"> <if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if> </if>
<if test="param.clineName != null and param.clineName!=''">
and ldr.consignee like concat('%',#{param.clineName},'%')
</if>
<if test="param.vehicleName != null and param.vehicleName!=''"> <if test="param.vehicleName != null and param.vehicleName!=''">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if> </if>
@ -239,6 +243,20 @@
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%') and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
</if> </if>
</where> </where>
GROUP BY lddl.id ,
lddl.train_number ,
lddl.warehouse_name ,
lddl.warehouse_id ,
lddl.type ,
lddl.kind ,
lddl.vehicle_name ,
lddl.driver_name ,
lddl.vehicle_id ,
lddl.driver_id ,
lddl.distribution_company ,
lddl.delivery_status ,
lddl.delivery_list_loading_status
</select> </select>
<select id="selectdeliverOnevnopen" resultType="com.logpm.distribution.entity.DistributionLoadscaninvnEntity"> <select id="selectdeliverOnevnopen" resultType="com.logpm.distribution.entity.DistributionLoadscaninvnEntity">
SELECT SELECT

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -241,13 +241,27 @@
ldst.tray_name trayName, ldst.tray_name trayName,
ldst.unpack unpack, ldst.unpack unpack,
count(ldss.id) realNum, count(ldss.id) realNum,
GROUP_CONCAT( DISTINCT lwug.position_code) allocation, CASE
WHEN ldst.source_type = '2' THEN
(SELECT GROUP_CONCAT( DISTINCT lwug.position_code) allocation
from logpm_warehouse_updown_goods lwug
where lwug.association_id = ldst.material_id and lwug.association_type = '4' and ldst.market_id = lwug.market_id
and ldst.incoming_batch = lwug.incoming_batch and ldst.warehouse_id = lwug.warehouse_id
)
WHEN ldst.source_type = '1' THEN
( SELECT GROUP_CONCAT( DISTINCT lwug.position_code) allocation
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3'
and ldpl.warehouse_id = lwug.warehouse_id
where ldpl.order_code = ldst.incoming_batch
)
END allocation,
ldrs.id deliveryDetailsId ldrs.id deliveryDetailsId
from logpm_distribution_reservation_stocklist ldrs from logpm_distribution_reservation_stocklist ldrs
left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0 left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0
left join logpm_distribution_stock ldss on ldss.stock_list_id = ldst.id and ldss.reservation_id = #{reservationId} and ldss.is_deleted = 0 left join logpm_distribution_stock ldss on ldss.stock_list_id = ldst.id and ldss.reservation_id = #{reservationId} and ldss.is_deleted = 0
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldst.material_id and lwug.association_type = '4' <!-- LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldst.material_id and lwug.association_type = '4'
and ldst.market_id = lwug.market_id and ldst.incoming_batch = lwug.incoming_batch and ldst.warehouse_id = lwug.warehouse_id and ldst.market_id = lwug.market_id and ldst.incoming_batch = lwug.incoming_batch and ldst.warehouse_id = lwug.warehouse_id-->
where ldrs.reservation_id = #{reservationId} where ldrs.reservation_id = #{reservationId}
and ldrs.is_deleted = 0 and ldrs.is_deleted = 0
group by ldst.id, ldst.storage_location, ldst.description_goods, ldst.sku,ldrs.id, group by ldst.id, ldst.storage_location, ldst.description_goods, ldst.sku,ldrs.id,

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); List<DistributionStockupSelfVO> stockupOffShelf(@Param("param")StockupDTO stockupDTO);
/** /**
* 自提 * 自提查询导入查询
* @param stockupDTO * @param stockupDTO
* @return * @return
*/ */
List<DistributionStockupTrayVO> getLocationSelection(@Param("param") StockupDTO stockupDTO); 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> getLocationMarketSelection(@Param("param")StockupDTO stockupDTO);
List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(@Param("param")StockupDTO stockupDTO);
/** /**
* 零担没有货位的查询 * 零担没有货位的查询
* @param stockupDTO * @param stockupDTO

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

@ -155,6 +155,18 @@
</where> </where>
</select> </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 id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select lwug.position_code positionCode, select lwug.position_code positionCode,
@ -183,6 +195,21 @@
where lddd.id = #{param.deliveryDetailsId} where lddd.id = #{param.deliveryDetailsId}
GROUP BY lwug.position_code, lwug.allocation_id, lwug.allocation_title, lwug.num GROUP BY lwug.position_code, lwug.allocation_id, lwug.allocation_title, lwug.num
</select> </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 id="stockupOffShelf" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO">
select lwug.id lwugId,lds.id ldsId,ldrp.packet_bar_code orderPackageCode,lwug.allocation_id allocationId select lwug.id lwugId,lds.id ldsId,ldrp.packet_bar_code orderPackageCode,lwug.allocation_id allocationId
from logpm_distribution_reservation ldr 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); Integer selectPackagePrint(StockupDTO stockupDTO);
/** /**
* 库存品选择货位展示 * 库存品选择货位展示 导入
* *
* @param stockupDTO * @param stockupDTO
* @return * @return
*/ */
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO); List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
/** /**
* 库存品选择货位展示 * 库存品选择货位展示 订单
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelectionOrder(StockupDTO stockupDTO);
/**
* 库存品选择货位展示 导入
* *
* @param stockupDTO * @param stockupDTO
* @return * @return
*/ */
List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO); List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO);
/**
* 库存品选择货位展示 订单
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(StockupDTO stockupDTO);
/** /**
* @return * @return

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -615,7 +615,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionStockListEntity.setMallName(Optional.ofNullable(distributionStockArticleEntity.getMallName()).orElse(null)); //商场名称 distributionStockListEntity.setMallName(Optional.ofNullable(distributionStockArticleEntity.getMallName()).orElse(null)); //商场名称
distributionStockListEntity.setQuantityStock(Optional.ofNullable(distributionParcelList.getQuantity()).orElse(null)); //库存数量(包件数量) distributionStockListEntity.setQuantityStock(Optional.ofNullable(distributionParcelList.getQuantity()).orElse(null)); //库存数量(包件数量)
distributionStockListEntity.setIncomingBatch(Optional.ofNullable(distributionStockArticleEntity.getWaybillNumber()).orElse(null)); //入库批次 distributionStockListEntity.setIncomingBatch(Optional.ofNullable(distributionStockArticleEntity.getOrderCode()).orElse(null)); //入库批次
distributionStockListEntity.setOutboundQuantity(0); //出库数量 distributionStockListEntity.setOutboundQuantity(0); //出库数量
// distributionStockListEntity.setCargoUnit(Optional.ofNullable(distributionParcelList.getMaterialUnit()).orElse(null));//单位 // distributionStockListEntity.setCargoUnit(Optional.ofNullable(distributionParcelList.getMaterialUnit()).orElse(null));//单位
@ -654,6 +654,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionStockListEntity.setDespatch(Optional.ofNullable(distributionStockArticleEntity.getTrainNumber()).orElse(null));//车次号 distributionStockListEntity.setDespatch(Optional.ofNullable(distributionStockArticleEntity.getTrainNumber()).orElse(null));//车次号
distributionStockListEntity.setStockArticleId(Optional.ofNullable(distributionParcelList.getStockArticleId()).orElse(null)); //订单ID distributionStockListEntity.setStockArticleId(Optional.ofNullable(distributionParcelList.getStockArticleId()).orElse(null)); //订单ID
distributionStockListEntity.setOrderCode(Optional.ofNullable(distributionStockArticleEntity.getOrderCode()).orElse(null)); //订单自编号 distributionStockListEntity.setOrderCode(Optional.ofNullable(distributionStockArticleEntity.getOrderCode()).orElse(null)); //订单自编号
distributionStockListEntity.setSourceType("1"); //订单自编号
//添加库存品记录 //添加库存品记录
DistributionStockListInfoEntity distributionStockListInfo = new DistributionStockListInfoEntity(); DistributionStockListInfoEntity distributionStockListInfo = new DistributionStockListInfoEntity();
BeanUtil.copyProperties(distributionStockListEntity,distributionStockListInfo); BeanUtil.copyProperties(distributionStockListEntity,distributionStockListInfo);

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

@ -1153,6 +1153,30 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}); });
return list; return list;
} else { } else {
/* List<DistributionReservationStocklistEntity> list1 = distributionReservationStocklistService.list(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
.eq(DistributionReservationStocklistEntity::getReservationId, stockupDTO.getReservationId())
.apply("stock_list_status in (1,3)")
);
//查询库存品的类型
List<String> listType = new ArrayList<>();
if(list1.isEmpty()){
list1.stream().forEach( i ->{
DistributionStockListEntity byId = distributionStockListService.getById(i.getStocklistId());
listType.add(byId.getSourceType());
});
}
if(listType.isEmpty()){
listType.forEach(i ->{
if(i.equals("2")){
//商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId);
}else {
}
});
}*/
//商,市 //商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId); List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId);
list.forEach(i ->{ list.forEach(i ->{
@ -2251,11 +2275,21 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return baseMapper.getLocationSelection(stockupDTO); return baseMapper.getLocationSelection(stockupDTO);
} }
@Override
public List<DistributionStockupTrayVO> getLocationSelectionOrder(StockupDTO stockupDTO) {
return baseMapper.getLocationSelectionOrder(stockupDTO);
}
@Override @Override
public List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO) { public List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO) {
return baseMapper.getLocationMarketSelection(stockupDTO); return baseMapper.getLocationMarketSelection(stockupDTO);
} }
@Override
public List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(StockupDTO stockupDTO) {
return baseMapper.getLocationMarketSelectionOrder(stockupDTO);
}
/** /**
* @return * @return
*/ */

Loading…
Cancel
Save