Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 8 months ago
parent
commit
62b34fbd27
  1. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  2. 629
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

37
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -616,28 +616,27 @@
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
LEFT JOIN
(SELECT ldsaa.id,SUM(ldpll.quantity) AS num
FROM logpm_distribution_stock_article ldsaa
LEFT JOIN logpm_distribution_parcel_list ldpll ON ldsaa.id = ldpll.stock_article_id
WHERE ldpll.order_package_loading_status != '20'
AND ldpll.order_package_reservation_status !='20'
AND ldpll.order_package_status != '70'
AND ldpll.conditions != 2
AND ldsaa.warehouse_id = #{par.warehouseId}
AND ldpll.warehouse_id = #{par.warehouseId}
AND ldsaa.type_service = #{par.typeService}
<if test="par.orderCode != null and par.orderCode != '' ">
and ldsaa.order_code like concat(#{par.orderCode},'%')
</if>
GROUP BY ldsaa.id
)
AS t ON t.id = ldsa.id
<where> <where>
ldsa.order_status in ('10','20','30','70') ldsa.order_status in ('10','20','30','70')
and ldsa.reservation_status in ('10','20') and ldsa.reservation_status in ('10','20')
and t.num > 0 AND EXISTS (
<!-- AND (ldsa.incoming_num - ldsa.delivery_quantity) > 0 --> SELECT 1
FROM logpm_distribution_parcel_list ldpll
WHERE
ldsa.id = ldpll.stock_article_id
AND ldpll.order_package_loading_status != '20'
AND ldpll.order_package_reservation_status != '20'
AND ldpll.order_package_status != '70'
AND ldpll.conditions != 2
AND ldpll.warehouse_id = #{par.warehouseId}
AND ldsa.type_service = #{par.typeService}
<if test="par.orderCode != null and par.orderCode != '' ">
and ldpll.order_code like concat(#{par.orderCode},'%')
</if>
GROUP BY ldpll.stock_article_id
HAVING SUM(ldpll.quantity) > 0
)
AND ldsa.hand_quantity > 0 AND ldsa.hand_quantity > 0
<if test="par.warehouseId != null and par.warehouseId != '' "> <if test="par.warehouseId != null and par.warehouseId != '' ">
and ldsa.warehouse_id = #{par.warehouseId} and ldsa.warehouse_id = #{par.warehouseId}

629
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

File diff suppressed because it is too large Load Diff

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

@ -38,8 +38,8 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
DistributionStockArticleVO distributionStockupVO = Objects.requireNonNull(BeanUtil.copy(entity, DistributionStockArticleVO.class)); DistributionStockArticleVO distributionStockupVO = Objects.requireNonNull(BeanUtil.copy(entity, DistributionStockArticleVO.class));
// 查询包条码 // 查询包条码
if (ObjectUtils.isNotNull(distributionStockupVO.getId())) { if (ObjectUtils.isNotNull(distributionStockupVO.getId())) {
String orderPackageCode = distributionParcelListService.getOrderPackageCode(distributionStockupVO.getId()); // String orderPackageCode = distributionParcelListService.getOrderPackageCode(distributionStockupVO.getId());
distributionStockupVO.setOrderPackageCode(orderPackageCode); // distributionStockupVO.setOrderPackageCode(orderPackageCode);
} }
if ("80".equals(entity.getOrderStatus())) { if ("80".equals(entity.getOrderStatus())) {

Loading…
Cancel
Save