Merge branch 'master' of http://git.lionquexpress.com/wuweihua/BMS
This commit is contained in:
@@ -20,6 +20,6 @@ public class ArBillGenerateQuery
|
||||
/** 订单号、运单号或转单号;支持换行、逗号、分号或空格分隔多个号码。 */
|
||||
private String orderOrTrackingNo;
|
||||
|
||||
/** 全选模式下,排除弹窗使用的附加订单号、运单号或转单号关键词。 */
|
||||
/** 全选模式下,排除弹窗使用的多行订单号、运单号或转单号。 */
|
||||
private String excludeOrderOrTrackingNo;
|
||||
}
|
||||
|
||||
+4
-2
@@ -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 <= #{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 <= #{cutoffDate}
|
||||
and p.ar_bill_status in
|
||||
|
||||
Reference in New Issue
Block a user