From 4475bff243429f30893cc41a2957d7950ea58181 Mon Sep 17 00:00:00 2001 From: caojia <1301869380@qq.com> Date: Wed, 30 Sep 2026 14:47:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E6=94=B6=E8=B4=A6=E5=8D=95=E5=8D=95=E4=BB=B7=E5=92=8C=E5=A4=84?= =?UTF-8?q?=E7=90=86=E8=B4=B9=E5=BF=AB=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bms/ar/domain/ArBillDetail.java | 4 ++ .../ar/service/impl/ArBillServiceImpl.java | 37 ++----------------- .../mapper/ar/ArBillDetailMapper.xml | 18 +++++---- ...260930_add_ar_bill_detail_freight_rate.sql | 17 +++++++++ bms-back/sql/bms_init.sql | 2 + 5 files changed, 37 insertions(+), 41 deletions(-) create mode 100644 bms-back/sql/20260930_add_ar_bill_detail_freight_rate.sql diff --git a/bms-back/bms-system/src/main/java/com/bms/ar/domain/ArBillDetail.java b/bms-back/bms-system/src/main/java/com/bms/ar/domain/ArBillDetail.java index 16b85456..f16c5606 100644 --- a/bms-back/bms-system/src/main/java/com/bms/ar/domain/ArBillDetail.java +++ b/bms-back/bms-system/src/main/java/com/bms/ar/domain/ArBillDetail.java @@ -34,6 +34,10 @@ public class ArBillDetail implements Serializable { private BigDecimal actualWeight; private BigDecimal volumeWeight; private BigDecimal chargeWeight; + /** 订单计费时命中的运费单价快照,对应 prc_order_bill.freight_rate。 */ + private BigDecimal freightRate; + /** 订单计费时的标准处理费快照,对应 prc_order_bill.registration_fee。 */ + private BigDecimal registrationFee; private BigDecimal pkgLength; private BigDecimal pkgWidth; private BigDecimal pkgHeight; diff --git a/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java index 63fe9b5a..889ce3bd 100644 --- a/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java +++ b/bms-back/bms-system/src/main/java/com/bms/ar/service/impl/ArBillServiceImpl.java @@ -1142,6 +1142,8 @@ public class ArBillServiceImpl implements IArBillService { detail.setActualWeight(source.getActualWeight()); detail.setVolumeWeight(source.getVolumeWeight()); detail.setChargeWeight(source.getChargeWeight() == null ? source.getWeight() : source.getChargeWeight()); + detail.setFreightRate(source.getFreightRate()); + detail.setRegistrationFee(source.getRegistrationFee()); detail.setPkgLength(source.getPkgLength()); detail.setPkgWidth(source.getPkgWidth()); detail.setPkgHeight(source.getPkgHeight()); @@ -1614,42 +1616,11 @@ public class ArBillServiceImpl implements IArBillService { } private BigDecimal exportUnitPrice(ArBillDetail detail) { - BigDecimal direct = firstFeeUnitPrice(detail.getFees()); - if (direct != null) { - return direct; - } - BigDecimal freight = feeAmount(detail, "BASIC_FREIGHT"); - if (freight == null || detail.getChargeWeight() == null || detail.getChargeWeight().compareTo(BigDecimal.ZERO) <= 0) { - return null; - } - return freight.divide(detail.getChargeWeight(), 4, java.math.RoundingMode.HALF_UP); - } - - private BigDecimal firstFeeUnitPrice(List fees) { - if (fees == null) { - return null; - } - for (ArBillDetailFee fee : fees) { - if (fee.getUnitPrice() != null) { - return fee.getUnitPrice(); - } - } - return null; + return detail == null ? null : detail.getFreightRate(); } private BigDecimal exportProcessingFee(ArBillDetail detail) { - BigDecimal total = BigDecimal.ZERO; - boolean found = false; - if (detail.getFees() != null) { - for (ArBillDetailFee fee : detail.getFees()) { - String name = fee.getFeeName() == null ? "" : fee.getFeeName(); - if ("REGISTRATION_FEE".equalsIgnoreCase(fee.getFeeType()) || name.contains("处理费")) { - total = total.add(nvl(fee.getAmount())); - found = true; - } - } - } - return found ? total : null; + return detail == null ? null : detail.getRegistrationFee(); } private String exportFormula(ArBillDetail detail) { diff --git a/bms-back/bms-system/src/main/resources/mapper/ar/ArBillDetailMapper.xml b/bms-back/bms-system/src/main/resources/mapper/ar/ArBillDetailMapper.xml index bb27940a..7aae0fd5 100644 --- a/bms-back/bms-system/src/main/resources/mapper/ar/ArBillDetailMapper.xml +++ b/bms-back/bms-system/src/main/resources/mapper/ar/ArBillDetailMapper.xml @@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -35,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -43,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select d.detail_id, d.ar_bill_id, d.prc_order_bill_id, d.detail_no, d.order_no, d.tracking_no, d.transfer_no, d.receive_time, d.product_code, d.product_name, d.goods_description, d.country_code, d.country_name, d.dest_postcode, - d.actual_weight, d.volume_weight, d.charge_weight, d.pkg_length, d.pkg_width, d.pkg_height, + d.actual_weight, d.volume_weight, d.charge_weight, d.freight_rate, d.registration_fee, d.pkg_length, d.pkg_width, d.pkg_height, d.currency, d.total_amount, d.remark, d.create_by, d.create_time, f.detail_fee_id as fee_detail_id, f.detail_id as fee_parent_detail_id, f.prc_income_bill_fee_id as fee_prc_income_bill_fee_id, @@ -97,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + where customer_id = #{customerId} + order by create_time desc, log_id desc + + + diff --git a/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js b/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js index 7aec7caf..60444d95 100644 --- a/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js +++ b/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js @@ -17,6 +17,15 @@ export function getCustomer(customerId) { }) } +// 查询客户业务操作日志 +export function listCustomerLog(customerId) { + return request({ + url: '/customersupplier/customerinfo/log/list', + method: 'get', + params: { customerId } + }) +} + // 新增客户主 export function addCustomer(data) { return request({ diff --git a/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue b/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue index 39938790..1fc649c2 100644 --- a/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue +++ b/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue @@ -85,6 +85,16 @@ >客户余额 + + 日志 + - + @@ -184,11 +195,62 @@ v-model:limit="queryParams.pageSize" @pagination="getList" /> + + + +
+ 客户编码:{{ logCustomer.customerCode || '-' }} + 共 {{ logList.length }} 条日志(按操作时间倒序) +
+ + + + + + + + + + + + + + + + + + +