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

Loading…
Cancel
Save