|
@@ -5,6 +5,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
5
|
5
|
import com.ruoyi.common.web.domain.PageData;
|
6
|
6
|
import com.ruoyi.monitoring.domain.CmcChannel;
|
7
|
7
|
import com.ruoyi.monitoring.domain.CmcTemperature;
|
|
8
|
+import com.ruoyi.monitoring.service.ICmcChannelService;
|
8
|
9
|
import com.ruoyi.monitoring.service.ICmcTemperatureService;
|
9
|
10
|
import com.ruoyi.common.web.controller.BaseController;
|
10
|
11
|
import org.noear.solon.annotation.*;
|
|
@@ -22,6 +23,9 @@ public class CmcTemperatureController extends BaseController {
|
22
|
23
|
@Inject
|
23
|
24
|
ICmcTemperatureService cmcTemperatureService;
|
24
|
25
|
|
|
26
|
+ @Inject
|
|
27
|
+ ICmcChannelService cmcChannelService;
|
|
28
|
+
|
25
|
29
|
/**
|
26
|
30
|
* 查询水温监测列表
|
27
|
31
|
*/
|
|
@@ -52,9 +56,12 @@ public class CmcTemperatureController extends BaseController {
|
52
|
56
|
@Get
|
53
|
57
|
@Mapping("listByInfo")
|
54
|
58
|
public PageData<CmcTemperature> listByInfo(Page<CmcTemperature> page, CmcTemperature cmcTemperature, String Info) {
|
|
59
|
+ CmcChannel channel = new CmcChannel();
|
|
60
|
+ channel.setInfo(Info);
|
|
61
|
+ int channelSize = cmcChannelService.listChannel(channel).size();
|
55
|
62
|
QueryWrapper qw = getQW(cmcTemperature, Info);
|
56
|
63
|
Page<CmcTemperature> result = cmcTemperatureService.page(page, qw);
|
57
|
|
- return getPageData(result);
|
|
64
|
+ return getPageData(result).total(result.getRecords().size() / channelSize);
|
58
|
65
|
}
|
59
|
66
|
|
60
|
67
|
private QueryWrapper getQW(CmcTemperature cmcTemperature, String Info) {
|