|
@@ -4,10 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
4
|
4
|
import com.yunzhi.nanyang.common.BaseController;
|
5
|
5
|
import com.yunzhi.nanyang.common.Constants;
|
6
|
6
|
import com.yunzhi.nanyang.common.ResponseBean;
|
7
|
|
-import com.yunzhi.nanyang.entity.TaMachinery;
|
8
|
|
-import com.yunzhi.nanyang.entity.TaOrg;
|
9
|
|
-import com.yunzhi.nanyang.entity.TaWorkMessage;
|
10
|
|
-import com.yunzhi.nanyang.entity.TdMachineryType;
|
|
7
|
+import com.yunzhi.nanyang.common.StringUtils;
|
|
8
|
+import com.yunzhi.nanyang.entity.*;
|
11
|
9
|
import com.yunzhi.nanyang.service.*;
|
12
|
10
|
import com.yunzhi.nanyang.vo.ChartParam;
|
13
|
11
|
import io.swagger.annotations.Api;
|
|
@@ -43,6 +41,9 @@ public class ScreenDataController extends BaseController {
|
43
|
41
|
@Autowired
|
44
|
42
|
ITaWorkMessageService iTaWorkMessageService;
|
45
|
43
|
|
|
44
|
+ @Autowired
|
|
45
|
+ ITdDeviceService iTdDeviceService;
|
|
46
|
+
|
46
|
47
|
|
47
|
48
|
@GetMapping("/basic")
|
48
|
49
|
@ApiOperation(value="基本数据统计", notes = "基本数据统计", httpMethod = "GET", response = ResponseBean.class)
|
|
@@ -103,7 +104,6 @@ public class ScreenDataController extends BaseController {
|
103
|
104
|
return ResponseBean.success(result);
|
104
|
105
|
}
|
105
|
106
|
|
106
|
|
-
|
107
|
107
|
@GetMapping("/machinery/all")
|
108
|
108
|
@ApiOperation(value="依据类型查询农机", notes = "依据类型查询农机", httpMethod = "GET", response = ResponseBean.class)
|
109
|
109
|
public ResponseBean getMachineryOfType(@ApiParam("农机类型") @RequestParam(value = "typeId", required = false) String typeId) throws Exception {
|
|
@@ -118,4 +118,20 @@ public class ScreenDataController extends BaseController {
|
118
|
118
|
List<TaWorkMessage> result = iTaWorkMessageService.listByType(messageType, limit);
|
119
|
119
|
return ResponseBean.success(result);
|
120
|
120
|
}
|
|
121
|
+
|
|
122
|
+ @GetMapping("/machinery-device")
|
|
123
|
+ @ApiOperation(value="依据类型查询绑定设备农机", notes = "依据类型查询绑定设备农机", httpMethod = "GET", response = ResponseBean.class)
|
|
124
|
+ public ResponseBean getDeviceMachineryList(@ApiParam("设备类型") @RequestParam(value = "deviceType", required = false) String deviceType) throws Exception {
|
|
125
|
+
|
|
126
|
+ List<String> typeList = new ArrayList<>();
|
|
127
|
+ if (StringUtils.isEmpty(deviceType)) {
|
|
128
|
+ typeList.add("shensong");
|
|
129
|
+ typeList.add("feifang");
|
|
130
|
+ } else {
|
|
131
|
+ typeList.add(deviceType);
|
|
132
|
+ }
|
|
133
|
+
|
|
134
|
+ List<TdDevice> result = iTdDeviceService.getListByTypes(typeList);
|
|
135
|
+ return ResponseBean.success(result);
|
|
136
|
+ }
|
121
|
137
|
}
|