|
@@ -1,11 +1,9 @@
|
1
|
1
|
package com.yunzhi.nanyang.controller;
|
2
|
2
|
|
3
|
3
|
import com.yunzhi.nanyang.common.BaseController;
|
|
4
|
+import com.yunzhi.nanyang.common.Constants;
|
4
|
5
|
import com.yunzhi.nanyang.common.ResponseBean;
|
5
|
|
-import com.yunzhi.nanyang.service.ITaMachineryService;
|
6
|
|
-import com.yunzhi.nanyang.service.ITaOrderService;
|
7
|
|
-import com.yunzhi.nanyang.service.ITaOrgService;
|
8
|
|
-import com.yunzhi.nanyang.service.ITaPersonService;
|
|
6
|
+import com.yunzhi.nanyang.service.*;
|
9
|
7
|
import com.yunzhi.nanyang.vo.ChartParam;
|
10
|
8
|
import io.swagger.annotations.Api;
|
11
|
9
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -35,9 +33,14 @@ public class StatisController extends BaseController {
|
35
|
33
|
@Autowired
|
36
|
34
|
ITaOrderService iTaOrderService;
|
37
|
35
|
|
|
36
|
+ @Autowired
|
|
37
|
+ ITdDeviceService iTdDeviceService;
|
|
38
|
+
|
|
39
|
+ @Autowired
|
|
40
|
+ ISysUserService iSysUserService;
|
38
|
41
|
|
39
|
42
|
@GetMapping("/summary")
|
40
|
|
- @ApiOperation(value="登录", notes = "登录", httpMethod = "POST", response = ResponseBean.class)
|
|
43
|
+ @ApiOperation(value="首屏统计", notes = "首屏统计", httpMethod = "GET", response = ResponseBean.class)
|
41
|
44
|
public ResponseBean summary() throws Exception {
|
42
|
45
|
|
43
|
46
|
List<ChartParam> resp = new ArrayList<>();
|
|
@@ -60,4 +63,64 @@ public class StatisController extends BaseController {
|
60
|
63
|
|
61
|
64
|
return ResponseBean.success(resp);
|
62
|
65
|
}
|
|
66
|
+
|
|
67
|
+ @GetMapping("/summary2")
|
|
68
|
+ @ApiOperation(value="首屏统计2", notes = "首屏统计2", httpMethod = "GET", response = ResponseBean.class)
|
|
69
|
+ public ResponseBean summary2() throws Exception {
|
|
70
|
+
|
|
71
|
+ List<ChartParam> resp = new ArrayList<>();
|
|
72
|
+
|
|
73
|
+ // 统计注册用户
|
|
74
|
+ ChartParam personNum = iSysUserService.statisTotal();
|
|
75
|
+ resp.add(personNum);
|
|
76
|
+
|
|
77
|
+ // 合作社数
|
|
78
|
+ ChartParam orgNum = iTaOrgService.statisTotal();
|
|
79
|
+ resp.add(orgNum);
|
|
80
|
+
|
|
81
|
+ // 设备数量
|
|
82
|
+ ChartParam machineryNum = iTdDeviceService.statisTotal("feifang");
|
|
83
|
+ resp.add(machineryNum);
|
|
84
|
+
|
|
85
|
+ // 订单数
|
|
86
|
+ ChartParam orderNum = iTdDeviceService.statisJob("feifang", "2023-04-10");
|
|
87
|
+ resp.add(orderNum);
|
|
88
|
+
|
|
89
|
+ return ResponseBean.success(resp);
|
|
90
|
+ }
|
|
91
|
+
|
|
92
|
+ @GetMapping("/area-total-org")
|
|
93
|
+ @ApiOperation(value="合作社作业统计", notes = "合作社作业统计", httpMethod = "GET", response = ResponseBean.class)
|
|
94
|
+ public ResponseBean totalAreaByOrg() throws Exception {
|
|
95
|
+ List<ChartParam> resp = iTdDeviceService.statisAreaByOrgJob("feifang", "2023-04-10");
|
|
96
|
+ return ResponseBean.success(resp);
|
|
97
|
+ }
|
|
98
|
+
|
|
99
|
+ @GetMapping("/device-total-org")
|
|
100
|
+ @ApiOperation(value="合作社设备统计", notes = "合作社设备统计", httpMethod = "GET", response = ResponseBean.class)
|
|
101
|
+ public ResponseBean totalNumByOrg() throws Exception {
|
|
102
|
+ List<ChartParam> resp = iTdDeviceService.statisNumByOrgJob("feifang");
|
|
103
|
+ return ResponseBean.success(resp);
|
|
104
|
+ }
|
|
105
|
+
|
|
106
|
+ @GetMapping("/area-total-person")
|
|
107
|
+ @ApiOperation(value="人员作业统计", notes = "人员作业统计", httpMethod = "GET", response = ResponseBean.class)
|
|
108
|
+ public ResponseBean totalAreaByPerson() throws Exception {
|
|
109
|
+ List<ChartParam> resp = iTdDeviceService.statisAreaByPerson("feifang", "2023-04-10");
|
|
110
|
+ return ResponseBean.success(resp);
|
|
111
|
+ }
|
|
112
|
+
|
|
113
|
+ @GetMapping("/device-total-person")
|
|
114
|
+ @ApiOperation(value="人员设备统计", notes = "人员设备统计", httpMethod = "GET", response = ResponseBean.class)
|
|
115
|
+ public ResponseBean totalNumByPerson() throws Exception {
|
|
116
|
+ List<ChartParam> resp = iTdDeviceService.statisNumByPerson("feifang");
|
|
117
|
+ return ResponseBean.success(resp);
|
|
118
|
+ }
|
|
119
|
+
|
|
120
|
+ @GetMapping("/area-total-town")
|
|
121
|
+ @ApiOperation(value="乡镇作业统计", notes = "乡镇作业统计", httpMethod = "GET", response = ResponseBean.class)
|
|
122
|
+ public ResponseBean totalAreaByTown() throws Exception {
|
|
123
|
+ List<ChartParam> resp = iTdDeviceService.statisAreaByTown("feifang", "2023-04-10");
|
|
124
|
+ return ResponseBean.success(resp);
|
|
125
|
+ }
|
63
|
126
|
}
|