增加收货重

This commit is contained in:
wuweihua
2026-10-13 17:47:22 +08:00
parent 490f5dd213
commit 825663be01
10 changed files with 41 additions and 6 deletions
@@ -49,6 +49,8 @@ public class PrcOrderBill extends BaseEntity
private List<String> customerCodes;
private Integer pieces;
private BigDecimal actualWeight;
/** Receive weight from upstream TAB_ORDER.WEIGHT */
private BigDecimal receiveWeight;
private BigDecimal volume;
private BigDecimal volumeWeight;
private BigDecimal pkgLength;
@@ -38,6 +38,8 @@ public class TmsPriceBillRequest extends TmsPriceQuoteRequest
private String customerName;
private Integer pieces;
private BigDecimal actualWeight;
/** Upstream TAB_ORDER.WEIGHT (receive weight) */
private BigDecimal receiveWeight;
private BigDecimal volume;
private BigDecimal volumeWeight;
private BigDecimal pkgLength;
@@ -105,6 +105,8 @@ public class TmsPriceQuoteResult implements Serializable
private String refundStatus;
private Integer pieces;
private BigDecimal actualWeight;
/** Receive weight from upstream TAB_ORDER.WEIGHT */
private BigDecimal receiveWeight;
private BigDecimal volume;
private BigDecimal volumeWeight;
private BigDecimal pkgLength;
@@ -46,8 +46,14 @@ public class OracleOrderBillMapper
String countryName = firstStr(row, "COUNTRY_NAME", "COUNTRY_EINGTH_NAME", "COUNTRY");
req.setCountryName(countryName);
req.setDestPostcode(firstStr(row, "CONSIGNEE_POSTCODE"));
// Quote / prc_order_bill.weight: use upstream TAB_ORDER.WEIGHT directly.
req.setWeight(firstPositiveDecimal(row, "WEIGHT"));
// TAB_ORDER.DIMENSIONAL_WEIGHT_FACTOR = billing weight -> quote weight / prc_order_bill.weight
BigDecimal chargeWeight = firstPositiveDecimal(row, "DIMENSIONAL_WEIGHT_FACTOR");
BigDecimal weight = chargeWeight != null
? chargeWeight
: firstPositiveDecimal(row, "ACTUAL_WEIGHT", "PUSH_WEIGHT", "WEIGHT", "VOLUME_WEIGHT");
req.setWeight(weight);
// TAB_ORDER.WEIGHT = receive weight (收货重)
req.setReceiveWeight(firstDecimal(row, "WEIGHT"));
req.setActualWeight(firstPositiveDecimal(row, "ACTUAL_WEIGHT", "PUSH_WEIGHT", "WEIGHT"));
req.setPieces(firstInt(row, "ORDER_PIECE", "PACKAGE_NUM", "PRODUCT_SUM"));
req.setVolume(toVolumeM3(firstDecimal(row, "VOLUME")));
@@ -1081,6 +1081,7 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
bill.setCustomerActiveStatus(customerActiveStatus);
bill.setPieces(request.getPieces());
bill.setActualWeight(request.getActualWeight());
bill.setReceiveWeight(request.getReceiveWeight());
bill.setVolume(request.getVolume());
bill.setVolumeWeight(request.getVolumeWeight());
bill.setPkgLength(request.getPkgLength());
@@ -1699,6 +1700,7 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
r.setRefundStatus(bill.getRefundStatus());
r.setPieces(bill.getPieces());
r.setActualWeight(bill.getActualWeight());
r.setReceiveWeight(bill.getReceiveWeight());
r.setVolume(bill.getVolume());
r.setVolumeWeight(bill.getVolumeWeight());
r.setPkgLength(bill.getPkgLength());
@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="customerName" column="customer_name" />
<result property="pieces" column="pieces" />
<result property="actualWeight" column="actual_weight" />
<result property="receiveWeight" column="receive_weight" />
<result property="volume" column="volume" />
<result property="volumeWeight" column="volume_weight" />
<result property="pkgLength" column="pkg_length" />
@@ -85,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
customer_id, customer_code, customer_name,
pieces, actual_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
pieces, actual_weight, receive_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
shipper_name, consignee_name, dest_postcode, warehouse_code, order_time, order_remark,
product_code, product_name, country_code, country_name, weight, biz_date, tms_id,
match_source, match_message, price_set_id, price_set_code, price_set_name,
@@ -103,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select p.bill_id, p.bill_key, p.order_no, p.tracking_no, p.transfer_no,
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.pieces, p.actual_weight, p.receive_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, 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,
@@ -521,7 +522,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
customer_id, customer_code, customer_name,
pieces, actual_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
pieces, actual_weight, receive_weight, volume, volume_weight, pkg_length, pkg_width, pkg_height,
shipper_name, consignee_name, dest_postcode, warehouse_code, order_time, order_remark,
product_code, product_name, country_code, country_name, weight, biz_date, tms_id,
match_source, match_message, price_set_id, price_set_code, price_set_name,
@@ -535,7 +536,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{billId}, #{billKey}, #{orderNo}, #{trackingNo}, #{transferNo},
#{belongSaler}, #{belongSalerCode}, #{settlementMan}, #{settlementManCode}, #{serviceMan}, #{serviceManCode},
#{customerId}, #{customerCode}, #{customerName},
#{pieces}, #{actualWeight}, #{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
#{pieces}, #{actualWeight}, #{receiveWeight}, #{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
#{shipperName}, #{consigneeName}, #{destPostcode}, #{warehouseCode}, #{orderTime}, #{orderRemark},
#{productCode}, #{productName}, #{countryCode}, #{countryName}, #{weight}, #{bizDate}, #{tmsId},
#{matchSource}, #{matchMessage}, #{priceSetId}, #{priceSetCode}, #{priceSetName},
@@ -564,6 +565,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_name = #{customerName},
pieces = #{pieces},
actual_weight = #{actualWeight},
receive_weight = #{receiveWeight},
volume = #{volume},
volume_weight = #{volumeWeight},
pkg_length = #{pkgLength},
+1
View File
@@ -1004,6 +1004,7 @@ CREATE TABLE `prc_order_bill` (
`customer_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '客户名称',
`pieces` int(11) DEFAULT NULL COMMENT '件数',
`actual_weight` decimal(10,3) DEFAULT NULL COMMENT '实际重量KG',
`receive_weight` decimal(10,3) DEFAULT NULL COMMENT '收货重KG(上游TAB_ORDER.WEIGHT)',
`volume` decimal(12,4) DEFAULT NULL COMMENT '体积m3',
`volume_weight` decimal(10,3) DEFAULT NULL COMMENT '材积重KG',
`pkg_length` decimal(10,2) DEFAULT NULL COMMENT '长CM',
@@ -0,0 +1,16 @@
-- prc_order_bill.receive_weight from upstream TAB_ORDER.WEIGHT
SET NAMES utf8mb4;
SET @col := (
SELECT COLUMN_NAME FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'prc_order_bill'
AND COLUMN_NAME = 'receive_weight'
LIMIT 1
);
SET @sql := IF(
@col IS NULL,
'ALTER TABLE prc_order_bill ADD COLUMN receive_weight decimal(10,3) DEFAULT NULL COMMENT ''收货重KG(上游TAB_ORDER.WEIGHT)'' AFTER actual_weight',
'SELECT 1'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
@@ -160,6 +160,7 @@ const columns = [
{ label: '国家', prop: 'country', minWidth: 130, slot: 'country' },
{ label: '件数', prop: 'pieces', align: 'center', width: 70 },
{ label: '计费重', prop: 'chargeWeight', align: 'center', width: 90, slot: 'chargeWeight' },
{ label: '收货重', prop: 'receiveWeight', align: 'center', width: 90, slot: 'chargeWeight' },
{ label: '应收总额', prop: 'incomeTotal', align: 'right', width: 120, slot: 'incomeTotal' },
{ label: '应付总额', prop: 'payTotal', align: 'right', width: 120, slot: 'payTotal' },
{ label: '计价来源', prop: 'matchSource', align: 'center', width: 130, slot: 'matchSource' },
@@ -32,6 +32,7 @@
<el-descriptions-item label="件数">{{ detail.pieces != null ? detail.pieces : '-' }}</el-descriptions-item>
<el-descriptions-item label="尺寸(cm)">{{ dimLabel(detail) }}</el-descriptions-item>
<el-descriptions-item label="实重(kg)">{{ formatWeight(detail.actualWeight) }}</el-descriptions-item>
<el-descriptions-item label="收货重(kg)">{{ formatWeight(detail.receiveWeight) }}</el-descriptions-item>
<el-descriptions-item label="材积重(kg)">{{ formatWeight(detail.volumeWeight) }}</el-descriptions-item>
<el-descriptions-item label="体积(m³)">{{ formatMoney(detail.volume) }}</el-descriptions-item>
<el-descriptions-item label="下单时间">{{ formatDateTime(detail.orderTime) }}</el-descriptions-item>