diff --git a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java
index 52ccdb8b..6330f8c1 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/domain/PrcOrderBill.java
@@ -97,7 +97,6 @@ public class PrcOrderBill extends BaseEntity
private Long psvId;
/** 套餐明细ID(prc_price_set_detail.psd_id) */
private Long psdId;
- private Long productCountryId;
private BigDecimal weightMin;
private BigDecimal weightMax;
private String weightLabel;
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcOrderBillServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcOrderBillServiceImpl.java
index ec5cc24c..5892017f 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcOrderBillServiceImpl.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/PrcOrderBillServiceImpl.java
@@ -1571,7 +1571,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
bill.setCustomerPricesetId(result.getCustomerPricesetId());
bill.setPsvId(result.getPsvId());
bill.setPsdId(result.getPsdId());
- bill.setProductCountryId(result.getProductCountryId());
bill.setWeightMin(result.getWeightMin());
bill.setWeightMax(result.getWeightMax());
bill.setWeightLabel(result.getWeightLabel());
@@ -2119,7 +2118,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
r.setProductName(bill.getProductName());
r.setCountryCode(bill.getCountryCode());
r.setCountryName(bill.getCountryName());
- r.setProductCountryId(bill.getProductCountryId());
r.setWeightMin(bill.getWeightMin());
r.setWeightMax(bill.getWeightMax());
r.setWeightLabel(bill.getWeightLabel());
diff --git a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java
index 36531f73..39e2f3ce 100644
--- a/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java
+++ b/bms-back/bms-system/src/main/java/com/bms/price/service/impl/TmsPriceQuoteServiceImpl.java
@@ -1657,6 +1657,9 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
to.setSetType(from.getSetType());
to.setBindPriority(from.getBindPriority());
to.setCustomerPricesetId(from.getCustomerPricesetId());
+ to.setPsvId(from.getPsvId());
+ to.setVersionNo(from.getVersionNo());
+ to.setPsdId(from.getPsdId());
to.setProductCode(from.getProductCode());
to.setProductName(from.getProductName());
to.setCountryCode(from.getCountryCode());
diff --git a/bms-back/bms-system/src/main/resources/mapper/price/PrcOrderBillMapper.xml b/bms-back/bms-system/src/main/resources/mapper/price/PrcOrderBillMapper.xml
index eaae5c9a..25733f12 100644
--- a/bms-back/bms-system/src/main/resources/mapper/price/PrcOrderBillMapper.xml
+++ b/bms-back/bms-system/src/main/resources/mapper/price/PrcOrderBillMapper.xml
@@ -52,7 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
@@ -95,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
- set_type, bind_priority, customer_priceset_id, psv_id, psd_id, product_country_id,
+ set_type, bind_priority, customer_priceset_id, psv_id, psd_id,
weight_min, weight_max, weight_label, effective_date, charge_weight,
freight_rate, base_freight_rate, discount_percent, registration_fee,
freight_amount, surcharge_amount, income_total, pay_total, currency, ar_bill_status,
@@ -114,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.shipper_name, p.consignee_name, p.dest_postcode, p.warehouse_code, p.order_time, p.order_status, p.bl_pickup, p.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,
+ p.set_type, p.bind_priority, p.customer_priceset_id, p.psv_id, p.psd_id,
p.weight_min, p.weight_max, p.weight_label, p.effective_date, p.charge_weight,
p.freight_rate, p.base_freight_rate, p.discount_percent, p.registration_fee,
p.freight_amount, p.surcharge_amount,
@@ -784,7 +783,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
shipper_name, consignee_name, dest_postcode, warehouse_code, order_time, order_status, bl_pickup, pickup_date, 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,
- set_type, bind_priority, customer_priceset_id, psv_id, psd_id, product_country_id,
+ set_type, bind_priority, customer_priceset_id, psv_id, psd_id,
weight_min, weight_max, weight_label, effective_date, charge_weight,
freight_rate, base_freight_rate, discount_percent, registration_fee,
freight_amount, surcharge_amount, income_total, pay_total, currency, ar_bill_status,
@@ -798,7 +797,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{shipperName}, #{consigneeName}, #{destPostcode}, #{warehouseCode}, #{orderTime}, #{orderStatus}, #{blPickup}, #{pickupDate}, #{orderRemark},
#{productCode}, #{productName}, #{countryCode}, #{countryName}, #{weight}, #{bizDate}, #{tmsId},
#{matchSource}, #{matchMessage}, #{priceSetId}, #{priceSetCode}, #{priceSetName},
- #{setType}, #{bindPriority}, #{customerPricesetId}, #{psvId}, #{psdId}, #{productCountryId},
+ #{setType}, #{bindPriority}, #{customerPricesetId}, #{psvId}, #{psdId},
#{weightMin}, #{weightMax}, #{weightLabel}, #{effectiveDate}, #{chargeWeight},
#{freightRate}, #{baseFreightRate}, #{discountPercent}, #{registrationFee},
#{freightAmount}, #{surchargeAmount}, #{incomeTotal}, #{payTotal}, #{currency}, #{arBillStatus},
@@ -857,7 +856,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_priceset_id = #{customerPricesetId},
psv_id = #{psvId},
psd_id = #{psdId},
- product_country_id = #{productCountryId},
weight_min = #{weightMin},
weight_max = #{weightMax},
weight_label = #{weightLabel},
diff --git a/bms-back/sql/bms_init.sql b/bms-back/sql/bms_init.sql
index e7f48bd0..49920000 100644
--- a/bms-back/sql/bms_init.sql
+++ b/bms-back/sql/bms_init.sql
@@ -944,7 +944,6 @@ CREATE TABLE `prc_order_bill` (
`customer_priceset_id` bigint(20) DEFAULT NULL COMMENT '客户套餐绑定ID',
`psv_id` bigint(20) DEFAULT NULL COMMENT '套餐版本ID,对应 prc_price_set_version.psv_id',
`psd_id` bigint(20) DEFAULT NULL COMMENT '套餐明细ID,对应 prc_price_set_detail.psd_id',
- `product_country_id` bigint(20) DEFAULT NULL COMMENT '关联 product_country.detail_id',
`weight_min` decimal(10,4) DEFAULT NULL COMMENT '重量段下限',
`weight_max` decimal(10,4) DEFAULT NULL COMMENT '重量段上限',
`weight_label` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '重量段展示',
diff --git a/bms-back/sql/price/prc_order_bill_drop_product_country_id.sql b/bms-back/sql/price/prc_order_bill_drop_product_country_id.sql
new file mode 100644
index 00000000..b3614500
--- /dev/null
+++ b/bms-back/sql/price/prc_order_bill_drop_product_country_id.sql
@@ -0,0 +1,11 @@
+-- prc_order_bill: drop unused product_country_id
+SET @db = DATABASE();
+
+SET @sql = (
+ SELECT IF(COUNT(*) > 0,
+ 'ALTER TABLE prc_order_bill DROP COLUMN product_country_id',
+ 'SELECT 1')
+ FROM information_schema.COLUMNS
+ WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'prc_order_bill' AND COLUMN_NAME = 'product_country_id'
+);
+PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;