修改了,阀门监控日志查询的BUG

master
yangzhe123 2025-11-10 15:40:00 +08:00
parent 25902eed5c
commit 133c595733
2 changed files with 10 additions and 8 deletions

View File

@ -112,10 +112,10 @@ public class GateValveRealService extends ServiceImpl<GateValveRealMapper, GateV
if(StringUtils.isBlank(code)){ if(StringUtils.isBlank(code)){
return null; return null;
} }
LambdaQueryWrapper<GateValveOplogVo> qw = new LambdaQueryWrapper(); LambdaQueryWrapper<GateValveOplog> qw = new LambdaQueryWrapper();
qw.eq(GateValveOplogVo::getValveCode,code); qw.eq(GateValveOplog::getValveCode,code);
qw.orderByDesc(GateValveOplogVo::getTm).last("LIMIT 1"); qw.orderByDesc(GateValveOplog::getTm).last("LIMIT 1");
List<GateValveOplog> list = gateValveOplogAutoDao.list(); List<GateValveOplog> list = gateValveOplogAutoDao.list(qw);
return list.isEmpty() ? null : list.get(0); return list.isEmpty() ? null : list.get(0);
} }

View File

@ -119,8 +119,9 @@ public class DataTaskHsz {
* @auther: cxw * @auther: cxw
* @date: 2024-09-20, , 17:07:23 * @date: 2024-09-20, , 17:07:23
*/ */
@Async // @Async
@Scheduled(fixedRate = 5, timeUnit = TimeUnit.MINUTES) // @Scheduled(fixedRate = 5, timeUnit = TimeUnit.MINUTES)
@Deprecated(since = "改在hsz-datasync中同步")
public void getPptnData() { public void getPptnData() {
Date now = new Date(); Date now = new Date();
System.out.println("雨情实时定时任务,执行时间:" + sdf.format(now)); System.out.println("雨情实时定时任务,执行时间:" + sdf.format(now));
@ -242,8 +243,9 @@ public class DataTaskHsz {
* @auther: cxw * @auther: cxw
* @date: 2024-09-23, , 11:23:04 * @date: 2024-09-23, , 11:23:04
*/ */
@Async // @Async
@Scheduled(fixedRate = 5, timeUnit = TimeUnit.MINUTES) // @Scheduled(fixedRate = 5, timeUnit = TimeUnit.MINUTES)
@Deprecated(since = "改在hsz-datasync中同步")
public void getRiverData() { public void getRiverData() {
Date now = new Date(); Date now = new Date();
System.out.println("水情历史定时任务,执行时间:" + sdf.format(now)); System.out.println("水情历史定时任务,执行时间:" + sdf.format(now));