This commit is contained in:
linfso 2025-02-23 18:55:42 +08:00
parent 2bc22c6276
commit 6597de7d4a

View File

@ -26,11 +26,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectEmisTmsCostProfitList" parameterType="EmisTmsCostProfit" resultMap="EmisTmsCostProfitWithSubBillResult">
<include refid="selectEmisTmsCostProfitVo"/>
<where>
del_flag='0'
select
a.id, a.bill_code, a.standard_fee, a.bill_fee, a.cost_fee, a.bill_profit,
a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
a.create_site, a.update_site
from emis_tms_cost_profit b,emis_waybill a
<where>
a.bill_code=b.bill_code and a.del_flag='0' and b.del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
<if test="billCode != null and billCode != ''"> and FIND_IN_SET(b.`bill_code`,#{billCode})</if>
<if test="standardFee != null "> and standard_fee = #{standardFee}</if>
<if test="billFee != null "> and bill_fee = #{billFee}</if>
<if test="costFee != null "> and cost_fee = #{costFee}</if>
@ -43,8 +47,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<if test="params.sendSiteCode != null and params.sendSiteCode != ''">
and a.send_site_code = #{params.sendSiteCode}
</if>
<if test="params.dispatchUnderlingSiteCode != null and params.dispatchUnderlingSiteCode != ''">
and a.dispatch_underling_site_code = #{params.dispatchUnderlingSiteCode}
</if>
<if test="custNo != null and custNo != ''"> and b.cust_no=#{custNo}</if>
<if test="params.receiveCompany != null and params.receiveCompany != ''">
and a.receive_company like concat('%', #{params.receiveCompany}, '%')
</if>
<if test="params.sendCompany != null and params.sendCompany != ''">
and a.send_company like concat('%', #{params.sendCompany}, '%')
</if>
<if test="params.transLineType != null and params.transLineType != ''">
and a.trans_line_type = #{params.transLineType}
</if>
<if test="params.productType != null and params.productType != ''">
and a.product_type = #{params.productType}
</if>
<if test="params.payee != null and params.payee != ''">
and a.payee = #{params.payee}
</if>
<if test="params.salesmen != null and params.salesmen != ''">
and a.salesmen = #{params.salesmen}
</if>
<if test="params.paymentType != null and params.paymentType != ''">
and a.payment_type = #{params.paymentType}
</if>
<if test="params.blSpecialQuote != null and params.blSpecialQuote != ''">
and a.bl_special_quote = #{params.blSpecialQuote}
</if>
<if test="params.calcFeeType != null and params.calcFeeType != ''">
and a.calc_fee_type = #{params.calcFeeType}
</if>
<if test="params.beginSendDate != null and params.beginSendDate != ''">
and a.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
</if>
<if test="params.endSendDate != null and params.endSendDate != ''">
and a.send_date <![CDATA[ <= ]]> #{params.endSendDate}
</if>
</where>
order by create_time desc
order by b.create_time desc
</select>
<select id="checkUnique" parameterType="EmisTmsCostProfit" resultType="int">