From 3fe886ea35cad418e1197e7e4165b79895fb06e4 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期一, 30 十月 2023 09:23:56 +0800
Subject: [PATCH] app任务管理查询兴趣点
---
ard-work/src/main/java/com/ruoyi/app/task/service/impl/ArdAppTaskServiceImpl.java | 22 +++++++++++
ard-work/src/main/java/com/ruoyi/app/task/service/IArdAppTaskService.java | 5 ++
ard-work/src/main/java/com/ruoyi/app/task/controller/ArdAppTaskController.java | 9 ++++
ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java | 52 +++++++++++++++----------
ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java | 3 +
ard-work/src/main/java/com/ruoyi/sy/param/OilWallParam.java | 9 ++++
ard-work/src/main/java/com/ruoyi/app/task/domain/WellParam.java | 17 ++++++++
7 files changed, 95 insertions(+), 22 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/task/controller/ArdAppTaskController.java b/ard-work/src/main/java/com/ruoyi/app/task/controller/ArdAppTaskController.java
index b3a69c0..b164ead 100644
--- a/ard-work/src/main/java/com/ruoyi/app/task/controller/ArdAppTaskController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/task/controller/ArdAppTaskController.java
@@ -6,9 +6,12 @@
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSONObject;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec;
import com.ruoyi.app.task.domain.AppParam;
import com.ruoyi.app.task.domain.ArdAppTaskDetail;
+import com.ruoyi.app.task.domain.WellParam;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
@@ -171,4 +174,10 @@
return success(map);
}
+ @ApiOperation("鎸囨尌绔�-妯$硦鍒嗛〉鏌ヨ鎵�鏈夊叴瓒g偣")
+ @PostMapping(value = "/likeWell")
+ public AjaxResult likeWell(@RequestBody WellParam wellParam) {
+ return success(ardAppTaskService.likeWell(wellParam));
+ }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/task/domain/WellParam.java b/ard-work/src/main/java/com/ruoyi/app/task/domain/WellParam.java
new file mode 100644
index 0000000..00fae43
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/app/task/domain/WellParam.java
@@ -0,0 +1,17 @@
+package com.ruoyi.app.task.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+@Data
+public class WellParam {
+ private String wellId;
+ @TableField(exist = false)
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+ private Integer pageNum;
+
+ @TableField(exist = false)
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+ private Integer pageSize;
+}
diff --git a/ard-work/src/main/java/com/ruoyi/app/task/service/IArdAppTaskService.java b/ard-work/src/main/java/com/ruoyi/app/task/service/IArdAppTaskService.java
index 4893b03..d46a5e3 100644
--- a/ard-work/src/main/java/com/ruoyi/app/task/service/IArdAppTaskService.java
+++ b/ard-work/src/main/java/com/ruoyi/app/task/service/IArdAppTaskService.java
@@ -1,8 +1,11 @@
package com.ruoyi.app.task.service;
import java.util.List;
+
+import com.github.pagehelper.PageInfo;
import com.ruoyi.app.task.domain.ArdAppTask;
import com.ruoyi.app.task.domain.ArdAppTaskDetail;
+import com.ruoyi.app.task.domain.WellParam;
/**
* app浠诲姟绠$悊Service鎺ュ彛
@@ -104,4 +107,6 @@
* @return 缁撴灉
*/
public int selectUnreadArdAppTaskCount(String userId);
+
+ PageInfo likeWell(WellParam wellParam);
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/task/service/impl/ArdAppTaskServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/task/service/impl/ArdAppTaskServiceImpl.java
index d6ab9f7..f9c31ad 100644
--- a/ard-work/src/main/java/com/ruoyi/app/task/service/impl/ArdAppTaskServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/task/service/impl/ArdAppTaskServiceImpl.java
@@ -2,8 +2,13 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
+import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper;
import com.ruoyi.app.task.domain.ArdAppTaskDetail;
+import com.ruoyi.app.task.domain.WellParam;
import com.ruoyi.app.taskdetail.domain.ArdAppTaskDetailPic;
import com.ruoyi.app.taskdetail.mapper.ArdAppTaskDetailPicMapper;
import com.ruoyi.app.tasktext.domain.ArdAppTaskText;
@@ -45,6 +50,8 @@
private ArdAppTaskTextMapper ardAppTaskTextMapper;
@Resource
private SysUserMapper sysUserMapper;
+ @Resource
+ private ArdAlarmpointsWellMapper wellMapper;
/**
* 鏌ヨapp浠诲姟绠$悊
@@ -346,4 +353,19 @@
public int selectUnreadArdAppTaskCount(String userId) {
return ardAppTaskMapper.selectUnreadArdAppTaskCount(userId);
}
+
+ @Override
+ public PageInfo likeWell(WellParam wellParam) {
+ if(wellParam.getPageNum()==null || wellParam.getPageNum() == 0){
+ wellParam.setPageNum(1);
+ }
+ if(wellParam.getPageSize()==null || wellParam.getPageSize() == 0){
+ wellParam.setPageSize(10);
+ }
+ PageHelper.startPage(wellParam.getPageNum(),wellParam.getPageSize());
+ QueryWrapper<ArdAlarmpointsWell> queryWrapper = new QueryWrapper<>();
+ queryWrapper.like(wellParam.getWellId()!=null,"well_id",wellParam.getWellId());
+ List<ArdAlarmpointsWell> list = wellMapper.selectList(queryWrapper);
+ return new PageInfo(list);
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
index af41116..c254d34 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
@@ -1,5 +1,8 @@
package com.ruoyi.sy.controller;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.common.utils.uuid.UUID;
@@ -50,42 +53,50 @@
@PostMapping("/add")
@ApiOperation("娣诲姞鐢靛瓙鍥存爮")
- public Results add(@RequestBody ArdOilWall ardOilWall){
+ public AjaxResult add(@RequestBody ArdOilWall ardOilWall){
ardOilWall.setId(String.valueOf(UUID.randomUUID()));
ardOilWall.setCreateBy(SecurityUtils.getUsername());
ardOilWall.setCreateTime(new Date());
- return Results.succeed("鎴愬姛娣诲姞"+ ardOilWallService.addOilWall(ardOilWall)+"鏉℃暟鎹�");
+ return AjaxResult.success("鎴愬姛娣诲姞"+ ardOilWallService.addOilWall(ardOilWall)+"鏉℃暟鎹�");
}
@DeleteMapping("/del")
@ApiOperation("鍒犻櫎鐢靛瓙鍥存爮")
- public Results del(String id){
- return Results.succeed("鎴愬姛鍒犻櫎"+ ardOilWallService.delOilWall(id)+"鏉℃暟鎹�");
+ public AjaxResult del(String id){
+ return AjaxResult.success("鎴愬姛鍒犻櫎"+ ardOilWallService.delOilWall(id)+"鏉℃暟鎹�");
}
@PutMapping("/upd")
@ApiOperation("淇敼鐢靛瓙鍥存爮")
- public Results upd(@RequestBody ArdOilWall ardOilWall){
+ public AjaxResult upd(@RequestBody ArdOilWall ardOilWall){
ardOilWall.setUpdateBy(SecurityUtils.getUsername());
ardOilWall.setUpdateTime(new Date());
- return Results.succeed("鎴愬姛淇敼"+ ardOilWallService.updOilWall(ardOilWall)+"鏉℃暟鎹�");
+ return AjaxResult.success("鎴愬姛淇敼"+ ardOilWallService.updOilWall(ardOilWall)+"鏉℃暟鎹�");
}
@GetMapping("/one")
@ApiOperation("鏌ヨ涓�鏉$數瀛愬洿鏍�")
- public Results one(String id){
- return Results.succeed(ardOilWallService.one(id));
+ public AjaxResult one(String id){
+ return AjaxResult.success(ardOilWallService.one(id));
}
@GetMapping("/query")
@ApiOperation("鏌ヨ鎵�鏈夌數瀛愬洿鏍�")
- public Results query(OilWallParam oilWallParam){
- return Results.succeed(ardOilWallService.query(oilWallParam));
+ public AjaxResult query(OilWallParam oilWallParam){
+ if(oilWallParam.getPageNum()==null || oilWallParam.getPageNum() == 0){
+ oilWallParam.setPageNum(1);
+ }
+ if(oilWallParam.getPageSize()==null || oilWallParam.getPageSize() == 0){
+ oilWallParam.setPageSize(10);
+ }
+ PageHelper.startPage(oilWallParam.getPageNum(),oilWallParam.getPageSize());
+ List<ArdOilWall> list = ardOilWallService.query(oilWallParam);
+ return AjaxResult.success(new PageInfo<>(list));
}
@GetMapping("/wallCar")
@ApiOperation("鎵�鏈夎繘鍏ュ洿鏍忕殑杞﹁締")
- public Results wallCar(){
+ public AjaxResult wallCar(){
//鏌ヨ鎵�鏈夊凡鎸傝浇鐨勮溅杈�
List<ArdSyCar> carList = carService.all();
//鑾峰彇杞﹁締浣嶇疆
@@ -96,31 +107,30 @@
String carId = carList.get(i).getCarId();
carService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser);
}
-
- return Results.succeed();
+ return AjaxResult.success();
}
@GetMapping("/accessAll")
@ApiOperation("鏌ヨ鎵�鏈夌數瀛愬洿鏍�")
- public Results accessAll(){
- return Results.succeed(ardAccessFenceService.all());
+ public AjaxResult accessAll(){
+ return AjaxResult.success(ardAccessFenceService.all());
}
@GetMapping("/rollTime")
@ApiOperation("鏌ヨ鏃堕棿姝ラ暱")
- public Results rollTime(){
- return Results.succeed(ardAccessNumService.queryNum());
+ public AjaxResult rollTime(){
+ return AjaxResult.success(ardAccessNumService.queryNum());
}
@GetMapping("/updTime")
@ApiOperation("淇濆瓨鏃堕棿姝ラ暱")
- public Results updTime(@RequestBody ArdAccessNum ardAccessNum){
- return Results.succeed(ardAccessNumService.add(ardAccessNum));
+ public AjaxResult updTime(@RequestBody ArdAccessNum ardAccessNum){
+ return AjaxResult.success(ardAccessNumService.add(ardAccessNum));
}
// @GetMapping("/addCar")
// @ApiOperation("鎵嬪姩娣诲姞杞﹁締")
-// public Results addCar(@RequestBody ArdAccessNum ardAccessNum){
-// return Results.succeed();
+// public AjaxResult addCar(@RequestBody ArdAccessNum ardAccessNum){
+// return AjaxResult.success();
// }
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/param/OilWallParam.java b/ard-work/src/main/java/com/ruoyi/sy/param/OilWallParam.java
index 0a0207c..289f97f 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/param/OilWallParam.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/param/OilWallParam.java
@@ -1,9 +1,18 @@
package com.ruoyi.sy.param;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
@Data
public class OilWallParam {
private String name;
private String type;
+ @TableField(exist = false)
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+ private Integer pageNum;
+
+ @TableField(exist = false)
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT )
+ private Integer pageSize;
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java b/ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java
index 3e2c167..566a64f 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java
@@ -3,6 +3,7 @@
import java.util.List;
import java.util.Map;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.scheduling.domian.SchedulingParam;
import com.ruoyi.sy.domain.ArdAccessFence;
import com.ruoyi.sy.domain.ArdSyCar;
@@ -125,7 +126,7 @@
Results getCarGPSTrack(Map<String,String> map,String syURL, ArdSyUser ardSyUser);
- Results getCarGPSBycarId(String usersId,String carId,String syURL,ArdSyUser ardSyUser);
+ Results getCarGPSBycarId(String usersId, String carId, String syURL, ArdSyUser ardSyUser);
/**
* 鏍规嵁鐢ㄦ埛鍙婅溅杈嗕富閿拷韪溅杈�
--
Gitblit v1.9.3