| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479 |
- <?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.catenary.mapper.BusJcebFzswjfxcMapper">
- <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcebFzswjfxc">
- <result column="id" property="id"/>
- <result column="station_id" property="stationId"/>
- <result column="station_name" property="stationName"/>
- <result column="dept_station_id" property="deptStationId"/>
- <result column="pillar_code" property="pillarCode"/>
- <result column="xch" property="xch"/>
- <result column="xc_id" property="xcId"/>
- <result column="operation_date" property="operationDate"/>
- <result column="zxzlcz" property="zxzlcz"/>
- <result column="fxzlcz_xdzg" property="fxzlczXdzg"/>
- <result column="fxzlcz_xdqg" property="fxzlczXdqg"/>
- <result column="cxzlcz" property="cxzlcz"/>
- <result column="zxzdg" property="zxzdg"/>
- <result column="fxzdg_xdzg" property="fxzdgXdzg"/>
- <result column="fxzdg_xdqg" property="fxzdgXdqg"/>
- <result column="cxzdg" property="cxzdg"/>
- <result column="zxzxdzxdg" property="zxzxdzxdg"/>
- <result column="zxzxdzxlcz" property="zxzxdzxlcz"/>
- <result column="cxzxdzxdg" property="cxzxdzxdg"/>
- <result column="cxzxdzxlcz" property="cxzxdzxlcz"/>
- <result column="operator" property="operator"/>
- <result column="remark" property="remark"/>
- <result column="submit_state" property="submitState"/>
- <result column="del_flag" property="delFlag"/>
- <result column="create_by" property="createBy"/>
- <result column="create_time" property="createTime"/>
- <result column="update_by" property="updateBy"/>
- <result column="update_time" property="updateTime"/>
- </resultMap>
- <sql id="Base_Column_List">
- t.id,
- v.station_id,
- t.dept_station_id,
- v.station_name,
- t.pillar_code,
- t.xch,
- t.xc_id,
- t.operation_date,
- t.zxzlcz,
- t.fxzlcz_xdzg,
- t.fxzlcz_xdqg,
- t.cxzlcz,
- t.zxzdg,
- t.fxzdg_xdzg,
- t.fxzdg_xdqg,
- t.cxzdg,
- t.zxzxdzxdg,
- t.zxzxdzxlcz,
- t.cxzxdzxdg,
- t.cxzxdzxlcz,
- t.operator,
- t.remark,
- t.submit_state,
- t.del_flag,
- t.create_by,
- t.create_time,
- t.update_by,
- t.update_time
- </sql>
- <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcebFzswjfxc">
- <selectKey keyProperty="id" order="AFTER" resultType="Long">
- select @@IDENTITY as id
- </selectKey>
- INSERT INTO bus_jceb_fzswjfxc
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test='null != deptStationId'>
- dept_station_id,
- </if>
- <if test='null != pillarCode'>
- pillar_code,
- </if>
- <if test='null != xch'>
- xch,
- </if>
- <if test='null != xcId'>
- xc_id,
- </if>
- <if test='null != operationDate'>
- operation_date,
- </if>
- <if test='null != zxzlcz'>
- zxzlcz,
- </if>
- <if test='null != fxzlczXdzg'>
- fxzlcz_xdzg,
- </if>
- <if test='null != fxzlczXdqg'>
- fxzlcz_xdqg,
- </if>
- <if test='null != cxzlcz'>
- cxzlcz,
- </if>
- <if test='null != zxzdg'>
- zxzdg,
- </if>
- <if test='null != fxzdgXdzg'>
- fxzdg_xdzg,
- </if>
- <if test='null != fxzdgXdqg'>
- fxzdg_xdqg,
- </if>
- <if test='null != cxzdg'>
- cxzdg,
- </if>
- <if test='null != zxzxdzxdg'>
- zxzxdzxdg,
- </if>
- <if test='null != zxzxdzxlcz'>
- zxzxdzxlcz,
- </if>
- <if test='null != cxzxdzxdg'>
- cxzxdzxdg,
- </if>
- <if test='null != cxzxdzxlcz'>
- cxzxdzxlcz,
- </if>
- <if test='null != operator'>
- operator,
- </if>
- <if test='null != remark'>
- remark,
- </if>
- <if test='null != submitState'>
- submit_state,
- </if>
- <if test='null != delFlag'>
- del_flag,
- </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>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test='null != deptStationId'>
- #{deptStationId},
- </if>
- <if test='null != pillarCode'>
- #{pillarCode},
- </if>
- <if test='null != xch'>
- #{xch},
- </if>
- <if test='null != xcId'>
- #{xcId},
- </if>
- <if test='null != operationDate'>
- #{operationDate},
- </if>
- <if test='null != zxzlcz'>
- #{zxzlcz},
- </if>
- <if test='null != fxzlczXdzg'>
- #{fxzlczXdzg},
- </if>
- <if test='null != fxzlczXdqg'>
- #{fxzlczXdqg},
- </if>
- <if test='null != cxzlcz'>
- #{cxzlcz},
- </if>
- <if test='null != zxzdg'>
- #{zxzdg},
- </if>
- <if test='null != fxzdgXdzg'>
- #{fxzdgXdzg},
- </if>
- <if test='null != fxzdgXdqg'>
- #{fxzdgXdqg},
- </if>
- <if test='null != cxzdg'>
- #{cxzdg},
- </if>
- <if test='null != zxzxdzxdg'>
- #{zxzxdzxdg},
- </if>
- <if test='null != zxzxdzxlcz'>
- #{zxzxdzxlcz},
- </if>
- <if test='null != cxzxdzxdg'>
- #{cxzxdzxdg},
- </if>
- <if test='null != cxzxdzxlcz'>
- #{cxzxdzxlcz},
- </if>
- <if test='null != operator'>
- #{operator},
- </if>
- <if test='null != remark'>
- #{remark},
- </if>
- <if test='null != submitState'>
- #{submitState},
- </if>
- <if test='null != delFlag'>
- #{delFlag},
- </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>
- </trim>
- </insert>
- <delete id="delete">
- UPDATE bus_jceb_fzswjfxc
- set del_flag='1'
- WHERE id = #{id}
- </delete>
- <update id="update" parameterType="com.railway.business.catenary.domain.BusJcebFzswjfxc">
- UPDATE bus_jceb_fzswjfxc
- <set>
- <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
- <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
- <if test='null != xch'>xch = #{xch},</if>
- <if test='null != xcId'>xc_id = #{xcId},</if>
- <if test='null != operationDate'>operation_date = #{operationDate},</if>
- <if test='null != zxzlcz'>zxzlcz = #{zxzlcz},</if>
- <if test='null != fxzlczXdzg'>fxzlcz_xdzg = #{fxzlczXdzg},</if>
- <if test='null != fxzlczXdqg'>fxzlcz_xdqg = #{fxzlczXdqg},</if>
- <if test='null != cxzlcz'>cxzlcz = #{cxzlcz},</if>
- <if test='null != zxzdg'>zxzdg = #{zxzdg},</if>
- <if test='null != fxzdgXdzg'>fxzdg_xdzg = #{fxzdgXdzg},</if>
- <if test='null != fxzdgXdqg'>fxzdg_xdqg = #{fxzdgXdqg},</if>
- <if test='null != cxzdg'>cxzdg = #{cxzdg},</if>
- <if test='null != zxzxdzxdg'>zxzxdzxdg = #{zxzxdzxdg},</if>
- <if test='null != zxzxdzxlcz'>zxzxdzxlcz = #{zxzxdzxlcz},</if>
- <if test='null != cxzxdzxdg'>cxzxdzxdg = #{cxzxdzxdg},</if>
- <if test='null != cxzxdzxlcz'>cxzxdzxlcz = #{cxzxdzxlcz},</if>
- <if test='null != operator'>operator = #{operator},</if>
- <if test='null != remark'>remark = #{remark},</if>
- <if test='null != submitState'>submit_state = #{submitState},</if>
- <if test='null != delFlag'>del_flag = #{delFlag},</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>
- </set>
- WHERE id = #{id}
- </update>
- <select id="getInfo" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_jceb_fzswjfxc t
- LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
- WHERE t.del_flag='0' and t.id = #{id}
- </select>
- <select id="getList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_jceb_fzswjfxc t
- LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
- <where>
- t.del_flag='0'
- <if test="deptId!=null and deptId!=''">
- and v.dept_id=#{deptId}
- </if>
- <if test="stationId!=null and stationId!=''">
- and v.station_id=#{stationId}
- </if>
- <if test="stationIds!=null and stationIds.length > 0">
- and v.station_id in
- <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
- #{stationId}
- </foreach>
- </if>
- <if test="pillarCode!=null and pillarCode!=''">
- and t.pillar_code=#{pillarCode}
- </if>
- <if test="xch!=null and xch!=''">
- and t.xch=#{xch}
- </if>
- <if test="xcId!=null and xcId!=''">
- and t.xc_id=#{xcId}
- </if>
- <if test="operationDate!=null and operationDate!=''">
- and t.operation_date=#{operationDate}
- </if>
- <if test="zxzlcz!=null and zxzlcz!=''">
- and t.zxzlcz=#{zxzlcz}
- </if>
- <if test="fxzlczXdzg!=null and fxzlczXdzg!=''">
- and t.fxzlcz_xdzg=#{fxzlczXdzg}
- </if>
- <if test="fxzlczXdqg!=null and fxzlczXdqg!=''">
- and t.fxzlcz_xdqg=#{fxzlczXdqg}
- </if>
- <if test="cxzlcz!=null and cxzlcz!=''">
- and t.cxzlcz=#{cxzlcz}
- </if>
- <if test="zxzdg!=null and zxzdg!=''">
- and t.zxzdg=#{zxzdg}
- </if>
- <if test="fxzdgXdzg!=null and fxzdgXdzg!=''">
- and t.fxzdg_xdzg=#{fxzdgXdzg}
- </if>
- <if test="fxzdgXdqg!=null and fxzdgXdqg!=''">
- and t.fxzdg_xdqg=#{fxzdgXdqg}
- </if>
- <if test="cxzdg!=null and cxzdg!=''">
- and t.cxzdg=#{cxzdg}
- </if>
- <if test="zxzxdzxdg!=null and zxzxdzxdg!=''">
- and t.zxzxdzxdg=#{zxzxdzxdg}
- </if>
- <if test="zxzxdzxlcz!=null and zxzxdzxlcz!=''">
- and t.zxzxdzxlcz=#{zxzxdzxlcz}
- </if>
- <if test="cxzxdzxdg!=null and cxzxdzxdg!=''">
- and t.cxzxdzxdg=#{cxzxdzxdg}
- </if>
- <if test="cxzxdzxlcz!=null and cxzxdzxlcz!=''">
- and t.cxzxdzxlcz=#{cxzxdzxlcz}
- </if>
- <if test="operator!=null and operator!=''">
- and t.operator like concat('%', #{operator}, '%')
- </if>
- <if test="submitState!=null and submitState!=''">
- and t.submit_state <![CDATA[ >= ]]> #{submitState}
- </if>
- <if test="createBy!=null and createBy!=''">
- and t.create_by=#{createBy}
- </if>
- <if test="createTime!=null">
- and DATE_FORMAT(t.create_time, '%Y-%m-%d') = #{createTime}
- </if>
- </where>
- <if test="orderBy!=null and orderBy!=''">
- order by t.${orderBy}
- </if>
- <if test="isAsc!=null and isAsc!=''">
- <if test="isAsc == '1'.toString()">
- asc
- </if>
- <if test="isAsc == '0'.toString()">
- desc
- </if>
- </if>
- </select>
- <select id="getJcebList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_jceb_fzswjfxc t
- LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
- <where>
- t.del_flag='0'
- <if test="submitState!=null and submitState!=''">
- and t.submit_state <![CDATA[ >= ]]> #{submitState}
- </if>
- <if test="deptId!=null and deptId!=''">
- and v.dept_id=#{deptId}
- </if>
- <if test="stationId!=null and stationId!=''">
- and v.station_id=#{stationId}
- </if>
- <if test="stationIds!=null and stationIds.length > 0">
- and v.station_id in
- <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
- #{stationId}
- </foreach>
- </if>
- <if test="pillarCode!=null and pillarCode!=''">
- and t.pillar_code=#{pillarCode}
- </if>
- <if test="operator!=null and operator!=''">
- and t.operator like concat('%', #{operator}, '%')
- </if>
- <if test="createBy!=null and createBy!=''">
- and t.create_by=#{createBy}
- </if>
- </where>
- </select>
- <resultMap id="JcebResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
- <result column="id" property="id"/>
- <result column="dept_name" property="deptName"/>
- <result column="station_name" property="stationName"/>
- <result column="operation_date" property="operationDate"/>
- <result column="operator" property="operator"/>
- <result column="jcebType" property="jcebType"/>
- </resultMap>
- <select id="getListByType" resultMap="JcebResultMap">
- SELECT t.id, v.dept_name, v.station_name, t.operation_date, t.operator, #{jcebType} as jcebType,
- #{jcebTypeText} as jcebTypeText
- FROM bus_jceb_fzswjfxc t
- LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
- <where>
- t.del_flag='0'
- <if test="submitState!=null and submitState!=''">
- and t.submit_state <![CDATA[ >= ]]> #{submitState}
- </if>
- <if test="deptId!=null and deptId!=''">
- and v.dept_id=#{deptId}
- </if>
- <if test="stationId!=null and stationId!=''">
- and v.station_id=#{stationId}
- </if>
- <if test="stationIds!=null and stationIds.length > 0">
- and v.station_id in
- <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
- #{stationId}
- </foreach>
- </if>
- <if test="pillarCode!=null and pillarCode!=''">
- and t.pillar_code=#{pillarCode}
- </if>
- <if test="operator!=null and operator!=''">
- and t.operator like concat('%', #{operator}, '%')
- </if>
- <if test="createBy!=null and createBy!=''">
- and t.create_by=#{createBy}
- </if>
- </where>
- </select>
- <resultMap id="JcebCountResultMap" type="com.railway.business.catenary.domain.vo.JcebCountVo">
- <result column="c" property="count"/>
- <result column="operation_date" property="operationDate"/>
- </resultMap>
- <select id="getCountByType" resultMap="JcebCountResultMap">
- SELECT count(*) c, max(t.operation_date) as operation_date
- FROM bus_jceb_fzswjfxc t
- LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
- <where>
- t.del_flag='0'
- <if test="submitState!=null and submitState!=''">
- and t.submit_state <![CDATA[ >= ]]> #{submitState}
- </if>
- <if test="deptId!=null and deptId!=''">
- and v.dept_id=#{deptId}
- </if>
- <if test="stationId!=null and stationId!=''">
- and v.station_id=#{stationId}
- </if>
- <if test="pillarCode!=null and pillarCode!=''">
- and t.pillar_code=#{pillarCode}
- </if>
- <if test="operator!=null and operator!=''">
- and t.operator like concat('%', #{operator}, '%')
- </if>
- <if test="createBy!=null and createBy!=''">
- and t.create_by=#{createBy}
- </if>
- </where>
- </select>
- </mapper>
|