|
|
@@ -0,0 +1,236 @@
|
|
|
+<?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.ShowBdycMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.railway.business.bi.domain.ShowBdyc">
|
|
|
+ <result column="id" property="id"/>
|
|
|
+ <result column="found_date" property="foundDate"/>
|
|
|
+ <result column="line_name" property="lineName"/>
|
|
|
+ <result column="station_name" property="stationName"/>
|
|
|
+ <result column="qxsbmc" property="qxsbmc"/>
|
|
|
+ <result column="yxbh" property="yxbh"/>
|
|
|
+ <result column="qxdj" property="qxdj"/>
|
|
|
+ <result column="qxnr" property="qxnr"/>
|
|
|
+ <result column="reason" property="reason"/>
|
|
|
+ <result column="zrbm" property="zrbm"/>
|
|
|
+ <result column="sjgq" property="sjgq"/>
|
|
|
+ <result column="rectify_result" property="rectifyResult"/>
|
|
|
+ <result column="rectify_way" property="rectifyWay"/>
|
|
|
+ <result column="rectify_date" property="rectifyDate"/>
|
|
|
+ <result column="counted" property="counted"/>
|
|
|
+ <result column="plan_date" property="planDate"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,
|
|
|
+ found_date,
|
|
|
+ line_name,
|
|
|
+ station_name,
|
|
|
+ qxsbmc,
|
|
|
+ yxbh,
|
|
|
+ qxdj,
|
|
|
+ qxnr,
|
|
|
+ reason,
|
|
|
+ zrbm,
|
|
|
+ sjgq,
|
|
|
+ rectify_result,
|
|
|
+ rectify_way,
|
|
|
+ rectify_date,
|
|
|
+ counted,
|
|
|
+ plan_date
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="com.railway.business.bi.domain.ShowBdyc">
|
|
|
+ <selectKey keyProperty="id" order="BEFORE" resultType="String">
|
|
|
+ select replace(uuid(), '-', '') from dual
|
|
|
+ </selectKey>
|
|
|
+ INSERT INTO show_bdyc
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test ='null != foundDate'>
|
|
|
+ found_date,
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineName'>
|
|
|
+ line_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationName'>
|
|
|
+ station_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxsbmc'>
|
|
|
+ qxsbmc,
|
|
|
+ </if>
|
|
|
+ <if test ='null != yxbh'>
|
|
|
+ yxbh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxdj'>
|
|
|
+ qxdj,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxnr'>
|
|
|
+ qxnr,
|
|
|
+ </if>
|
|
|
+ <if test ='null != reason'>
|
|
|
+ reason,
|
|
|
+ </if>
|
|
|
+ <if test ='null != zrbm'>
|
|
|
+ zrbm,
|
|
|
+ </if>
|
|
|
+ <if test ='null != sjgq'>
|
|
|
+ sjgq,
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyResult'>
|
|
|
+ rectify_result,
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyWay'>
|
|
|
+ rectify_way,
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyDate'>
|
|
|
+ rectify_date,
|
|
|
+ </if>
|
|
|
+ <if test ='null != counted'>
|
|
|
+ counted,
|
|
|
+ </if>
|
|
|
+ <if test ='null != planDate'>
|
|
|
+ plan_date
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test ='null != foundDate'>
|
|
|
+ #{foundDate},
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineName'>
|
|
|
+ #{lineName},
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationName'>
|
|
|
+ #{stationName},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxsbmc'>
|
|
|
+ #{qxsbmc},
|
|
|
+ </if>
|
|
|
+ <if test ='null != yxbh'>
|
|
|
+ #{yxbh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxdj'>
|
|
|
+ #{qxdj},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qxnr'>
|
|
|
+ #{qxnr},
|
|
|
+ </if>
|
|
|
+ <if test ='null != reason'>
|
|
|
+ #{reason},
|
|
|
+ </if>
|
|
|
+ <if test ='null != zrbm'>
|
|
|
+ #{zrbm},
|
|
|
+ </if>
|
|
|
+ <if test ='null != sjgq'>
|
|
|
+ #{sjgq},
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyResult'>
|
|
|
+ #{rectifyResult},
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyWay'>
|
|
|
+ #{rectifyWay},
|
|
|
+ </if>
|
|
|
+ <if test ='null != rectifyDate'>
|
|
|
+ #{rectifyDate},
|
|
|
+ </if>
|
|
|
+ <if test ='null != counted'>
|
|
|
+ #{counted},
|
|
|
+ </if>
|
|
|
+ <if test ='null != planDate'>
|
|
|
+ #{planDate}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <delete id="delete">
|
|
|
+ UPDATE show_bdyc
|
|
|
+ set del_flag='1'
|
|
|
+ WHERE id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.railway.business.bi.domain.ShowBdyc">
|
|
|
+ UPDATE show_bdyc
|
|
|
+ <set>
|
|
|
+ <if test ='null != foundDate'>found_date = #{foundDate},</if>
|
|
|
+ <if test ='null != lineName'>line_name = #{lineName},</if>
|
|
|
+ <if test ='null != stationName'>station_name = #{stationName},</if>
|
|
|
+ <if test ='null != qxsbmc'>qxsbmc = #{qxsbmc},</if>
|
|
|
+ <if test ='null != yxbh'>yxbh = #{yxbh},</if>
|
|
|
+ <if test ='null != qxdj'>qxdj = #{qxdj},</if>
|
|
|
+ <if test ='null != qxnr'>qxnr = #{qxnr},</if>
|
|
|
+ <if test ='null != reason'>reason = #{reason},</if>
|
|
|
+ <if test ='null != zrbm'>zrbm = #{zrbm},</if>
|
|
|
+ <if test ='null != sjgq'>sjgq = #{sjgq},</if>
|
|
|
+ <if test ='null != rectifyResult'>rectify_result = #{rectifyResult},</if>
|
|
|
+ <if test ='null != rectifyWay'>rectify_way = #{rectifyWay},</if>
|
|
|
+ <if test ='null != rectifyDate'>rectify_date = #{rectifyDate},</if>
|
|
|
+ <if test ='null != counted'>counted = #{counted},</if>
|
|
|
+ <if test ='null != planDate'>plan_date = #{planDate}</if>
|
|
|
+ </set>
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getInfo" resultMap="BaseResultMap">
|
|
|
+ SELECT
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ FROM show_bdyc
|
|
|
+ WHERE del_flag='0' and id = #{id}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getList" resultMap="BaseResultMap">
|
|
|
+ SELECT
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ FROM show_bdyc
|
|
|
+ <where>
|
|
|
+ del_flag='0'
|
|
|
+ <if test="foundDate!=null and foundDate!=''">
|
|
|
+ and found_date=#{foundDate}
|
|
|
+ </if>
|
|
|
+ <if test="lineName!=null and lineName!=''">
|
|
|
+ and line_name=#{lineName}
|
|
|
+ </if>
|
|
|
+ <if test="stationName!=null and stationName!=''">
|
|
|
+ and station_name=#{stationName}
|
|
|
+ </if>
|
|
|
+ <if test="qxsbmc!=null and qxsbmc!=''">
|
|
|
+ and qxsbmc=#{qxsbmc}
|
|
|
+ </if>
|
|
|
+ <if test="yxbh!=null and yxbh!=''">
|
|
|
+ and yxbh=#{yxbh}
|
|
|
+ </if>
|
|
|
+ <if test="qxdj!=null and qxdj!=''">
|
|
|
+ and qxdj=#{qxdj}
|
|
|
+ </if>
|
|
|
+ <if test="qxnr!=null and qxnr!=''">
|
|
|
+ and qxnr=#{qxnr}
|
|
|
+ </if>
|
|
|
+ <if test="reason!=null and reason!=''">
|
|
|
+ and reason=#{reason}
|
|
|
+ </if>
|
|
|
+ <if test="zrbm!=null and zrbm!=''">
|
|
|
+ and zrbm=#{zrbm}
|
|
|
+ </if>
|
|
|
+ <if test="sjgq!=null and sjgq!=''">
|
|
|
+ and sjgq=#{sjgq}
|
|
|
+ </if>
|
|
|
+ <if test="rectifyResult!=null and rectifyResult!=''">
|
|
|
+ and rectify_result=#{rectifyResult}
|
|
|
+ </if>
|
|
|
+ <if test="rectifyWay!=null and rectifyWay!=''">
|
|
|
+ and rectify_way=#{rectifyWay}
|
|
|
+ </if>
|
|
|
+ <if test="rectifyDate!=null and rectifyDate!=''">
|
|
|
+ and rectify_date=#{rectifyDate}
|
|
|
+ </if>
|
|
|
+ <if test="counted!=null and counted!=''">
|
|
|
+ and counted=#{counted}
|
|
|
+ </if>
|
|
|
+ <if test="planDate!=null and planDate!=''">
|
|
|
+ and plan_date=#{planDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|