Browse Source

配送详情页订单列表修复零担订单不展示BUG

pull/2/head
汤建军 1 year ago
parent
commit
52dd81d886
  1. 98
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

98
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -299,8 +299,17 @@
ldsa.waybill_number,
ldsa.service_number,
ldrs.reservation_num AS deliveryNumber,
t.materialName,
-- (SELECT COUNT(*) from logpm_distribution_reservation_package ldrp WHERE ldrp.stock_article_id = ldsa.id ) deliveryNumber,
(
SELECT DISTINCT
group_concat( DISTINCT ldpl.material_name ) AS materialName
FROM
logpm_distribution_parcel_list ldpl
WHERE
ldpl.stock_article_id = ldsa.id
GROUP BY
ldpl.stock_article_id
) AS materialName,
<!-- (SELECT COUNT(*) from logpm_distribution_reservation_package ldrp WHERE ldrp.stock_article_id = ldsa.id ) deliveryNumber,-->
(
SELECT
count(*)
@ -341,51 +350,46 @@
JOIN logpm_distribution_reservation_stockarticle ldrs ON lds.reservation_id = ldrs.reservation_id
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_stock_article ldsa ON ldrs.stock_article_id = ldsa.id
JOIN
(SELECT
DISTINCT ldpl.stock_article_id,GROUP_CONCAT(DISTINCT ldpl.material_name) AS materialName
FROM
logpm_distribution_parcel_list ldpl
JOIN logpm_distribution_reservation_package ldrp ON ldrp.parce_list_id = ldpl.id
GROUP BY ldpl.stock_article_id
) AS t ON t.stock_article_id = ldsa.id
where lddl.id = #{param.deliveryId} AND ldrs.stock_article_status != 2
<if test="param.orderCode != '' and param.orderCode != null">
and ldsa.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.consigneeUnit != '' and param.consigneeUnit != null">
and ldsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')
</if>
<if test="param.consigneePerson != '' and param.consigneePerson != null">
and ldsa.consignee_person like concat('%',#{param.consigneePerson},'%')
</if>
<if test="param.consigneePerson != '' and param.consigneePerson != null">
and ldsa.consignee_person like concat('%',#{param.consigneePerson},'%')
</if>
<if test="param.consigneeAddress != '' and param.consigneeAddress != null">
and ldsa.consignee_address like concat('%',#{param.consigneeAddress},'%')
</if>
<if test="param.consigneeMobile != '' and param.consigneeMobile != null">
and ldsa.consignee_mobile like concat('%',#{param.consigneeMobile},'%')
</if>
<if test="param.customerName != '' and param.customerName != null">
and ldsa.customer_name like concat('%',#{param.customerName},'%')
</if>
<if test="param.customerTelephone != '' and param.customerTelephone != null">
and ldsa.customer_telephone like concat('%',#{param.customerTelephone},'%')
</if>
<if test="param.customerAddress != '' and param.customerAddress != null">
and ldsa.customer_address like concat('%',#{param.customerAddress},'%')
</if>
<if test="param.waybillNumber != '' and param.waybillNumber != null">
and ldsa.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.serviceNumber != '' and param.serviceNumber != null">
and ldsa.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.materialName != '' and param.materialName != null">
and t.materialName like concat('%',#{param.materialName},'%')
</if>
<where>
lddl.id = #{param.deliveryId} AND ldrs.stock_article_status != 2
<if test="param.orderCode != '' and param.orderCode != null">
and ldsa.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.consigneeUnit != '' and param.consigneeUnit != null">
and ldsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')
</if>
<if test="param.consigneePerson != '' and param.consigneePerson != null">
and ldsa.consignee_person like concat('%',#{param.consigneePerson},'%')
</if>
<if test="param.consigneePerson != '' and param.consigneePerson != null">
and ldsa.consignee_person like concat('%',#{param.consigneePerson},'%')
</if>
<if test="param.consigneeAddress != '' and param.consigneeAddress != null">
and ldsa.consignee_address like concat('%',#{param.consigneeAddress},'%')
</if>
<if test="param.consigneeMobile != '' and param.consigneeMobile != null">
and ldsa.consignee_mobile like concat('%',#{param.consigneeMobile},'%')
</if>
<if test="param.customerName != '' and param.customerName != null">
and ldsa.customer_name like concat('%',#{param.customerName},'%')
</if>
<if test="param.customerTelephone != '' and param.customerTelephone != null">
and ldsa.customer_telephone like concat('%',#{param.customerTelephone},'%')
</if>
<if test="param.customerAddress != '' and param.customerAddress != null">
and ldsa.customer_address like concat('%',#{param.customerAddress},'%')
</if>
<if test="param.waybillNumber != '' and param.waybillNumber != null">
and ldsa.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.serviceNumber != '' and param.serviceNumber != null">
and ldsa.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.materialName != '' and param.materialName != null">
and t.materialName like concat('%',#{param.materialName},'%')
</if>
</where>
</select>
<select id="selectAppcustomList" resultType="com.logpm.distribution.vo.app.DistributionAppReservationVO">

Loading…
Cancel
Save