|
|
@@ -116,6 +116,7 @@
|
|
|
kllu.firm_name firmName,
|
|
|
kll.order_count orderCount
|
|
|
from kwp_ledger_logistics kll
|
|
|
+ inner join kwp_ledger_logistics_track kllt on kll.id = kllt.l_ledger_id and kllt.del_flag = 0
|
|
|
inner join kwp_ledger_logistics_unit kllu
|
|
|
on kll.id = kllu.l_ledger_id and kllu.del_flag = 0 and
|
|
|
kllu.unit_type = #{logisticsReq.unitType,jdbcType=INTEGER}
|
|
|
@@ -147,6 +148,19 @@
|
|
|
or kllu.contacts like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
)
|
|
|
</if>
|
|
|
+ and (
|
|
|
+ (
|
|
|
+ kllt.status = 1 and
|
|
|
+ kllt.create_by in
|
|
|
+ <foreach collection="authList" item="item" open="(" close=")" separator=",">
|
|
|
+ #{item,jdbcType=BIGINT}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ or kllu2.contacts_id in
|
|
|
+ <foreach collection="authList" item="item" open="(" close=")" separator=",">
|
|
|
+ #{item,jdbcType=BIGINT}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</where>
|
|
|
order by kll.generate_time desc
|
|
|
</select>
|
|
|
@@ -359,6 +373,16 @@
|
|
|
or kllu.contacts like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
)
|
|
|
</if>
|
|
|
+ and (
|
|
|
+ kll.create_by in
|
|
|
+ <foreach collection="authList" item="item" open="(" close=")" separator=",">
|
|
|
+ #{item,jdbcType=BIGINT}
|
|
|
+ </foreach>
|
|
|
+ or kllu2.contacts_id in
|
|
|
+ <foreach collection="authList" item="item" open="(" close=")" separator=",">
|
|
|
+ #{item,jdbcType=BIGINT}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
</where>
|
|
|
order by kll.generate_time desc
|
|
|
</select>
|
|
|
@@ -507,31 +531,31 @@
|
|
|
|
|
|
<select id="exportList" resultType="com.sckw.payment.model.dto.LedgerLogisticsDto">
|
|
|
select kll.id,
|
|
|
- kll.l_ledger_no lLedgerNo,
|
|
|
+ kll.l_ledger_no lLedgerNo,
|
|
|
kll.name,
|
|
|
- kll.start_time startTime,
|
|
|
- kll.end_time endTime,
|
|
|
- kll.tax_rate taxRate,
|
|
|
+ kll.start_time startTime,
|
|
|
+ kll.end_time endTime,
|
|
|
+ kll.tax_rate taxRate,
|
|
|
kll.trading,
|
|
|
- kll.total_price totalPrice,
|
|
|
- kll.ex_tax_price exTaxPrice,
|
|
|
- kll.settle_price settlePrice,
|
|
|
- kll.actual_price actualPrice,
|
|
|
+ kll.total_price totalPrice,
|
|
|
+ kll.ex_tax_price exTaxPrice,
|
|
|
+ kll.settle_price settlePrice,
|
|
|
+ kll.actual_price actualPrice,
|
|
|
kll.url,
|
|
|
- kll.generate_time generateTime,
|
|
|
- kll.receipt_time receiptTime,
|
|
|
+ kll.generate_time generateTime,
|
|
|
+ kll.receipt_time receiptTime,
|
|
|
kll.remark,
|
|
|
kll.status,
|
|
|
- kll.create_by createBy,
|
|
|
- kllu.top_ent_id checkEntId,
|
|
|
+ kll.create_by createBy,
|
|
|
+ kllu.top_ent_id checkEntId,
|
|
|
(case
|
|
|
when #{logisticsReq.unitType,jdbcType=INTEGER} = 1 then kll.audit_user
|
|
|
- else kll.success_user end) as contacts,
|
|
|
+ else kll.success_user end) as contacts,
|
|
|
(case
|
|
|
when #{logisticsReq.unitType,jdbcType=INTEGER} = 1 then kll.audit_phone
|
|
|
else kll.success_phone end) as phone,
|
|
|
- kllu.firm_name firmName,
|
|
|
- kll.order_count orderCount
|
|
|
+ kllu.firm_name firmName,
|
|
|
+ kll.order_count orderCount
|
|
|
from kwp_ledger_logistics kll
|
|
|
inner join kwp_ledger_logistics_unit kllu
|
|
|
on kll.id = kllu.l_ledger_id and kllu.del_flag = 0 and
|