|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
t.is_zero zeroOrder, |
|
|
|
|
t.total_number total |
|
|
|
|
from logpm_distribution_stock_article t |
|
|
|
|
where t.order_code = #{contract_number} |
|
|
|
|
where t.order_code = #{contractNumber} |
|
|
|
|
<if test="warehouseId != null and warehouseId.size() > 0"> |
|
|
|
|
and t.warehouse_id in |
|
|
|
|
<foreach collection="warehouseId" item="item" separator="," open="(" close=")"> |
|
|
|
@ -25,26 +25,26 @@
|
|
|
|
|
and t.is_deleted = 0 |
|
|
|
|
</select> |
|
|
|
|
<select id="findPackage" resultType="com.logpm.datasharing.vo.MerchantPackageVO"> |
|
|
|
|
select |
|
|
|
|
lww.shipper_address sendAddress, |
|
|
|
|
ldpl.waybill_number waybillNumber, |
|
|
|
|
ldpl.order_package_code orderPackageCode, |
|
|
|
|
ldpl.order_package_status orderPackageStatus, |
|
|
|
|
t.update_time updateTime, |
|
|
|
|
ifnull(driver.lname,driver.ltname) distributionName, |
|
|
|
|
ifnull(driver.lphone,driver.ltphone) distributionPhone |
|
|
|
|
select lww.shipper_address sendAddress, |
|
|
|
|
ldpl.waybill_number waybillNumber, |
|
|
|
|
ldpl.order_package_code orderPackageCode, |
|
|
|
|
ldpl.order_package_status orderPackageStatus, |
|
|
|
|
t.update_time updateTime, |
|
|
|
|
ifnull(driver.lname, driver.ltname) distributionName, |
|
|
|
|
ifnull(driver.lphone, driver.ltphone) distributionPhone |
|
|
|
|
from logpm_distribution_stock_article t |
|
|
|
|
left join logpm_distribution_reservation_stockarticle ldrs on ldrs.stock_article_id = t.id and ldrs.stock_article_status !=2 |
|
|
|
|
left join logpm_distribution_reservation ldr on ldr.id = ldrs.reservation_id and ldr.reservation_status !=40 |
|
|
|
|
left join logpm_distribution_reservation_stockarticle ldrs |
|
|
|
|
on ldrs.stock_article_id = t.id and ldrs.stock_article_status !=2 |
|
|
|
|
left join logpm_distribution_reservation ldr |
|
|
|
|
on ldr.id = ldrs.reservation_id and ldr.reservation_status !=40 |
|
|
|
|
join logpm_distribution_reservation_package ldrp |
|
|
|
|
on ldrp.reservation_id = ldr.id and ldrp.packet_bar_status != 2 |
|
|
|
|
|
|
|
|
|
left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id |
|
|
|
|
left join logpm_warehouse_waybill lww on lww.waybill_no = ldpl.waybill_number |
|
|
|
|
left join logpm_distribution_signfor lds on lds.reservation_id = ldr.id |
|
|
|
|
left join logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id |
|
|
|
|
left join (select lddl.id, |
|
|
|
|
group_concat(ldd.driver_name) lname, |
|
|
|
|
group_concat(ldd.driver_name) lname, |
|
|
|
|
group_concat(lddt.driver_name) ltname, |
|
|
|
|
group_concat(ldd.driver_phone) lphone, |
|
|
|
|
group_concat(lddt.driver_phone) ltphone |
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
left join logpm_distribution_delivery_self ldd on ldd.delivery_id = lddl.id |
|
|
|
|
left join logpm_distribution_delivery_tripartite lddt on lddt.delivery_id = lddl.id |
|
|
|
|
group by lddl.id) driver on driver.id = lddl.id |
|
|
|
|
where t.order_code = #{contract_number} |
|
|
|
|
where t.order_code = #{contractNumber} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|