From bb3652e04f5a66172d0a6cd6ec2535b82e7ca2ed Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Tue, 04 Jun 2024 17:19:51 +0800
Subject: [PATCH] 修改航线查询、添加方法,图斑查询方法。

---
 src/main/java/com/dji/sample/patches/controller/PatchesController.java |   33 ++++++++++++++++++++++++++-------
 1 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/controller/PatchesController.java b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
index e2a21fe..bd2103f 100644
--- a/src/main/java/com/dji/sample/patches/controller/PatchesController.java
+++ b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
@@ -11,6 +11,7 @@
 import com.dji.sample.patches.service.GetPatchesService;
 import com.dji.sample.patches.service.ShpToDataSourceService;
 import com.dji.sample.patches.service.impl.ShpToDataSourceServiceImpl;
+import com.dji.sample.patches.utils.TimerUtil;
 import com.dji.sample.territory.service.impl.TbDkjbxxServiceImpl;
 import com.dji.sample.wayline.model.entity.WaylineFileEntity;
 import com.dji.sample.wayline.service.IWaylineFileService;
@@ -38,6 +39,8 @@
     private IWaylineFileService waylineFileService;
     @Autowired
     private TbDkjbxxServiceImpl tbDkjbxxService;
+    @Autowired
+    private TimerUtil timerUtil;
 
     /**
      * 根据workspaceId获取图斑列表信息
@@ -51,12 +54,22 @@
     @SysLogAnnotation(operModul = "图斑", operType = "查询", operDesc = "查询图斑的全部信息")
     public ResponseResult<PaginationData<LotInfo>> page(@RequestParam Integer page,
                                                         @RequestParam(name = "page_size", defaultValue = "10") Integer pageSize,
-                                                        @RequestParam String workspaceId) {
+                                                        @RequestParam String workspaceId,
+                                                        @RequestParam(name = "dkbh", defaultValue = "") String dkbh,
+                                                        @RequestParam(name = "isPlan", required = false) Integer isPlan,
+                                                        @RequestParam(name = "xzqdm", defaultValue = "") String xzqdm,
+                                                        @RequestParam(name="bsm",defaultValue = "")String bsm
+    ) {
         //调用service分页查询
         PatchesParam param = PatchesParam.builder()
                 .page(page)
                 .workspaceId(workspaceId)
-                .pageSize(pageSize).build();
+                .pageSize(pageSize)
+                .dkbh(dkbh)
+                .isPlan(isPlan)
+                .xzqdm(xzqdm)
+                .bsm(bsm)
+                .build();
         PaginationData<LotInfo> data = getPatchesService.limitGet(param);
         return ResponseResult.success(data);
     }
@@ -71,6 +84,17 @@
     public ResponseResult del() {
         getPatchesService.delPatches();
         return ResponseResult.success();
+    }
+
+    @GetMapping("/useMyTask")
+    public ResponseResult useMyTask() throws Exception {
+        try {
+//            timerUtil.myTask();
+            timerUtil.myTask2();
+            return ResponseResult.success();
+        } catch (Exception e) {
+            throw new RuntimeException("db存储发送出现异常");
+        }
     }
 
     /**
@@ -134,10 +158,5 @@
             throw new RuntimeException(e);
         }
         return ResponseResult.success(infoMap);
-    }
-    @PostMapping("/test")
-    public void test(){
-        List<LotInfo> list=getPatchesService.listLotinfo();
-        tbDkjbxxService.insert(list);
     }
 }

--
Gitblit v1.9.3