| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <?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.railway.business.bi.mapper.ShowTestPlanDtMapper">
- <resultMap id="BaseResultMap" type="com.railway.business.bi.domain.ShowTestPlanDt">
- <result column="id" property="id"/>
- <result column="line_name" property="lineName"/>
- <result column="substation_name" property="substationName"/>
- <result column="sbmc" property="sbmc"/>
- <result column="yxbh" property="yxbh"/>
- <result column="test_cycle" property="testCycle"/>
- <result column="test_plan_date" property="testPlanDate"/>
- <result column="completion_date" property="completionDate"/>
- <result column="create_by" property="createBy"/>
- <result column="create_time" property="createTime"/>
- <result column="update_by" property="updateBy"/>
- <result column="update_time" property="updateTime"/>
- <result column="del_flag" property="delFlag"/>
- <result column="file_id" property="fileId"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,
- line_name,
- substation_name,
- sbmc,
- yxbh,
- test_cycle,
- test_plan_date,
- completion_date,
- create_by,
- create_time,
- update_by,
- update_time,
- del_flag,
- file_id
- </sql>
- <insert id="insert" parameterType="com.railway.business.bi.domain.ShowTestPlanDt">
- INSERT INTO show_test_plan_dt
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test='null != lineName'>
- line_name,
- </if>
- <if test='null != substationName'>
- substation_name,
- </if>
- <if test='null != sbmc'>
- sbmc,
- </if>
- <if test='null != yxbh'>
- yxbh,
- </if>
- <if test='null != testCycle'>
- test_cycle,
- </if>
- <if test='null != testPlanDate'>
- test_plan_date,
- </if>
- <if test='null != completionDate'>
- completion_date,
- </if>
- <if test='null != createBy'>
- create_by,
- </if>
- <if test='null != createTime'>
- create_time,
- </if>
- <if test='null != fileId'>
- file_id,
- </if>
- <if test='null != delFlag'>
- del_flag
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test='null != lineName'>
- #{lineName},
- </if>
- <if test='null != substationName'>
- #{substationName},
- </if>
- <if test='null != sbmc'>
- #{sbmc},
- </if>
- <if test='null != yxbh'>
- #{yxbh},
- </if>
- <if test='null != testCycle'>
- #{testCycle},
- </if>
- <if test='null != testPlanDate'>
- #{testPlanDate},
- </if>
- <if test='null != completionDate'>
- #{completionDate},
- </if>
- <if test='null != createBy'>
- #{createBy},
- </if>
- <if test='null != createTime'>
- #{createTime},
- </if>
- <if test='null != fileId'>
- #{fileId},
- </if>
- <if test='null != delFlag'>
- #{delFlag}
- </if>
- </trim>
- </insert>
- <delete id="delete">
- UPDATE show_test_plan_dt
- set del_flag='1'
- WHERE id = #{id}
- </delete>
- <update id="update" parameterType="com.railway.business.bi.domain.ShowTestPlanDt">
- UPDATE show_test_plan_dt
- <set>
- <if test='null != lineName'>line_name = #{lineName},</if>
- <if test='null != substationName'>substation_name = #{substationName},</if>
- <if test='null != sbmc'>sbmc = #{sbmc},</if>
- <if test='null != yxbh'>yxbh = #{yxbh},</if>
- <if test='null != testCycle'>test_cycle = #{testCycle},</if>
- <if test='null != testPlanDate'>test_plan_date = #{testPlanDate},</if>
- <if test='null != completionDate'>completion_date = #{completionDate},</if>
- <if test='null != updateBy'>update_by = #{updateBy},</if>
- <if test='null != updateTime'>update_time = #{updateTime},</if>
- <if test='null != fileId'>file_id = #{fileId},</if>
- <if test='null != delFlag'>del_flag = #{delFlag}</if>
- </set>
- WHERE id = #{id}
- </update>
- <select id="getInfo" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM show_test_plan_dt
- WHERE del_flag='0' and id = #{id}
- </select>
- <select id="getList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM show_test_plan_dt
- <where>
- del_flag='0'
- <if test="lineName!=null and lineName!=''">
- and line_name like concat('%', #{lineName}, '%')
- </if>
- <if test="substationName!=null and substationName!=''">
- and substation_name like concat('%', #{substationName}, '%')
- </if>
- <if test="sbmc!=null and sbmc!=''">
- and sbmc like concat('%', #{sbmc}, '%')
- </if>
- <if test="testPlanDateStart!=null">
- and test_plan_date <![CDATA[ >= ]]> #{testPlanDateStart}
- </if>
- <if test="testPlanDateEnd!=null">
- and test_plan_date <![CDATA[ <= ]]> #{testPlanDateEnd}
- </if>
- <if test="completionDateStart!=null">
- and completion_date <![CDATA[ >= ]]> #{completionDateStart}
- </if>
- <if test="completionDateEnd!=null">
- and completion_date <![CDATA[ <= ]]> #{completionDateEnd}
- </if>
- <if test="fileId!=null ">
- and file_id=#{fileId}
- </if>
- </where>
- </select>
- </mapper>
|