|
|
@@ -1,5 +1,6 @@
|
|
1
|
1
|
package com.chinaitop.depot.intelligent.grainsituation.controller;
|
|
2
|
2
|
|
|
|
3
|
+import com.chinaitop.depot.intelligent.common.ConstantCommon;
|
|
3
|
4
|
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdata;
|
|
4
|
5
|
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdataLayer;
|
|
5
|
6
|
import com.chinaitop.depot.intelligent.grainsituation.service.TPointsService;
|
|
|
@@ -17,9 +18,7 @@ import io.swagger.annotations.ApiImplicitParams;
|
|
17
|
18
|
import io.swagger.annotations.ApiOperation;
|
|
18
|
19
|
import org.apache.commons.lang.StringUtils;
|
|
19
|
20
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
20
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
21
|
21
|
import org.springframework.http.MediaType;
|
|
22
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
23
|
22
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
24
|
23
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
25
|
24
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -50,19 +49,21 @@ public class TemperatureRecordController {
|
|
50
|
49
|
@ApiImplicitParam(name = "vCfCode", value = "仓库名称", paramType = "query"),
|
|
51
|
50
|
@ApiImplicitParam(name = "tType", value = "检测类型0测温,1粮油,2测水分", paramType = "query")
|
|
52
|
51
|
})
|
|
53
|
|
- public ResponseEntity<PageInfo<TTestdata>> getList(Integer pageNum, Integer pageSize, String vCfCode, String vDatatime, String startTime, String endTime, String tType,String orgId) {
|
|
54
|
|
- List<TTestdata> list = null;
|
|
|
52
|
+ public ResponseEntity getList(Integer pageNum, Integer pageSize, String vCfCode, String vDatatime, String startTime, String endTime, String tType, String orgId) {
|
|
55
|
53
|
try {
|
|
|
54
|
+ if (StringUtils.isBlank(tType))
|
|
|
55
|
+ return ResponseEntity.failed(ConstantCommon.CHECK_TYPE);
|
|
|
56
|
+ if (StringUtils.isBlank(orgId))
|
|
|
57
|
+ return ResponseEntity.failed(ConstantCommon.ORGID_NOT_NULL);
|
|
56
|
58
|
if (null != pageNum && null != pageSize) {
|
|
57
|
59
|
PageHelper.startPage(pageNum, pageSize);
|
|
58
|
60
|
}
|
|
59
|
|
- list = temperatureRecordService.getList(vCfCode, vDatatime, startTime, endTime, tType, orgId);
|
|
|
61
|
+ PageInfo<TTestdata> list = temperatureRecordService.getList(vCfCode, vDatatime, startTime, endTime, tType, orgId);
|
|
|
62
|
+ return ResponseEntity.ok(list);
|
|
60
|
63
|
} catch (Exception e) {
|
|
61
|
64
|
e.printStackTrace();
|
|
62
|
65
|
return ResponseEntity.failed(e.getMessage());
|
|
63
|
66
|
}
|
|
64
|
|
- PageInfo<TTestdata> pageInfo = new PageInfo<TTestdata>(list);
|
|
65
|
|
- return ResponseEntity.ok(pageInfo);
|
|
66
|
67
|
}
|
|
67
|
68
|
|
|
68
|
69
|
/**
|
|
|
@@ -91,11 +92,10 @@ public class TemperatureRecordController {
|
|
91
|
92
|
}
|
|
92
|
93
|
|
|
93
|
94
|
/**
|
|
94
|
|
- *
|
|
95
|
95
|
* @param lqId
|
|
96
|
96
|
* @param vCfCode
|
|
97
|
97
|
* @param vDatatime
|
|
98
|
|
- * @param viewFlag true: 表格数据,false: 3D三温图数据
|
|
|
98
|
+ * @param viewFlag true: 表格数据,false: 3D三温图数据
|
|
99
|
99
|
* @return
|
|
100
|
100
|
*/
|
|
101
|
101
|
@RequestMapping(value = "/findByHouseAndTimes", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
|