diff --git a/src/main/java/com/gunshi/project/hsz/mapper/AttResBaseMapper.java b/src/main/java/com/gunshi/project/hsz/mapper/AttResBaseMapper.java index 7d634b6..2d12b21 100644 --- a/src/main/java/com/gunshi/project/hsz/mapper/AttResBaseMapper.java +++ b/src/main/java/com/gunshi/project/hsz/mapper/AttResBaseMapper.java @@ -26,15 +26,16 @@ public interface AttResBaseMapper extends BaseMapper { select t.stcd,t.stnm,t.lgtd lgtd,t.lttd lttd,t.source,t.sttp,t.stlc,t.adcd,t.esstym,s.res_code,s.fl_low_lim_lev, s.tot_cap,s.ben_res_cap,s.norm_wat_lev,s.crest_elev,s.des_flood_lev,s.dead_lev,s.cal_flood_lev,s.wat_shed_area,s.dead_cap,sad.adnm, m.tm,m.rz,(m.rz-s.fl_low_lim_lev) as aFsltdz,sprr.tm as drpTm,sprr.h1,sprr.h3,sprr.h6,sprr.h12,sprr.h24,sprr.today, - case when s.cal_flood_lev is not null and m.rz-s.cal_flood_lev > 0 then 1 else 0 end as calState, - case when s.des_flood_lev is not null and m.rz-s.des_flood_lev > 0 then 1 else 0 end as desState, - case when s.fl_low_lim_lev is not null and m.rz-s.fl_low_lim_lev > 0 then 1 else 0 end as flState + case when s.cal_flood_lev is not null and m.rz-s.cal_flood_lev >= 0 then 1 else 0 end as calState, + case when s.des_flood_lev is not null and m.rz-s.des_flood_lev >= 0 then 1 else 0 end as desState, + case when s.fl_low_lim_lev is not null and m.rz-s.fl_low_lim_lev >= 0 then 1 else 0 end as flState from public.st_stbprp_b t left join public.att_res_base s on 1=1 left join public.st_addvcd_d sad on t.adcd = sad.adcd left join public.st_rsvr_r_real m on t.stcd = m.stcd left join public.st_pptn_r_real sprr on t.stcd = sprr.stcd - where t.sttp = 'RR' and s.res_code = '42118130001' and t.stcd='232' + join public.st_stbprp_b_elem stbe on t.stcd = stbe.stcd + where stbe.elem ='rz' and s.res_code = '42118130001' and t.stcd='232' order by aFsltdz desc nulls last """) diff --git a/src/main/java/com/gunshi/project/hsz/mapper/JcskSyRMapper.java b/src/main/java/com/gunshi/project/hsz/mapper/JcskSyRMapper.java index 506e4e5..32e1bb9 100644 --- a/src/main/java/com/gunshi/project/hsz/mapper/JcskSyRMapper.java +++ b/src/main/java/com/gunshi/project/hsz/mapper/JcskSyRMapper.java @@ -101,9 +101,9 @@ public interface JcskSyRMapper extends BaseMapper { @Select("""