156 lines
10 KiB
XML
156 lines
10 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper
|
||
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.xdadan.erp.emis.mapper.EmisQuoteExpressionMapper">
|
||
|
|
|
||
|
|
<resultMap type="EmisQuoteExpression" id="EmisQuoteExpressionResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="quoteId" column="quote_id" />
|
||
|
|
<result property="quoteSequence" column="quote_sequence" />
|
||
|
|
<result property="useSiteCode" column="use_site_code" />
|
||
|
|
<result property="useSite" column="use_site" />
|
||
|
|
<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="status" column="status" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
<result property="tenantId" column="tenant_id" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="createSite" column="create_site" />
|
||
|
|
<result property="updateSite" column="update_site" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectEmisQuoteExpressionVo">
|
||
|
|
select id, quote_id, quote_sequence, use_site_code, use_site, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_quote_expression
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectEmisQuoteExpressionList" parameterType="EmisQuoteExpression" resultMap="EmisQuoteExpressionResult">
|
||
|
|
<include refid="selectEmisQuoteExpressionVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="id != null "> and id = #{id}</if>
|
||
|
|
<if test="quoteId != null "> and quote_id = #{quoteId}</if>
|
||
|
|
<if test="quoteSequence != null "> and quote_sequence = #{quoteSequence}</if>
|
||
|
|
<if test="useSiteCode != null and useSiteCode != ''"> and use_site_code like concat('%', #{useSiteCode}, '%')</if>
|
||
|
|
<if test="useSite != null and useSite != ''"> and use_site like concat('%', #{useSite}, '%')</if>
|
||
|
|
<if test="startWeight != null "> and start_weight = #{startWeight}</if>
|
||
|
|
<if test="endWeight != null "> and end_weight = #{endWeight}</if>
|
||
|
|
<if test="initialWeight != null "> and initial_weight = #{initialWeight}</if>
|
||
|
|
<if test="additionalWeight != null "> and additional_weight = #{additionalWeight}</if>
|
||
|
|
<if test="conditionExpression != null and conditionExpression != ''"> and condition_expression like concat('%', #{conditionExpression}, '%')</if>
|
||
|
|
<if test="calculateExpression != null and calculateExpression != ''"> and calculate_expression like concat('%', #{calculateExpression}, '%')</if>
|
||
|
|
<if test="status != null "> and status = #{status}</if>
|
||
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</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="selectEmisQuoteExpressionById" parameterType="Long" resultMap="EmisQuoteExpressionResult">
|
||
|
|
select id, quote_id, quote_sequence, use_site_code, use_site, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||
|
|
from emis_quote_expression a
|
||
|
|
where a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertEmisQuoteExpression" parameterType="EmisQuoteExpression">
|
||
|
|
insert into emis_quote_expression
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">id,</if>
|
||
|
|
<if test="quoteId != null">quote_id,</if>
|
||
|
|
<if test="quoteSequence != null">quote_sequence,</if>
|
||
|
|
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
|
||
|
|
<if test="useSite != null and useSite != ''">use_site,</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="status != null">status,</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>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||
|
|
<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 prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">#{id},</if>
|
||
|
|
<if test="quoteId != null">#{quoteId},</if>
|
||
|
|
<if test="quoteSequence != null">#{quoteSequence},</if>
|
||
|
|
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
|
||
|
|
<if test="useSite != null and useSite != ''">#{useSite},</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="status != null">#{status},</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>
|
||
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateEmisQuoteExpression" parameterType="EmisQuoteExpression">
|
||
|
|
update emis_quote_expression
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="quoteId != null">quote_id = #{quoteId},</if>
|
||
|
|
<if test="quoteSequence != null">quote_sequence = #{quoteSequence},</if>
|
||
|
|
<if test="useSiteCode != null and useSiteCode != ''">use_site_code = #{useSiteCode},</if>
|
||
|
|
<if test="useSite != null and useSite != ''">use_site = #{useSite},</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="status != null">status = #{status},</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>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||
|
|
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteEmisQuoteExpressionById" parameterType="Long">
|
||
|
|
delete from emis_quote_expression where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteEmisQuoteExpressionByIds" parameterType="String">
|
||
|
|
delete from emis_quote_expression where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|