测值查询查不到数据问题#598

master
李一帆 2025-04-09 17:27:30 +08:00
parent 23f4636aee
commit 269c5f15cc
2 changed files with 6 additions and 3 deletions

View File

@ -74,13 +74,13 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
<if test = "obj.type == 2">
t.q as value from public.osmotic_flow_r t
</if>
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.station_code in
where t.station_code in
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
#{code}
</foreach>
</foreach>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
</if>
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
</if>

View File

@ -49,6 +49,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
* @return
*/
public List<OsmoticStationVo> queryValue(OsmoticQuerySo osmoticQuerySo,Integer year) {
if(osmoticQuerySo.getType() == null) {
osmoticQuerySo.setType(1);
}
List<OsmoticStationVo> resList = new ArrayList<>();
if(CollectionUtils.isEmpty(osmoticQuerySo.getStationCodes())){
return resList;