|
@@ -1,6 +1,8 @@
|
1
|
1
|
package com.ruoyi.monitoring.controller;
|
2
|
2
|
|
|
3
|
+import com.mybatisflex.core.query.QueryTable;
|
3
|
4
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
5
|
+import com.ruoyi.monitoring.domain.CmcChannel;
|
4
|
6
|
import com.ruoyi.monitoring.domain.CmcTemperature;
|
5
|
7
|
import com.ruoyi.monitoring.service.ICmcTemperatureService;
|
6
|
8
|
import com.ruoyi.common.web.controller.BaseController;
|
|
@@ -31,8 +33,8 @@ public class CmcTemperatureController extends BaseController {
|
31
|
33
|
|
32
|
34
|
private QueryWrapper getQW(CmcTemperature cmcTemperature) {
|
33
|
35
|
QueryWrapper qw = QueryWrapper.create();
|
34
|
|
- qw.and(CmcTemperature::getId).like(cmcTemperature.getId());
|
35
|
|
- qw.and(CmcTemperature::getGroupNo).like(cmcTemperature.getGroupNo());
|
|
36
|
+ qw.and(CmcTemperature::getId).eq(cmcTemperature.getId());
|
|
37
|
+ qw.and(CmcTemperature::getGroupNo).eq(cmcTemperature.getGroupNo());
|
36
|
38
|
qw.and(CmcTemperature::getSensorNo).eq(cmcTemperature.getSensorNo());
|
37
|
39
|
qw.and(CmcTemperature::getData).eq(cmcTemperature.getData());
|
38
|
40
|
qw.and(CmcTemperature::getVolt).eq(cmcTemperature.getVolt());
|
|
@@ -43,4 +45,33 @@ public class CmcTemperatureController extends BaseController {
|
43
|
45
|
return qw;
|
44
|
46
|
}
|
45
|
47
|
|
|
48
|
+ /**
|
|
49
|
+ * 根据点位查询水温监测列表
|
|
50
|
+ */
|
|
51
|
+ @Get
|
|
52
|
+ @Mapping("listByInfo")
|
|
53
|
+ public List<CmcTemperature> listByInfo(CmcTemperature cmcTemperature, String Info) {
|
|
54
|
+ QueryWrapper qw = getQW(cmcTemperature, Info);
|
|
55
|
+ return cmcTemperatureService.list(qw);
|
|
56
|
+ }
|
|
57
|
+
|
|
58
|
+ private QueryWrapper getQW(CmcTemperature cmcTemperature, String Info) {
|
|
59
|
+ QueryWrapper qw = QueryWrapper.create();
|
|
60
|
+ qw.select(CmcTemperature::getId, CmcTemperature::getGroupNo, CmcTemperature::getSensorNo, CmcTemperature::getData, CmcTemperature::getVolt, CmcTemperature::getCSQ, CmcTemperature::getDatetime)
|
|
61
|
+ .from(CmcTemperature.class)
|
|
62
|
+ .leftJoin(CmcChannel.class)
|
|
63
|
+ .on(CmcChannel::getSensorNo, CmcTemperature::getSensorNo)
|
|
64
|
+ .where(CmcChannel::getInfo).eq(Info)
|
|
65
|
+ .and(CmcTemperature::getId).eq(cmcTemperature.getId())
|
|
66
|
+ .and(CmcTemperature::getGroupNo).eq(cmcTemperature.getGroupNo())
|
|
67
|
+ .and(CmcTemperature::getSensorNo).eq(cmcTemperature.getSensorNo())
|
|
68
|
+ .and(CmcTemperature::getData).eq(cmcTemperature.getData())
|
|
69
|
+ .and(CmcTemperature::getVolt).eq(cmcTemperature.getVolt())
|
|
70
|
+ .and(CmcTemperature::getCSQ).eq(cmcTemperature.getCSQ())
|
|
71
|
+ .and(CmcTemperature::getDatetime).ge(cmcTemperature.getStartTime())
|
|
72
|
+ .and(CmcTemperature::getDatetime).le(cmcTemperature.getEndTime())
|
|
73
|
+ .orderBy(CmcTemperature::getDatetime).desc();
|
|
74
|
+ return qw;
|
|
75
|
+ }
|
|
76
|
+
|
46
|
77
|
}
|