|
@@ -336,6 +336,7 @@
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
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 dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
|
|
|
+
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getJcebInfo" resultMap="BaseResultMap">
|
|
<select id="getJcebInfo" resultMap="BaseResultMap">
|
|
@@ -347,6 +348,7 @@
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
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
|
|
LEFT JOIN base_dmcgyq base ON t.gyq_id = base.id
|
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
WHERE t.del_flag='0' and t.id = #{id}
|
|
|
|
|
+
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getLastRecord" resultMap="BaseResultMap">
|
|
<select id="getLastRecord" resultMap="BaseResultMap">
|
|
@@ -360,38 +362,8 @@
|
|
|
and submit_state != '0'
|
|
and submit_state != '0'
|
|
|
) b
|
|
) b
|
|
|
WHERE a.update_time = b.lastTime
|
|
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>
|
|
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
@@ -400,13 +372,34 @@
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
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 dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
|
<where>
|
|
<where>
|
|
|
- <include refid="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="fenxiang!=null and fenxiang!=''">
|
|
<if test="fenxiang!=null and fenxiang!=''">
|
|
|
and t.fenxiang=#{fenxiang}
|
|
and t.fenxiang=#{fenxiang}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="xingbie!=null and xingbie!=''">
|
|
<if test="xingbie!=null and xingbie!=''">
|
|
|
and t.xingbie=#{xingbie}
|
|
and t.xingbie=#{xingbie}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="pillarArea!=null and pillarArea!=''">
|
|
|
|
|
+ and t.pillar_area=#{pillarArea}
|
|
|
|
|
+ </if>
|
|
|
<if test="tianqi!=null and tianqi!=''">
|
|
<if test="tianqi!=null and tianqi!=''">
|
|
|
and t.tianqi=#{tianqi}
|
|
and t.tianqi=#{tianqi}
|
|
|
</if>
|
|
</if>
|
|
@@ -467,6 +460,12 @@
|
|
|
<if test="czwt!=null and czwt!=''">
|
|
<if test="czwt!=null and czwt!=''">
|
|
|
and t.czwt=#{czwt}
|
|
and t.czwt=#{czwt}
|
|
|
</if>
|
|
</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">
|
|
<if test="createTime!=null">
|
|
|
and DATE_FORMAT(t.create_time, '%Y-%m-%d') = #{createTime}
|
|
and DATE_FORMAT(t.create_time, '%Y-%m-%d') = #{createTime}
|
|
|
</if>
|
|
</if>
|
|
@@ -502,10 +501,31 @@
|
|
|
LEFT JOIN sys_dict_data dict ON (t.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
|
|
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
|
|
LEFT JOIN base_dmcgyq base ON t.gyq_id = base.id
|
|
|
<where>
|
|
<where>
|
|
|
- <include refid="queryParam"/>
|
|
|
|
|
|
|
+ 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>
|
|
|
<if test="operator!=null and operator!=''">
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
|
|
+ and t.create_by=#{createBy}
|
|
|
|
|
+ </if>
|
|
|
<if test="operationDate!=null">
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|
|
</if>
|
|
@@ -526,10 +546,31 @@
|
|
|
FROM bus_jcb_dmcgyq t
|
|
FROM bus_jcb_dmcgyq t
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
|
<where>
|
|
<where>
|
|
|
- <include refid="queryParam"/>
|
|
|
|
|
|
|
+ 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!=''">
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
|
|
+ and t.create_by=#{createBy}
|
|
|
|
|
+ </if>
|
|
|
<if test="operationDate!=null">
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|
|
</if>
|
|
@@ -546,10 +587,25 @@
|
|
|
FROM bus_jcb_dmcgyq t
|
|
FROM bus_jcb_dmcgyq t
|
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
|
|
|
<where>
|
|
<where>
|
|
|
- <include refid="queryParam"/>
|
|
|
|
|
|
|
+ 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>
|
|
|
<if test="operator!=null and operator!=''">
|
|
<if test="operator!=null and operator!=''">
|
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
and t.check_user like concat('%', #{operator}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
|
|
+ and t.create_by=#{createBy}
|
|
|
|
|
+ </if>
|
|
|
<if test="operationDate!=null">
|
|
<if test="operationDate!=null">
|
|
|
and t.check_date=#{operationDate}
|
|
and t.check_date=#{operationDate}
|
|
|
</if>
|
|
</if>
|