|
|
@@ -5,6 +5,8 @@
|
|
|
|
|
|
<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"/>
|
|
|
@@ -33,37 +35,39 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
- id,
|
|
|
- dept_station_id,
|
|
|
- pillar_code,
|
|
|
- xch,
|
|
|
- xc_id,
|
|
|
- operation_date,
|
|
|
- zxzlcz,
|
|
|
- fxzlcz_xdzg,
|
|
|
- fxzlcz_xdqg,
|
|
|
- cxzlcz,
|
|
|
- zxzdg,
|
|
|
- fxzdg_xdzg,
|
|
|
- fxzdg_xdqg,
|
|
|
- cxzdg,
|
|
|
- zxzxdzxdg,
|
|
|
- zxzxdzxlcz,
|
|
|
- cxzxdzxdg,
|
|
|
- cxzxdzxlcz,
|
|
|
- operator,
|
|
|
- remark,
|
|
|
- submit_state,
|
|
|
- del_flag,
|
|
|
- create_by,
|
|
|
- create_time,
|
|
|
- update_by,
|
|
|
- update_time
|
|
|
+ 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="BEFORE" resultType="String">
|
|
|
- select replace(uuid(), '-', '') from dual
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="Long">
|
|
|
+ select @@IDENTITY as id
|
|
|
</selectKey>
|
|
|
INSERT INTO bus_jceb_fzswjfxc
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -264,79 +268,177 @@
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM bus_jceb_fzswjfxc
|
|
|
- WHERE del_flag='0' and id = #{id}
|
|
|
+ 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
|
|
|
+ FROM bus_jceb_fzswjfxc t
|
|
|
+ LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
|
<where>
|
|
|
- del_flag='0'
|
|
|
- <if test="deptStationId!=null and deptStationId!=''">
|
|
|
- and dept_station_id=#{deptStationId}
|
|
|
+ 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 pillar_code=#{pillarCode}
|
|
|
+ and t.pillar_code=#{pillarCode}
|
|
|
</if>
|
|
|
<if test="xch!=null and xch!=''">
|
|
|
- and xch=#{xch}
|
|
|
+ and t.xch=#{xch}
|
|
|
</if>
|
|
|
<if test="xcId!=null and xcId!=''">
|
|
|
- and xc_id=#{xcId}
|
|
|
+ and t.xc_id=#{xcId}
|
|
|
</if>
|
|
|
<if test="operationDate!=null and operationDate!=''">
|
|
|
- and operation_date=#{operationDate}
|
|
|
+ and t.operation_date=#{operationDate}
|
|
|
</if>
|
|
|
<if test="zxzlcz!=null and zxzlcz!=''">
|
|
|
- and zxzlcz=#{zxzlcz}
|
|
|
+ and t.zxzlcz=#{zxzlcz}
|
|
|
</if>
|
|
|
<if test="fxzlczXdzg!=null and fxzlczXdzg!=''">
|
|
|
- and fxzlcz_xdzg=#{fxzlczXdzg}
|
|
|
+ and t.fxzlcz_xdzg=#{fxzlczXdzg}
|
|
|
</if>
|
|
|
<if test="fxzlczXdqg!=null and fxzlczXdqg!=''">
|
|
|
- and fxzlcz_xdqg=#{fxzlczXdqg}
|
|
|
+ and t.fxzlcz_xdqg=#{fxzlczXdqg}
|
|
|
</if>
|
|
|
<if test="cxzlcz!=null and cxzlcz!=''">
|
|
|
- and cxzlcz=#{cxzlcz}
|
|
|
+ and t.cxzlcz=#{cxzlcz}
|
|
|
</if>
|
|
|
<if test="zxzdg!=null and zxzdg!=''">
|
|
|
- and zxzdg=#{zxzdg}
|
|
|
+ and t.zxzdg=#{zxzdg}
|
|
|
</if>
|
|
|
<if test="fxzdgXdzg!=null and fxzdgXdzg!=''">
|
|
|
- and fxzdg_xdzg=#{fxzdgXdzg}
|
|
|
+ and t.fxzdg_xdzg=#{fxzdgXdzg}
|
|
|
</if>
|
|
|
<if test="fxzdgXdqg!=null and fxzdgXdqg!=''">
|
|
|
- and fxzdg_xdqg=#{fxzdgXdqg}
|
|
|
+ and t.fxzdg_xdqg=#{fxzdgXdqg}
|
|
|
</if>
|
|
|
<if test="cxzdg!=null and cxzdg!=''">
|
|
|
- and cxzdg=#{cxzdg}
|
|
|
+ and t.cxzdg=#{cxzdg}
|
|
|
</if>
|
|
|
<if test="zxzxdzxdg!=null and zxzxdzxdg!=''">
|
|
|
- and zxzxdzxdg=#{zxzxdzxdg}
|
|
|
+ and t.zxzxdzxdg=#{zxzxdzxdg}
|
|
|
</if>
|
|
|
<if test="zxzxdzxlcz!=null and zxzxdzxlcz!=''">
|
|
|
- and zxzxdzxlcz=#{zxzxdzxlcz}
|
|
|
+ and t.zxzxdzxlcz=#{zxzxdzxlcz}
|
|
|
</if>
|
|
|
<if test="cxzxdzxdg!=null and cxzxdzxdg!=''">
|
|
|
- and cxzxdzxdg=#{cxzxdzxdg}
|
|
|
+ and t.cxzxdzxdg=#{cxzxdzxdg}
|
|
|
</if>
|
|
|
<if test="cxzxdzxlcz!=null and cxzxdzxlcz!=''">
|
|
|
- and cxzxdzxlcz=#{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="remark!=null and remark!=''">
|
|
|
- and remark=#{remark}
|
|
|
+ <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
|
|
|
+ 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 submit_state=#{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 create_by=#{createBy}
|
|
|
+ and t.create_by=#{createBy}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
@@ -362,7 +464,7 @@
|
|
|
and v.station_id=#{stationId}
|
|
|
</if>
|
|
|
<if test="pillarCode!=null and pillarCode!=''">
|
|
|
- and t.pillar_start=#{pillarCode}
|
|
|
+ and t.pillar_code=#{pillarCode}
|
|
|
</if>
|
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.operator like concat('%', #{operator}, '%')
|