This commit is contained in:
linfso 2025-07-02 07:09:20 +08:00
parent 52111fd06f
commit 402f38fee0
3 changed files with 93 additions and 8 deletions

View File

@ -43,10 +43,24 @@ public class EmisTmsCostQuotePrice extends BaseEntity
private BigDecimal distance;
/* 费用类型 运输费 */
private String feeType;
/* 总费用 */
private BigDecimal fee;
/* 计费单价 */
private BigDecimal price;
/* 费用币种 */
private String currency;
/* 起始重量 */
private Double startWeight;
/* 结束重量 */
private Double endWeight;
/* 首重 */
private Double initialWeight;
/* 续重 */
private Double additionalWeight;
/* 条件表达式 */
private String conditionExpression;
/* 计算表达式 */
private String calculateExpression;
/* 计费类型 1-重量计费 2-体积计费 */
private String billType;
/* 供应商代码 */
@ -57,6 +71,8 @@ public class EmisTmsCostQuotePrice extends BaseEntity
/* 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endDate;
/* 启用状态 1-启用 0-停用 */
private String blOpen;
// 扩展字段 ------

View File

@ -100,6 +100,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.calc_fee_type = #{params.calcFeeType}
</if>
<!-- 组批次完整: blIsBatchOk=1 blIsBatchOk=-1 不完整 -->
<if test="params.blIsBatchOk != null and params.blIsBatchOk == 1 ">
and exists (
select 1 from emis_waybill_batch_status ewbs where a.bill_code=ewbs.bill_code
)
</if>
<if test="params.blIsBatchOk != null and params.blIsBatchOk == -1 ">
and not exists (
select 1 from emis_waybill_batch_status ewbs where a.bill_code=ewbs.bill_code
)
</if>
<!-- 费用是否录入完整: blIsCostFeeOk=1 blIsCostFeeOk=-1 不完整 -->
<if test="params.blIsCostFeeOk != null and params.blIsCostFeeOk == 1 ">
and exists (
select 1 from emis_waybill_batch_status ewbs where a.bill_code=ewbs.bill_code
)
</if>
<if test="params.blIsCostFeeOk != null and params.blIsCostFeeOk == -1 ">
and not exists (
select 1 from emis_waybill_batch_status ewbs where a.bill_code=ewbs.bill_code
)
</if>
<if test="params.beginSendDate != null and params.beginSendDate != ''">
and a.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
</if>

View File

@ -10,12 +10,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nextSiteCode" column="next_site_code" />
<result property="distance" column="distance" />
<result property="feeType" column="fee_type" />
<result property="fee" column="fee" />
<result property="price" column="price" />
<result property="currency" column="currency" />
<result property="startWeight" column="start_weight" />
<result property="endWeight" column="end_weight" />
<result property="initialWeight" column="initial_weight" />
<result property="additionalWeight" column="additional_weight" />
<result property="conditionExpression" column="condition_expression" />
<result property="calculateExpression" column="calculate_expression" />
<result property="billType" column="bill_type" />
<result property="supplierCode" column="supplier_code" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="blOpen" column="bl_open" />
<result property="batchNo" column="batch_no" />
@ -32,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEmisTmsCostQuotePriceVo">
select id, start_site_code, next_site_code, distance, fee_type, price, currency, bill_type, supplier_code, start_date, end_date, 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, 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">
@ -70,13 +78,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.start_site_code,
a.next_site_code,
a.distance,
a.fee_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,
@ -100,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND c.bill_code = #{billCode}
</select>
<select id="checkUnique" parameterType="EmisTmsCostQuotePrice" resultType="int">
select count(1) from emis_tms_cost_quote_price
where del_flag='0'
@ -108,12 +119,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and next_site_code = #{nextSiteCode}
and distance = #{distance}
and fee_type = #{feeType}
and fee = #{fee}
and price = #{price}
and currency = #{currency}
and start_weight = #{startWeight}
and end_weight = #{endWeight}
and initial_weight = #{initialWeight}
and additional_weight = #{additionalWeight}
and condition_expression = #{conditionExpression}
and calculate_expression = #{calculateExpression}
and bill_type = #{billType}
and supplier_code = #{supplierCode}
and start_date = #{startDate}
and end_date = #{endDate}
and bl_open = #{blOpen}
and remark = #{remark}
and tenant_id = #{tenantId}
and del_flag = #{delFlag}
@ -127,11 +146,11 @@ 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, price, currency, bill_type, supplier_code, start_date, end_date, 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, 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>
<insert id="insertEmisTmsCostQuotePrice" parameterType="EmisTmsCostQuotePrice" useGeneratedKeys="true" keyProperty="id">
insert into emis_tms_cost_quote_price
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -140,12 +159,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nextSiteCode != null and nextSiteCode != ''">next_site_code,</if>
<if test="distance != null">distance,</if>
<if test="feeType != null and feeType != ''">fee_type,</if>
<if test="fee != null">fee,</if>
<if test="price != null">price,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="startWeight != null">start_weight,</if>
<if test="endWeight != null">end_weight,</if>
<if test="initialWeight != null">initial_weight,</if>
<if test="additionalWeight != null">additional_weight,</if>
<if test="conditionExpression != null and conditionExpression != ''">condition_expression,</if>
<if test="calculateExpression != null and calculateExpression != ''">calculate_expression,</if>
<if test="billType != null and billType != ''">bill_type,</if>
<if test="supplierCode != null and supplierCode != ''">supplier_code,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="blOpen != null and blOpen != ''">bl_open,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
@ -155,19 +182,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="startSiteCode != null and startSiteCode != ''">#{startSiteCode},</if>
<if test="nextSiteCode != null and nextSiteCode != ''">#{nextSiteCode},</if>
<if test="distance != null">#{distance},</if>
<if test="feeType != null and feeType != ''">#{feeType},</if>
<if test="fee != null">#{fee},</if>
<if test="price != null">#{price},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="startWeight != null">#{startWeight},</if>
<if test="endWeight != null">#{endWeight},</if>
<if test="initialWeight != null">#{initialWeight},</if>
<if test="additionalWeight != null">#{additionalWeight},</if>
<if test="conditionExpression != null and conditionExpression != ''">#{conditionExpression},</if>
<if test="calculateExpression != null and calculateExpression != ''">#{calculateExpression},</if>
<if test="billType != null and billType != ''">#{billType},</if>
<if test="supplierCode != null and supplierCode != ''">#{supplierCode},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="blOpen != null and blOpen != ''">#{blOpen},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
@ -177,7 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</trim>
</insert>
<update id="updateEmisTmsCostQuotePrice" parameterType="EmisTmsCostQuotePrice">
@ -187,12 +222,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nextSiteCode != null and nextSiteCode != ''">next_site_code = #{nextSiteCode},</if>
<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="price != null">price = #{price},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="startWeight != null">start_weight = #{startWeight},</if>
<if test="endWeight != null">end_weight = #{endWeight},</if>
<if test="initialWeight != null">initial_weight = #{initialWeight},</if>
<if test="additionalWeight != null">additional_weight = #{additionalWeight},</if>
<if test="conditionExpression != null and conditionExpression != ''">condition_expression = #{conditionExpression},</if>
<if test="calculateExpression != null and calculateExpression != ''">calculate_expression = #{calculateExpression},</if>
<if test="billType != null and billType != ''">bill_type = #{billType},</if>
<if test="supplierCode != null and supplierCode != ''">supplier_code = #{supplierCode},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="blOpen != null and blOpen != ''">bl_open = #{blOpen},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
@ -207,11 +250,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteEmisTmsCostQuotePriceById" parameterType="Long">
delete from emis_tms_cost_quote_price where id = #{id}
update emis_tms_cost_quote_price set del_flag='1' where id = #{id}
</delete>
<delete id="deleteEmisTmsCostQuotePriceByIds" parameterType="String">
delete from emis_tms_cost_quote_price where id in
update emis_tms_cost_quote_price set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>