<?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.jcdm.main.em.inspectionPlanItemsProject.mapper.EmInspectionPlanItemsProjectMapper">
|
|
<resultMap type="EmInspectionPlanItemsProject" id="EmInspectionPlanItemsProjectResult">
|
<result property="id" column="id" />
|
<result property="itemsCode" column="items_code" />
|
<result property="itemsName" column="items_name" />
|
<result property="itemsType" column="items_type" />
|
<result property="standard" column="standard" />
|
<result property="itemsContent" column="items_content" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="results" column="results" />
|
<result property="planTaskId" column="plan_task_id" />
|
</resultMap>
|
|
<sql id="selectEmInspectionPlanItemsProjectVo">
|
select id, items_code, items_name, items_type, standard, items_content, create_user, create_time, update_user, update_time, results, plan_task_id from em_inspection_plan_items_project
|
</sql>
|
|
<select id="selectEmInspectionPlanItemsProjectList" parameterType="EmInspectionPlanItemsProject" resultMap="EmInspectionPlanItemsProjectResult">
|
<include refid="selectEmInspectionPlanItemsProjectVo"/>
|
<where>
|
<if test="itemsCode != null and itemsCode != ''"> and items_code = #{itemsCode}</if>
|
<if test="itemsName != null and itemsName != ''"> and items_name like concat('%', #{itemsName}, '%')</if>
|
<if test="itemsType != null and itemsType != ''"> and items_type = #{itemsType}</if>
|
<if test="standard != null and standard != ''"> and standard = #{standard}</if>
|
<if test="results != null and results != ''"> and results = #{results}</if>
|
</where>
|
</select>
|
|
<select id="selectEmInspectionPlanItemsProjectById" parameterType="Long" resultMap="EmInspectionPlanItemsProjectResult">
|
<include refid="selectEmInspectionPlanItemsProjectVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertEmInspectionPlanItemsProject" parameterType="EmInspectionPlanItemsProject" useGeneratedKeys="true" keyProperty="id">
|
insert into em_inspection_plan_items_project
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="itemsCode != null">items_code,</if>
|
<if test="itemsName != null">items_name,</if>
|
<if test="itemsType != null">items_type,</if>
|
<if test="standard != null">standard,</if>
|
<if test="itemsContent != null">items_content,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="results != null">results,</if>
|
<if test="planTaskId != null">plan_task_id,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="itemsCode != null">#{itemsCode},</if>
|
<if test="itemsName != null">#{itemsName},</if>
|
<if test="itemsType != null">#{itemsType},</if>
|
<if test="standard != null">#{standard},</if>
|
<if test="itemsContent != null">#{itemsContent},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="results != null">#{results},</if>
|
<if test="planTaskId != null">#{planTaskId},</if>
|
</trim>
|
</insert>
|
|
<update id="updateEmInspectionPlanItemsProject" parameterType="EmInspectionPlanItemsProject">
|
update em_inspection_plan_items_project
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="itemsCode != null">items_code = #{itemsCode},</if>
|
<if test="itemsName != null">items_name = #{itemsName},</if>
|
<if test="itemsType != null">items_type = #{itemsType},</if>
|
<if test="standard != null">standard = #{standard},</if>
|
<if test="itemsContent != null">items_content = #{itemsContent},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="results != null">results = #{results},</if>
|
<if test="planTaskId != null">plan_task_id = #{planTaskId},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteEmInspectionPlanItemsProjectById" parameterType="Long">
|
delete from em_inspection_plan_items_project where id = #{id}
|
</delete>
|
|
<delete id="deleteEmInspectionPlanItemsProjectByIds" parameterType="String">
|
delete from em_inspection_plan_items_project where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|