|
|
|
@ -3,62 +3,6 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.jjh.declaration.mapper.BmsTemplateInfoMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.jjh.declaration.entity.BmsTemplateInfo" id="BmsTemplateInfoResult">
|
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
<result property="templateName" column="template_name"/>
|
|
|
|
|
<result property="level" column="level"/>
|
|
|
|
|
<result property="notes" column="notes"/>
|
|
|
|
|
<result property="responsibilityUnit" column="responsibility_unit"/>
|
|
|
|
|
<result property="isDeleted" column="is_deleted"/>
|
|
|
|
|
<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="remark" column="remark"/>
|
|
|
|
|
<result property="projectClassify" column="project_classify"/>
|
|
|
|
|
<result property="useStart" column="use_start"/>
|
|
|
|
|
<result property="useEnd" column="use_end"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBmsTemplateInfoVo">
|
|
|
|
|
select id,
|
|
|
|
|
template_name,
|
|
|
|
|
level,
|
|
|
|
|
product_area,
|
|
|
|
|
type,
|
|
|
|
|
notes,
|
|
|
|
|
responsibility_unit,
|
|
|
|
|
is_deleted,
|
|
|
|
|
project_classify,
|
|
|
|
|
use_start,
|
|
|
|
|
use_end,
|
|
|
|
|
status,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time,
|
|
|
|
|
remark
|
|
|
|
|
from bms_template_info
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBmsTemplateInfoList" parameterType="com.ruoyi.jjh.declaration.entity.BmsTemplateInfo"
|
|
|
|
|
resultMap="BmsTemplateInfoResult">
|
|
|
|
|
<include refid="selectBmsTemplateInfoVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="templateName != null and templateName != ''">and template_name like concat('%', #{templateName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="level != null ">and level = #{level}</if>
|
|
|
|
|
<if test="productArea != null ">and product_area = #{productArea}</if>
|
|
|
|
|
<if test="type != null ">and type = #{type}</if>
|
|
|
|
|
<if test="notes != null and notes != ''">and notes = #{notes}</if>
|
|
|
|
|
<if test="responsibilityUnit != null ">and responsibility_unit = #{responsibilityUnit}</if>
|
|
|
|
|
<if test="isDeleted != null ">and is_deleted = #{isDeleted}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="templateInfoList" parameterType="com.ruoyi.jjh.declaration.entity.BmsTemplateInfo"
|
|
|
|
|
resultType="com.ruoyi.jjh.declaration.entity.vo.BmsTemplateInfoQueryVo">
|
|
|
|
|
SELECT
|
|
|
|
@ -78,75 +22,6 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBmsTemplateInfoById" parameterType="Long" resultMap="BmsTemplateInfoResult">
|
|
|
|
|
<include refid="selectBmsTemplateInfoVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBmsTemplateInfo" parameterType="com.ruoyi.jjh.declaration.entity.BmsTemplateInfo">
|
|
|
|
|
insert into bms_template_info
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
|
<if test="templateName != null">template_name,</if>
|
|
|
|
|
<if test="level != null">level,</if>
|
|
|
|
|
<if test="productArea != null">product_area,</if>
|
|
|
|
|
<if test="type != null">type,</if>
|
|
|
|
|
<if test="notes != null">notes,</if>
|
|
|
|
|
<if test="responsibilityUnit != null">responsibility_unit,</if>
|
|
|
|
|
<if test="isDeleted != null">is_deleted,</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>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
<if test="projectClassify != null">project_classify,</if>
|
|
|
|
|
<if test="useStart != null">use_start,</if>
|
|
|
|
|
<if test="useEnd != null">use_end,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
|
<if test="templateName != null">#{templateName},</if>
|
|
|
|
|
<if test="level != null">#{level},</if>
|
|
|
|
|
<if test="productArea != null">#{productArea},</if>
|
|
|
|
|
<if test="type != null">#{type},</if>
|
|
|
|
|
<if test="notes != null">#{notes},</if>
|
|
|
|
|
<if test="responsibilityUnit != null">#{responsibilityUnit},</if>
|
|
|
|
|
<if test="isDeleted != null">#{isDeleted},</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>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="projectClassify != null">#{projectClassify},</if>
|
|
|
|
|
<if test="useStart != null">#{useStart},</if>
|
|
|
|
|
<if test="useEnd != null">#{useEnd},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateBmsTemplateInfo" parameterType="com.ruoyi.jjh.declaration.entity.BmsTemplateInfo">
|
|
|
|
|
update bms_template_info
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="templateName != null">template_name = #{templateName},</if>
|
|
|
|
|
<if test="level != null">level = #{level},</if>
|
|
|
|
|
<if test="productArea != null">product_area = #{productArea},</if>
|
|
|
|
|
<if test="type != null">type = #{type},</if>
|
|
|
|
|
<if test="notes != null">notes = #{notes},</if>
|
|
|
|
|
<if test="responsibilityUnit != null">responsibility_unit = #{responsibilityUnit},</if>
|
|
|
|
|
<if test="isDeleted != null">is_deleted = #{isDeleted},</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>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="projectClassify != null">project_classify = #{projectClassify},</if>
|
|
|
|
|
<if test="useStart != null">use_start = #{useStart},</if>
|
|
|
|
|
<if test="useEnd != null">use_end = #{useEnd},</if>
|
|
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBmsTemplateInfoById" parameterType="Long">
|
|
|
|
|
delete
|
|
|
|
|