|
@@ -12,6 +12,7 @@ import java.util.List;
|
12
|
12
|
import java.util.Map;
|
13
|
13
|
|
14
|
14
|
import com.yunzhi.nanyang.common.StringUtils;
|
|
15
|
+import com.yunzhi.nanyang.entity.TaMachinery;
|
15
|
16
|
import io.swagger.annotations.Api;
|
16
|
17
|
import io.swagger.annotations.ApiOperation;
|
17
|
18
|
import io.swagger.annotations.ApiParam;
|
|
@@ -36,17 +37,18 @@ public class TaDeviceJobController extends BaseController {
|
36
|
37
|
@Autowired
|
37
|
38
|
private TaDeviceJobService taDeviceJobService;
|
38
|
39
|
|
39
|
|
-// /**
|
40
|
|
-// * 通过ID查询单条数据
|
41
|
|
-// *
|
42
|
|
-// * @param jobId 主键
|
43
|
|
-// * @return 实例对象
|
44
|
|
-// */
|
45
|
|
-// @ApiOperation("通过ID查询单条数据")
|
46
|
|
-// @GetMapping("/device-job/{id}")
|
47
|
|
-// public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
|
48
|
|
-// return ResponseBean.success(taDeviceJobService.getById(id));
|
49
|
|
-// }
|
|
40
|
+ /**
|
|
41
|
+ * 通过ID查询单条数据
|
|
42
|
+ *
|
|
43
|
+ * @param userId 用户ID
|
|
44
|
+ * @return 实例对象
|
|
45
|
+ */
|
|
46
|
+ @ApiOperation("获取用户作业农机列表")
|
|
47
|
+ @GetMapping("/device-job/user/{userId}/machinery")
|
|
48
|
+ public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String userId) throws Exception {
|
|
49
|
+ List<TaMachinery> machineryList = taDeviceJobService.getMachineryListByUser(userId);
|
|
50
|
+ return ResponseBean.success(machineryList);
|
|
51
|
+ }
|
50
|
52
|
|
51
|
53
|
/**
|
52
|
54
|
* 设备作业列表
|
|
@@ -83,9 +85,9 @@ public class TaDeviceJobController extends BaseController {
|
83
|
85
|
public ResponseBean statis(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
84
|
86
|
@ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
85
|
87
|
@ApiParam("合作社名称") @RequestParam(value = "orgName", required = false) String orgName,
|
86
|
|
- @ApiParam("合作社名称") @RequestParam(value = "machineryName", required = false) String machineryName,
|
87
|
|
- @ApiParam("合作社名称") @RequestParam(value = "userName", required = false) String userName,
|
88
|
|
- @ApiParam("合作社名称") @RequestParam(value = "phone", required = false) String phone,
|
|
88
|
+ @ApiParam("农机名称") @RequestParam(value = "machineryName", required = false) String machineryName,
|
|
89
|
+ @ApiParam("人员名称") @RequestParam(value = "userName", required = false) String userName,
|
|
90
|
+ @ApiParam("人员手机") @RequestParam(value = "phone", required = false) String phone,
|
89
|
91
|
@ApiParam("设备分类") @RequestParam(value = "deviceKind", required = false) String deviceKind,
|
90
|
92
|
@ApiParam("设备编号") @RequestParam(value = "deviceNo", required = false) String deviceNo,
|
91
|
93
|
@ApiParam(value = "开始时间", example = "2022-10-01") @RequestParam(value = "startDate") String startDate,
|
|
@@ -115,13 +117,16 @@ public class TaDeviceJobController extends BaseController {
|
115
|
117
|
@ApiOperation("设备作业统计-导出")
|
116
|
118
|
@GetMapping("/device-job/by-org/export")
|
117
|
119
|
public ResponseBean export(@ApiParam("合作社名称") @RequestParam(value = "orgName", required = false) String orgName,
|
|
120
|
+ @ApiParam("农机名称") @RequestParam(value = "machineryName", required = false) String machineryName,
|
|
121
|
+ @ApiParam("人员名称") @RequestParam(value = "userName", required = false) String userName,
|
|
122
|
+ @ApiParam("人员手机") @RequestParam(value = "phone", required = false) String phone,
|
118
|
123
|
@ApiParam("设备分类") @RequestParam(value = "deviceKind", required = false) String deviceKind,
|
119
|
124
|
@ApiParam("设备编号") @RequestParam(value = "deviceNo", required = false) String deviceNo,
|
120
|
125
|
@ApiParam(value = "开始时间", example = "2022-10-01") @RequestParam(value = "startDate") String startDate,
|
121
|
126
|
@ApiParam(value = "结束时间", example = "2022-10-31") @RequestParam(value = "endDate") String endDate,
|
122
|
127
|
HttpServletResponse response) throws Exception {
|
123
|
128
|
|
124
|
|
- List<TaDeviceJob> list = taDeviceJobService.listOrgBy(orgName, deviceKind, deviceNo, startDate, endDate);
|
|
129
|
+ List<TaDeviceJob> list = taDeviceJobService.listOrgBy(orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone);
|
125
|
130
|
|
126
|
131
|
Double total = 0.0;
|
127
|
132
|
if (list != null || list.size() > 0) {
|