|
|
|
@ -281,7 +281,7 @@
|
|
|
|
|
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 |
|
|
|
|
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 |
|
|
|
@ -557,4 +557,90 @@ FROM
|
|
|
|
|
WHERE lds.reservation_id = #{reservationId} and lwtg.association_type in ('3') |
|
|
|
|
GROUP BY lwtg.tray_id,lds.reservation_id,lwtg.tray_code,lwtg.num,lwtg.association_type |
|
|
|
|
</select> |
|
|
|
|
<select id="selectClientList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO"> |
|
|
|
|
SELECT |
|
|
|
|
ldr.reservation_num, |
|
|
|
|
ldr.id id, |
|
|
|
|
ldr.is_urgent isUrgent, |
|
|
|
|
ldr.mall_name mallName, |
|
|
|
|
ldr.reservation_code reservationCode, |
|
|
|
|
lds.id deliveryId, |
|
|
|
|
ldr.store_name, |
|
|
|
|
ldr.remarks remarks, |
|
|
|
|
ldr.delivery_way deliveryWay, |
|
|
|
|
ldr.loading_status loadingStatus, |
|
|
|
|
ldr.signing_status reservationSigningStatus, |
|
|
|
|
ldr.receiving_unit receivingUnit, |
|
|
|
|
ldr.consignee consignee, |
|
|
|
|
lds.signing_type signingType, |
|
|
|
|
lds.train_number trainNumber, |
|
|
|
|
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, |
|
|
|
|
ldr.reservation_stock_list_num reservationStockListNum, |
|
|
|
|
lds.loaded_number loadedNub, |
|
|
|
|
lds.loadedin_number inventoryNub, |
|
|
|
|
lds.reservation_id reservationId, |
|
|
|
|
lds.received_quantity receivedQuantity, |
|
|
|
|
(SELECT |
|
|
|
|
ldss.forklift_name |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_stockup_info AS ldsi |
|
|
|
|
LEFT JOIN logpm_distribution_stockup AS ldss ON ldsi.stockup_id = ldss.id |
|
|
|
|
WHERE |
|
|
|
|
ldsi.reservation_id = lds.reservation_id |
|
|
|
|
) AS forkliftName, |
|
|
|
|
CASE |
|
|
|
|
WHEN ldr.stockup_status ='10' THEN '待指派' |
|
|
|
|
WHEN ldr.stockup_status ='20' THEN '待备货' |
|
|
|
|
WHEN ldr.stockup_status ='30' THEN '备货中' |
|
|
|
|
WHEN ldr.stockup_status ='40' THEN '备货完成' |
|
|
|
|
END stockupStatusName, |
|
|
|
|
CASE |
|
|
|
|
WHEN ldr.is_urgent ='1' THEN '否' |
|
|
|
|
else '是' |
|
|
|
|
END isUrgentName, |
|
|
|
|
CASE |
|
|
|
|
WHEN lds.signing_status ='1' THEN '待审核' |
|
|
|
|
else '已审核' |
|
|
|
|
END signingStatus, |
|
|
|
|
CASE |
|
|
|
|
WHEN lds.driver_signing ='1' THEN '未签收' |
|
|
|
|
else '已签收' |
|
|
|
|
END driverSigning |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_signfor lds |
|
|
|
|
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id |
|
|
|
|
<where> |
|
|
|
|
lds.is_deleted = 0 and lds.delivery_id = #{id} and ldr.reservation_status != 40 |
|
|
|
|
<if test="param.reservationCode != '' and param.reservationCode != null"> |
|
|
|
|
and ldr.reservation_code like concat('%',#{param.reservationCode},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.reservationCode != '' and param.reservationCode != null"> |
|
|
|
|
and ldr.reservation_code like concat('%',#{param.reservationCode},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.waybillNo != '' and param.waybillNo != null"> |
|
|
|
|
and ldr.waybill_no like concat('%',#{param.waybillNo},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.mallName != '' and param.mallName != null"> |
|
|
|
|
and ldr.mall_name like concat('%',#{param.mallName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consignee != '' and param.consignee != null"> |
|
|
|
|
and ldr.consignee like concat('%',#{param.consignee},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryPhone != '' and param.deliveryPhone != null"> |
|
|
|
|
and ldr.delivery_phone like concat('%',#{param.deliveryPhone},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryAddress != '' and param.deliveryAddress != null"> |
|
|
|
|
and ldr.delivery_address like concat('%',#{param.deliveryAddress},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.receivingUnit != '' and param.receivingUnit != null"> |
|
|
|
|
and ldr.receiving_unit like concat('%',#{param.receivingUnit},'%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
</mapper> |
|
|
|
|