|
|
@@ -0,0 +1,200 @@
|
|
|
+<?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"/>
|
|
|
+ </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
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="com.railway.business.bi.domain.ShowTestPlanDt">
|
|
|
+ <selectKey keyProperty="id" order="BEFORE" resultType="String">
|
|
|
+ select replace(uuid(), '-', '') from dual
|
|
|
+ </selectKey>
|
|
|
+ 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 != updateBy'>
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ <if test='null != updateTime'>
|
|
|
+ update_time,
|
|
|
+ </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 != updateBy'>
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test='null != updateTime'>
|
|
|
+ #{updateTime},
|
|
|
+ </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 != createBy'>create_by = #{createBy},</if>
|
|
|
+ <if test='null != createTime'>create_time = #{createTime},</if>
|
|
|
+ <if test='null != updateBy'>update_by = #{updateBy},</if>
|
|
|
+ <if test='null != updateTime'>update_time = #{updateTime},</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=#{lineName}
|
|
|
+ </if>
|
|
|
+ <if test="substationName!=null and substationName!=''">
|
|
|
+ and substation_name=#{substationName}
|
|
|
+ </if>
|
|
|
+ <if test="sbmc!=null and sbmc!=''">
|
|
|
+ and sbmc=#{sbmc}
|
|
|
+ </if>
|
|
|
+ <if test="yxbh!=null and yxbh!=''">
|
|
|
+ and yxbh=#{yxbh}
|
|
|
+ </if>
|
|
|
+ <if test="testCycle!=null and testCycle!=''">
|
|
|
+ and test_cycle=#{testCycle}
|
|
|
+ </if>
|
|
|
+ <if test="testPlanDate!=null and testPlanDate!=''">
|
|
|
+ and test_plan_date=#{testPlanDate}
|
|
|
+ </if>
|
|
|
+ <if test="completionDate!=null and completionDate!=''">
|
|
|
+ and completion_date=#{completionDate}
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
+ and create_by=#{createBy}
|
|
|
+ </if>
|
|
|
+ <if test="createTime!=null and createTime!=''">
|
|
|
+ and create_time=#{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateBy!=null and updateBy!=''">
|
|
|
+ and update_by=#{updateBy}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null and updateTime!=''">
|
|
|
+ and update_time=#{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null and delFlag!=''">
|
|
|
+ and del_flag=#{delFlag}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|