208 lines
13 KiB
XML
208 lines
13 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.EmisElectronicSitePagMapper">
|
|
|
|
<resultMap type="EmisElectronicSitePag" id="EmisElectronicSitePagResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
|
<result property="id" column="id" />
|
|
<result property="prefix" column="prefix" />
|
|
<result property="startNo" column="start_no" />
|
|
<result property="endNo" column="end_no" />
|
|
<result property="curStartNo" column="cur_start_no" />
|
|
<result property="useSiteCode" column="use_site_code" />
|
|
<result property="materialCode" column="material_code" />
|
|
<result property="billCount" column="bill_count" />
|
|
<result property="unitMoney" column="unit_money" />
|
|
<result property="hasBillCount" column="has_bill_count" />
|
|
<result property="billFee" column="bill_fee" />
|
|
<result property="provideDate" column="provide_date" />
|
|
<result property="provideMan" column="provide_man" />
|
|
<result property="provideSite" column="provide_site" />
|
|
<result property="applySeq" column="apply_seq" />
|
|
<result property="centerPagId" column="center_pag_id" />
|
|
<result property="provideFlag" column="provide_flag" />
|
|
<result property="status" column="status" />
|
|
|
|
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisElectronicSitePagVo">
|
|
select id, prefix, start_no, end_no, cur_start_no, use_site_code, material_code, bill_count, unit_money, has_bill_count, bill_fee, provide_date, provide_man, provide_site, apply_seq, center_pag_id, provide_flag, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_electronic_site_pag
|
|
</sql>
|
|
|
|
<select id="selectEmisElectronicSitePagList" parameterType="EmisElectronicSitePag" resultMap="EmisElectronicSitePagResult">
|
|
<include refid="selectEmisElectronicSitePagVo"/>
|
|
<where>
|
|
del_flag='0'
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
|
|
<if test="startNo != null and startNo != ''"> and start_no = #{startNo}</if>
|
|
<if test="endNo != null and endNo != ''"> and end_no like concat('%', #{endNo}, '%')</if>
|
|
<if test="curStartNo != null and curStartNo != ''"> and cur_start_no like concat('%', #{curStartNo}, '%')</if>
|
|
<if test="useSiteCode != null and useSiteCode != ''"> and use_site_code like concat('%', #{useSiteCode}, '%')</if>
|
|
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if>
|
|
<if test="billCount != null "> and bill_count = #{billCount}</if>
|
|
<if test="unitMoney != null "> and unit_money = #{unitMoney}</if>
|
|
<if test="hasBillCount != null "> and has_bill_count = #{hasBillCount}</if>
|
|
<if test="billFee != null "> and bill_fee = #{billFee}</if>
|
|
<if test="provideDate != null "> and provide_date = #{provideDate}</if>
|
|
<if test="provideMan != null and provideMan != ''"> and provide_man like concat('%', #{provideMan}, '%')</if>
|
|
<if test="provideSite != null and provideSite != ''"> and provide_site like concat('%', #{provideSite}, '%')</if>
|
|
<if test="applySeq != null and applySeq != ''"> and apply_seq like concat('%', #{applySeq}, '%')</if>
|
|
<if test="centerPagId != null "> and center_pag_id = #{centerPagId}</if>
|
|
<if test="provideFlag != null and provideFlag != ''"> and provide_flag like concat('%', #{provideFlag}, '%')</if>
|
|
<if test="status != null "> and status = #{status}</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="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</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="EmisElectronicSitePag" resultType="int">
|
|
select count(1) from emis_electronic_site_pag
|
|
where del_flag='0'
|
|
and id = #{id}
|
|
and prefix = #{prefix}
|
|
and start_no = #{startNo}
|
|
and end_no = #{endNo}
|
|
and cur_start_no = #{curStartNo}
|
|
and use_site_code = #{useSiteCode}
|
|
and material_code = #{materialCode}
|
|
and bill_count = #{billCount}
|
|
and unit_money = #{unitMoney}
|
|
and has_bill_count = #{hasBillCount}
|
|
and bill_fee = #{billFee}
|
|
and provide_date = #{provideDate}
|
|
and provide_man = #{provideMan}
|
|
and provide_site = #{provideSite}
|
|
and apply_seq = #{applySeq}
|
|
and center_pag_id = #{centerPagId}
|
|
and provide_flag = #{provideFlag}
|
|
and status = #{status}
|
|
and del_flag = #{delFlag}
|
|
and create_by = #{createBy}
|
|
and create_time = #{createTime}
|
|
and update_by = #{updateBy}
|
|
and update_time = #{updateTime}
|
|
and remark = #{remark}
|
|
and create_site = #{createSite}
|
|
and update_site = #{updateSite}
|
|
limit 1
|
|
</select>
|
|
|
|
<select id="selectEmisElectronicSitePagById" parameterType="Long" resultMap="EmisElectronicSitePagResult">
|
|
select id, prefix, start_no, end_no, cur_start_no, use_site_code, material_code, bill_count, unit_money, has_bill_count, bill_fee, provide_date, provide_man, provide_site, apply_seq, center_pag_id, provide_flag, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
|
from emis_electronic_site_pag a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisElectronicSitePag" parameterType="EmisElectronicSitePag" useGeneratedKeys="true" keyProperty="id">
|
|
insert into emis_electronic_site_pag
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="prefix != null and prefix != ''">prefix,</if>
|
|
<if test="startNo != null and startNo != ''">start_no,</if>
|
|
<if test="endNo != null and endNo != ''">end_no,</if>
|
|
<if test="curStartNo != null and curStartNo != ''">cur_start_no,</if>
|
|
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
|
|
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
|
<if test="billCount != null">bill_count,</if>
|
|
<if test="unitMoney != null">unit_money,</if>
|
|
<if test="hasBillCount != null">has_bill_count,</if>
|
|
<if test="billFee != null">bill_fee,</if>
|
|
<if test="provideDate != null">provide_date,</if>
|
|
<if test="provideMan != null and provideMan != ''">provide_man,</if>
|
|
<if test="provideSite != null and provideSite != ''">provide_site,</if>
|
|
<if test="applySeq != null and applySeq != ''">apply_seq,</if>
|
|
<if test="centerPagId != null">center_pag_id,</if>
|
|
<if test="provideFlag != null and provideFlag != ''">provide_flag,</if>
|
|
<if test="status != null">status,</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="remark != null and remark != ''">remark,</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="prefix != null and prefix != ''">#{prefix},</if>
|
|
<if test="startNo != null and startNo != ''">#{startNo},</if>
|
|
<if test="endNo != null and endNo != ''">#{endNo},</if>
|
|
<if test="curStartNo != null and curStartNo != ''">#{curStartNo},</if>
|
|
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
|
|
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
|
<if test="billCount != null">#{billCount},</if>
|
|
<if test="unitMoney != null">#{unitMoney},</if>
|
|
<if test="hasBillCount != null">#{hasBillCount},</if>
|
|
<if test="billFee != null">#{billFee},</if>
|
|
<if test="provideDate != null">#{provideDate},</if>
|
|
<if test="provideMan != null and provideMan != ''">#{provideMan},</if>
|
|
<if test="provideSite != null and provideSite != ''">#{provideSite},</if>
|
|
<if test="applySeq != null and applySeq != ''">#{applySeq},</if>
|
|
<if test="centerPagId != null">#{centerPagId},</if>
|
|
<if test="provideFlag != null and provideFlag != ''">#{provideFlag},</if>
|
|
<if test="status != null">#{status},</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="remark != null and remark != ''">#{remark},</if>
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisElectronicSitePag" parameterType="EmisElectronicSitePag">
|
|
update emis_electronic_site_pag
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="prefix != null and prefix != ''">prefix = #{prefix},</if>
|
|
<if test="startNo != null and startNo != ''">start_no = #{startNo},</if>
|
|
<if test="endNo != null and endNo != ''">end_no = #{endNo},</if>
|
|
<if test="curStartNo != null and curStartNo != ''">cur_start_no = #{curStartNo},</if>
|
|
<if test="useSiteCode != null and useSiteCode != ''">use_site_code = #{useSiteCode},</if>
|
|
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
|
<if test="billCount != null">bill_count = #{billCount},</if>
|
|
<if test="unitMoney != null">unit_money = #{unitMoney},</if>
|
|
<if test="hasBillCount != null">has_bill_count = #{hasBillCount},</if>
|
|
<if test="billFee != null">bill_fee = #{billFee},</if>
|
|
<if test="provideDate != null">provide_date = #{provideDate},</if>
|
|
<if test="provideMan != null and provideMan != ''">provide_man = #{provideMan},</if>
|
|
<if test="provideSite != null and provideSite != ''">provide_site = #{provideSite},</if>
|
|
<if test="applySeq != null and applySeq != ''">apply_seq = #{applySeq},</if>
|
|
<if test="centerPagId != null">center_pag_id = #{centerPagId},</if>
|
|
<if test="provideFlag != null and provideFlag != ''">provide_flag = #{provideFlag},</if>
|
|
<if test="status != null">status = #{status},</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="remark != null and remark != ''">remark = #{remark},</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="deleteEmisElectronicSitePagById" parameterType="Long">
|
|
delete from emis_electronic_site_pag where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisElectronicSitePagByIds" parameterType="String">
|
|
delete from emis_electronic_site_pag where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |