|
|
@@ -5,7 +5,6 @@
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BasePreventFlood">
|
|
|
<result column="id" property="id"/>
|
|
|
- <result column="piecewise" property="piecewise"/>
|
|
|
<result column="dept_id" property="deptId"/>
|
|
|
<result column="dept_name" property="deptName"/>
|
|
|
<result column="fill_date" property="fillDate"/>
|
|
|
@@ -34,7 +33,6 @@
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
t.id,
|
|
|
- t.piecewise,
|
|
|
v.dept_id,
|
|
|
v.dept_name,
|
|
|
t.fill_date,
|
|
|
@@ -66,36 +64,18 @@
|
|
|
</selectKey>
|
|
|
INSERT INTO base_prevent_flood
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != piecewise'>
|
|
|
- piecewise,
|
|
|
- </if>
|
|
|
- <if test='null != deptId'>
|
|
|
- dept_id,
|
|
|
- </if>
|
|
|
- <if test='null != deptName'>
|
|
|
- dept_name,
|
|
|
- </if>
|
|
|
<if test='null != fillDate'>
|
|
|
fill_date,
|
|
|
</if>
|
|
|
<if test='null != fillUser'>
|
|
|
fill_user,
|
|
|
</if>
|
|
|
- <if test='null != lineId'>
|
|
|
- line_id,
|
|
|
- </if>
|
|
|
- <if test='null != lineName'>
|
|
|
- line_name,
|
|
|
- </if>
|
|
|
<if test='null != xingbie'>
|
|
|
xingbie,
|
|
|
</if>
|
|
|
<if test='null != deptStationId'>
|
|
|
dept_station_id,
|
|
|
</if>
|
|
|
- <if test='null != stationName'>
|
|
|
- station_name,
|
|
|
- </if>
|
|
|
<if test='null != marker'>
|
|
|
marker,
|
|
|
</if>
|
|
|
@@ -137,36 +117,18 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != piecewise'>
|
|
|
- #{piecewise},
|
|
|
- </if>
|
|
|
- <if test='null != deptId'>
|
|
|
- #{deptId},
|
|
|
- </if>
|
|
|
- <if test='null != deptName'>
|
|
|
- #{deptName},
|
|
|
- </if>
|
|
|
<if test='null != fillDate'>
|
|
|
#{fillDate},
|
|
|
</if>
|
|
|
<if test='null != fillUser'>
|
|
|
#{fillUser},
|
|
|
</if>
|
|
|
- <if test='null != lineId'>
|
|
|
- #{lineId},
|
|
|
- </if>
|
|
|
- <if test='null != lineName'>
|
|
|
- #{lineName},
|
|
|
- </if>
|
|
|
<if test='null != xingbie'>
|
|
|
#{xingbie},
|
|
|
</if>
|
|
|
<if test='null != deptStationId'>
|
|
|
#{deptStationId},
|
|
|
</if>
|
|
|
- <if test='null != stationName'>
|
|
|
- #{stationName},
|
|
|
- </if>
|
|
|
<if test='null != marker'>
|
|
|
#{marker},
|
|
|
</if>
|
|
|
@@ -218,16 +180,10 @@
|
|
|
<update id="update" parameterType="com.railway.business.baseinfo.domain.BasePreventFlood">
|
|
|
UPDATE base_prevent_flood
|
|
|
<set>
|
|
|
- <if test='null != piecewise'>piecewise = #{piecewise},</if>
|
|
|
- <if test='null != deptId'>dept_id = #{deptId},</if>
|
|
|
- <if test='null != deptName'>dept_name = #{deptName},</if>
|
|
|
<if test='null != fillDate'>fill_date = #{fillDate},</if>
|
|
|
<if test='null != fillUser'>fill_user = #{fillUser},</if>
|
|
|
- <if test='null != lineId'>line_id = #{lineId},</if>
|
|
|
- <if test='null != lineName'>line_name = #{lineName},</if>
|
|
|
<if test='null != xingbie'>xingbie = #{xingbie},</if>
|
|
|
<if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
|
|
|
- <if test='null != stationName'>station_name = #{stationName},</if>
|
|
|
<if test='null != marker'>marker = #{marker},</if>
|
|
|
<if test='null != startMarker'>start_marker = #{startMarker},</if>
|
|
|
<if test='null != endMarker'>end_marker = #{endMarker},</if>
|
|
|
@@ -248,31 +204,22 @@
|
|
|
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>, dict.dict_label as xingbie_text,dict1.dict_label as
|
|
|
- piecewiseText
|
|
|
+ <include refid="Base_Column_List"/>, dict.dict_label as xingbie_text
|
|
|
FROM base_prevent_flood t
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
- LEFT JOIN sys_dict_data dict1 ON (t.piecewise = dict1.dict_value AND dict1.dict_type =
|
|
|
- 'piecewise')
|
|
|
WHERE t.del_flag='0' and id = #{id}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>, dict.dict_label as xingbie_text,dict1.dict_label as
|
|
|
- piecewiseText
|
|
|
+ <include refid="Base_Column_List"/>, dict.dict_label as xingbie_text
|
|
|
FROM base_prevent_flood t
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
- LEFT JOIN sys_dict_data dict1 ON (t.piecewise = dict1.dict_value AND dict1.dict_type =
|
|
|
- 'piecewise')
|
|
|
<where>
|
|
|
t.del_flag='0'
|
|
|
- <if test="piecewise!=null and piecewise!=''">
|
|
|
- and t.piecewise=#{piecewise}
|
|
|
- </if>
|
|
|
<if test="deptId!=null and deptId!=''">
|
|
|
and v.dept_id=#{deptId}
|
|
|
</if>
|