|
|
@@ -336,7 +336,6 @@
|
|
|
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')
|
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
<select id="getJcebInfo" resultMap="BaseResultMap">
|
|
|
@@ -348,7 +347,6 @@
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
LEFT JOIN base_dmcgyq base ON t.gyq_id = base.id
|
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
<select id="getLastRecord" resultMap="BaseResultMap">
|
|
|
@@ -362,9 +360,39 @@
|
|
|
and submit_state != '0'
|
|
|
) b
|
|
|
WHERE a.update_time = b.lastTime
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
+ <sql id="queryParam">
|
|
|
+ t.del_flag='0'
|
|
|
+ <if test="deptId!=null and deptId!=''">
|
|
|
+ and v.dept_id=#{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="deptIds!=null and deptIds.size() > 0">
|
|
|
+ and v.dept_id in
|
|
|
+ <foreach collection="deptIds" item="deptId" index="i" open="(" separator="," close=")">
|
|
|
+ #{deptId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="stationId!=null and stationId!=''">
|
|
|
+ and v.station_id=#{stationId}
|
|
|
+ </if>
|
|
|
+ <if test="stationIds!=null and stationIds.size() > 0">
|
|
|
+ and v.station_id in
|
|
|
+ <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
|
|
|
+ #{stationId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="submitState!=null and submitState!=''">
|
|
|
+ and t.submit_state <![CDATA[ >= ]]> #{submitState}
|
|
|
+ </if>
|
|
|
+ <if test="pillarArea!=null and pillarArea!=''">
|
|
|
+ and t.pillar_area=#{pillarArea}
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
+ and t.create_by=#{createBy}
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>, dict.dict_label as xingbie_text
|
|
|
@@ -372,34 +400,13 @@
|
|
|
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')
|
|
|
<where>
|
|
|
- t.del_flag='0'
|
|
|
- <if test="deptId!=null and deptId!=''">
|
|
|
- and v.dept_id=#{deptId}
|
|
|
- </if>
|
|
|
- <if test="deptIds!=null and deptIds.size() > 0">
|
|
|
- and v.dept_id in
|
|
|
- <foreach collection="deptIds" item="deptId" index="i" open="(" separator="," close=")">
|
|
|
- #{deptId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="stationId!=null and stationId!=''">
|
|
|
- and v.station_id=#{stationId}
|
|
|
- </if>
|
|
|
- <if test="stationIds!=null and stationIds.size() > 0">
|
|
|
- and v.station_id in
|
|
|
- <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
|
|
|
- #{stationId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ <include refid="queryParam"/>
|
|
|
<if test="fenxiang!=null and fenxiang!=''">
|
|
|
and t.fenxiang=#{fenxiang}
|
|
|
</if>
|
|
|
<if test="xingbie!=null and xingbie!=''">
|
|
|
and t.xingbie=#{xingbie}
|
|
|
</if>
|
|
|
- <if test="pillarArea!=null and pillarArea!=''">
|
|
|
- and t.pillar_area=#{pillarArea}
|
|
|
- </if>
|
|
|
<if test="tianqi!=null and tianqi!=''">
|
|
|
and t.tianqi=#{tianqi}
|
|
|
</if>
|
|
|
@@ -460,12 +467,6 @@
|
|
|
<if test="czwt!=null and czwt!=''">
|
|
|
and t.czwt=#{czwt}
|
|
|
</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>
|
|
|
@@ -501,31 +502,10 @@
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
LEFT JOIN base_dmcgyq base ON t.gyq_id = base.id
|
|
|
<where>
|
|
|
- t.del_flag='0' and t.submit_state = '9'
|
|
|
- <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_area=#{pillarCode}
|
|
|
- </if>
|
|
|
+ <include refid="queryParam"/>
|
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
|
- <if test="createBy!=null and createBy!=''">
|
|
|
- and t.create_by=#{createBy}
|
|
|
- </if>
|
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|
|
|
@@ -546,31 +526,10 @@
|
|
|
FROM bus_jcb_dmcgyq 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>
|
|
|
+ <include refid="queryParam"/>
|
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
|
- <if test="createBy!=null and createBy!=''">
|
|
|
- and t.create_by=#{createBy}
|
|
|
- </if>
|
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|
|
|
@@ -587,25 +546,10 @@
|
|
|
FROM bus_jcb_dmcgyq 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>
|
|
|
+ <include refid="queryParam"/>
|
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
|
- <if test="createBy!=null and createBy!=''">
|
|
|
- and t.create_by=#{createBy}
|
|
|
- </if>
|
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|