@ -32,97 +32,165 @@
</foreach>
</update>
<select id= "pageList" resultType= "com.logpm.distribution.vo.DistrilbutionBillLadingVO" >
select dbl.id,
GROUP_CONCAT(DISTINCT dsa.service_number) serviceNumber,
GROUP_CONCAT(DISTINCT dsa.waybill_number) waybillNumber,
GROUP_CONCAT(DISTINCT dsa.consignee_unit)
consigneeUnit,GROUP_CONCAT(DISTINCT dsa.consignee_person) customerName,
GROUP_CONCAT(DISTINCT dsa.customer_telephone)
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee
storageFee,
IFNULL((SELECT SUM(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = dbl.id AND packet_bar_status != 2),0)+IFNULL((SELECT SUM(quantity) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = dbl.id AND zero_package_status !=2),0) + IFNULL((SELECT SUM(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id AND inventory_status != 2),0)AS totalNumber,
dbl.certificate_type certificateType,
GROUP_CONCAT(DISTINCT dsa.brand) brand,dsa.type_service typeService,
dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document
deliveryDocument,dbl.conditions,
dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch,
SELECT
dbl.id,
t.orderCode,
t.serviceNumber,
t.consigneeUnit,
t.customerName,
t.customerTelephone,
t.waybillNumber,
3 AS typeService,
t.warehouseEntryTime,
t.storageFee,
IFNULL(( SELECT sum( packet_number ) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = dbl.id AND packet_bar_status != 2 ), 0 ) + IFNULL(( SELECT sum( quantity ) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = dbl.id AND zero_package_status != 2 ), 0 ) + IFNULL(( SELECT sum( quantity ) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id AND inventory_status != 2 ), 0 ) AS totalNumber,
dbl.certificate_type AS certificateType,
dbl.pick_up_time AS pickUpTime,
dbl.consignee,
dbl.delivery_document AS deliveryDocument,
dbl.conditions,
dbl.total_cost AS totalCost,
dbl.pick_up_plate AS pickUpPlate,
dbl.pickup_batch AS pickupBatch,
( SELECT count( quantity ) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id = dbl.id ) AS stopNum,
(
select COUNT(quantity)
from logpm_distribution_bill_lading_scan
where bill_lading_id = dbl.id
) stopNum,
GROUP_CONCAT(DISTINCT dsa.order_code) orderCode,
(SELECT
GROUP_CONCAT(splice)
from
SELECT
group_concat( splice )
FROM
(
SELECT
dbl2.id AS id,
IF
(
SELECT dbl2.id as id,
if(ldpl2.second=null or ldpl2.second='' ,'',CONCAT(ldpl2.second,'(',count(*),')') )
as splice from logpm_distrilbution_bill_lading dbl2
LEFT JOIN logpm_distrilbution_bill_package dbp2 ON dbp2.bill_lading_id = dbl2.id AND dbp2.packet_bar_status IN ( 1, 3 )
ldpl2.SECOND = NULL
OR ldpl2.SECOND = '',
'',
CONCAT( ldpl2.SECOND, '(', count(*), ')' )) AS splice
FROM
logpm_distrilbution_bill_lading dbl2
LEFT JOIN logpm_distrilbution_bill_package dbp2 ON dbp2.bill_lading_id = dbl2.id
AND dbp2.packet_bar_status IN ( 1, 3 )
LEFT JOIN logpm_distribution_parcel_list ldpl2 ON dbp2.parce_list_id = ldpl2.id
AND dbp2.tenant_id = '627683'
GROUP BY dbl2.pickup_batch,ldpl2.second
) as aimdate
WHERE dbl.id=id
GROUP BY id
GROUP BY
dbl2.pickup_batch,
ldpl2.SECOND
) aimdate
WHERE
dbl.id = id
GROUP BY
id
) AS productInformation
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distrilbution_bill_stock AS lds on lds.bill_lading_id = dbl.id
LEFT JOIN logpm_distribution_stock_article dsa on lds.stock_article_id = dsa.id
FROM
logpm_distrilbution_bill_lading dbl
LEFT JOIN (
SELECT
CASE
WHEN
k.id IS NULL THEN
m.id
WHEN m.id IS NULL THEN
k.id ELSE k.id
END id,
CONCAT_WS( ',', k.orderCode, m.orderCode ) AS orderCode,
CONCAT_WS( ',', k.serviceNumber, m.serviceNumber ) AS serviceNumber,
CONCAT_WS( ',', k.consigneeUnit, m.consigneeUnit ) AS consigneeUnit,
CONCAT_WS( ',', k.customerName, m.customerName ) AS customerName,
CONCAT_WS( ',', k.customerTelephone, m.customerTelephone ) AS customerTelephone,
CONCAT_WS( ',', k.waybillNumber ) AS waybillNumber,
k.warehouse_entry_time AS warehouseEntryTime,
k.storage_fee AS storageFee
FROM
(
SELECT
aaa.id,
group_concat( DISTINCT dsa.service_number ) AS serviceNumber,
group_concat( DISTINCT dsa.waybill_number ) AS waybillNumber,
group_concat( DISTINCT dsa.consignee_unit ) AS consigneeUnit,
group_concat( DISTINCT dsa.consignee_person ) AS customerName,
group_concat( DISTINCT dsa.customer_telephone ) AS customerTelephone,
group_concat( DISTINCT dsa.brand ) AS brand,
group_concat( DISTINCT dsa.order_code ) AS orderCode,
group_concat( DISTINCT dsa.warehouse ) AS warehouse,
dsa.warehouse_entry_time,
dsa.storage_fee
FROM
logpm_distrilbution_bill_lading aaa
LEFT JOIN logpm_distrilbution_bill_stock lds ON lds.bill_lading_id = aaa.id
LEFT JOIN logpm_distribution_stock_article dsa ON lds.stock_article_id = dsa.id
WHERE
lds.order_status != 2
GROUP BY
aaa.id
) AS k
LEFT JOIN (
SELECT
bbb.id,
group_concat( DISTINCT ldsl.service_number ) AS serviceNumber,
group_concat( ldsl.incoming_batch ) AS incomingBatch,
group_concat( DISTINCT ldsl.market_name ) AS consigneeUnit,
group_concat( DISTINCT ldsl.order_code ) AS orderCode,
group_concat( DISTINCT lbc.linkman ) AS customerName,
group_concat( DISTINCT lbc.phone ) AS customerTelephone,
group_concat( DISTINCT ldsl.brand_name ) AS brand
FROM
logpm_distrilbution_bill_lading bbb
LEFT JOIN logpm_distribution_delivery_details lddd ON lddd.bill_lading_id = bbb.id
AND lddd.is_deleted = 0
LEFT JOIN logpm_distribution_stock_list ldsl ON lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_basicdata_client lbc ON ldsl.market_id = lbc.id
WHERE
lddd.inventory_status != 2
GROUP BY
bbb.id
) AS m ON m.id = k.id
) AS t ON t.id = dbl.id
<where >
dbl.is_deleted = 0 AND lds.order_status != 2
<if test= "param.serviceNumber != null and param.serviceNumber != ''" > and dsa.service_number like
concat('%',#{param.serviceNumber},'%')
</if>
<if test= "param.orderCode != null and param.orderCode != ''" > and dsa.order_code like
concat('%',#{param.orderCode},'%')
</if>
<if test= "param.pickupBatch != null and param.pickupBatch != ''" > and dbl.pickup_batch like
concat('%',#{param.pickupBatch},'%')
</if>
<if test= "param.waybillNumber != null and param.waybillNumber != ''" > and dsa.waybill_number like
concat('%',#{param.waybillNumber},'%')
</if>
<if test= "param.consigneeUnit != null and param.consigneeUnit != ''" > and dsa.consignee_unit like
concat('%',#{param.consigneeUnit},'%')
</if>
<if test= "param.customerName != null and param.customerName != ''" > and dbl.customer_name like
concat('%',#{param.customerName},'%')
</if>
<if test= "param.customerTelephone != null and param.customerTelephone != ''" > and dsa.customer_telephone like
concat('%',#{param.customerTelephone},'%')
</if>
<if test= "param.warehouse != null and param.warehouse != ''" > and dsa.warehouse like
concat('%',#{param.warehouse},'%')
</if>
<if test= "param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)" >
and dbl.warehouse_id in
<foreach collection= "param.warehouseIdList" item= "item" open= "(" close= ")" separator= "," >
#{item}
</foreach>
</if>
<if test= "param.warehouseEntryTime != null " > and date(dsa.warehouse_entry_time) =
<if test= "param.warehouseEntryTime != null " > and date(t.warehouseEntryTime) =
#{param.warehouseEntryTime}
</if>
<if test= "param.startDate != null " > and dsa.warehouse_entry_time between #{param.startDate} and
<if test= "param.pickUpTime != null " > and date(dbl.pick_up_time) =
#{param.pickUpTime}
</if>
<if test= "param.startDate != null " > and t.warehouseEntryTime between #{param.startDate} and
#{param.entDate}
</if>
<if test= "param.brand != null and param.brand != ''" > and dsa.brand like concat('%',#{param.brand},'%')</if>
<if test= "param.typeService != null and param.typeService != ''" > and dsa.type_service =
#{param.typeService}
</if>
<if test= "param.productInformation != null and param.productInformation != ''" > and dsa.allocation like
concat('%',#{param.productInformation},'%')
</if>
<if test= "param.pickupPhone != null and param.pickupPhone != ''" > and dbl.pickup_phone
concat('%',#{param.pickupPhone},'%')
</if>
<if test= "param.consignee != null and param.consignee != ''" > and dbl.consignee like
concat('%',#{param.consignee},'%')
</if>
<if test= "param.orderCode != null and param.orderCode != ''" > and t.orderCode like
concat('%',#{param.orderCode},'%')
</if>
<if test= "param.waybillNumber != null and param.waybillNumber != ''" > and t.waybillNumber like
concat('%',#{param.waybillNumber},'%')
</if>
<if test= "param.serviceNumber != null and param.serviceNumber != ''" > and t.serviceNumber like
concat('%',#{param.serviceNumber},'%')
</if>
<if test= "param.consigneeUnit != null and param.consigneeUnit != ''" > and t.consigneeUnit like
concat('%',#{param.consigneeUnit},'%')
</if>
<if test= "param.customerName != null and param.customerName != ''" > and t.customerName like
concat('%',#{param.customerName},'%')
</if>
<if test= "param.customerTelephone != null and param.customerTelephone != ''" > and t.customerTelephone like
concat('%',#{param.customerTelephone},'%')
</if>
<if test= "param.pickUpPlate != null and param.pickUpPlate != ''" > and dbl.pick_up_plate like
concat('%',#{param.pickUpPlate},'%')
</if>
@ -135,33 +203,40 @@
<if test= "param.warehouseId != null and param.warehouseId != ''" > and dbl.warehouse_id =
#{param.warehouseId}
</if>
<if test= "param.pickupBatchs != null and param.warehouseId != '' " >
<if test= "param.pickupBatchs != null " >
and dbl.pickup_batch IN
<foreach collection= "param.pickupBatchs" item= "batch" index= "index" separator= "," open= "(" close= ")" >
#{batch}
</foreach>
</if>
<if test= "param.orderCodes != null " >
and t.orderCode IN
<foreach collection= "param.orderCodes" item= "orderCode" index= "index" separator= "," open= "(" close= ")" >
#{orderCode}
</foreach>
</if>
</where>
GROUP BY dbl.id,dsa.warehouse,dsa.type_service
Order BY dbl.create_time desc
GROUP BY
dbl.id
ORDER BY
dbl.create_time DESC
</select>
<select id= "exportDistributionBillLading" resultType= "com.logpm.distribution.vo.DistrilbutionBillLadingVO" >
SELECT
dbl.id,
dsa.service_number AS serviceNumber,
dsa.waybill_number AS waybillNumber,
dsa.consignee_unit AS consigneeUnit,
dsa.customer_name AS customerName,
dsa.customer_telephone AS customerTelephone,
dsa.warehouse,
dsa.warehouse_entry_time AS warehouseEntryTime,
dsa.storage_fee AS storageFee,
(count(DISTINCT ldbp.id,0)+count(DISTINCT lddd.quantity,0)) AS totalNumber,
t.orderCode,
t.serviceNumber,
t.consigneeUnit,
t.customerName,
t.customerTelephone,
t.waybillNumber,
3 AS typeService,
t.warehouseEntryTime,
t.storageFee,
IFNULL(( SELECT sum( packet_number ) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = dbl.id AND packet_bar_status != 2 ), 0 ) + IFNULL(( SELECT sum( quantity ) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = dbl.id AND zero_package_status != 2 ), 0 ) + IFNULL(( SELECT sum( quantity ) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id AND inventory_status != 2 ), 0 ) AS totalNumber,
dbl.certificate_type AS certificateType,
dsa.brand,
dsa.type_service AS typeService,
dbl.pick_up_time AS pickUpTime,
dbl.consignee,
dbl.delivery_document AS deliveryDocument,
@ -169,80 +244,180 @@
dbl.total_cost AS totalCost,
dbl.pick_up_plate AS pickUpPlate,
dbl.pickup_batch AS pickupBatch,
dbl.total_cost totalCost,
count(DISTINCT ldbls.id ) AS stopNum
( SELECT count( quantity ) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id = dbl.id ) AS stopNum,
(
SELECT
group_concat( splice )
FROM
(
SELECT
dbl2.id AS id,
IF
(
ldpl2.SECOND = NULL
OR ldpl2.SECOND = '',
'',
CONCAT( ldpl2.SECOND, '(', count(*), ')' )) AS splice
FROM
logpm_distrilbution_bill_lading dbl2
LEFT JOIN logpm_distrilbution_bill_package dbp2 ON dbp2.bill_lading_id = dbl2.id
AND dbp2.packet_bar_status IN ( 1, 3 )
LEFT JOIN logpm_distribution_parcel_list ldpl2 ON dbp2.parce_list_id = ldpl2.id
GROUP BY
dbl2.pickup_batch,
ldpl2.SECOND
) aimdate
WHERE
dbl.id = id
GROUP BY
id
) AS productInformation
FROM
logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distrilbution_bill_stock AS ldbs ON ldbs.bill_lading_id = dbl.id AND ldbs.order_status != 3
LEFT JOIN logpm_distribution_stock_article dsa ON ldbs.stock_article_id = dsa.id
LEFT JOIN logpm_distrilbution_bill_package AS ldbp ON ldbp.stock_article_id = dsa.id AND ldbp.bill_lading_id = dbl.id AND ldbp.packet_bar_status != 3
LEFT JOIN logpm_distribution_delivery_details AS lddd ON lddd.bill_lading_id = dbl.id AND lddd.inventory_status != 3
LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.bill_lading_id = dbl.id
LEFT JOIN (
SELECT
CASE
WHEN
k.id IS NULL THEN
m.id
WHEN m.id IS NULL THEN
k.id ELSE k.id
END id,
CONCAT_WS( ',', k.orderCode, m.orderCode ) AS orderCode,
CONCAT_WS( ',', k.serviceNumber, m.serviceNumber ) AS serviceNumber,
CONCAT_WS( ',', k.consigneeUnit, m.consigneeUnit ) AS consigneeUnit,
CONCAT_WS( ',', k.customerName, m.customerName ) AS customerName,
CONCAT_WS( ',', k.customerTelephone, m.customerTelephone ) AS customerTelephone,
CONCAT_WS( ',', k.waybillNumber ) AS waybillNumber,
k.warehouse_entry_time AS warehouseEntryTime,
k.storage_fee AS storageFee
FROM
(
SELECT
aaa.id,
group_concat( DISTINCT dsa.service_number ) AS serviceNumber,
group_concat( DISTINCT dsa.waybill_number ) AS waybillNumber,
group_concat( DISTINCT dsa.consignee_unit ) AS consigneeUnit,
group_concat( DISTINCT dsa.consignee_person ) AS customerName,
group_concat( DISTINCT dsa.customer_telephone ) AS customerTelephone,
group_concat( DISTINCT dsa.brand ) AS brand,
group_concat( DISTINCT dsa.order_code ) AS orderCode,
group_concat( DISTINCT dsa.warehouse ) AS warehouse,
dsa.warehouse_entry_time,
dsa.storage_fee
FROM
logpm_distrilbution_bill_lading aaa
LEFT JOIN logpm_distrilbution_bill_stock lds ON lds.bill_lading_id = aaa.id
LEFT JOIN logpm_distribution_stock_article dsa ON lds.stock_article_id = dsa.id
WHERE
lds.order_status != 2
GROUP BY
aaa.id
) AS k
LEFT JOIN (
SELECT
bbb.id,
group_concat( DISTINCT ldsl.service_number ) AS serviceNumber,
group_concat( ldsl.incoming_batch ) AS incomingBatch,
group_concat( DISTINCT ldsl.market_name ) AS consigneeUnit,
group_concat( DISTINCT ldsl.order_code ) AS orderCode,
group_concat( DISTINCT lbc.linkman ) AS customerName,
group_concat( DISTINCT lbc.phone ) AS customerTelephone,
group_concat( DISTINCT ldsl.brand_name ) AS brand
FROM
logpm_distrilbution_bill_lading bbb
LEFT JOIN logpm_distribution_delivery_details lddd ON lddd.bill_lading_id = bbb.id
AND lddd.is_deleted = 0
LEFT JOIN logpm_distribution_stock_list ldsl ON lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_basicdata_client lbc ON ldsl.market_id = lbc.id
WHERE
lddd.inventory_status != 2
GROUP BY
bbb.id
) AS m ON m.id = k.id
) AS t ON t.id = dbl.id
<where >
dbl.is_deleted = 0
<if test= "param.serviceNumber != null and param.serviceNumber != ''" >
and dsa.service_number like concat('%',#{param.serviceNumber},'%')
<if test= "param.pickupBatch != null and param.pickupBatch != ''" > and dbl.pickup_batch like
concat('%',#{param.pickupBatch},'%')
</if>
<if test= "param.pickupBatch != null and param.pickupBatch != ''" >
and dbl.pickup_batch like concat('%',#{param.pickupBatch},'%')
<if test= "param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)" >
and dbl.warehouse_id in
<foreach collection= "param.warehouseIdList" item= "item" open= "(" close= ")" separator= "," >
#{item}
</foreach>
</if>
<if test= "param.waybillNumber != null and param.waybillNumber != ''" >
and dsa.waybill_number like concat('%',#{param.waybillNumber},'%')
<if test= "param.warehouseEntryTime != null " > and date(t.warehouseEntryTime) =
#{param.warehouseEntryTime}
</if>
<if test= "param.consigneeUnit != null and param.consigneeUnit != ''" >
and dsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')
<if test= "param.pickUpTime != null " > and date(dbl.pick_up_time) =
#{param.pickUpTime}
</if>
<if test= "param.customerName != null and param.customerName != ''" >
and dsa.customer_name like concat('%',#{param.customerName},'%')
<if test= "param.startDate != null " > and t.warehouseEntryTime between #{param.startDate} and
#{param.entDate}
</if>
<if test= "param.customerTelephone != null and param.customerTelephone != ''" >
and dsa.customer_telephone like concat('%',#{param.customerTelephone},'%')
<if test= "param.typeService != null and param.typeService != ''" > and dsa.type_service =
#{param.typeService}
</if>
<if test= "param.pickupPhone != null and param.pickupPhone != ''" > and dbl.pickup_phone
concat('%',#{param.pickupPhone},'%')
</if>
<if test= "param.consignee != null and param.consignee != ''" > and dbl.consignee like
concat('%',#{param.consignee},'%')
</if>
<if test= "param.warehouse != null and param.warehouse != ''" >
and dsa.warehouse like concat('%',#{param.warehouse},'%')
<if test= "param.orderCode != null and param.orderCod e != ''" > and t.orderCode like
concat('%',#{param.orderCod e},'%')
</if>
<if test= "param.warehouseId != null and param.warehouseId != ''" >
and dsa.warehouse_id like concat('%',#{param.warehouseId},'%')
<if test= "param.waybillNumber != null and param.waybillNumber != ''" > and t.waybillNumber like
concat('%',#{param.waybillNumber },'%')
</if>
<if test= "param.warehouseEntryTime != null " >
and date(dsa.warehouse_entry_time) = #{param.warehouseEntryTime}
<if test= "param.serviceNumber != null and param.serviceNumber != ''" > and t.serviceNumber like
concat('%',#{param.serviceNumber},'%')
</if>
<if test= "param.startDate != null " >
and dsa.warehouse_entry_time between #{param.startDate} and #{param.entDate}
<if test= "param.consigneeUnit != null and param.consigneeUnit != ''" > and t.consigneeUnit like
concat('%',#{param.consigneeUnit},'%')
</if>
<if test= "param.brand != null and param.brand != ''" >
and dsa.brand like concat('%',#{param.brand},'%')
<if test= "param.customerName != null and param.customerName != ''" > and t.customerName like
concat('%',#{param.customerName },'%')
</if>
<if test= "param.typeService != null and param.typeService != ''" >
and dsa.type_service = #{param.typeService}
<if test= "param.customerTelephone != null and param.customerTelephon e != ''" > and t.customerTelephone like
concat('%',#{param.customerTelephone},'%')
</if>
<if test= "param.productInformation != null and param.productInformation != ''" >
and dsa.allocation like concat('%',#{param.productInformation},'%')
<if test= "param.pickUpPlate != null and param.pickUpPlate != ''" > and dbl.pick_up_plate like
concat('%',#{param.pickUpPlate },'%')
</if>
<if test= "param.pickupPhone != null and param.pickupPhone != ''" >
and dbl.pickup_phone concat('%',#{param.pickupPhone},'%')
<if test= "param.deliveryDocument != null and param.deliveryDocument != ''" > and dbl.delivery_document like
concat('%',#{param.deliveryDocument },'%')
</if>
<if test= "param.consignee != null and param.consignee != ''" >
and dbl.consignee like concat('%',#{param.consignee},'%')
<if test= "param.certificateType != null and param.certificateTyp e != ''" > and dbl.certificate_type =
#{param.certificateType}
</if>
<if test= "param.pickUpPlate != null and param.pickUpPlate != ''" >
and dbl.pick_up_plate like concat('%',#{param.pickUpPlate},'%')
<if test= "param.warehouseId != null and param.warehouseId != ''" > and dbl.warehouse_id =
#{param.warehouseId}
</if>
<if test= "param.deliveryDocument != null and param.deliveryDocument != ''" >
and dbl.delivery_document like concat('%',#{param.deliveryDocument},'%')
<if test= "param.pickupBatchs != null " >
and dbl.pickup_batch IN
<foreach collection= "param.pickupBatchs" item= "batch" index= "index" separator= "," open= "(" close= ")" >
#{batch}
</foreach>
</if>
<if test= "param.certificateType != null and param.certificateType != ''" >
and dbl.certificate_type = #{param.certificateType},
<if test= "param.orderCodes != null " >
and t.orderCode IN
<foreach collection= "param.orderCodes" item= "orderCode" index= "index" separator= "," open= "(" close= ")" >
#{orderCode}
</foreach>
</if>
<if test= "idArr != null and idArr != ''" >
and dbl.id in
<foreach collection= "idArr" item= "item" open= "(" close= ")" separator= ", " >
#{item }
<if test= "param. idArr != null " >
and dbl.id IN
<foreach collection= "param. idArr" item= "id" index= "index" separator= "," open= "(" close= ") " >
#{id }
</foreach>
</if>
</where>
GROUP BY dbl.id
GROUP BY
dbl.id
ORDER BY
dbl.create_time DESC
</select>
<select id= "selectDistrilbutionBillLadingPage" resultMap= "distrilbutionBillLadingResultMap" >