|
|
|
@ -151,7 +151,6 @@
|
|
|
|
|
lww.waybill_no waybillNo, |
|
|
|
|
lww.order_no orderNo, |
|
|
|
|
lww.consignee consignee, |
|
|
|
|
lbc.client_code consigneeCode, |
|
|
|
|
lww.consignee_name consigneeName, |
|
|
|
|
lww.consignee_mobile consigneeMobile, |
|
|
|
|
lww.consignee_address consigneeAddress, |
|
|
|
@ -183,8 +182,8 @@
|
|
|
|
|
lww.document_making_time documentMakingTime, |
|
|
|
|
lww.create_time createTime, |
|
|
|
|
GROUP_CONCAT( lwwd.product_name) goodsName, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice, |
|
|
|
|
GROUP_CONCAT( lwwd.num) productNum, |
|
|
|
|
GROUP_CONCAT( lwwd.price) productPrice, |
|
|
|
|
lww.total_count totalCount, |
|
|
|
|
sum( lwwd.weight) totalWeight, |
|
|
|
|
sum( lwwd.volume) totalVolume, |
|
|
|
@ -224,11 +223,27 @@
|
|
|
|
|
lww.check_user_name checkUserName, |
|
|
|
|
lww.check_time checkTime |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
left join logpm_trunkline_waybill_track ltwt on ltwt.waybill_id = lww.id |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
and lww.abolish_status = 0 |
|
|
|
|
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0"> |
|
|
|
|
and lww.id in (select l.id |
|
|
|
|
from logpm_warehouse_waybill l |
|
|
|
|
left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id |
|
|
|
|
where (l.departure_warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
or l.destination_warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
or wt.warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach>) |
|
|
|
|
group by l.id) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
@ -355,6 +370,9 @@
|
|
|
|
|
<if test="param.freezeTimeEndDate != null"> |
|
|
|
|
and lww.freeze_time <= #{param.freezeTimeEndDate} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.checkStatus != null"> |
|
|
|
|
and IFNULL(lww.check_status,0) = #{param.checkStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0 "> |
|
|
|
|
and lww.destination_warehouse_id in |
|
|
|
|
<foreach collection="param.destinationWarehouseIds" item="item" separator="," open="(" close=")"> |
|
|
|
@ -362,25 +380,6 @@
|
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
group by lww.id |
|
|
|
|
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0"> |
|
|
|
|
HAVING |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" index="index" open="(" close=")"> |
|
|
|
|
<if test="index == 0"> |
|
|
|
|
GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="index != 0"> |
|
|
|
|
or GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%') |
|
|
|
|
</if> |
|
|
|
|
</foreach> |
|
|
|
|
or group_concat(lww.departure_warehouse_id) in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
or group_concat(lww.destination_warehouse_id) in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
order by lww.create_time desc |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
@ -948,15 +947,14 @@
|
|
|
|
|
lww.shipper_mobile shipperMobile, |
|
|
|
|
lww.shipper_address shipperAddress, |
|
|
|
|
lww.consignee consignee, |
|
|
|
|
lbc.client_code consigneeCode, |
|
|
|
|
lww.consignee_name consigneeName, |
|
|
|
|
lww.consignee_mobile consigneeMobile, |
|
|
|
|
lww.consignee_address consigneeAddress, |
|
|
|
|
lww.destination destination, |
|
|
|
|
lww.departure departure, |
|
|
|
|
GROUP_CONCAT(lwwd.product_name) goodsName, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice, |
|
|
|
|
GROUP_CONCAT(lwwd.num) productNum, |
|
|
|
|
GROUP_CONCAT(lwwd.price) productPrice, |
|
|
|
|
lww.cost_piece costPiece, |
|
|
|
|
lww.cost_zhang costZhang, |
|
|
|
|
lww.cost_num costNum, |
|
|
|
@ -1004,10 +1002,27 @@
|
|
|
|
|
lww.document_making_time documentMakingTime, |
|
|
|
|
lww.create_time createTime |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
and lww.abolish_status = 0 |
|
|
|
|
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0"> |
|
|
|
|
and lww.id in (select l.id |
|
|
|
|
from logpm_warehouse_waybill l |
|
|
|
|
left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id |
|
|
|
|
where (l.departure_warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
or l.destination_warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
or wt.warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach>) |
|
|
|
|
group by l.id) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
@ -1152,6 +1167,9 @@
|
|
|
|
|
<if test="param.freezeTimeEndDate != null"> |
|
|
|
|
and lww.freeze_time <= #{param.freezeTimeEndDate} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.checkStatus != null"> |
|
|
|
|
and IFNULL(lww.check_status,0) = #{param.checkStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0 "> |
|
|
|
|
and lww.destination_warehouse_id in |
|
|
|
|
<foreach collection="param.destinationWarehouseIds" item="item" separator="," open="(" close=")"> |
|
|
|
|