| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <?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.ShowYdtsMapper">
- <resultMap id="BaseResultMap" type="com.railway.business.bi.domain.ShowYdts">
- <result column="id" property="id"/>
- <result column="branch_name" property="branchName"/>
- <result column="dept_name" property="deptName"/>
- <result column="line_sddj" property="lineSddj"/>
- <result column="line_name" property="lineName"/>
- <result column="station_name" property="stationName"/>
- <result column="line_xz" property="lineXz"/>
- <result column="substation_name" property="substationName"/>
- <result column="switch_high" property="switchHigh"/>
- <result column="switch_low" property="switchLow"/>
- <result column="last_year" property="lastYear"/>
- <result column="plan_month" property="planMonth"/>
- <result column="overdue_reminder" property="overdueReminder"/>
- <result column="completion_date" property="completionDate"/>
- <result column="jhtzjy" property="jhtzjy"/>
- <result column="overdue_reason" property="overdueReason"/>
- <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="file_id" property="fileId"/>
- <result column="del_flag" property="delFlag"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,
- branch_name,
- dept_name,
- line_sddj,
- line_name,
- station_name,
- line_xz,
- substation_name,
- switch_high,
- switch_low,
- last_year,
- plan_month,
- overdue_reminder,
- completion_date,
- jhtzjy,
- overdue_reason,
- create_by,
- create_time,
- update_by,
- update_time,
- del_flag,
- file_id
- </sql>
- <insert id="insert" parameterType="com.railway.business.bi.domain.ShowYdts">
- INSERT INTO show_ydts
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test='null != branchName'>
- branch_name,
- </if>
- <if test='null != deptName'>
- dept_name,
- </if>
- <if test='null != lineSddj'>
- line_sddj,
- </if>
- <if test='null != lineName'>
- line_name,
- </if>
- <if test='null != stationName'>
- station_name,
- </if>
- <if test='null != lineXz'>
- line_xz,
- </if>
- <if test='null != substationName'>
- substation_name,
- </if>
- <if test='null != switchHigh'>
- switch_high,
- </if>
- <if test='null != switchLow'>
- switch_low,
- </if>
- <if test='null != lastYear'>
- last_year,
- </if>
- <if test='null != planMonth'>
- plan_month,
- </if>
- <if test='null != overdueReminder'>
- overdue_reminder,
- </if>
- <if test='null != completionDate'>
- completion_date,
- </if>
- <if test='null != jhtzjy'>
- jhtzjy,
- </if>
- <if test='null != overdueReason'>
- overdue_reason,
- </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 != branchName'>
- #{branchName},
- </if>
- <if test='null != deptName'>
- #{deptName},
- </if>
- <if test='null != lineSddj'>
- #{lineSddj},
- </if>
- <if test='null != lineName'>
- #{lineName},
- </if>
- <if test='null != stationName'>
- #{stationName},
- </if>
- <if test='null != lineXz'>
- #{lineXz},
- </if>
- <if test='null != substationName'>
- #{substationName},
- </if>
- <if test='null != switchHigh'>
- #{switchHigh},
- </if>
- <if test='null != switchLow'>
- #{switchLow},
- </if>
- <if test='null != lastYear'>
- #{lastYear},
- </if>
- <if test='null != planMonth'>
- #{planMonth},
- </if>
- <if test='null != overdueReminder'>
- #{overdueReminder},
- </if>
- <if test='null != completionDate'>
- #{completionDate},
- </if>
- <if test='null != jhtzjy'>
- #{jhtzjy},
- </if>
- <if test='null != overdueReason'>
- #{overdueReason},
- </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_ydts
- set del_flag='1'
- WHERE id = #{id}
- </delete>
- <update id="update" parameterType="com.railway.business.bi.domain.ShowYdts">
- UPDATE show_ydts
- <set>
- <if test='null != branchName'>branch_name = #{branchName},</if>
- <if test='null != deptName'>dept_name = #{deptName},</if>
- <if test='null != lineSddj'>line_sddj = #{lineSddj},</if>
- <if test='null != lineName'>line_name = #{lineName},</if>
- <if test='null != stationName'>station_name = #{stationName},</if>
- <if test='null != lineXz'>line_xz = #{lineXz},</if>
- <if test='null != substationName'>substation_name = #{substationName},</if>
- <if test='null != switchHigh'>switch_high = #{switchHigh},</if>
- <if test='null != switchLow'>switch_low = #{switchLow},</if>
- <if test='null != lastYear'>last_year = #{lastYear},</if>
- <if test='null != planMonth'>plan_month = #{planMonth},</if>
- <if test='null != overdueReminder'>overdue_reminder = #{overdueReminder},</if>
- <if test='null != completionDate'>completion_date = #{completionDate},</if>
- <if test='null != jhtzjy'>jhtzjy = #{jhtzjy},</if>
- <if test='null != overdueReason'>overdue_reason = #{overdueReason},</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_ydts
- WHERE del_flag='0' and id = #{id}
- </select>
- <select id="getList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM show_ydts
- <where>
- del_flag='0'
- and file_id = (select max(id) from show_file where data_type = 'scrw' and imp_result = '1')
- <if test="lineName!=null and lineName!=''">
- and line_name like concat('%', #{lineName}, '%')
- </if>
- <if test="planMonth!=null and planMonth!=''">
- and plan_month like concat('%', #{planMonth})
- </if>
- </where>
- </select>
- <select id="getLineList" resultType="java.lang.String">
- SELECT distinct line_name
- FROM show_ydts
- <where>
- del_flag='0'
- and file_id = (select max(id) from show_file where data_type = 'scrw' and imp_result = '1')
- </where>
- </select>
- </mapper>
|