|
|
@@ -83,7 +83,7 @@
|
|
|
kll.receipt_time receiptTime,
|
|
|
kll.remark,
|
|
|
kll.status,
|
|
|
- kll.create_by createBy,
|
|
|
+ kll.create_by createBy,
|
|
|
kllu.top_ent_id checkEntId,
|
|
|
kllu.contacts,
|
|
|
kllu.phone,
|
|
|
@@ -234,7 +234,7 @@
|
|
|
kllu2.unit_type = #{logisticsReq.unitTypeTwo,jdbcType=INTEGER}
|
|
|
<where>
|
|
|
kll.del_flag = 0
|
|
|
- and kllu2.top_ent_id = #{logisticsReq.entId,jdbcType=BIGINT}
|
|
|
+ and kllu2.top_ent_id = #{logisticsReq.entId,jdbcType=BIGINT}
|
|
|
<if test="logisticsReq.unitType != null and logisticsReq.unitType == 2">
|
|
|
and kll.status not in (1, 6)
|
|
|
</if>
|
|
|
@@ -243,14 +243,14 @@
|
|
|
</if>
|
|
|
<if test="logisticsReq.startCreateTime != null and logisticsReq.startCreateTime != '' and logisticsReq.endCreateTime != null and logisticsReq.endCreateTime != ''">
|
|
|
and kll.generate_time between #{logisticsReq.startCreateTime,jdbcType=TIMESTAMP}
|
|
|
- and #{logisticsReq.endCreateTime,jdbcType=TIMESTAMP}
|
|
|
+ and #{logisticsReq.endCreateTime,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="logisticsReq.keywords != null and logisticsReq.keywords != ''">
|
|
|
and (
|
|
|
- kll.l_ledger_no like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
- or kllu.firm_name like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
- or kllu.contacts like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
- )
|
|
|
+ kll.l_ledger_no like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
+ or kllu.firm_name like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
+ or kllu.contacts like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
|
|
|
+ )
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
@@ -313,4 +313,16 @@
|
|
|
and kllu2.top_ent_id = #{entTarget,jdbcType=BIGINT}
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="countSize" resultType="com.sckw.payment.model.dto.LedgerSize">
|
|
|
+ select count(distinct if(kllu.unit_type = 2, kll.id, null)) send,
|
|
|
+ count(distinct if(kllu.unit_type = 1, kll.id, null)) receive
|
|
|
+ from kwp_ledger_logistics kll
|
|
|
+ inner join kwp_ledger_logistics_unit kllu on kll.id = kllu.l_ledger_id and kllu.del_flag = 0
|
|
|
+ <where>
|
|
|
+ kll.del_flag = 0
|
|
|
+ and kll.status != 1
|
|
|
+ and kllu.top_ent_id = #{entId,jdbcType=BIGINT}
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|