|
|
@@ -7,6 +7,7 @@
|
|
|
<result column="id" property="id"/>
|
|
|
<result column="line_id" property="lineId"/>
|
|
|
<result column="dept_id" property="deptId"/>
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
<result column="line_ktrq" property="lineKtrq"/>
|
|
|
<result column="line_start_marker" property="lineStartMarker"/>
|
|
|
<result column="line_end_marker" property="lineEndMarker"/>
|
|
|
@@ -23,22 +24,17 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
- id,
|
|
|
- line_id,
|
|
|
- dept_id,
|
|
|
- line_ktrq,
|
|
|
- line_start_marker,
|
|
|
- line_end_marker,
|
|
|
- line_gdfs,
|
|
|
- line_xglx,
|
|
|
- line_qt,
|
|
|
- line_sjbh,
|
|
|
- order_num,
|
|
|
- del_flag,
|
|
|
- create_by,
|
|
|
- create_time,
|
|
|
- update_by,
|
|
|
- update_time
|
|
|
+ t.id,
|
|
|
+ t.line_id,
|
|
|
+ t.dept_id,
|
|
|
+ t.line_ktrq,
|
|
|
+ t.line_start_marker,
|
|
|
+ t.line_end_marker,
|
|
|
+ t.line_gdfs,
|
|
|
+ t.line_xglx,
|
|
|
+ t.line_qt,
|
|
|
+ t.line_sjbh,
|
|
|
+ t.order_num
|
|
|
</sql>
|
|
|
|
|
|
<insert id="insert" parameterType="com.railway.business.baseinfo.domain.BaseDeptLine">
|
|
|
@@ -47,6 +43,9 @@
|
|
|
<if test='null != deptId'>
|
|
|
dept_id,
|
|
|
</if>
|
|
|
+ <if test='null != lineId'>
|
|
|
+ line_id,
|
|
|
+ </if>
|
|
|
<if test='null != lineKtrq'>
|
|
|
line_ktrq,
|
|
|
</if>
|
|
|
@@ -80,17 +79,14 @@
|
|
|
<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 != deptId'>
|
|
|
#{deptId},
|
|
|
</if>
|
|
|
+ <if test='null != lineId'>
|
|
|
+ #{lineId},
|
|
|
+ </if>
|
|
|
<if test='null != lineKtrq'>
|
|
|
#{lineKtrq},
|
|
|
</if>
|
|
|
@@ -124,12 +120,6 @@
|
|
|
<if test='null != createTime'>
|
|
|
#{createTime},
|
|
|
</if>
|
|
|
- <if test='null != updateBy'>
|
|
|
- #{updateBy},
|
|
|
- </if>
|
|
|
- <if test='null != updateTime'>
|
|
|
- #{updateTime}
|
|
|
- </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -141,12 +131,25 @@
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM base_dept_line
|
|
|
+ <include refid="Base_Column_List"/>, d.dept_name
|
|
|
+ FROM base_dept_line t
|
|
|
+ LEFT JOIN sys_dept d on t.dept_id = d.dept_id
|
|
|
+ <where>
|
|
|
+ t.del_flag='0'
|
|
|
+ <if test="lineId!=null and lineId!=''">
|
|
|
+ and t.line_id=#{lineId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getDeptByLineId" resultMap="BaseResultMap">
|
|
|
+ SELECT t.dept_id, d.dept_name
|
|
|
+ FROM base_dept_line t
|
|
|
+ LEFT JOIN sys_dept e on t.dept_id = d.dept_id
|
|
|
<where>
|
|
|
- del_flag='0'
|
|
|
+ t.del_flag='0'
|
|
|
<if test="lineId!=null and lineId!=''">
|
|
|
- and line_id=#{lineId}
|
|
|
+ and t.line_id=#{lineId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|