“单号”改为多行输入,每行一个,支持最多 2000 个号码。

后端支持换行、空格、逗号、分号分隔。
自动去重、忽略空行。
同时匹配订单号、运单号、转单号:
This commit is contained in:
caojia
2026-09-23 11:28:55 +08:00
parent 67c9d28c8c
commit c92c8c0a8e
6 changed files with 81 additions and 33 deletions
@@ -267,17 +267,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- rename_bill_tables.sql 已将需求文档中的 prc_bill 映射为本项目的 prc_order_bill。 -->
<!-- 生成弹窗预览:按客户、截止日、币种和订单号/运单号/转单号 OR 条件分页查询未入账订单。 -->
<sql id="orderIdentifierCondition">
<if test="orderIdentifiers != null and orderIdentifiers.size() > 0">
and (
p.order_no in
<foreach collection="orderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.tracking_no in
<foreach collection="orderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.transfer_no in
<foreach collection="orderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
)
</if>
</sql>
<select id="selectPrcOrderBillByCustomerPeriod" resultMap="PrcOrderBillResult">
<include refid="selectArBillSourceVo"/>
where p.customer_id = #{customerId}
<if test="customerCode != null and customerCode != ''">
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<if test="orderOrTrackingNo != null and orderOrTrackingNo != ''">
and (p.order_no like concat('%', #{orderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{orderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{orderOrTrackingNo}, '%'))
</if>
<include refid="orderIdentifierCondition"/>
<if test="excludeOrderOrTrackingNo != null and excludeOrderOrTrackingNo != ''">
and (p.order_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
@@ -314,11 +329,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerCode != null and customerCode != ''">
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<if test="orderOrTrackingNo != null and orderOrTrackingNo != ''">
and (p.order_no like concat('%', #{orderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{orderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{orderOrTrackingNo}, '%'))
</if>
<include refid="orderIdentifierCondition"/>
<if test="excludeOrderOrTrackingNo != null and excludeOrderOrTrackingNo != ''">
and (p.order_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
@@ -339,11 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerCode != null and customerCode != ''">
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<if test="orderOrTrackingNo != null and orderOrTrackingNo != ''">
and (p.order_no like concat('%', #{orderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{orderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{orderOrTrackingNo}, '%'))
</if>
<include refid="orderIdentifierCondition"/>
and p.biz_date &lt;= #{cutoffDate}
and p.ar_bill_status in
<foreach collection="arBillStatuses" item="status" open="(" separator="," close=")">
@@ -412,11 +419,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerCode != null and customerCode != ''">
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<if test="orderOrTrackingNo != null and orderOrTrackingNo != ''">
and (p.order_no like concat('%', #{orderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{orderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{orderOrTrackingNo}, '%'))
</if>
<include refid="orderIdentifierCondition"/>
<if test="currency != null and currency != ''">
and p.currency = #{currency}
</if>