将渗流,渗压,位移部分代码迁移至common依赖内

master
yangzhe123 2025-11-05 09:38:37 +08:00
parent 608fe4846d
commit 72343a2907
140 changed files with 1319 additions and 2147 deletions

View File

@ -2,10 +2,60 @@ package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.vo.HomeJcskGnssBVo;
import com.gunshi.project.hsz.common.model.JcskGnssB; import com.gunshi.project.hsz.common.model.JcskGnssB;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskGnssBMapper extends BaseMapper<JcskGnssB> { public interface JcskGnssBMapper extends BaseMapper<JcskGnssB> {
@Select("""
<script>
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
</script>
""")
List<HomeJcskGnssBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
WHERE st.cd = #{id}
</script>
""")
HomeJcskGnssBVo getDetailsById(String id);
@Select("""
select ch from jcsk_gnss_b where ch is not null
group by ch
""")
List<String> listDms();
@Select("""
select ch from jcsk_gnss_b group by ch
""")
List<String> selectCH();
@Select("""
select cd from jcsk_gnss_b where ch = #{ch}
""")
List<String> selectCDbyCh(@Param("ch") String ch);
@Select("""
select * from jcsk_gnss_b where ch is null order by cd asc
""")
List<JcskGnssB> selectArtificial();
} }

View File

@ -2,10 +2,232 @@ package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.common.model.so.JcskGnssRPageSo;
import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.common.model.vo.JcskGnessListVo;
import com.gunshi.project.hsz.common.model.vo.JcskGnssRHisVo;
import com.gunshi.project.hsz.common.model.vo.OsmoticShiftListVo2;
import com.gunshi.project.hsz.common.model.vo.OsmoticShiftValueVo2;
import com.gunshi.project.hsz.common.model.JcskGnssR; import com.gunshi.project.hsz.common.model.JcskGnssR;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskGnssRMapper extends BaseMapper<JcskGnssR> { public interface JcskGnssRMapper extends BaseMapper<JcskGnssR> {
// @Select("""
// <script>
// SELECT st.cd,r.de,r.dn,r.du,to_char(r.tm,'YYYY-MM-DD HH24:MI:SS') as tm FROM jcsk_gnss_r st
// LEFT JOIN (SELECT cd,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
// LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
// ORDER BY st.cd asc,r.tm desc
// </script>
// """)
// List<JcskGnessListVo> listValue();
@Select("""
<script>
select
t1.cd,
t1.ch,
t1.cd_nm as cdnm,
t2.de,
t2.dn,
t2.du,
to_char(t2.tm,'YYYY-MM-DD HH24:MI:SS') as tm
from jcsk_gnss_b t1
left join (
select t2.*
from jcsk_gnss_r t2
join (
select cd, MAX(tm) as tm
from jcsk_gnss_r
GROUP BY cd
) maxr on t2.cd = maxr.cd and t2.tm = maxr.tm
) t2 on t1.cd = t2.cd
ORDER BY t1.cd asc, t2.tm desc;
</script>
""")
List<JcskGnessListVo> listValue();
@Select("""
<script>
select t.station_code as cd,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,s.direction
from public.osmotic_warn_r t
left join public.osmotic_warn_rule s on t.rule_id = s.id
where t.station_code in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftListVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
@Select("""
<script>
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
from public.jcsk_gnss_r t
where t.cd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
from public.jcsk_gnss_r_8am t
where t.cd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> queryReorganizeValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.de,t.dn ,t.du,t.is_artificial as isArtificial from public.jcsk_gnss_r t
where t.cd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
WITH daily_data AS (
SELECT
t2.cd,
t1.ch,
t1.cd_nm,
t2.de,
t2.dn,
t2.du,
t2.alt,
t2.tm,
t2.update_tm,
ROW_NUMBER() OVER (PARTITION BY t2.cd, t1.ch, DATE(t2.tm) ORDER BY t2.tm DESC) as rn
FROM jcsk_gnss_b t1
JOIN jcsk_gnss_r t2 ON t1.cd = t2.cd
WHERE 1=1
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
AND t2.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
AND t2.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
<if test="obj.cd != null and obj.cd != ''">
AND t2.cd = #{obj.cd}
</if>
<if test="obj.ch != null and obj.ch != ''">
AND t1.ch = #{obj.ch}
</if>
<if test= "obj.isArtificial != null">
AND t2.is_artificial = #{obj.isArtificial}
</if>
)
SELECT
cd,
ch,
cd_nm as cdnm,
de,
dn,
du,
alt,
tm as tm,
update_tm
FROM daily_data
WHERE rn = 1
ORDER BY DATE(tm) DESC, tm DESC, cd DESC
</script>
""")
Page<JcskGnssR> pageQuery(Page<Object> page, @Param("obj") JcskGnssRPageSo page1);
@Select("""
<script>
select t1.ch,t2.* from
jcsk_gnss_b t1
left join jcsk_gnss_r t2
on t1.cd = t2.cd
where 1=1
<if test="dto.cd != null and dto.cd != ''">
AND t1.cd = #{dto.cd}
</if>
<if test="dto.ch != null and dto.ch != ''">
AND t1.ch = #{dto.ch}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.tm >= #{dto.dateTimeRangeSo.start}
AND t2.tm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
</script>
""")
Page<JcskGnssRHisVo> historyPage(Page<Object> page, @Param("dto") JcskGnssRPageSo page1);
@Select("""
<script>
select t1.ch,t2.* from
jcsk_gnss_b t1
left join jcsk_gnss_r t2
on t1.cd = t2.cd
where t2.is_artificial = 1
<if test="dto.cd != null and dto.cd != ''">
AND t1.cd = #{dto.cd}
</if>
<if test="dto.ch != null and dto.ch != ''">
AND t1.ch = #{dto.ch}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.tm >= #{dto.dateTimeRangeSo.start}
AND t2.tm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.tm desc
</script>
""")
Page<JcskGnssR> artificialPage(Page<Object> page,@Param("dto") JcskGnssRPageSo page1);
} }

View File

@ -1,11 +1,162 @@
package com.gunshi.project.hsz.common.mapper; package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.common.model.vo.HomeJcskSlBVo;
import com.gunshi.project.hsz.common.model.vo.JcskSyRVo;
import com.gunshi.project.hsz.common.model.vo.OsmoticPressDetailVo;
import com.gunshi.project.hsz.common.model.vo.OsmoticValueVo2;
import com.gunshi.project.hsz.common.model.JcskSlB; import com.gunshi.project.hsz.common.model.JcskSlB;
import com.gunshi.project.hsz.common.model.JcskSlR;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskSlBMapper extends BaseMapper<JcskSlB> { public interface JcskSlBMapper extends BaseMapper<JcskSlB> {
@Select("""
<script>
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
</script>
""")
List<HomeJcskSlBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
where st.mpcd = #{id}
</script>
""")
HomeJcskSlBVo getDetailsById(String id);
@Select("""
select dvcd from jcsk_sl_b where dm = #{dm}
""")
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
@Select(
"""
<script>
SELECT station_code, value, tm
FROM (
SELECT
st.dvcd as station_code,
r.spqn as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
ROW_NUMBER() OVER (PARTITION BY st.mpcd ORDER BY r.mstm DESC) as rn
FROM jcsk_sl_b st
LEFT JOIN jcsk_sl_r r ON st.mpcd = r.mpcd
) t
WHERE rn = 1
ORDER BY station_code asc;
</script>
"""
)
List<JcskSyRVo> listValue();
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
from public.jcsk_sl_b t1
left join public.jcsk_sl_r t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t2.*
from public.jcsk_sl_b t1
left join public.jcsk_sl_r t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<JcskSlR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
from public.jcsk_sl_b t1
left join public.jcsk_sl_r_8am t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
t.spqn as value from public.jcsk_sl_b t2
left join
public.jcsk_sl_r t on t2.mpcd = t.mpcd
where t2.dvcd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.mstm desc
</script>
""")
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
select dvcd from jcsk_sl_b where mpcd = #{mpcd} limit 1
</script>
""")
String selectDvcdByStcdAndMpcd(@Param("mpcd") String mpcd);
} }

View File

@ -2,10 +2,83 @@ package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.common.model.so.JcskSlRPageSo;
import com.gunshi.project.hsz.common.model.vo.JcskSlRHisVo;
import com.gunshi.project.hsz.common.model.JcskSlR; import com.gunshi.project.hsz.common.model.JcskSlR;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskSlRMapper extends BaseMapper<JcskSlR> { public interface JcskSlRMapper extends BaseMapper<JcskSlR> {
@Select("""
<script>
<![CDATA[
WITH ranked_data AS (
SELECT
t1.*,
t2.dm,
t3.profile_name as dmName,
t2.dvcd,
ROW_NUMBER() OVER (PARTITION BY t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
FROM jcsk_sl_r t1
JOIN jcsk_sl_b t2 ON t1.mpcd = t2.mpcd
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
WHERE 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t2.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t2.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
)
SELECT *
FROM ranked_data
WHERE rn = 1
ORDER BY mstm DESC
</script>
""")
Page<JcskSlR> pageQuery(Page<Object> page, @Param("dto") JcskSlRPageSo page1);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sl_b t1
left join jcsk_sl_r t2 on t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSlRHisVo> historyPage(Page<Object> page, JcskSlRPageSo page1);
} }

View File

@ -3,9 +3,58 @@ package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskSyB; import com.gunshi.project.hsz.common.model.JcskSyB;
import com.gunshi.project.hsz.common.model.vo.HomeJcskSYBVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskSyBMapper extends BaseMapper<JcskSyB> { public interface JcskSyBMapper extends BaseMapper<JcskSyB> {
@Select("""
<script>
SELECT st.*, r.spprwl as value, r.mstm
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as max_mstm
FROM jcsk_sy_r
GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_mstm = r.mstm
</script>
""")
List<HomeJcskSYBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*, r.spprwl as value, r.mstm
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as tm\s
FROM jcsk_sy_r\s
GROUP BY mpcd
)maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
WHERE st.mpcd = #{id}
</script>
""")
HomeJcskSYBVo getDetailsById(@Param("id") String id);
@Select("""
SELECT dvcd from jcsk_sy_b where dm = #{dm}
ORDER BY LENGTH(dvcd) ASC,dvcd ASC;
""")
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
@Select("""
<script>
select dvcd from jcsk_sy_b where mpcd = #{mpcd} and stcd =#{stcd}
</script>
""")
String selectDvcdByStcdAndMpcd(@Param("stcd")String stcd,@Param("mpcd") String mpcd);
} }

View File

@ -2,10 +2,364 @@ package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.common.model.JcskSyB;
import com.gunshi.project.hsz.common.model.JcskSyR; import com.gunshi.project.hsz.common.model.JcskSyR;
import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.common.model.vo.*;
import com.gunshi.project.hsz.common.model.so.JcskSyRPageSo;
import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@DS("tsg") @DS("tsg")
@Mapper @Mapper
public interface JcskSyRMapper extends BaseMapper<JcskSyR> { public interface JcskSyRMapper extends BaseMapper<JcskSyR> {
@Select(
"""
<script>
SELECT
st.dvcd as station_code,
r.spprwl as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
m.profile_name
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd,stcd, MAX(mstm) as max_tm
FROM jcsk_sy_r
GROUP BY mpcd,stcd
) maxr ON st.mpcd = maxr.mpcd and st.stcd = maxr.stcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_tm = r.mstm and maxr.stcd = r.stcd
LEFT JOIN att_dam_profile m ON st.dm = m.profile_code
ORDER BY m._order ASC;
</script>
"""
)
List<JcskSyRVo> listValue();
@Select(
"""
<script>
SELECT
st.mpcd as station_code,
r.spqn as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm
FROM jcsk_sl_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as tm
FROM jcsk_sl_r
GROUP BY mpcd
) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
ORDER BY st.mpcd asc, r.mstm desc;
</script>
"""
)
List<JcskSyRVo> flowListValue();
@Select("""
<script>
select t.station_code as stationCode,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm
from public.osmotic_warn_r t
where t.station_code in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticValueVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
@Select("""
<script>
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
t.spprwl as value from public.jcsk_sy_b t2
left join public.jcsk_sy_r t on t2.stcd = t.stcd and t2.mpcd = t.mpcd
where t2.dvcd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.mstm desc
</script>
""")
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
select to_char((t.tm - INTERVAL '5 minutes'),'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
from public.st_rsvr_r t
where t.stcd = #{stcd} and to_char(t.tm, 'MI:SS') = '05:00'
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo, @Param("stcd") String stcd);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
from public.st_pptn_r_d t
where t.year = #{year} and t.stcd = #{stcd}
order by t.tm desc
</script>
""")
List<StRzVo> queryDrp(@Param("year") Integer year,@Param("stcd") String stcd);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
from public.st_rsvr_r t
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.stcd = #{stcd}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
select t.tm,t.rz
from public.st_rsvr_r t
where to_char(t.tm, 'MI:SS') = '00:00' and to_char(t.tm, 'HH24:MI') like '%:00' and t.stcd = #{stcd}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryRz2(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
from public.jcsk_sy_b t1 left join public.jcsk_sy_r t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
from public.jcsk_sy_b t1 left join public.jcsk_sy_r_8am t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t2.*
from public.jcsk_sy_b t1
left join public.jcsk_sy_r t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<JcskSyR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,to_char(t2.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,t2.spprwl as value
from public.jcsk_sy_b t1
left join public.jcsk_sy_r t2 on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryLineValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
<![CDATA[
WITH ranked_data AS (
SELECT
t1.*,
t2.dm,
t3.profile_name as dmName,
t2.dvcd,
ROW_NUMBER() OVER (PARTITION BY t1.stcd, t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
FROM jcsk_sy_r t1
JOIN jcsk_sy_b t2 ON t1.stcd = t2.stcd AND t1.mpcd = t2.mpcd
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
WHERE 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t2.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t2.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
)
SELECT *
FROM ranked_data
WHERE rn = 1
ORDER BY mstm DESC
</script>
""")
Page<JcskSyR> queryPage(Page<Object> page, @Param("dto") JcskSyRPageSo pageSo);
@Select("""
select dm from jcsk_sy_b
GROUP BY dm
""")
List<String> listDm();
@Select("""
select stcd,mpcd from jcsk_sy_b
""")
List<JcskSyB> listStcdMpcd();
@Select("""
select dvcd from jcsk_sy_b where dm = #{dm}
""")
List<String> listDvcdByDm(@Param("dm") String dm);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sy_b t1
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSyRHisVo> historyPage(Page<Object> page, @Param("dto") JcskSyRPageSo page1);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sy_b t1
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where t2.is_artificial = 1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSyR> artificialPage(Page<Object> page,@Param("dto") JcskSyRPageSo page1);
} }

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.model; package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.model; package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.model; package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;

View File

@ -3,6 +3,8 @@ package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao; import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import com.gunshi.project.hsz.common.model.vo.JcskByRProcessVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -106,4 +108,18 @@ public class JcskByR {
*/ */
@TableField("receive_type") @TableField("receive_type")
private Short receiveType; private Short receiveType;
@Schema(description = "是否处理")
@TableField(exist = false)
private Boolean isProcess = false;
@Schema(description = "是否有巡检任务")
@TableField(exist = false)
private Boolean hasInspectTask = false;
@Schema(description = "工单详情")
@TableField(exist = false)
private JcskByRProcessVo jcskByRProcessVo;
} }

View File

@ -50,4 +50,7 @@ public class JcskGnssB {
*/ */
@TableField("device_status") @TableField("device_status")
private String deviceStatus; private String deviceStatus;
@TableField(exist = false)
private String stationCode;
} }

View File

@ -2,11 +2,13 @@ package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao; import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
/** /**
* *
@ -23,6 +25,11 @@ public class JcskGnssR {
@TableField("res_cd") @TableField("res_cd")
private String resCd; private String resCd;
@TableField("is_artificial")
private Integer isArtificial;
/** /**
* *
*/ */
@ -64,4 +71,24 @@ public class JcskGnssR {
*/ */
@TableField("update_tm") @TableField("update_tm")
private LocalDateTime updateTm; private LocalDateTime updateTm;
/**
*
*/
@TableField(exist = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime newUpdateTm;
@TableField(exist = false)
private String ch;
@TableField(exist = false)
private String cdnm;
/**
* cd
*/
@TableField(exist = false)
private String newUpdateCd;
} }

View File

@ -19,6 +19,8 @@ import java.time.LocalDateTime;
@TableName("jcsk_sl_b") @TableName("jcsk_sl_b")
@IgnoreAutoMapperAndDao @IgnoreAutoMapperAndDao
public class JcskSlB { public class JcskSlB {
/** /**
* *
*/ */
@ -108,4 +110,7 @@ public class JcskSlB {
*/ */
@TableField("is_tb") @TableField("is_tb")
private String isTb; private String isTb;
@TableField(exist = false)
private String stationCode;
} }

View File

@ -36,6 +36,10 @@ public class JcskSlR {
@TableField("mpcd") @TableField("mpcd")
private String mpcd; private String mpcd;
@TableField("stcd")
private String stcd;
/** /**
* *
*/ */
@ -60,4 +64,7 @@ public class JcskSlR {
@TableField("stspqn") @TableField("stspqn")
private BigDecimal stspqn; private BigDecimal stspqn;
@TableField(exist = false)
private String dvcd;
} }

View File

@ -132,4 +132,8 @@ public class JcskSyB {
*/ */
@TableField("is_tb") @TableField("is_tb")
private String isTb; private String isTb;
@TableField(exist = false)
private String stationCode;
} }

View File

@ -2,11 +2,14 @@ package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao; import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
/** /**
* *
@ -53,6 +56,19 @@ public class JcskSyR {
@TableField("tm") @TableField("tm")
private BigDecimal tm; private BigDecimal tm;
/**
*
*/
@TableField(exist = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateMstm;
@TableField("is_artificial")
@Schema(description = "是否为人工录入 0不是 1是")
private Integer isArtificial;
/** /**
* m * m
*/ */
@ -64,4 +80,19 @@ public class JcskSyR {
*/ */
@TableField("update_tm") @TableField("update_tm")
private LocalDateTime updateTm; private LocalDateTime updateTm;
@TableField(exist = false)
@Schema(description = "断面编码")
private String dm;
@TableField(exist = false)
@Schema(description = "断面名称")
private String dmName;
@TableField(exist = false)
@Schema(description = "测点编号")
private String dvcd;
} }

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.page; package com.gunshi.project.hsz.common.model.page;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,6 +1,6 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.common.model.so;
import com.gunshi.db.dto.DateTimeRangeSo; import com.gunshi.db.dto.DateTimeRangeSo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,8 +1,8 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.model.JcskGnssB; import com.gunshi.project.hsz.common.model.JcskGnssB;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,8 +1,8 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.model.JcskSyB; import com.gunshi.project.hsz.common.model.JcskSyB;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,8 +1,9 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.model.JcskSlB;
import com.gunshi.project.hsz.common.model.JcskSlB;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import lombok.Data; import lombok.Data;

View File

@ -1,9 +1,9 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.model.InspectTask; import com.gunshi.project.hsz.common.model.InspectTask;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.common.model.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,6 +1,9 @@
package com.gunshi.project.hsz.controller; package com.gunshi.project.hsz.controller;
import com.gunshi.core.result.R;
import com.gunshi.project.hsz.timetask.JcskDataTask;
import com.gunshi.project.hsz.timetask.PaDataTask; import com.gunshi.project.hsz.timetask.PaDataTask;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -18,6 +21,9 @@ public class DebugController {
@Autowired @Autowired
private PaDataTask paDataTask; private PaDataTask paDataTask;
@Autowired
private JcskDataTask jcskDataTask;
@GetMapping("/patask") @GetMapping("/patask")
public String patask(){ public String patask(){
@ -28,4 +34,15 @@ public class DebugController {
return "失败"; return "失败";
} }
} }
@Operation(description = "同步一次渗压、渗流、位移的数据")
@GetMapping("/syncJcskData")
public R syncJcskData(){
jcskDataTask.syncGnssREightAmData();
jcskDataTask.syncSlREightAmData();
jcskDataTask.syncSyREightAmData();
return R.ok("ok");
}
} }

View File

@ -5,7 +5,7 @@ import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.InspectTaskPageSo; import com.gunshi.project.hsz.entity.so.InspectTaskPageSo;
import com.gunshi.project.hsz.entity.so.InspectTaskSo; import com.gunshi.project.hsz.entity.so.InspectTaskSo;
import com.gunshi.project.hsz.entity.vo.InspectTaskVo; import com.gunshi.project.hsz.entity.vo.InspectTaskVo;
import com.gunshi.project.hsz.model.InspectTask; import com.gunshi.project.hsz.common.model.InspectTask;
import com.gunshi.project.hsz.service.InspectTaskService; import com.gunshi.project.hsz.service.InspectTaskService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;

View File

@ -5,7 +5,7 @@ import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.InspectProblemPageSo; import com.gunshi.project.hsz.entity.so.InspectProblemPageSo;
import com.gunshi.project.hsz.entity.vo.InspectProblemVo; import com.gunshi.project.hsz.entity.vo.InspectProblemVo;
import com.gunshi.project.hsz.entity.vo.InspectTaskDetailVo; import com.gunshi.project.hsz.entity.vo.InspectTaskDetailVo;
import com.gunshi.project.hsz.model.InspectTaskDetail; import com.gunshi.project.hsz.common.model.InspectTaskDetail;
import com.gunshi.project.hsz.service.InspectTaskDetailService; import com.gunshi.project.hsz.service.InspectTaskDetailService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -4,7 +4,7 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.WaterDevicePageSo; import com.gunshi.project.hsz.entity.so.WaterDevicePageSo;
import com.gunshi.project.hsz.model.JcskByB; import com.gunshi.project.hsz.common.model.JcskByB;
import com.gunshi.project.hsz.service.WaterDeviceService; import com.gunshi.project.hsz.service.WaterDeviceService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -2,10 +2,10 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.JcskByRPageSo; import com.gunshi.project.hsz.common.model.so.JcskByRPageSo;
import com.gunshi.project.hsz.model.JcskByB; import com.gunshi.project.hsz.common.model.JcskByB;
import com.gunshi.project.hsz.model.JcskByBD; import com.gunshi.project.hsz.common.model.JcskByBD;
import com.gunshi.project.hsz.model.JcskByR; import com.gunshi.project.hsz.common.model.JcskByR;
import com.gunshi.project.hsz.model.JcskByRProcess; import com.gunshi.project.hsz.model.JcskByRProcess;
import com.gunshi.project.hsz.service.JcskByBDService; import com.gunshi.project.hsz.service.JcskByBDService;
import com.gunshi.project.hsz.service.JcskByBService; import com.gunshi.project.hsz.service.JcskByBService;

View File

@ -3,9 +3,9 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.JcskGnssBPageSo; import com.gunshi.project.hsz.common.model.so.JcskGnssBPageSo;
import com.gunshi.project.hsz.entity.vo.HomeJcskGnssBVo; import com.gunshi.project.hsz.common.model.vo.HomeJcskGnssBVo;
import com.gunshi.project.hsz.model.JcskGnssB; import com.gunshi.project.hsz.common.model.JcskGnssB;
import com.gunshi.project.hsz.service.JcskGnssBService; import com.gunshi.project.hsz.service.JcskGnssBService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;

View File

@ -3,13 +3,16 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.common.model.vo.JcskGnessListVo;
import com.gunshi.project.hsz.common.model.vo.JcskGnssRHisVo;
import com.gunshi.project.hsz.common.model.vo.OsmoticShiftValueVo2;
import com.gunshi.project.hsz.entity.dto.ArtificialJcskGnssDeleteDto; import com.gunshi.project.hsz.entity.dto.ArtificialJcskGnssDeleteDto;
import com.gunshi.project.hsz.entity.so.JcskGnssRPageSo; import com.gunshi.project.hsz.common.model.so.JcskGnssRPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.*; import com.gunshi.project.hsz.entity.vo.*;
import com.gunshi.project.hsz.model.JcskGnssB; import com.gunshi.project.hsz.common.model.JcskGnssB;
import com.gunshi.project.hsz.model.JcskGnssR; import com.gunshi.project.hsz.common.model.JcskGnssR;
import com.gunshi.project.hsz.service.JcskGnssBService; import com.gunshi.project.hsz.service.JcskGnssBService;
import com.gunshi.project.hsz.service.JcskGnssRService; import com.gunshi.project.hsz.service.JcskGnssRService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;

View File

@ -3,9 +3,9 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.JcskSlBPageSo; import com.gunshi.project.hsz.common.model.so.JcskSlBPageSo;
import com.gunshi.project.hsz.entity.vo.HomeJcskSlBVo; import com.gunshi.project.hsz.common.model.vo.HomeJcskSlBVo;
import com.gunshi.project.hsz.model.JcskSlB; import com.gunshi.project.hsz.common.model.JcskSlB;
import com.gunshi.project.hsz.service.JcskSlBService; import com.gunshi.project.hsz.service.JcskSlBService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -41,7 +42,7 @@ public class JcskSlBController {
throw new IllegalArgumentException("当前编号已存在"); throw new IllegalArgumentException("当前编号已存在");
} }
dto.setDtuptm(new Date()); dto.setDtuptm(LocalDateTime.now());
boolean result = service.save(dto); boolean result = service.save(dto);
// if (result){ // if (result){
// fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode()); // fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());

View File

@ -3,9 +3,9 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.JcskSlRPageSo; import com.gunshi.project.hsz.common.model.so.JcskSlRPageSo;
import com.gunshi.project.hsz.entity.vo.JcskSlRHisVo; import com.gunshi.project.hsz.common.model.vo.JcskSlRHisVo;
import com.gunshi.project.hsz.model.JcskSlR; import com.gunshi.project.hsz.common.model.JcskSlR;
import com.gunshi.project.hsz.service.JcskSlRService; import com.gunshi.project.hsz.service.JcskSlRService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;

View File

@ -3,9 +3,9 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.JcskSyBPageSo; import com.gunshi.project.hsz.common.model.so.JcskSyBPageSo;
import com.gunshi.project.hsz.entity.vo.HomeJcskSYBVo; import com.gunshi.project.hsz.common.model.vo.HomeJcskSYBVo;
import com.gunshi.project.hsz.model.JcskSyB; import com.gunshi.project.hsz.common.model.JcskSyB;
import com.gunshi.project.hsz.service.JcskSyBService; import com.gunshi.project.hsz.service.JcskSyBService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;

View File

@ -3,12 +3,16 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.common.model.JcskSyR;
import com.gunshi.project.hsz.common.model.vo.JcskSyRHisVo;
import com.gunshi.project.hsz.common.model.vo.JcskSyRVo;
import com.gunshi.project.hsz.common.model.vo.OsmoticPressDetailVo;
import com.gunshi.project.hsz.entity.dto.ArtificialJcskSyDeleteDto; import com.gunshi.project.hsz.entity.dto.ArtificialJcskSyDeleteDto;
import com.gunshi.project.hsz.entity.so.JcskSyRPageSo; import com.gunshi.project.hsz.common.model.so.JcskSyRPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.*; import com.gunshi.project.hsz.entity.vo.*;
import com.gunshi.project.hsz.model.JcskSyR; import com.gunshi.project.hsz.common.model.JcskSyB;
import com.gunshi.project.hsz.service.JcskSyRService; import com.gunshi.project.hsz.service.JcskSyRService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.common.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;

View File

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.OsmoticDevicePage; import com.gunshi.project.hsz.common.model.so.OsmoticDevicePage;
import com.gunshi.project.hsz.entity.vo.HomeOsmoticFlowDeviceVo; import com.gunshi.project.hsz.entity.vo.HomeOsmoticFlowDeviceVo;
import com.gunshi.project.hsz.model.OsmoticFlowDevice; import com.gunshi.project.hsz.model.OsmoticFlowDevice;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; import com.gunshi.project.hsz.common.model.so.OsmoticQueryPageSo;
import com.gunshi.project.hsz.model.OsmoticFlowR; import com.gunshi.project.hsz.model.OsmoticFlowR;
import com.gunshi.project.hsz.service.OsmoticFlowRService; import com.gunshi.project.hsz.service.OsmoticFlowRService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;

View File

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.OsmoticDevicePage; import com.gunshi.project.hsz.common.model.so.OsmoticDevicePage;
import com.gunshi.project.hsz.entity.vo.HomeOsmoticPressDeviceVo; import com.gunshi.project.hsz.entity.vo.HomeOsmoticPressDeviceVo;
import com.gunshi.project.hsz.model.OsmoticPressDevice; import com.gunshi.project.hsz.model.OsmoticPressDevice;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;

View File

@ -5,11 +5,11 @@
//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; //import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.gunshi.core.result.R; //import com.gunshi.core.result.R;
//import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; //import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
//import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; //import com.gunshi.project.hsz.common.model.so.OsmoticQueryPageSo;
//import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; //import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
//import com.gunshi.project.hsz.entity.vo.OsmoticChartVo; //import com.gunshi.project.hsz.entity.vo.OsmoticChartVo;
//import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo; //import com.gunshi.project.hsz.common.model.vo.OsmoticPressDetailVo;
//import com.gunshi.project.hsz.entity.vo.OsmoticPressVo; //import com.gunshi.project.hsz.entity.vo.OsmoticPressVo;
//import com.gunshi.project.hsz.entity.vo.OsmoticStationVo; //import com.gunshi.project.hsz.entity.vo.OsmoticStationVo;
//import com.gunshi.project.hsz.model.OsmoticPressDevice; //import com.gunshi.project.hsz.model.OsmoticPressDevice;

View File

@ -4,9 +4,9 @@
//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; //import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.gunshi.core.result.R; //import com.gunshi.core.result.R;
//import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; //import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
//import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; //import com.gunshi.project.hsz.common.model.so.OsmoticQueryPageSo;
//import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; //import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
//import com.gunshi.project.hsz.entity.vo.*; //import com.gunshi.project.hsz.entity.vo.*;
//import com.gunshi.project.hsz.model.OsmoticShiftR; //import com.gunshi.project.hsz.model.OsmoticShiftR;
//import com.gunshi.project.hsz.service.OsmoticShiftRService; //import com.gunshi.project.hsz.service.OsmoticShiftRService;

View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import com.gunshi.project.hsz.model.SysDictB; import com.gunshi.project.hsz.model.SysDictB;
import com.gunshi.project.hsz.service.SysDictBService; import com.gunshi.project.hsz.service.SysDictBService;
import com.gunshi.project.hsz.common.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.dto;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.dto;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.db.dto.PageSo; import com.gunshi.db.dto.PageSo;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.dto;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;

View File

@ -1,6 +1,6 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.entity.so;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -1,6 +1,6 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.entity.so;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -1,6 +1,6 @@
package com.gunshi.project.hsz.entity.so; package com.gunshi.project.hsz.entity.so;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -2,7 +2,7 @@ package com.gunshi.project.hsz.entity.so;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.model.FileAssociations; import com.gunshi.project.hsz.model.FileAssociations;
import com.gunshi.project.hsz.model.InspectTaskDetail; import com.gunshi.project.hsz.common.model.InspectTaskDetail;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,7 +1,7 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.entity.vo;
import com.gunshi.project.hsz.model.FileAssociations; import com.gunshi.project.hsz.model.FileAssociations;
import com.gunshi.project.hsz.model.InspectTaskDetail; import com.gunshi.project.hsz.common.model.InspectTaskDetail;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,5 +1,6 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.entity.vo;
import com.gunshi.project.hsz.common.model.vo.OsmoticShiftValueVo2;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -1,5 +1,6 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.entity.vo;
import com.gunshi.project.hsz.common.model.vo.StRzVo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -1,5 +1,7 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.entity.vo;
import com.gunshi.project.hsz.common.model.vo.OsmoticValueVo2;
import com.gunshi.project.hsz.common.model.vo.StRzVo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;

View File

@ -2,7 +2,6 @@ package com.gunshi.project.hsz.entity.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.project.hsz.model.ResMonthEcoFlow; import com.gunshi.project.hsz.model.ResMonthEcoFlow;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -16,7 +15,6 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
@TableName("public.st_flow_r")
public class StFlowRVo { public class StFlowRVo {
@TableId(value = "id") @TableId(value = "id")

View File

@ -1,13 +1,11 @@
package com.gunshi.project.hsz.entity.vo; package com.gunshi.project.hsz.entity.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import com.gunshi.project.hsz.model.StWaterRReorganize;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
@Data @Data
public class StWaterRRVo extends GenericPageParams { public class StWaterRRVo extends GenericPageParams {

View File

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.InspectProblemPageSo; import com.gunshi.project.hsz.entity.so.InspectProblemPageSo;
import com.gunshi.project.hsz.entity.vo.InspectProblemVo; import com.gunshi.project.hsz.entity.vo.InspectProblemVo;
import com.gunshi.project.hsz.entity.vo.InspectTaskDetailVo; import com.gunshi.project.hsz.entity.vo.InspectTaskDetailVo;
import com.gunshi.project.hsz.model.InspectTaskDetail; import com.gunshi.project.hsz.common.model.InspectTaskDetail;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -3,7 +3,7 @@ package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.InspectTaskPageSo; import com.gunshi.project.hsz.entity.so.InspectTaskPageSo;
import com.gunshi.project.hsz.model.InspectTask; import com.gunshi.project.hsz.common.model.InspectTask;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -1,7 +1,7 @@
package com.gunshi.project.hsz.mapper; package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.model.JcskByBD; import com.gunshi.project.hsz.common.model.JcskByBD;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -1,9 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.model.JcskByB;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface JcskByBMapper extends BaseMapper<JcskByB> {
}

View File

@ -1,59 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.entity.vo.HomeJcskGnssBVo;
import com.gunshi.project.hsz.model.JcskGnssB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface JcskGnssBMapper extends BaseMapper<JcskGnssB> {
@Select("""
<script>
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
</script>
""")
List<HomeJcskGnssBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
WHERE st.cd = #{id}
</script>
""")
HomeJcskGnssBVo getDetailsById(String id);
@Select("""
select ch from jcsk_gnss_b where ch is not null
group by ch
""")
List<String> listDms();
@Select("""
select ch from jcsk_gnss_b group by ch
""")
List<String> selectCH();
@Select("""
select cd from jcsk_gnss_b where ch = #{ch}
""")
List<String> selectCDbyCh(@Param("ch") String ch);
@Select("""
select * from jcsk_gnss_b where ch is null order by cd asc
""")
List<JcskGnssB> selectArtificial();
}

View File

@ -1,231 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.JcskGnssRPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.JcskGnessListVo;
import com.gunshi.project.hsz.entity.vo.JcskGnssRHisVo;
import com.gunshi.project.hsz.entity.vo.OsmoticShiftListVo2;
import com.gunshi.project.hsz.entity.vo.OsmoticShiftValueVo2;
import com.gunshi.project.hsz.model.JcskGnssR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface JcskGnssRMapper extends BaseMapper<JcskGnssR> {
// @Select("""
// <script>
// SELECT st.cd,r.de,r.dn,r.du,to_char(r.tm,'YYYY-MM-DD HH24:MI:SS') as tm FROM jcsk_gnss_r st
// LEFT JOIN (SELECT cd,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
// LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
// ORDER BY st.cd asc,r.tm desc
// </script>
// """)
// List<JcskGnessListVo> listValue();
@Select("""
<script>
select
t1.cd,
t1.ch,
t1.cd_nm as cdnm,
t2.de,
t2.dn,
t2.du,
to_char(t2.tm,'YYYY-MM-DD HH24:MI:SS') as tm
from jcsk_gnss_b t1
left join (
select t2.*
from jcsk_gnss_r t2
join (
select cd, MAX(tm) as tm
from jcsk_gnss_r
GROUP BY cd
) maxr on t2.cd = maxr.cd and t2.tm = maxr.tm
) t2 on t1.cd = t2.cd
ORDER BY t1.cd asc, t2.tm desc;
</script>
""")
List<JcskGnessListVo> listValue();
@Select("""
<script>
select t.station_code as cd,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,s.direction
from public.osmotic_warn_r t
left join public.osmotic_warn_rule s on t.rule_id = s.id
where t.station_code in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftListVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
@Select("""
<script>
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
from public.jcsk_gnss_r t
where t.cd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
from public.jcsk_gnss_r_8am t
where t.cd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> queryReorganizeValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.de,t.dn ,t.du,t.is_artificial as isArtificial from public.jcsk_gnss_r t
where t.cd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticShiftValueVo2> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
WITH daily_data AS (
SELECT
t2.cd,
t1.ch,
t1.cd_nm,
t2.de,
t2.dn,
t2.du,
t2.alt,
t2.tm,
t2.update_tm,
ROW_NUMBER() OVER (PARTITION BY t2.cd, t1.ch, DATE(t2.tm) ORDER BY t2.tm DESC) as rn
FROM jcsk_gnss_b t1
JOIN jcsk_gnss_r t2 ON t1.cd = t2.cd
WHERE 1=1
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
AND t2.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
AND t2.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
<if test="obj.cd != null and obj.cd != ''">
AND t2.cd = #{obj.cd}
</if>
<if test="obj.ch != null and obj.ch != ''">
AND t1.ch = #{obj.ch}
</if>
<if test= "obj.isArtificial != null">
AND t2.is_artificial = #{obj.isArtificial}
</if>
)
SELECT
cd,
ch,
cd_nm as cdnm,
de,
dn,
du,
alt,
tm as tm,
update_tm
FROM daily_data
WHERE rn = 1
ORDER BY DATE(tm) DESC, tm DESC, cd DESC
</script>
""")
Page<JcskGnssR> pageQuery(Page<Object> page, @Param("obj") JcskGnssRPageSo page1);
@Select("""
<script>
select t1.ch,t2.* from
jcsk_gnss_b t1
left join jcsk_gnss_r t2
on t1.cd = t2.cd
where 1=1
<if test="dto.cd != null and dto.cd != ''">
AND t1.cd = #{dto.cd}
</if>
<if test="dto.ch != null and dto.ch != ''">
AND t1.ch = #{dto.ch}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.tm >= #{dto.dateTimeRangeSo.start}
AND t2.tm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
</script>
""")
Page<JcskGnssRHisVo> historyPage(Page<Object> page, @Param("dto") JcskGnssRPageSo page1);
@Select("""
<script>
select t1.ch,t2.* from
jcsk_gnss_b t1
left join jcsk_gnss_r t2
on t1.cd = t2.cd
where t2.is_artificial = 1
<if test="dto.cd != null and dto.cd != ''">
AND t1.cd = #{dto.cd}
</if>
<if test="dto.ch != null and dto.ch != ''">
AND t1.ch = #{dto.ch}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.tm >= #{dto.dateTimeRangeSo.start}
AND t2.tm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.tm desc
</script>
""")
Page<JcskGnssR> artificialPage(Page<Object> page,@Param("dto") JcskGnssRPageSo page1);
}

View File

@ -1,160 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.HomeJcskSlBVo;
import com.gunshi.project.hsz.entity.vo.JcskSyRVo;
import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo;
import com.gunshi.project.hsz.entity.vo.OsmoticValueVo2;
import com.gunshi.project.hsz.model.JcskSlB;
import com.gunshi.project.hsz.model.JcskSlR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface JcskSlBMapper extends BaseMapper<JcskSlB> {
@Select("""
<script>
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
</script>
""")
List<HomeJcskSlBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
where st.mpcd = #{id}
</script>
""")
HomeJcskSlBVo getDetailsById(String id);
@Select("""
select dvcd from jcsk_sl_b where dm = #{dm}
""")
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
@Select(
"""
<script>
SELECT station_code, value, tm
FROM (
SELECT
st.dvcd as station_code,
r.spqn as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
ROW_NUMBER() OVER (PARTITION BY st.mpcd ORDER BY r.mstm DESC) as rn
FROM jcsk_sl_b st
LEFT JOIN jcsk_sl_r r ON st.mpcd = r.mpcd
) t
WHERE rn = 1
ORDER BY station_code asc;
</script>
"""
)
List<JcskSyRVo> listValue();
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
from public.jcsk_sl_b t1
left join public.jcsk_sl_r t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t2.*
from public.jcsk_sl_b t1
left join public.jcsk_sl_r t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<JcskSlR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
from public.jcsk_sl_b t1
left join public.jcsk_sl_r_8am t2
on t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
t.spqn as value from public.jcsk_sl_b t2
left join
public.jcsk_sl_r t on t2.mpcd = t.mpcd
where t2.dvcd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.mstm desc
</script>
""")
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
select dvcd from jcsk_sl_b where mpcd = #{mpcd} limit 1
</script>
""")
String selectDvcdByStcdAndMpcd(@Param("mpcd") String mpcd);
}

View File

@ -1,82 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.JcskSlRPageSo;
import com.gunshi.project.hsz.entity.vo.JcskSlRHisVo;
import com.gunshi.project.hsz.model.JcskSlR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface JcskSlRMapper extends BaseMapper<JcskSlR> {
@Select("""
<script>
<![CDATA[
WITH ranked_data AS (
SELECT
t1.*,
t2.dm,
t3.profile_name as dmName,
t2.dvcd,
ROW_NUMBER() OVER (PARTITION BY t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
FROM jcsk_sl_r t1
JOIN jcsk_sl_b t2 ON t1.mpcd = t2.mpcd
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
WHERE 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t2.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t2.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
)
SELECT *
FROM ranked_data
WHERE rn = 1
ORDER BY mstm DESC
</script>
""")
Page<JcskSlR> pageQuery(Page<Object> page, @Param("dto") JcskSlRPageSo page1);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sl_b t1
left join jcsk_sl_r t2 on t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSlRHisVo> historyPage(Page<Object> page, JcskSlRPageSo page1);
}

View File

@ -1,59 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.entity.vo.HomeJcskSYBVo;
import com.gunshi.project.hsz.model.JcskSyB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface JcskSyBMapper extends BaseMapper<JcskSyB> {
@Select("""
<script>
SELECT st.*, r.spprwl as value, r.mstm
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as max_mstm
FROM jcsk_sy_r
GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_mstm = r.mstm
</script>
""")
List<HomeJcskSYBVo> getDetailsAndMonitoringDataList();
@Select("""
<script>
SELECT st.*, r.spprwl as value, r.mstm
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as tm\s
FROM jcsk_sy_r\s
GROUP BY mpcd
)maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
WHERE st.mpcd = #{id}
</script>
""")
HomeJcskSYBVo getDetailsById(@Param("id") String id);
@Select("""
SELECT dvcd from jcsk_sy_b where dm = #{dm}
ORDER BY LENGTH(dvcd) ASC,dvcd ASC;
""")
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
@Select("""
<script>
select dvcd from jcsk_sy_b where mpcd = #{mpcd} and stcd =#{stcd}
</script>
""")
String selectDvcdByStcdAndMpcd(@Param("stcd")String stcd,@Param("mpcd") String mpcd);
}

View File

@ -1,361 +0,0 @@
package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.JcskSyRPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.*;
import com.gunshi.project.hsz.model.JcskSyB;
import com.gunshi.project.hsz.model.JcskSyR;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface JcskSyRMapper extends BaseMapper<JcskSyR> {
@Select(
"""
<script>
SELECT
st.dvcd as station_code,
r.spprwl as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
m.profile_name
FROM jcsk_sy_b st
LEFT JOIN (
SELECT mpcd,stcd, MAX(mstm) as max_tm
FROM jcsk_sy_r
GROUP BY mpcd,stcd
) maxr ON st.mpcd = maxr.mpcd and st.stcd = maxr.stcd
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_tm = r.mstm and maxr.stcd = r.stcd
LEFT JOIN att_dam_profile m ON st.dm = m.profile_code
ORDER BY m._order ASC;
</script>
"""
)
List<JcskSyRVo> listValue();
@Select(
"""
<script>
SELECT
st.mpcd as station_code,
r.spqn as value,
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm
FROM jcsk_sl_b st
LEFT JOIN (
SELECT mpcd, MAX(mstm) as tm
FROM jcsk_sl_r
GROUP BY mpcd
) maxr ON st.mpcd = maxr.mpcd
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
ORDER BY st.mpcd asc, r.mstm desc;
</script>
"""
)
List<JcskSyRVo> flowListValue();
@Select("""
<script>
select t.station_code as stationCode,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm
from public.osmotic_warn_r t
where t.station_code in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<OsmoticValueVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
@Select("""
<script>
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
t.spprwl as value from public.jcsk_sy_b t2
left join public.jcsk_sy_r t on t2.stcd = t.stcd and t2.mpcd = t.mpcd
where t2.dvcd = #{obj.stationCode}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.mstm desc
</script>
""")
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
@Select("""
<script>
select to_char((t.tm - INTERVAL '5 minutes'),'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
from public.st_rsvr_r t
where t.stcd = #{stcd} and to_char(t.tm, 'MI:SS') = '05:00'
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo, @Param("stcd") String stcd);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
from public.st_pptn_r_d t
where t.year = #{year} and t.stcd = #{stcd}
order by t.tm desc
</script>
""")
List<StRzVo> queryDrp(@Param("year") Integer year,@Param("stcd") String stcd);
@Select("""
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
from public.st_rsvr_r t
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.stcd = #{stcd}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
select t.tm,t.rz
from public.st_rsvr_r t
where to_char(t.tm, 'MI:SS') = '00:00' and to_char(t.tm, 'HH24:MI') like '%:00' and t.stcd = #{stcd}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t.tm desc
</script>
""")
List<StRzVo> queryRz2(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
from public.jcsk_sy_b t1 left join public.jcsk_sy_r t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
from public.jcsk_sy_b t1 left join public.jcsk_sy_r_8am t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t2.*
from public.jcsk_sy_b t1
left join public.jcsk_sy_r t2
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<JcskSyR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
select t1.dvcd as stationCode,to_char(t2.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,t2.spprwl as value
from public.jcsk_sy_b t1
left join public.jcsk_sy_r t2 on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
where t1.dvcd in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>
order by t2.mstm desc
</script>
""")
List<OsmoticValueVo2> queryLineValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
@Select("""
<script>
<![CDATA[
WITH ranked_data AS (
SELECT
t1.*,
t2.dm,
t3.profile_name as dmName,
t2.dvcd,
ROW_NUMBER() OVER (PARTITION BY t1.stcd, t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
FROM jcsk_sy_r t1
JOIN jcsk_sy_b t2 ON t1.stcd = t2.stcd AND t1.mpcd = t2.mpcd
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
WHERE 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t2.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t2.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
)
SELECT *
FROM ranked_data
WHERE rn = 1
ORDER BY mstm DESC
</script>
""")
Page<JcskSyR> queryPage(Page<Object> page, @Param("dto") JcskSyRPageSo pageSo);
@Select("""
select dm from jcsk_sy_b
GROUP BY dm
""")
List<String> listDm();
@Select("""
select stcd,mpcd from jcsk_sy_b
""")
List<JcskSyB> listStcdMpcd();
@Select("""
select dvcd from jcsk_sy_b where dm = #{dm}
""")
List<String> listDvcdByDm(@Param("dm") String dm);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sy_b t1
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where 1=1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSyRHisVo> historyPage(Page<Object> page, @Param("dto") JcskSyRPageSo page1);
@Select("""
<script>
<![CDATA[
select t2.*,
t1.dm,
t3.profile_name as dmName,
t1.dvcd
from jcsk_sy_b t1
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
left join att_dam_profile t3 on t1.dm = t3.profile_code
where t2.is_artificial = 1
]]>
<if test="dto.dvcd != null and dto.dvcd != ''">
AND t1.dvcd = #{dto.dvcd}
</if>
<if test="dto.dm != null and dto.dm != ''">
AND t1.dm = #{dto.dm}
</if>
<if test="dto.dateTimeRangeSo != null">
<![CDATA[
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
]]>
</if>
order by t2.mstm desc
</script>
""")
Page<JcskSyR> artificialPage(Page<Object> page,@Param("dto") JcskSyRPageSo page1);
}

View File

@ -2,13 +2,13 @@ package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; import com.gunshi.project.hsz.common.model.so.OsmoticQueryPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo; import com.gunshi.project.hsz.common.model.vo.OsmoticPressDetailVo;
import com.gunshi.project.hsz.entity.vo.OsmoticPressVo; import com.gunshi.project.hsz.entity.vo.OsmoticPressVo;
import com.gunshi.project.hsz.entity.vo.OsmoticValueVo; import com.gunshi.project.hsz.entity.vo.OsmoticValueVo;
import com.gunshi.project.hsz.entity.vo.StRzVo; import com.gunshi.project.hsz.common.model.vo.StRzVo;
import com.gunshi.project.hsz.model.OsmoticPressR; import com.gunshi.project.hsz.model.OsmoticPressR;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

View File

@ -1,8 +1,8 @@
package com.gunshi.project.hsz.mapper; package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; import com.gunshi.project.hsz.common.model.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.OsmoticShiftListVo; import com.gunshi.project.hsz.entity.vo.OsmoticShiftListVo;
import com.gunshi.project.hsz.entity.vo.OsmoticShiftValueVo; import com.gunshi.project.hsz.entity.vo.OsmoticShiftValueVo;
import com.gunshi.project.hsz.model.OsmoticShiftR; import com.gunshi.project.hsz.model.OsmoticShiftR;

View File

@ -1,7 +1,7 @@
package com.gunshi.project.hsz.mapper; package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.entity.vo.StRzVo; import com.gunshi.project.hsz.common.model.vo.StRzVo;
import com.gunshi.project.hsz.model.StPptnRD; import com.gunshi.project.hsz.model.StPptnRD;
import com.gunshi.project.hsz.model.StPptnRH; import com.gunshi.project.hsz.model.StPptnRH;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -4,8 +4,8 @@ package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.hsz.entity.so.JcskByRPageSo; import com.gunshi.project.hsz.common.model.so.JcskByRPageSo;
import com.gunshi.project.hsz.model.JcskByR; import com.gunshi.project.hsz.common.model.JcskByR;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -1,7 +1,7 @@
package com.gunshi.project.hsz.mapper; package com.gunshi.project.hsz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.model.JcskByB; import com.gunshi.project.hsz.common.model.JcskByB;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper

View File

@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -3,7 +3,7 @@ package com.gunshi.project.hsz.model;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import com.gunshi.project.hsz.entity.vo.ForecastResultVo; import com.gunshi.project.hsz.entity.vo.ForecastResultVo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;

View File

@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.entity.page.GenericPageParams; import com.gunshi.project.hsz.common.model.page.GenericPageParams;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
import lombok.Data; import lombok.Data;

Some files were not shown because too many files have changed in this diff Show More