From d4c8d478007e72916a92516c42338ed0d9a84f58 Mon Sep 17 00:00:00 2001 From: aijinhui <aijinhui> Date: 星期四, 02 十一月 2023 17:30:30 +0800 Subject: [PATCH] 清淤 --- ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 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 e6545e8..340b055 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 @@ -14,6 +14,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysUserService; +import com.ruoyi.utils.pagehelper.JpaPageInfo; import com.ruoyi.utils.result.Results; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -80,6 +81,7 @@ List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellList(ardAlarmpointsWell); return success(list); } + /** * 瀵煎嚭浜曠鐞嗗垪琛� */ @@ -127,7 +129,7 @@ @ApiOperation("淇敼浜�") public AjaxResult edit(@RequestBody ArdAlarmpointsWell ardAlarmpointsWell) { try { - return toAjax(ardAlarmpointsWellService.updateArdAlarmpointsWell(ardAlarmpointsWell)); + return toAjax(ardAlarmpointsWellService.updateArdAlarmpointsWell(ardAlarmpointsWell)); } catch (Exception e) { return AjaxResult.error(e.getMessage()); } @@ -150,9 +152,9 @@ @ApiOperation("瀵煎叆浜�") public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { ExcelUtil<ArdAlarmpointsWell> util = new ExcelUtil<ArdAlarmpointsWell>(ArdAlarmpointsWell.class); - List<ArdAlarmpointsWell> userList = util.importExcel(file.getInputStream()); + List<ArdAlarmpointsWell> wellList = util.importExcel(file.getInputStream()); String operName = getUsername(); - String message = ardAlarmpointsWellService.importUser(userList, updateSupport, operName); + String message = ardAlarmpointsWellService.importWell(wellList, updateSupport, operName); return success(message); } @@ -189,7 +191,7 @@ @PostMapping("/wellList") @ApiOperation("鏌ヨ鏉冮檺涓嬫墍鏈夊叴瓒g偣") - public Results wellList(){ + public Results wellList() { String usersId = SecurityUtils.getUserId(); //鏍规嵁userId鏌ヨ閮ㄩ棬Id SysUser sysUser = sysUserService.selectUserById(usersId); @@ -202,7 +204,7 @@ @PostMapping("/conditionList") @ApiOperation("鏌ヨ骞剁瓫閫夋潈闄愪笅鎵�鏈夊叴瓒g偣") - public Results conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam){ + public Results conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam) { String usersId = SecurityUtils.getUserId(); //鏍规嵁userId鏌ヨ閮ㄩ棬Id SysUser sysUser = sysUserService.selectUserById(usersId); @@ -212,13 +214,16 @@ //鏍规嵁deptId鑾峰彇瀵瑰簲鍏磋叮鐐规暟鎹� return Results.succeed(ardAlarmpointsWellService.conditionList(ardAlarmpointsWellParam)); } + @PostMapping("/getNearbyWells") @ApiOperation("鏌ヨ闄勮繎鐨勬墍鏈変簳") - @ApiOperationSupport(includeParameters = {"longitude","latitude","deptId","pageNum","pageSize"}) - public TableDataInfo getNearbyWells(ArdAlarmpointsWell ardAlarmpointsWell){ - startPage(); - List<ArdAlarmpointsWell> nearbyWellList = ardAlarmpointsWellService.getNearbyWellList(ardAlarmpointsWell,1000); - return getDataTable(nearbyWellList); + public AjaxResult getNearbyWells(Double longitude,Double latitude, Long deptId, Integer pageNum, Integer pageSize) { + JpaPageInfo jpaPageInfo = new JpaPageInfo(); + jpaPageInfo.setPageNum(pageNum); + jpaPageInfo.setPageSize(pageSize); + List<ArdAlarmpointsWell> nearbyWellList = ardAlarmpointsWellService.getNearbyWellList(longitude,latitude, deptId, 1000); + jpaPageInfo.doPage(nearbyWellList); + return AjaxResult.success(jpaPageInfo); } } -- Gitblit v1.9.3