|
@@ -1629,14 +1629,33 @@
|
|
|
continuity_equal, diff_time, yearonyear1, yearonyear2, yearonyear3, yearonmonth1, yearonmonth2, yearonmonth3,
|
|
|
audit_time, audit_type, quality_count, update_water, upload_day, abnomal_id, sjsl, update_bcds, update_scds,
|
|
|
is_updatecbsl, is_updateid, isfirst, isbreak_read, order_ids, sxj_sbqd, cbrq4, is_estimate, img_url
|
|
|
- from TF_YWPN_METERREADING_W_VIEW
|
|
|
- where (CBBZ = 1 or CBBZ is null)
|
|
|
+ from TF_YWPN_READMETERHIS_W
|
|
|
+ where CBBZ = 1
|
|
|
<if test="search.isGeneral != null and search.isGeneral != ''">
|
|
|
and IS_GENERAL = #{search.isGeneral}
|
|
|
</if>
|
|
|
<if test="search.inputContent != null and search.inputContent != ''">
|
|
|
and yhbh || yhxm || yhdz || lxdh like '%' || #{search.inputContent} || '%'
|
|
|
</if>
|
|
|
+ <if test="search.cbb != null and search.cbb != ''">
|
|
|
+ and CBB in
|
|
|
+ <foreach collection="search.cbb.split(',')" item="c" open="(" separator="," close=")">
|
|
|
+ #{c}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="search.cbry != null">
|
|
|
+ and CBRY = #{search.cbry}
|
|
|
+ </if>
|
|
|
+ <if test="search.sspq != null and search.sspq != ''">
|
|
|
+ and CBQY_BM in
|
|
|
+ <foreach collection="search.sspq.split(',')" item="s" open="(" separator="," close=")">
|
|
|
+ #{s}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="search.startTime != null and search.startTime != '' and search.endTime != null and search.endTime != ''">
|
|
|
+ and CBRQ between to_date(#{search.startTime},'yyyy-mm-dd hh24:mi:ss') and
|
|
|
+ to_date(#{search.endTime},'yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </if>
|
|
|
order by yhbh,cbrq
|
|
|
</select>
|
|
|
|
|
@@ -1652,13 +1671,13 @@
|
|
|
<update id="handleAbnormalUser">
|
|
|
update TF_YWPN_READMETERHIS_W r
|
|
|
set SCDS = (select q.SCDS from TF_YWPN_QFKHJBXX_W q where q.YHBH = r.YHBH)
|
|
|
- where MONTH_PLAN = to_char(sysdate,'yyyyMM')
|
|
|
+ where MONTH_PLAN = to_char(sysdate, 'yyyyMM')
|
|
|
and YHBH in (select r.YHBH
|
|
|
from TF_YWPN_READMETERHIS_W r
|
|
|
left join TF_YWPN_QFKHJBXX_W q
|
|
|
on r.YHBH = q.YHBH
|
|
|
where CBBZ = 0
|
|
|
- and MONTH_PLAN = to_char(sysdate,'yyyyMM')
|
|
|
+ and MONTH_PLAN = to_char(sysdate, 'yyyyMM')
|
|
|
and r.scds != q.SCDS
|
|
|
and r.XZBS = 0)
|
|
|
</update>
|