更改产品获取数据

This commit is contained in:
wuweihua
2026-10-20 18:43:33 +08:00
parent 7655713319
commit 66d95a0da9
9 changed files with 38 additions and 7 deletions
@@ -75,6 +75,10 @@ public class PrcOrderBillExt implements Serializable
private Integer payType;
private String lineCode;
private String lineName;
/** 上游产品代码 PRODUCT_CODE */
private String productCode;
/** 上游产品名称 PRODUCT_NAME */
private String productName;
private String productType;
private String lineType;
private String cargoName;
@@ -36,6 +36,8 @@ public class TmsPriceBillRequest extends TmsPriceQuoteRequest
/** 客服员编码 */
private String serviceManCode;
private String customerName;
/** From upstream LINE_NAME (fallback PRODUCT_NAME). */
private String productName;
private Integer pieces;
private BigDecimal actualWeight;
/** Upstream TAB_ORDER.WEIGHT (receive weight) */
@@ -81,6 +81,8 @@ public final class OracleOrderBillExtFiller
ext.setPayType(integer(row, "PAY_TYPE"));
ext.setLineCode(str(row, "LINE_CODE"));
ext.setLineName(str(row, "LINE_NAME"));
ext.setProductCode(str(row, "PRODUCT_CODE"));
ext.setProductName(str(row, "PRODUCT_NAME"));
ext.setProductType(str(row, "PRODUCT_TYPE"));
ext.setLineType(str(row, "LINE_TYPE"));
ext.setCargoName(str(row, "CARGO_NAME"));
@@ -35,13 +35,14 @@ public class OracleOrderBillMapper
req.setUpstreamRow(row);
req.setCustomerCode(firstStr(row, "CUSTOMER_CODE"));
req.setCustomerName(firstStr(row, "CUSTOMER_NAME"));
String product = firstStr(row, "PRODUCT_CODE");
// Map LINE_CODE/LINE_NAME to product_code/product_name; fallback PRODUCT_*.
String product = firstStr(row, "LINE_CODE", "PRODUCT_CODE");
if (StringUtils.isEmpty(product))
{
product = defaultProductCode;
}
// Keep upstream product code; package miss then maps via product_code_mapping in doQuote.
req.setProductCode(product);
req.setProductName(firstStr(row, "LINE_NAME", "PRODUCT_NAME"));
req.setCountryCode(firstStr(row, "COUNTRY"));
String countryName = firstStr(row, "COUNTRY_NAME", "COUNTRY_EINGTH_NAME", "COUNTRY");
req.setCountryName(countryName);
@@ -2492,6 +2492,7 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
bill.setPickupDate(request.getPickupDate());
bill.setOrderRemark(request.getOrderRemark());
bill.setProductCode(request.getProductCode());
bill.setProductName(request.getProductName());
bill.setCountryCode(request.getCountryCode());
bill.setCountryName(request.getCountryName());
bill.setWeight(request.getWeight());
@@ -388,7 +388,15 @@ public class TmsPriceQuoteServiceImpl implements ITmsPriceQuoteService
// Charge weight keeps 3 decimals; freight unit price keeps 2 (see buildFromRates).
BigDecimal weight = request.getWeight().setScale(3, RoundingMode.HALF_UP);
String destPostcode = emptyToNull(request.getDestPostcode());
String productName = resolveProductName(productCode, bizDate);
String productName = null;
if (request instanceof TmsPriceBillRequest)
{
productName = emptyToNull(((TmsPriceBillRequest) request).getProductName());
}
if (StringUtils.isEmpty(productName))
{
productName = resolveProductName(productCode, bizDate);
}
List<PrcCustomerPriceSet> binds;
if (StringUtils.isNotEmpty(request.getCustomerCode()))
@@ -68,6 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="payType" column="pay_type" />
<result property="lineCode" column="line_code" />
<result property="lineName" column="line_name" />
<result property="productCode" column="product_code" />
<result property="productName" column="product_name" />
<result property="productType" column="product_type" />
<result property="lineType" column="line_type" />
<result property="cargoName" column="cargo_name" />
@@ -182,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectPrcOrderBillExtVo">
select bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time, update_time
select bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_code, product_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time, update_time
from prc_order_bill_ext
</sql>
@@ -198,7 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertPrcOrderBillExt" parameterType="PrcOrderBillExt">
insert into prc_order_bill_ext (
bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_code, product_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
) values (
#{billId},
#{orderNo},
@@ -263,6 +265,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{payType},
#{lineCode},
#{lineName},
#{productCode},
#{productName},
#{productType},
#{lineType},
#{cargoName},
@@ -378,7 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="upsertPrcOrderBillExt" parameterType="PrcOrderBillExt">
insert into prc_order_bill_ext (
bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
bill_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, order_status, create_at, pay_type, line_code, line_name, product_code, product_name, product_type, line_type, cargo_name, product_floor_code, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, pickup_date, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, dimensional_weight_factor, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
) values (
#{billId},
#{orderNo},
@@ -443,6 +447,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{payType},
#{lineCode},
#{lineName},
#{productCode},
#{productName},
#{productType},
#{lineType},
#{cargoName},
@@ -554,7 +560,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{mrn},
sysdate()
)
on duplicate key update
on duplicate key update
order_no = values(order_no),
upstream_id = values(upstream_id),
line_no = values(line_no),
@@ -617,6 +623,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pay_type = values(pay_type),
line_code = values(line_code),
line_name = values(line_name),
product_code = values(product_code),
product_name = values(product_name),
product_type = values(product_type),
line_type = values(line_type),
cargo_name = values(cargo_name),