This commit is contained in:
linfso 2025-07-02 07:27:16 +08:00
parent 402f38fee0
commit 774bd9be32
2 changed files with 60 additions and 5 deletions

View File

@ -43,8 +43,12 @@ public class EmisTmsCostQuotePrice extends BaseEntity
private BigDecimal distance;
/* 费用类型 运输费 */
private String feeType;
/* 总费用 */
/* 固定总费用 */
private BigDecimal fee;
/* 最低价格 */
private BigDecimal leastPrice;
/* 价格取值 */
private String priceType;
/* 计费单价 */
private BigDecimal price;
/* 费用币种 */
@ -66,10 +70,10 @@ public class EmisTmsCostQuotePrice extends BaseEntity
/* 供应商代码 */
private String supplierCode;
/* 开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startDate;
/* 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDate;
/* 启用状态 1-启用 0-停用 */
private String blOpen;

View File

@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="distance" column="distance" />
<result property="feeType" column="fee_type" />
<result property="fee" column="fee" />
<result property="leastPrice" column="least_price" />
<result property="priceType" column="price_type" />
<result property="price" column="price" />
<result property="currency" column="currency" />
<result property="startWeight" column="start_weight" />
@ -40,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEmisTmsCostQuotePriceVo">
select id, start_site_code, next_site_code, distance, fee_type, fee, price, currency, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, bill_type, supplier_code, start_date, end_date, bl_open, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_tms_cost_quote_price
select id, start_site_code, next_site_code, distance, fee_type, fee, least_price, price_type, price, currency, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, bill_type, supplier_code, start_date, end_date, bl_open, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_tms_cost_quote_price
</sql>
<select id="selectEmisTmsCostQuotePriceList" parameterType="EmisTmsCostQuotePrice" resultMap="EmisTmsCostQuotePriceResult">
@ -78,6 +80,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.start_site_code,
a.next_site_code,
a.distance,
a.least_price,
a.price_type,
a.fee,
a.price,
a.fee_type,
@ -108,6 +112,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND b.batch_no = c.batch_no
and a.start_date <![CDATA[ <= ]]> b.etd and b.etd <![CDATA[ < ]]> a.end_date
AND c.bill_code = #{billCode}
limit 1
</select>
<select id="matchCostQuotePriceByBillAndSite" parameterType="String" resultMap="EmisTmsCostQuotePriceResult">
SELECT
DISTINCT
a.start_site_code,
a.next_site_code,
a.distance,
a.least_price,
a.price_type,
a.fee,
a.price,
a.fee_type,
a.currency,
a.bill_type,
a.supplier_code,
a.start_date,
a.end_date,
a.calculate_expression,
b.batch_no,
b.car_no,
b.etd,
b.trans_weight,
b.total_weight
FROM
emis_tms_cost_quote_price a,
emis_tms_site_batch b,
emis_tms_site_batch_dtl c
WHERE
a.del_flag = '0'
AND b.del_flag = '0'
AND c.del_flag = '0'
AND a.start_site_code = b.start_site_code
AND a.next_site_code = b.next_site_code
AND b.batch_no = c.batch_no
and a.start_date <![CDATA[ <= ]]> b.etd and b.etd <![CDATA[ < ]]> a.end_date
AND c.bill_code = #{billCode}
limit 1
</select>
@ -146,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEmisTmsCostQuotePriceById" parameterType="Long" resultMap="EmisTmsCostQuotePriceResult">
select id, start_site_code, next_site_code, distance, fee_type, fee, price, currency, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, bill_type, supplier_code, start_date, end_date, bl_open, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, start_site_code, next_site_code, distance, fee_type, fee, least_price, price_type, price, currency, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, bill_type, supplier_code, start_date, end_date, bl_open, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_tms_cost_quote_price a
where a.id = #{id}
</select>
@ -160,6 +205,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="distance != null">distance,</if>
<if test="feeType != null and feeType != ''">fee_type,</if>
<if test="fee != null">fee,</if>
<if test="leastPrice != null">least_price,</if>
<if test="priceType != null and priceType != ''">price_type,</if>
<if test="price != null">price,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="startWeight != null">start_weight,</if>
@ -190,6 +237,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="distance != null">#{distance},</if>
<if test="feeType != null and feeType != ''">#{feeType},</if>
<if test="fee != null">#{fee},</if>
<if test="leastPrice != null">#{leastPrice},</if>
<if test="priceType != null and priceType != ''">#{priceType},</if>
<if test="price != null">#{price},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="startWeight != null">#{startWeight},</if>
@ -223,6 +272,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="distance != null">distance = #{distance},</if>
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
<if test="fee != null">fee = #{fee},</if>
<if test="leastPrice != null">least_price = #{leastPrice},</if>
<if test="priceType != null and priceType != ''">price_type = #{priceType},</if>
<if test="price != null">price = #{price},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="startWeight != null">start_weight = #{startWeight},</if>