This commit is contained in:
linfso 2025-04-01 07:56:23 +08:00
parent 0654dcdab6
commit 116672837b
3 changed files with 64 additions and 11 deletions

View File

@ -283,6 +283,7 @@
<if test="orderSn != null and orderSn != ''">
and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') )
</if>
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and `bill_code`=#{billCode}
</if>

View File

@ -29,7 +29,7 @@
<if test="id != null "> and id = #{id}</if>
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
<!--
and `bill_code` ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
-->
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">

View File

@ -492,8 +492,16 @@
<!-- 多个运单查询-->
<select id="selectEmisWaybillByMutiBillCode" parameterType="EmisWaybill" resultMap="EmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
where FIND_IN_SET(`bill_code`,#{billCode})
where a.del_flag='0'
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and a.`bill_code`=#{billCode}
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="params.orderSnSortList != null and params.orderSnSortList.size >0 ">
ORDER BY FIELD
@ -519,8 +527,19 @@
a.del_flag='0' and a.order_type='0' and a.waybill_status='0' and a.order_status in('0','3')
<if test="id != null "> and a.id = #{id}</if>
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') ) </if>
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') ) </if>
<if test="orderSn != null and orderSn != ''">
and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') )
</if>
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and ( a.`bill_code`=#{billCode} or a.bill_code like concat(#{billCode}, '%') )
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="custOrderId != null and custOrderId != ''"> and cust_order_id=#{custOrderId}</if>
<if test="billCodeSub != null and billCodeSub != ''"> and bill_code_sub like concat('%', #{billCodeSub}, '%')</if>
@ -757,7 +776,18 @@
<if test="id != null "> and a.id = #{id}</if>
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(a.`order_sn`,#{orderSn}) or a.order_sn like concat('%', #{orderSn}, '%') ) </if>
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(a.`bill_code`,#{billCode}) or a.bill_code like concat('%', #{billCode}, '%') ) </if>
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and ( a.`bill_code`=#{billCode} or a.bill_code like concat(#{billCode}, '%') )
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="orderType != null and orderType != ''"> and a.order_type=#{orderType}</if>
<if test="custOrderId != null and custOrderId != ''"> and a.cust_order_id=#{custOrderId}</if>
<if test="billCodeSub != null and billCodeSub != ''"> and a.bill_code_sub like concat('%', #{billCodeSub}, '%')</if>
@ -1038,8 +1068,14 @@
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') ) </if>
<if test="billCode != null and billCode != ''">
and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and ( a.`bill_code`=#{billCode} or a.bill_code like concat(#{billCode}, '%') )
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="custOrderId != null and custOrderId != ''"> and cust_order_id=#{custOrderId}</if>
@ -1527,8 +1563,14 @@
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') ) </if>
<if test="billCode != null and billCode != ''">
and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and ( a.`bill_code`=#{billCode} or a.bill_code like concat(#{billCode}, '%') )
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="custOrderId != null and custOrderId != ''"> and cust_order_id=#{custOrderId}</if>
@ -1964,7 +2006,17 @@
<include refid="selectEmisWaybillVo"/>
<where>
a.del_flag='0' and a.order_status !='0' and a.order_status!='2'
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET( a.`bill_code`,#{billCode}) or a.bill_code like concat('%', #{billCode}, '%') ) </if>
<if test="billCode != null and billCode != '' and params.billCodeSortList == null">
and ( a.`bill_code`=#{billCode} or a.bill_code like concat(#{billCode}, '%') )
</if>
<if test="params.billCodeSortList != null and params.billCodeSortList.size > 1 ">
and a.bill_code in
<foreach collection="params.billCodeSortList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''"> and a.dispatch_underling_site_code=#{dispatchUnderlingSiteCode}</if>
<if test="sendSiteCode != null and sendSiteCode != ''"> and a.send_site_code= #{sendSiteCode}</if>