This commit is contained in:
linfso 2025-03-16 10:49:11 +08:00
parent 708297d244
commit ca626b151e
2 changed files with 49 additions and 0 deletions

View File

@ -86,6 +86,10 @@ public class EmisCommissionDtl extends BaseEntity
private String confirmSiteCode;
// 扩展参数
// 关联运单信息
private EmisWaybill waybillDetail;
// 关联批次信息
private EmisTmsSiteBatch batchDetail;
}

View File

@ -39,6 +39,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<resultMap id="EmisBatchCommissionDtlResult" type="EmisCommissionDtl" extends="BaseEmisCommissionDtlResult" >
<association property="batchDetail"
column="bill_code"
select="com.xdadan.erp.emis.mapper.EmisTmsSiteBatchMapper.selectTmsSiteBatchByBatchNo"
fetchType="lazy"
/>
</resultMap>
<sql id="selectEmisCommissionDtlVo">
select id, fee_type, money, bill_month, bill_type, bill_code, quote_id, quote_name, expr_id, calc_expr, fee_remark, emp_code, emp_name, bl_confirm_center, confirm_center_date, confirm_center_note, confirm_center_man_code, confirm_center_code, bl_confirm_site, confirm_site_date, confirm_site_man_code, confirm_site_note, confirm_site_code, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_dtl
</sql>
@ -78,6 +87,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc
</select>
<select id="selectBatchCommissionDtlList" parameterType="EmisCommissionDtl" resultMap="EmisBatchCommissionDtlResult">
<include refid="selectEmisCommissionDtlVo"/>
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
<if test="money != null "> and money = #{money}</if>
<if test="billMonth != null and billMonth != ''"> and bill_month=#{billMonth},</if>
<if test="billType != null and billType != ''"> and bill_type=#{billType}</if>
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(bill_code,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )</if>
<if test="feeRemark != null and feeRemark != ''"> and fee_remark like concat('%', #{feeRemark}, '%')</if>
<if test="empCode != null and empCode != ''"> and emp_code=#{empCode}</if>
<if test="empName != null and empName != ''"> and emp_name=#{empName}</if>
<if test="blConfirmCenter != null and blConfirmCenter != ''"> and bl_confirm_center=#{blConfirmCenter}</if>
<if test="confirmCenterDate != null "> and confirm_center_date = #{confirmCenterDate}</if>
<if test="confirmCenterNote != null and confirmCenterNote != ''"> and confirm_center_note like concat('%', #{confirmCenterNote}, '%')</if>
<if test="confirmCenterManCode != null and confirmCenterManCode != ''"> and confirm_center_man_code= #{confirmCenterManCode}</if>
<if test="confirmCenterCode != null and confirmCenterCode != ''"> and confirm_center_code=#{confirmCenterCode}</if>
<if test="blConfirmSite != null and blConfirmSite != ''"> and bl_confirm_site=#{blConfirmSite}</if>
<if test="confirmSiteDate != null "> and confirm_site_date = #{confirmSiteDate}</if>
<if test="confirmSiteManCode != null and confirmSiteManCode != ''"> and confirm_site_man_code=#{confirmSiteManCode}</if>
<if test="confirmSiteNote != null and confirmSiteNote != ''"> and confirm_site_note like concat('%', #{confirmSiteNote}, '%')</if>
<if test="confirmSiteCode != null and confirmSiteCode != ''"> and confirm_site_code=#{confirmSiteCode}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<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>
</where>
order by create_time desc
</select>
<select id="checkUnique" parameterType="EmisCommissionDtl" resultType="int">
select count(1) from emis_commission_dtl
where del_flag='0'