|
|
|
@ -39,8 +39,19 @@
|
|
|
|
|
SELECT * FROM logpm_aftersales_abnormal_package ${ew.customSqlSegment} |
|
|
|
|
</select> |
|
|
|
|
<select id="getAbnormalPackage" resultType="com.logpm.aftersales.vo.AftersalesAbnormalPackageVO"> |
|
|
|
|
select ldpl.order_package_code packageCode ,ldpl.waybill_number waybillNumber,ldpl.order_code orderCode,ldpl.waybill_id waybillId,ldpl.stock_article_id orderId, |
|
|
|
|
lawo.work_order_number workOrderNumber,lawo.id workOrderId,ldsa.brand brandName,ldpl.firsts,ldpl.second,ldsa.mall_name mallName,ldsa.mall_id mallId |
|
|
|
|
select ldpl.order_package_code packageCode, |
|
|
|
|
ldpl.waybill_number waybillNumber, |
|
|
|
|
ldpl.order_code orderCode, |
|
|
|
|
ldpl.waybill_id waybillId, |
|
|
|
|
ldpl.stock_article_id orderId, |
|
|
|
|
lawo.work_order_number workOrderNumber, |
|
|
|
|
lawo.id workOrderId, |
|
|
|
|
ldsa.brand brandName, |
|
|
|
|
ldpl.firsts, |
|
|
|
|
ldpl.second, |
|
|
|
|
ldpl.third_product, |
|
|
|
|
ldsa.mall_name mallName, |
|
|
|
|
ldsa.mall_id mallId |
|
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
|
LEFT JOIN logpm_aftersales_abnormal_package laap on laap.package_code = ldpl.order_package_code |
|
|
|
|
LEFT JOIN logpm_aftersales_work_order lawo on laap.work_order_id = lawo.id |
|
|
|
@ -73,5 +84,33 @@
|
|
|
|
|
LEFT JOIN logpm_distribution_delivery_list AS lddl ON lddl.id = lds.delivery_id |
|
|
|
|
where ldrp.packet_bar_status in (1,3) and ldrp.packet_bar_code = #{orderPackageCode} |
|
|
|
|
</select> |
|
|
|
|
<select id="getAdvanceAbnormalPackage" resultType="com.logpm.aftersales.vo.AftersalesAbnormalPackageVO"> |
|
|
|
|
SELECT |
|
|
|
|
DISTINCT |
|
|
|
|
ltad.order_package_code AS packageCode, |
|
|
|
|
ltad.waybill_no AS waybillNumber, |
|
|
|
|
ltad.order_code AS orderCode, |
|
|
|
|
ltad.waybill_id AS waybillId, |
|
|
|
|
ltad.brand AS brandName, |
|
|
|
|
ltad.first_pack_name AS firsts, |
|
|
|
|
ltad.second_pack_name AS second, |
|
|
|
|
ltad.third_pack_name AS third_product, |
|
|
|
|
lawo.id workOrderId, |
|
|
|
|
lawo.work_order_number workOrderNumber, |
|
|
|
|
lww.consignee AS mallName, |
|
|
|
|
lww.consignee_id AS mallId |
|
|
|
|
FROM |
|
|
|
|
logpm_trunkline_advance_detail AS ltad |
|
|
|
|
LEFT JOIN logpm_warehouse_waybill AS lww ON ltad.waybill_id = lww.id AND lww.is_deleted = 0 |
|
|
|
|
LEFT JOIN logpm_aftersales_abnormal_package laap on laap.package_code = ltad.order_package_code AND laap.is_deleted = 0 |
|
|
|
|
LEFT JOIN logpm_aftersales_work_order lawo on laap.work_order_id = lawo.id AND lawo.is_deleted = 0 |
|
|
|
|
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ltad.order_code = ldsa.order_code AND ldsa.is_deleted = 0 |
|
|
|
|
<where> |
|
|
|
|
ltad.is_deleted = 0 |
|
|
|
|
<if test="param.packageCode != null and param.packageCode != ''"> |
|
|
|
|
AND ltad.order_package_code = #{param.packageCode} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|