🐛 修正应收账单收货时间来源为订单扩展表

This commit is contained in:
caojia
2026-10-12 09:17:37 +08:00
parent b68cefd8d0
commit 3ef6ea78a9
4 changed files with 20 additions and 5 deletions
@@ -1159,7 +1159,7 @@ public class ArBillServiceImpl implements IArBillService {
detail.setOrderNo(source.getOrderNo());
detail.setTrackingNo(source.getTrackingNo());
detail.setTransferNo(source.getTransferNo());
detail.setReceiveTime(source.getOrderTime());
detail.setReceiveTime(source.getPickupDate());
detail.setProductCode(source.getProductCode());
detail.setProductName(source.getProductName());
detail.setGoodsDescription(source.getOrderRemark());
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.bms.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -59,6 +60,9 @@ public class PrcOrderBill extends BaseEntity
private String warehouseCode;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime;
/** 应收来源查询专用:从 prc_order_bill_ext.pickup_date 读取的收件时间。 */
@JsonIgnore
private Date pickupDate;
private String orderRemark;
private String productCode;
private String productName;
@@ -76,6 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
</resultMap>
<resultMap type="PrcOrderBill" id="PrcOrderBillArSourceResult" extends="PrcOrderBillResult">
<result property="pickupDate" column="pickup_date"/>
</resultMap>
<sql id="selectPrcOrderBillVo">
select bill_id, bill_key, order_no, tracking_no, transfer_no,
belong_saler, belong_saler_code, settlement_man, settlement_man_code, service_man, service_man_code,
@@ -99,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.belong_saler, p.belong_saler_code, p.settlement_man, p.settlement_man_code, p.service_man, p.service_man_code,
p.customer_id, p.customer_code, p.customer_name,
p.pieces, p.actual_weight, p.volume, p.volume_weight, p.pkg_length, p.pkg_width, p.pkg_height,
p.shipper_name, p.consignee_name, p.dest_postcode, p.warehouse_code, p.order_time, p.order_remark,
p.shipper_name, p.consignee_name, p.dest_postcode, p.warehouse_code, p.order_time, e.pickup_date, p.order_remark,
p.product_code, p.product_name, p.country_code, p.country_name, p.weight, p.biz_date, p.tms_id,
p.match_source, p.match_message, p.price_set_id, p.price_set_code, p.price_set_name,
p.set_type, p.bind_priority, p.customer_priceset_id, p.psv_id, p.psd_id, p.product_country_id,
@@ -114,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.customer_active_status, p.credit_arrears_status, p.round_mode,
p.created_by, p.create_time, p.updated_by, p.update_time
from prc_order_bill p
left join prc_order_bill_ext e on e.bill_id = p.bill_id
</sql>
<select id="selectPrcOrderBillByOrderNo" parameterType="String" resultMap="PrcOrderBillResult">
@@ -341,7 +346,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</sql>
<select id="selectPrcOrderBillByCustomerPeriod" resultMap="PrcOrderBillResult">
<select id="selectPrcOrderBillByCustomerPeriod" resultMap="PrcOrderBillArSourceResult">
<include refid="selectArBillSourceVo"/>
where p.customer_id = #{customerId}
<if test="customerCode != null and customerCode != ''">
@@ -457,7 +462,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<!-- 异步生成使用 bill_id 游标批量读取,避免深分页和一次加载全量订单。 -->
<select id="selectPrcOrderBillByCustomerPeriodCursor" resultMap="PrcOrderBillResult">
<select id="selectPrcOrderBillByCustomerPeriodCursor" resultMap="PrcOrderBillArSourceResult">
<include refid="selectArBillSourceVo"/>
<include refid="customerPeriodConditions"/>
<if test="lastSourceBillId != null and lastSourceBillId != ''">
@@ -474,7 +479,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="customerPeriodConditions"/>
</select>
<select id="selectPrcOrderBillByCustomerCutoffAndIds" resultMap="PrcOrderBillResult">
<select id="selectPrcOrderBillByCustomerCutoffAndIds" resultMap="PrcOrderBillArSourceResult">
<include refid="selectArBillSourceVo"/>
where p.customer_id = #{customerId}
and p.biz_date &lt;= #{cutoffDate}