|
@@ -91,14 +91,30 @@ public class TaDeviceJobController extends BaseController {
|
91
|
91
|
@ApiParam("农机ID") @RequestParam(value = "machineryId", required = false) String machineryId,
|
92
|
92
|
@ApiParam("人员ID") @RequestParam(value = "userId", required = false) String userId,
|
93
|
93
|
@ApiParam("人员手机") @RequestParam(value = "phone", required = false) String phone,
|
|
94
|
+ @ApiParam("乡镇") @RequestParam(value = "town", required = false) String town,
|
94
|
95
|
@ApiParam("设备分类") @RequestParam(value = "deviceKind", required = false) String deviceKind,
|
95
|
96
|
@ApiParam("设备编号") @RequestParam(value = "deviceNo", required = false) String deviceNo,
|
96
|
97
|
@ApiParam(value = "开始时间", example = "2022-10-01") @RequestParam(value = "startDate") String startDate,
|
97
|
98
|
@ApiParam(value = "结束时间", example = "2022-10-31") @RequestParam(value = "endDate") String endDate) throws Exception {
|
98
|
99
|
|
99
|
100
|
IPage<TaDeviceJob> pg = new Page<>(pageNum, pageSize);
|
100
|
|
- IPage<TaDeviceJob> list = taDeviceJobService.statisOrgBy(pg, orgId, orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone, machineryId, userId);
|
101
|
|
- Double totalArea = taDeviceJobService.statisTotalArea(orgId, orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone, machineryId, userId);
|
|
101
|
+
|
|
102
|
+ Map<String, Object> params = new HashMap<>();
|
|
103
|
+ params.put("orgId", orgId);
|
|
104
|
+ params.put("orgName", orgName);
|
|
105
|
+ params.put("deviceKind", deviceKind);
|
|
106
|
+ params.put("deviceNo", deviceNo);
|
|
107
|
+ params.put("startDate", startDate);
|
|
108
|
+ params.put("endDate", endDate);
|
|
109
|
+ params.put("machineryName", machineryName);
|
|
110
|
+ params.put("userName", userName);
|
|
111
|
+ params.put("phone", phone);
|
|
112
|
+ params.put("machineryId", machineryId);
|
|
113
|
+ params.put("userId", userId);
|
|
114
|
+ params.put("town", town);
|
|
115
|
+
|
|
116
|
+ IPage<TaDeviceJob> list = taDeviceJobService.statisOrgBy(pg, params);
|
|
117
|
+ Double totalArea = taDeviceJobService.statisTotalArea(params);
|
102
|
118
|
return ResponseBean.success(new HashMap<String, Object>(){{
|
103
|
119
|
put("list", list);
|
104
|
120
|
put("totalArea", totalArea);
|
|
@@ -125,6 +141,7 @@ public class TaDeviceJobController extends BaseController {
|
125
|
141
|
@ApiParam("农机ID") @RequestParam(value = "machineryId", required = false) String machineryId,
|
126
|
142
|
@ApiParam("人员ID") @RequestParam(value = "userId", required = false) String userId,
|
127
|
143
|
@ApiParam("人员手机") @RequestParam(value = "phone", required = false) String phone,
|
|
144
|
+ @ApiParam("乡镇") @RequestParam(value = "town", required = false) String town,
|
128
|
145
|
@ApiParam("设备分类") @RequestParam(value = "deviceKind", required = false) String deviceKind,
|
129
|
146
|
@ApiParam("设备编号") @RequestParam(value = "deviceNo", required = false) String deviceNo,
|
130
|
147
|
// @ApiParam("位置") @RequestParam(value = "address", required = false) String address,
|
|
@@ -132,7 +149,21 @@ public class TaDeviceJobController extends BaseController {
|
132
|
149
|
@ApiParam(value = "结束时间", example = "2022-10-31") @RequestParam(value = "endDate") String endDate,
|
133
|
150
|
HttpServletResponse response) throws Exception {
|
134
|
151
|
|
135
|
|
- List<TaDeviceJob> list = taDeviceJobService.listOrgBy(orgId, orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone, machineryId, userId);
|
|
152
|
+ Map<String, Object> params = new HashMap<>();
|
|
153
|
+ params.put("orgId", orgId);
|
|
154
|
+ params.put("orgName", orgName);
|
|
155
|
+ params.put("deviceKind", deviceKind);
|
|
156
|
+ params.put("deviceNo", deviceNo);
|
|
157
|
+ params.put("startDate", startDate);
|
|
158
|
+ params.put("endDate", endDate);
|
|
159
|
+ params.put("machineryName", machineryName);
|
|
160
|
+ params.put("userName", userName);
|
|
161
|
+ params.put("phone", phone);
|
|
162
|
+ params.put("machineryId", machineryId);
|
|
163
|
+ params.put("userId", userId);
|
|
164
|
+ params.put("town", town);
|
|
165
|
+
|
|
166
|
+ List<TaDeviceJob> list = taDeviceJobService.listOrgBy(params);
|
136
|
167
|
|
137
|
168
|
Double total = 0.0;
|
138
|
169
|
if (list != null || list.size() > 0) {
|