|
|
@@ -2,6 +2,7 @@ package com.chinaitop.depot.intelligent.grainsituation.controller;
|
|
2
|
2
|
|
|
3
|
3
|
import com.alibaba.fastjson.JSONObject;
|
|
4
|
4
|
import com.chinaitop.depot.intelligent.basicdata.service.TUrlConfigService;
|
|
|
5
|
+import com.chinaitop.depot.intelligent.common.ResultEnum;
|
|
5
|
6
|
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdata;
|
|
6
|
7
|
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdataLayer;
|
|
7
|
8
|
import com.chinaitop.depot.intelligent.grainsituation.model.TempMetadata;
|
|
|
@@ -84,25 +85,27 @@ public class TemperatureRecordController {
|
|
84
|
85
|
PageInfo<TTestdata> pageInfo = new PageInfo<TTestdata>(list);
|
|
85
|
86
|
return ResponseEntity.ok(pageInfo);
|
|
86
|
87
|
}
|
|
87
|
|
- // 要求修改为->温湿度检测只显示最新的一次检测数据
|
|
|
88
|
+
|
|
|
89
|
+ // 要求修改为->温湿度检测只显示当天数据,按仓房排序
|
|
88
|
90
|
@RequestMapping(value = "/getListOfGroup", method = RequestMethod.GET)
|
|
89
|
91
|
@ApiOperation(value = "查询 测温 信息列表", notes = "查询 测温 信息列表,支持分页")
|
|
90
|
92
|
@ApiImplicitParams({
|
|
91
|
93
|
@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
|
|
92
|
94
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
|
|
93
|
95
|
@ApiImplicitParam(name = "vDatatime", value = "采集时间", paramType = "query"),
|
|
94
|
|
- @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query"),
|
|
95
|
|
- @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query"),
|
|
96
|
96
|
@ApiImplicitParam(name = "vCfCode", value = "仓库名称", paramType = "query"),
|
|
97
|
97
|
@ApiImplicitParam(name = "tType", value = "检测类型0测温,1粮油,2测水分", paramType = "query")
|
|
98
|
98
|
})
|
|
99
|
|
- public ResponseEntity getListOfGroup(Integer pageNum, Integer pageSize, String vCfCode, String vDatatime, String startTime, String endTime, String tType, String orgId) {
|
|
|
99
|
+ public ResponseEntity getListOfGroup(Integer pageNum, Integer pageSize, String vCfCode, String vDatatime, String tType, String orgId) {
|
|
100
|
100
|
List<TTestdata> list = null;
|
|
101
|
101
|
try {
|
|
|
102
|
+ // 查询检测类型不能为空(检测类型0测温,1粮油,2测水分)
|
|
|
103
|
+ if(StringUtils.isBlank(tType))
|
|
|
104
|
+ return ResponseEntity.failed(ResultEnum.CODE_20.getMsg());
|
|
102
|
105
|
if (null != pageNum && null != pageSize) {
|
|
103
|
106
|
PageHelper.startPage(pageNum, pageSize);
|
|
104
|
107
|
}
|
|
105
|
|
- list = temperatureRecordService.getListOfGroup(vCfCode, vDatatime, startTime, endTime, tType, orgId);
|
|
|
108
|
+ list = temperatureRecordService.getListOfGroup(vCfCode, vDatatime, tType, orgId);
|
|
106
|
109
|
} catch (Exception e) {
|
|
107
|
110
|
e.printStackTrace();
|
|
108
|
111
|
return ResponseEntity.failed(e.getMessage());
|
|
|
@@ -110,7 +113,8 @@ public class TemperatureRecordController {
|
|
110
|
113
|
PageInfo<TTestdata> pageInfo = new PageInfo<TTestdata>(list);
|
|
111
|
114
|
return ResponseEntity.ok(pageInfo);
|
|
112
|
115
|
}
|
|
113
|
|
- // 要求修改为->分页列表数据(测温记录列表,时间仓房排序)
|
|
|
116
|
+
|
|
|
117
|
+ // 要求修改为->分页列表数据(测温历史记录列表)
|
|
114
|
118
|
@RequestMapping(value = "/getTemHistoryPageInfoList", method = RequestMethod.GET)
|
|
115
|
119
|
@ApiOperation(value = "查询 测温 信息列表", notes = "查询 测温 信息列表,支持分页")
|
|
116
|
120
|
@ApiImplicitParams({
|