From 8dcb6801a19f08af6c7baaf6a1b9105c8b4dc58b Mon Sep 17 00:00:00 2001
From: liusuyi <13324259@qq.com>
Date: 星期三, 31 五月 2023 21:31:38 +0800
Subject: [PATCH] 增加手动巡检

---
 ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java |   53 +++++++++++++++++++++++++++++++++--------------------
 1 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
index 78e357e..4ed36a0 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
@@ -27,19 +27,21 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 浜曠鐞咰ontroller
- * 
+ *
  * @author 鍒樿嫃涔�
  * @date 2023-03-07
  */
 @RestController
 @RequestMapping("/alarmpoints/well")
 @Api(tags = "浜曠鐞嗘帴鍙�")
-public class ArdAlarmpointsWellController extends BaseController
-{
+public class ArdAlarmpointsWellController extends BaseController {
     @Resource
     private IArdAlarmpointsWellService ardAlarmpointsWellService;
 
@@ -49,8 +51,7 @@
     @PreAuthorize("@ss.hasPermi('alarmpoints:well:list')")
     @GetMapping("/list")
     @ApiOperation("鏌ヨ浜曞垪琛�")
-    public TableDataInfo list(ArdAlarmpointsWell ardAlarmpointsWell)
-    {
+    public TableDataInfo list(ArdAlarmpointsWell ardAlarmpointsWell) {
         startPage();
         List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellList(ardAlarmpointsWell);
         return getDataTable(list);
@@ -63,8 +64,7 @@
     @Log(title = "浜曠鐞�", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @ApiOperation("瀵煎嚭浜曞垪琛�")
-    public void export(HttpServletResponse response, ArdAlarmpointsWell ardAlarmpointsWell)
-    {
+    public void export(HttpServletResponse response, ArdAlarmpointsWell ardAlarmpointsWell) {
         List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellList(ardAlarmpointsWell);
         ExcelUtil<ArdAlarmpointsWell> util = new ExcelUtil<ArdAlarmpointsWell>(ArdAlarmpointsWell.class);
         util.exportExcel(response, list, "浜曠鐞嗘暟鎹�");
@@ -76,8 +76,7 @@
     @PreAuthorize("@ss.hasPermi('alarmpoints:well:query')")
     @GetMapping(value = "/{id}")
     @ApiOperation("鑾峰彇浜曡缁嗕俊鎭�")
-    public AjaxResult getInfo(@PathVariable("id") String id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") String id) {
         return success(ardAlarmpointsWellService.selectArdAlarmpointsWellById(id));
     }
 
@@ -88,8 +87,7 @@
     @Log(title = "浜曠鐞�", businessType = BusinessType.INSERT)
     @PostMapping
     @ApiOperation("鏂板浜�")
-    public AjaxResult add(@RequestBody ArdAlarmpointsWell ardAlarmpointsWell)
-    {
+    public AjaxResult add(@RequestBody ArdAlarmpointsWell ardAlarmpointsWell) {
         return toAjax(ardAlarmpointsWellService.insertArdAlarmpointsWell(ardAlarmpointsWell));
     }
 
@@ -100,8 +98,7 @@
     @Log(title = "浜曠鐞�", businessType = BusinessType.UPDATE)
     @PutMapping
     @ApiOperation("淇敼浜�")
-    public AjaxResult edit(@RequestBody ArdAlarmpointsWell ardAlarmpointsWell)
-    {
+    public AjaxResult edit(@RequestBody ArdAlarmpointsWell ardAlarmpointsWell) {
         return toAjax(ardAlarmpointsWellService.updateArdAlarmpointsWell(ardAlarmpointsWell));
     }
 
@@ -110,10 +107,9 @@
      */
     @PreAuthorize("@ss.hasPermi('alarmpoints:well:remove')")
     @Log(title = "浜曠鐞�", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
+    @DeleteMapping("/{ids}")
     @ApiOperation("鍒犻櫎浜�")
-    public AjaxResult remove(@PathVariable String[] ids)
-    {
+    public AjaxResult remove(@PathVariable String[] ids) {
         return toAjax(ardAlarmpointsWellService.deleteArdAlarmpointsWellByIds(ids));
     }
 
@@ -121,19 +117,36 @@
     @PreAuthorize("@ss.hasPermi('alarmpoints:well:import')")
     @PostMapping("/importData")
     @ApiOperation("瀵煎叆浜�")
-    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
-    {
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
         ExcelUtil<ArdAlarmpointsWell> util = new ExcelUtil<ArdAlarmpointsWell>(ArdAlarmpointsWell.class);
         List<ArdAlarmpointsWell> userList = util.importExcel(file.getInputStream());
         String operName = getUsername();
         String message = ardAlarmpointsWellService.importUser(userList, updateSupport, operName);
         return success(message);
     }
+
     @PostMapping("/importTemplate")
     @ApiOperation("浜曞鍏ユā鏉�")
-    public void importTemplate(HttpServletResponse response)
-    {
+    public void importTemplate(HttpServletResponse response) {
         ExcelUtil<ArdAlarmpointsWell> util = new ExcelUtil<ArdAlarmpointsWell>(ArdAlarmpointsWell.class);
         util.importTemplateExcel(response, "浜曟暟鎹�");
     }
+
+    /**
+     * 浜曢�夐」鏁版嵁
+     */
+    @GetMapping("/options")
+    @ApiOperation("浜曢�夐」鏁版嵁")
+    public List options(ArdAlarmpointsWell ardAlarmpointsWell) {
+        List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellByWellIdLike(ardAlarmpointsWell);
+        List options = new ArrayList();
+        for (ArdAlarmpointsWell item : list) {
+            Map option = new HashMap();
+            option.put("value", item.getId());
+            option.put("label", item.getWellId());
+            option.put("description", item.getOilProduction());
+            options.add(option);
+        }
+        return options;
+    }
 }

--
Gitblit v1.9.3