|
|
@@ -5,14 +5,16 @@
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BusDmcgyq">
|
|
|
<result column="id" property="id"/>
|
|
|
- <result column="db" property="db"/>
|
|
|
<result column="dept_id" property="deptId"/>
|
|
|
- <result column="bm" property="bm"/>
|
|
|
- <result column="xb" property="xb"/>
|
|
|
- <result column="qj" property="qj"/>
|
|
|
- <result column="hb" property="hb"/>
|
|
|
- <result column="zzh" property="zzh"/>
|
|
|
- <result column="gd" property="gd"/>
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
+ <result column="line_id" property="lineId"/>
|
|
|
+ <result column="line_name" property="lineName"/>
|
|
|
+ <result column="station_id" property="stationId"/>
|
|
|
+ <result column="station_name" property="stationName"/>
|
|
|
+ <result column="xingbie" property="xingbie"/>
|
|
|
+ <result column="pillar_code" property="pillarCode"/>
|
|
|
+ <result column="station_track" property="stationTrack"/>
|
|
|
<result column="gxms" property="gxms"/>
|
|
|
<result column="fxcs" property="fxcs"/>
|
|
|
<result column="fxmc" property="fxmc"/>
|
|
|
@@ -34,33 +36,32 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
- id,
|
|
|
- db,
|
|
|
- dept_id,
|
|
|
- line_id,
|
|
|
- station_id,
|
|
|
- bm,
|
|
|
- xb,
|
|
|
- qj,
|
|
|
- hb,
|
|
|
- zzh,
|
|
|
- gd,
|
|
|
- gxms,
|
|
|
- fxcs,
|
|
|
- fxmc,
|
|
|
- mdh,
|
|
|
- sbbh,
|
|
|
- gzlx,
|
|
|
- czlc,
|
|
|
- fxzxlc,
|
|
|
- sccj,
|
|
|
- xh,
|
|
|
- del_flag,
|
|
|
- create_by,
|
|
|
- create_time,
|
|
|
- update_by,
|
|
|
- update_time,
|
|
|
- sjbh
|
|
|
+ t.id,
|
|
|
+ v.dept_id,
|
|
|
+ v.dept_name,
|
|
|
+ v.line_id,
|
|
|
+ v.line_name,
|
|
|
+ v.station_name as station_name,
|
|
|
+ t.station_id,
|
|
|
+ t.xingbie,
|
|
|
+ t.pillar_code,
|
|
|
+ t.station_track,
|
|
|
+ t.gxms,
|
|
|
+ t.fxcs,
|
|
|
+ t.fxmc,
|
|
|
+ t.mdh,
|
|
|
+ t.sbbh,
|
|
|
+ t.gzlx,
|
|
|
+ t.czlc,
|
|
|
+ t.fxzxlc,
|
|
|
+ t.sccj,
|
|
|
+ t.xh,
|
|
|
+ t.del_flag,
|
|
|
+ t.create_by,
|
|
|
+ t.create_time,
|
|
|
+ t.update_by,
|
|
|
+ t.update_time,
|
|
|
+ t.sjbh
|
|
|
</sql>
|
|
|
|
|
|
<insert id="insert" parameterType="com.railway.business.baseinfo.domain.BusDmcgyq">
|
|
|
@@ -69,35 +70,17 @@
|
|
|
</selectKey>
|
|
|
INSERT INTO base_dmcgyq
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != db'>
|
|
|
- db,
|
|
|
- </if>
|
|
|
- <if test='null != deptId'>
|
|
|
- dept_id,
|
|
|
- </if>
|
|
|
- <if test='null != lineId'>
|
|
|
- line_id,
|
|
|
- </if>
|
|
|
<if test='null != stationId'>
|
|
|
station_id,
|
|
|
</if>
|
|
|
- <if test='null != bm'>
|
|
|
- bm,
|
|
|
- </if>
|
|
|
- <if test='null != xb'>
|
|
|
- xb,
|
|
|
- </if>
|
|
|
- <if test='null != qj'>
|
|
|
- qj,
|
|
|
+ <if test='null != xingbie'>
|
|
|
+ xingbie,
|
|
|
</if>
|
|
|
- <if test='null != hb'>
|
|
|
- hb,
|
|
|
+ <if test='null != pillarCode'>
|
|
|
+ pillar_code,
|
|
|
</if>
|
|
|
- <if test='null != zzh'>
|
|
|
- zzh,
|
|
|
- </if>
|
|
|
- <if test='null != gd'>
|
|
|
- gd,
|
|
|
+ <if test='null != stationTrack'>
|
|
|
+ station_track,
|
|
|
</if>
|
|
|
<if test='null != gxms'>
|
|
|
gxms,
|
|
|
@@ -149,35 +132,17 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != db'>
|
|
|
- #{db},
|
|
|
- </if>
|
|
|
- <if test='null != deptId'>
|
|
|
- #{deptId},
|
|
|
- </if>
|
|
|
- <if test='null != lineId'>
|
|
|
- #{line_id},
|
|
|
- </if>
|
|
|
<if test='null != stationId'>
|
|
|
#{station_id},
|
|
|
</if>
|
|
|
- <if test='null != bm'>
|
|
|
- #{bm},
|
|
|
- </if>
|
|
|
- <if test='null != xb'>
|
|
|
- #{xb},
|
|
|
- </if>
|
|
|
- <if test='null != qj'>
|
|
|
- #{qj},
|
|
|
- </if>
|
|
|
- <if test='null != hb'>
|
|
|
- #{hb},
|
|
|
+ <if test='null != xingbie'>
|
|
|
+ #{xingbie},
|
|
|
</if>
|
|
|
- <if test='null != zzh'>
|
|
|
- #{zzh},
|
|
|
+ <if test='null != pillarCode'>
|
|
|
+ #{pillarCode},
|
|
|
</if>
|
|
|
- <if test='null != gd'>
|
|
|
- #{gd},
|
|
|
+ <if test='null != stationTrack'>
|
|
|
+ #{stationTrack},
|
|
|
</if>
|
|
|
<if test='null != gxms'>
|
|
|
#{gxms},
|
|
|
@@ -239,16 +204,10 @@
|
|
|
<update id="update" parameterType="com.railway.business.baseinfo.domain.BusDmcgyq">
|
|
|
UPDATE base_dmcgyq
|
|
|
<set>
|
|
|
- <if test='null != db'>db = #{db},</if>
|
|
|
- <if test='null != deptId'>dept_id = #{deptId},</if>
|
|
|
- <if test='null != lineId'>line_id = #{lineId},</if>
|
|
|
<if test='null != stationId'>station_id = #{stationId},</if>
|
|
|
- <if test='null != bm'>bm = #{bm},</if>
|
|
|
- <if test='null != xb'>xb = #{xb},</if>
|
|
|
- <if test='null != qj'>qj = #{qj},</if>
|
|
|
- <if test='null != hb'>hb = #{hb},</if>
|
|
|
- <if test='null != zzh'>zzh = #{zzh},</if>
|
|
|
- <if test='null != gd'>gd = #{gd},</if>
|
|
|
+ <if test='null != xingbie'>xingbie = #{xingbie},</if>
|
|
|
+ <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
|
|
|
+ <if test='null != stationTrack'>station_track = #{stationTrack},</if>
|
|
|
<if test='null != gxms'>gxms = #{gxms},</if>
|
|
|
<if test='null != fxcs'>fxcs = #{fxcs},</if>
|
|
|
<if test='null != fxmc'>fxmc = #{fxmc},</if>
|
|
|
@@ -273,94 +232,84 @@
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM base_dmcgyq
|
|
|
- WHERE del_flag='0' and id = #{id}
|
|
|
+ FROM base_dmcgyq t
|
|
|
+ LEFT JOIN v_station v on t.station_id = v.station_id
|
|
|
+ WHERE t.del_flag='0' and t.id = #{id}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM base_dmcgyq
|
|
|
+ FROM base_dmcgyq t
|
|
|
+ LEFT JOIN v_station v on t.station_id = v.station_id
|
|
|
<where>
|
|
|
- del_flag='0'
|
|
|
- <if test="db!=null and db!=''">
|
|
|
- and db=#{db}
|
|
|
- </if>
|
|
|
+ t.del_flag='0'
|
|
|
<if test="deptId!=null and deptId!=''">
|
|
|
- and dept_id=#{deptId}
|
|
|
+ and v.dept_id=#{deptId}
|
|
|
</if>
|
|
|
<if test="lineId!=null and lineId!=''">
|
|
|
- and line_id=#{lineId}
|
|
|
+ and v.line_id=#{lineId}
|
|
|
</if>
|
|
|
<if test="stationId!=null and stationId!=''">
|
|
|
- and station_id=#{stationId}
|
|
|
- </if>
|
|
|
- <if test="bm!=null and bm!=''">
|
|
|
- and bm=#{bm}
|
|
|
- </if>
|
|
|
- <if test="xb!=null and xb!=''">
|
|
|
- and xb=#{xb}
|
|
|
- </if>
|
|
|
- <if test="qj!=null and qj!=''">
|
|
|
- and qj=#{qj}
|
|
|
+ and t.station_id=#{stationId}
|
|
|
</if>
|
|
|
- <if test="hb!=null and hb!=''">
|
|
|
- and hb=#{hb}
|
|
|
+ <if test="xingbie!=null and xingbie!=''">
|
|
|
+ and t.xingbie=#{xingbie}
|
|
|
</if>
|
|
|
- <if test="zzh!=null and zzh!=''">
|
|
|
- and zzh=#{zzh}
|
|
|
+ <if test="pillarCode!=null and pillarCode!=''">
|
|
|
+ and t.pillar_code=#{pillarCode}
|
|
|
</if>
|
|
|
- <if test="gd!=null and gd!=''">
|
|
|
- and gd=#{gd}
|
|
|
+ <if test="stationTrack!=null and stationTrack!=''">
|
|
|
+ and t.station_track=#{stationTrack}
|
|
|
</if>
|
|
|
<if test="gxms!=null and gxms!=''">
|
|
|
- and gxms=#{gxms}
|
|
|
+ and t.gxms=#{gxms}
|
|
|
</if>
|
|
|
<if test="fxcs!=null and fxcs!=''">
|
|
|
- and fxcs=#{fxcs}
|
|
|
+ and t.fxcs=#{fxcs}
|
|
|
</if>
|
|
|
<if test="fxmc!=null and fxmc!=''">
|
|
|
- and fxmc=#{fxmc}
|
|
|
+ and t.fxmc=#{fxmc}
|
|
|
</if>
|
|
|
<if test="mdh!=null and mdh!=''">
|
|
|
- and mdh=#{mdh}
|
|
|
+ and t.mdh=#{mdh}
|
|
|
</if>
|
|
|
<if test="sbbh!=null and sbbh!=''">
|
|
|
- and sbbh=#{sbbh}
|
|
|
+ and t.sbbh=#{sbbh}
|
|
|
</if>
|
|
|
<if test="gzlx!=null and gzlx!=''">
|
|
|
- and gzlx=#{gzlx}
|
|
|
+ and t.gzlx=#{gzlx}
|
|
|
</if>
|
|
|
<if test="czlc!=null and czlc!=''">
|
|
|
- and czlc=#{czlc}
|
|
|
+ and t.czlc=#{czlc}
|
|
|
</if>
|
|
|
<if test="fxzxlc!=null and fxzxlc!=''">
|
|
|
- and fxzxlc=#{fxzxlc}
|
|
|
+ and t.fxzxlc=#{fxzxlc}
|
|
|
</if>
|
|
|
<if test="sccj!=null and sccj!=''">
|
|
|
- and sccj=#{sccj}
|
|
|
+ and t.sccj=#{sccj}
|
|
|
</if>
|
|
|
<if test="xh!=null and xh!=''">
|
|
|
- and xh=#{xh}
|
|
|
+ and t.xh=#{xh}
|
|
|
</if>
|
|
|
<if test="delFlag!=null and delFlag!=''">
|
|
|
- and del_flag=#{delFlag}
|
|
|
+ and t.del_flag=#{delFlag}
|
|
|
</if>
|
|
|
<if test="createBy!=null and createBy!=''">
|
|
|
- and create_by=#{createBy}
|
|
|
+ and t.create_by=#{createBy}
|
|
|
</if>
|
|
|
<if test="createTime!=null and createTime!=''">
|
|
|
- and create_time=#{createTime}
|
|
|
+ and t.create_time=#{createTime}
|
|
|
</if>
|
|
|
<if test="updateBy!=null and updateBy!=''">
|
|
|
- and update_by=#{updateBy}
|
|
|
+ and t.update_by=#{updateBy}
|
|
|
</if>
|
|
|
<if test="updateTime!=null and updateTime!=''">
|
|
|
- and update_time=#{updateTime}
|
|
|
+ and t.update_time=#{updateTime}
|
|
|
</if>
|
|
|
<if test="sjbh!=null and sjbh!=''">
|
|
|
- and sjbh=#{sjbh}
|
|
|
+ and t.sjbh=#{sjbh}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|