选择排除订单 页面支持输入多行数据

This commit is contained in:
caojia
2026-09-23 16:01:00 +08:00
parent 20363acefe
commit ff29672089
5 changed files with 45 additions and 15 deletions
@@ -20,6 +20,6 @@ public class ArBillGenerateQuery
/** 订单号、运单号或转单号;支持换行、逗号、分号或空格分隔多个号码。 */
private String orderOrTrackingNo;
/** 全选模式下,排除弹窗使用的附加订单号、运单号或转单号关键词。 */
/** 全选模式下,排除弹窗使用的多行订单号、运单号或转单号。 */
private String excludeOrderOrTrackingNo;
}
@@ -224,9 +224,10 @@ public class ArBillServiceImpl implements IArBillService {
public List<PrcOrderBill> previewBill(ArBillGenerateQuery query) {
validatePreviewQuery(query);
List<String> orderIdentifiers = normalizeOrderIdentifiers(query.getOrderOrTrackingNo());
List<String> excludeOrderIdentifiers = normalizeOrderIdentifiers(query.getExcludeOrderOrTrackingNo());
return sourceBillMapper.selectPrcOrderBillByCustomerPeriod(query.getCustomerId(),
query.getCustomerCode(), orderIdentifiers,
StringUtils.trim(query.getExcludeOrderOrTrackingNo()), query.getBillPeriodEnd(), query.getCurrency(),
excludeOrderIdentifiers, query.getBillPeriodEnd(), query.getCurrency(),
eligibleOrderBillStatuses(), ArIncomeBillFeeStatus.UNBILLED.getCode(), null);
}
@@ -237,9 +238,10 @@ public class ArBillServiceImpl implements IArBillService {
public BigDecimal sumPreviewBill(ArBillGenerateQuery query) {
validatePreviewQuery(query);
List<String> orderIdentifiers = normalizeOrderIdentifiers(query.getOrderOrTrackingNo());
List<String> excludeOrderIdentifiers = normalizeOrderIdentifiers(query.getExcludeOrderOrTrackingNo());
return nvl(sourceBillMapper.sumPrcOrderBillIncomeByCustomerPeriod(query.getCustomerId(),
query.getCustomerCode(), orderIdentifiers,
StringUtils.trim(query.getExcludeOrderOrTrackingNo()), query.getBillPeriodEnd(), query.getCurrency(),
excludeOrderIdentifiers, query.getBillPeriodEnd(), query.getCurrency(),
eligibleOrderBillStatuses(), ArIncomeBillFeeStatus.UNBILLED.getCode()));
}
@@ -32,7 +32,7 @@ public interface PrcOrderBillMapper
/** 应收账单生成读取指定客户截止日期前仍存在未出账费用的订单计费快照。 */
public List<PrcOrderBill> selectPrcOrderBillByCustomerPeriod(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("excludeOrderOrTrackingNo") String excludeOrderOrTrackingNo,
@Param("excludeOrderIdentifiers") List<String> excludeOrderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus,
@Param("excludedBillIds") List<String> excludedBillIds);
@@ -40,7 +40,7 @@ public interface PrcOrderBillMapper
/** 统计应收账单预览结果金额,供全选模式展示。 */
BigDecimal sumPrcOrderBillIncomeByCustomerPeriod(@Param("customerId") Long customerId,
@Param("customerCode") String customerCode, @Param("orderIdentifiers") List<String> orderIdentifiers,
@Param("excludeOrderOrTrackingNo") String excludeOrderOrTrackingNo,
@Param("excludeOrderIdentifiers") List<String> excludeOrderIdentifiers,
@Param("cutoffDate") Date cutoffDate, @Param("currency") String currency,
@Param("arBillStatuses") List<String> arBillStatuses, @Param("feeArBillStatus") String feeArBillStatus);
@@ -293,10 +293,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<include refid="orderIdentifierCondition"/>
<if test="excludeOrderOrTrackingNo != null and excludeOrderOrTrackingNo != ''">
and (p.order_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{excludeOrderOrTrackingNo}, '%'))
<if test="excludeOrderIdentifiers != null and excludeOrderIdentifiers.size() > 0">
and (p.order_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.tracking_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.transfer_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
)
</if>
and p.biz_date &lt;= #{cutoffDate}
and p.ar_bill_status in
@@ -330,10 +340,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and p.customer_code like concat('%', #{customerCode}, '%')
</if>
<include refid="orderIdentifierCondition"/>
<if test="excludeOrderOrTrackingNo != null and excludeOrderOrTrackingNo != ''">
and (p.order_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.tracking_no like concat('%', #{excludeOrderOrTrackingNo}, '%')
or p.transfer_no like concat('%', #{excludeOrderOrTrackingNo}, '%'))
<if test="excludeOrderIdentifiers != null and excludeOrderIdentifiers.size() > 0">
and (p.order_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.tracking_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
or p.transfer_no in
<foreach collection="excludeOrderIdentifiers" item="identifier" open="(" separator="," close=")">
#{identifier}
</foreach>
)
</if>
and p.biz_date &lt;= #{cutoffDate}
and p.ar_bill_status in