|
|
|
@ -81,6 +81,7 @@
|
|
|
|
|
ldr.delivery_address deliveryAddress, |
|
|
|
|
ldr.delivery_phone deliveryPhone, |
|
|
|
|
ldr.stock_article_id orderIds, |
|
|
|
|
ldr.waybill_no waybillNo, |
|
|
|
|
lds.delivery_sign_pictures deliverySignPictures, |
|
|
|
|
lds.clerk_sign_pictures clerkSignPictures, |
|
|
|
|
ldr.reservation_num packageNub, |
|
|
|
@ -233,18 +234,10 @@
|
|
|
|
|
ldsa.customer_address, |
|
|
|
|
ldsa.total_number, |
|
|
|
|
ldsa.hand_quantity, |
|
|
|
|
ldsa.waybill_number, |
|
|
|
|
ldsa.service_number, |
|
|
|
|
ldrs.reservation_num AS deliveryNumber, |
|
|
|
|
ldsa.description_goods descriptionGoods, |
|
|
|
|
( |
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
|
GROUP_CONCAT( ldpl.material_name SEPARATOR ',' ) |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_parcel_list ldpl |
|
|
|
|
JOIN logpm_distribution_reservation_package ldrp ON ldrp.parce_list_id = ldpl.id |
|
|
|
|
WHERE |
|
|
|
|
ldrp.reservation_id = lds.reservation_id |
|
|
|
|
) materialName, |
|
|
|
|
t.materialName, |
|
|
|
|
-- (SELECT COUNT(*) from logpm_distribution_reservation_package ldrp WHERE ldrp.stock_article_id = ldsa.id ) deliveryNumber, |
|
|
|
|
( |
|
|
|
|
SELECT |
|
|
|
@ -286,7 +279,52 @@
|
|
|
|
|
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(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> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
<select id="selectAppcustomList" resultType="com.logpm.distribution.vo.app.DistributionAppReservationVO"> |
|
|
|
|
SELECT |
|
|
|
|