From 7019f217c9b986a465a8f3f82d0df8d9a9c3d6e1 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 28 二月 2024 12:03:18 +0800
Subject: [PATCH] 兴趣点
---
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java | 16 ++++++++--------
ard-work/src/main/java/com/ruoyi/alarmpoints/well/domain/ArdAlarmpointsWellParam.java | 10 ++--------
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 7 +++----
ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java | 2 +-
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java | 16 ++++++++--------
ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java | 7 +------
6 files changed, 23 insertions(+), 35 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 8a8c4ba..df2bd20 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
@@ -4,8 +4,6 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellParam;
import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService;
@@ -22,9 +20,6 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.dao.DuplicateKeyException;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -209,7 +204,7 @@
}
@PostMapping("/conditionList")
- @ApiOperation("鏌ヨ骞剁瓫閫夋潈闄愪笅鎵�鏈夊叴瓒g偣")
+ @ApiOperation("鏌ョ湅閮ㄩ棬涓嬬瓫閫夋潯浠剁殑鍏磋叮鐐�")
public Results conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam) {
String usersId = SecurityUtils.getUserId();
//鏍规嵁userId鏌ヨ閮ㄩ棬Id
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/domain/ArdAlarmpointsWellParam.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/domain/ArdAlarmpointsWellParam.java
index 0cb5788..7a265fb 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/domain/ArdAlarmpointsWellParam.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/domain/ArdAlarmpointsWellParam.java
@@ -1,13 +1,9 @@
package com.ruoyi.alarmpoints.well.domain;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
-import java.util.Date;
import java.util.List;
+
/**
* 浜曠鐞嗗璞� ard_alarmpoints_well
@@ -53,12 +49,10 @@
/** 杩愯鐘舵�� */
private String runStatus;
- @TableField(exist = false)
private List<Long> deptList;
- @TableField(exist = false)
private Integer pageNum = 1;
- @TableField(exist = false)
+
private Integer pageSize = 10;
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
index b2e992b..a86c693 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
@@ -105,6 +105,6 @@
ArdAlarmpointsWell getWellDataByPatrolplanIdAndPosition(@Param("patrolplanId") String patrolplanId,@Param("longitude") Double longitude,@Param("latitude") Double latitude);
ArdAlarmpointsWell getWellById(String id);
- List<ArdAlarmpointsWell> conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam);
+ List<ArdAlarmpointsWell> conditionList(@Param("wellId") String wellId,@Param("deptList") List<Long> deptList);
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
index 62c34fe..71a3dd9 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
@@ -11,15 +11,15 @@
/**
* 浜曠鐞哠ervice鎺ュ彛
- *
+ *
* @author 鍒樿嫃涔�
* @date 2023-03-07
*/
-public interface IArdAlarmpointsWellService
+public interface IArdAlarmpointsWellService
{
/**
* 鏌ヨ浜曠鐞�
- *
+ *
* @param id 浜曠鐞嗕富閿�
* @return 浜曠鐞�
*/
@@ -33,7 +33,7 @@
public ArdAlarmpointsWell selectArdAlarmpointsWellByWellId(String wellId);
/**
* 鏌ヨ浜曠鐞嗗垪琛�
- *
+ *
* @param ardAlarmpointsWell 浜曠鐞�
* @return 浜曠鐞嗛泦鍚�
*/
@@ -49,7 +49,7 @@
/**
* 鏂板浜曠鐞�
- *
+ *
* @param ardAlarmpointsWell 浜曠鐞�
* @return 缁撴灉
*/
@@ -57,7 +57,7 @@
/**
* 淇敼浜曠鐞�
- *
+ *
* @param ardAlarmpointsWell 浜曠鐞�
* @return 缁撴灉
*/
@@ -71,7 +71,7 @@
public int updateArdAlarmpointsWellByWellId(ArdAlarmpointsWell ardAlarmpointsWell);
/**
* 鎵归噺鍒犻櫎浜曠鐞�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑浜曠鐞嗕富閿泦鍚�
* @return 缁撴灉
*/
@@ -79,7 +79,7 @@
/**
* 鍒犻櫎浜曠鐞嗕俊鎭�
- *
+ *
* @param id 浜曠鐞嗕富閿�
* @return 缁撴灉
*/
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
index 00fefb1..2f1e53f 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
@@ -292,14 +292,14 @@
Integer pageNum = ardAlarmpointsWellParam.getPageNum();
Integer pageSize = ardAlarmpointsWellParam.getPageSize();
PageHelper.startPage(pageNum, pageSize);
-// QueryWrapper<ArdAlarmpointsWell> queryWrapper = new QueryWrapper<>();
-// queryWrapper.select("id","altitude","metering_station","displacement_mode","latitude","dehydration_station",
-// "well_type","production_date","well_id","transfer_station","oil_production","run_status","longitude",
-// "installed_load","dept_id","user_id","surrounding_environment","well_number","well_block")
-// .eq(!StringUtils.isBlank(ardAlarmpointsWellParam.getWellId()), "well_id", ardAlarmpointsWellParam.getWellId())
-// .in("dept_id", ardAlarmpointsWellParam.getDeptList());
-// List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.selectList(queryWrapper);
- List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.conditionList(ardAlarmpointsWellParam);
+ QueryWrapper<ArdAlarmpointsWell> queryWrapper = new QueryWrapper<>();
+ queryWrapper.select("id","altitude","metering_station","displacement_mode","latitude","dehydration_station",
+ "well_type","production_date","well_id","transfer_station","oil_production","run_status","longitude",
+ "installed_load","dept_id","user_id","surrounding_environment","well_number","well_block")
+ .eq(!StringUtils.isBlank(ardAlarmpointsWellParam.getWellId()), "well_id", ardAlarmpointsWellParam.getWellId())
+ .in("dept_id", ardAlarmpointsWellParam.getDeptList());
+ List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.selectList(queryWrapper);
+// List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.conditionList(ardAlarmpointsWellParam.getWellId(),ardAlarmpointsWellParam.getDeptList());
return new PageInfo<>(list);
}
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
index 5d4b794..1efe543 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -300,13 +300,12 @@
</select>
- <select id="conditionList" parameterType="List"
- resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo">
+ <select id="conditionList" resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell">
Select * from ard_alarmpoints_well well
where WHERE well.well_id = #{wellId}
and well.dept_id in
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
+ <foreach item="deptList" collection="deptList" open="(" separator="," close=")">
+ #{deptList}
</foreach>
</select>
</mapper>
--
Gitblit v1.9.3