You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
6.5 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.aucma.dms.mapper.DmsBaseInspectProjectMapper">
<resultMap type="DmsBaseInspectProject" id="DmsBaseInspectProjectResult">
<result property="inspectProjectId" column="inspect_project_id" />
<result property="inspectProjectCode" column="inspect_project_code" />
<result property="inspectProject" column="inspect_project" />
<result property="inspectType" column="inspect_type" />
<result property="recordMethod" column="record_method" />
<result property="upLimit" column="up_limit" />
<result property="lowLimit" column="low_limit" />
<result property="defValue" column="def_value" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDmsBaseInspectProjectVo">
select inspect_project_id, inspect_project_code, inspect_project, inspect_type, record_method, up_limit, low_limit, def_value, create_by, create_time, update_by, update_time
from dms_base_inspect_project
</sql>
<select id="selectDmsBaseInspectProjectList" parameterType="DmsBaseInspectProject" resultMap="DmsBaseInspectProjectResult">
<include refid="selectDmsBaseInspectProjectVo"/>
<where>
<if test="inspectProjectCode != null and inspectProjectCode != ''"> and inspect_project_code = #{inspectProjectCode}</if>
<if test="inspectProject != null and inspectProject != ''"> and inspect_project = #{inspectProject}</if>
<if test="inspectType != null and inspectType != ''"> and inspect_type = #{inspectType}</if>
<if test="recordMethod != null and recordMethod != ''"> and record_method = #{recordMethod}</if>
<if test="upLimit != null "> and up_limit = #{upLimit}</if>
<if test="lowLimit != null "> and low_limit = #{lowLimit}</if>
<if test="defValue != null "> and def_value = #{defValue}</if>
</where>
</select>
<select id="selectDmsBaseInspectProjectByInspectProjectId" parameterType="Long" resultMap="DmsBaseInspectProjectResult">
<include refid="selectDmsBaseInspectProjectVo"/>
where inspect_project_id = #{inspectProjectId}
</select>
<insert id="insertDmsBaseInspectProject" parameterType="DmsBaseInspectProject">
<selectKey keyProperty="inspectProjectId" resultType="long" order="BEFORE">
SELECT HAIWEI.SEQ_DMS_INSPECT_PROJ.NEXTVAL FROM DUAL
</selectKey>
insert into dms_base_inspect_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inspectProjectId != null">inspect_project_id,</if>
<if test="inspectProjectCode != null and inspectProjectCode != ''">inspect_project_code,</if>
<if test="inspectProject != null and inspectProject != ''">inspect_project,</if>
inspect_project_property,
<if test="inspectType != null and inspectType != ''">inspect_type,</if>
<if test="recordMethod != null">record_method,</if>
<if test="upLimit != null">up_limit,</if>
<if test="lowLimit != null">low_limit,</if>
<if test="defValue != null">def_value,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inspectProjectId != null">#{inspectProjectId,jdbcType=NUMERIC},</if>
<if test="inspectProjectCode != null and inspectProjectCode != ''">#{inspectProjectCode},</if>
<if test="inspectProject != null and inspectProject != ''">#{inspectProject},</if>
<choose><when test="inspectProjectProperty != null">#{inspectProjectProperty}</when><otherwise>1</otherwise></choose>,
<if test="inspectType != null and inspectType != ''">#{inspectType},</if>
<if test="recordMethod != null">#{recordMethod},</if>
<if test="upLimit != null">#{upLimit,jdbcType=NUMERIC},</if>
<if test="lowLimit != null">#{lowLimit,jdbcType=NUMERIC},</if>
<if test="defValue != null">#{defValue,jdbcType=NUMERIC},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDmsBaseInspectProject" parameterType="DmsBaseInspectProject">
update dms_base_inspect_project
<trim prefix="SET" suffixOverrides=",">
<if test="inspectProjectCode != null">inspect_project_code = #{inspectProjectCode},</if>
<if test="inspectProject != null and inspectProject != ''">inspect_project = #{inspectProject},</if>
<if test="inspectType != null and inspectType != ''">inspect_type = #{inspectType},</if>
<if test="recordMethod != null">record_method = #{recordMethod},</if>
<if test="upLimit != null">up_limit = #{upLimit},</if>
<if test="lowLimit != null">low_limit = #{lowLimit},</if>
<if test="defValue != null">def_value = #{defValue},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where inspect_project_id = #{inspectProjectId}
</update>
<delete id="deleteDmsBaseInspectProjectByInspectProjectId" parameterType="Long">
delete from dms_base_inspect_project where inspect_project_id = #{inspectProjectId}
</delete>
<delete id="deleteDmsBaseInspectProjectByInspectProjectIds" parameterType="String">
delete from dms_base_inspect_project where inspect_project_id in
<foreach item="inspectProjectId" collection="array" open="(" separator="," close=")">
#{inspectProjectId}
</foreach>
</delete>
</mapper>