|
|
|
@ -370,7 +370,7 @@
|
|
|
|
|
select DISTINCT (select count(conditions) |
|
|
|
|
from logpm_distrilbution_bill_lading |
|
|
|
|
<where> |
|
|
|
|
conditions IN (10) and is_deleted = '0' |
|
|
|
|
conditions IN (10,20) and is_deleted = '0' and warehouse_id = #{param.warehouseId} |
|
|
|
|
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if> |
|
|
|
|
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> |
|
|
|
|
</where> |
|
|
|
@ -378,16 +378,18 @@
|
|
|
|
|
(select count(conditions) |
|
|
|
|
from logpm_distrilbution_bill_lading |
|
|
|
|
<where> |
|
|
|
|
conditions IN (20) and is_deleted = '0' |
|
|
|
|
conditions IN (30) and is_deleted = '0' and warehouse_id = #{param.warehouseId} |
|
|
|
|
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if> |
|
|
|
|
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> |
|
|
|
|
</where> |
|
|
|
|
) stopNum |
|
|
|
|
from logpm_distrilbution_bill_lading |
|
|
|
|
) stopNum, COUNT(ldbls.id) signedFor,COUNT(ldbp.id) sumTotal |
|
|
|
|
from logpm_distrilbution_bill_lading ldbl |
|
|
|
|
LEFT JOIN logpm_distrilbution_bill_package ldbp on ldbp.bill_lading_id = ldbl.id |
|
|
|
|
LEFT JOIN logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldbp.parce_list_id |
|
|
|
|
<where> |
|
|
|
|
is_deleted = '0' |
|
|
|
|
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if> |
|
|
|
|
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> |
|
|
|
|
ldbl.is_deleted = '0' and ldbl.warehouse_id = #{param.warehouseId} |
|
|
|
|
<if test="param.startDate != null">and ldbl.pick_up_time between #{param.startDate} and #{param.entDate}</if> |
|
|
|
|
<if test="param.startDate == null">and DATE(ldbl.pick_up_time) = CURDATE()</if> |
|
|
|
|
|
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|