From 7a3fdf9f4cbfa17a448202d657a2dbf0e711aded Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期四, 31 八月 2023 10:47:30 +0800
Subject: [PATCH] 流媒体优化
---
ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 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 e4ac74d..e091a7b 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,11 +4,19 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
+import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellParam;
import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysDeptService;
+import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.utils.result.Results;
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;
@@ -46,6 +54,12 @@
@Resource
private IArdAlarmpointsWellService ardAlarmpointsWellService;
+ @Autowired
+ private ISysUserService sysUserService;
+
+ @Autowired
+ private ISysDeptService sysDeptService;
+
/**
* 鏌ヨ浜曠鐞嗗垪琛�
*/
@@ -58,6 +72,13 @@
return getDataTable(list);
}
+ @PreAuthorize("@ss.hasPermi('alarmpoints:well:list')")
+ @GetMapping("/nonPageList")
+ @ApiOperation("鏌ヨ浜曞垪琛�-涓嶅垎椤�")
+ public AjaxResult nonPageList(ArdAlarmpointsWell ardAlarmpointsWell) {
+ List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellList(ardAlarmpointsWell);
+ return success(list);
+ }
/**
* 瀵煎嚭浜曠鐞嗗垪琛�
*/
@@ -158,4 +179,38 @@
}
return options;
}
+
+ @GetMapping("/wellById/{id}")
+ @ApiOperation("鏌ヨ鍗曟潯鍏磋叮鐐�")
+ public Results wellById(@PathVariable String id) {
+ return Results.succeed(ardAlarmpointsWellService.wellById(id));
+ }
+
+ @PostMapping("/wellList")
+ @ApiOperation("鏌ヨ鏉冮檺涓嬫墍鏈夊叴瓒g偣")
+ public Results wellList(){
+ String usersId = SecurityUtils.getUserId();
+ //鏍规嵁userId鏌ヨ閮ㄩ棬Id
+ SysUser sysUser = sysUserService.selectUserById(usersId);
+ //鏍规嵁褰撳墠deptId鎴栬�呭綋鍓嶅強鎵�灞炰笅绾х殑鎵�鏈塪eptId
+ List<Long> deptList = sysDeptService.deptIdBySub(sysUser.getDeptId());
+ //鏍规嵁deptId鑾峰彇瀵瑰簲鍏磋叮鐐规暟鎹�
+ List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.wellList(deptList);
+ return Results.succeed(list);
+ }
+
+ @PostMapping("/conditionList")
+ @ApiOperation("鏌ヨ骞剁瓫閫夋潈闄愪笅鎵�鏈夊叴瓒g偣")
+ public Results conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam){
+ String usersId = SecurityUtils.getUserId();
+ //鏍规嵁userId鏌ヨ閮ㄩ棬Id
+ SysUser sysUser = sysUserService.selectUserById(usersId);
+ //鏍规嵁褰撳墠deptId鎴栬�呭綋鍓嶅強鎵�灞炰笅绾х殑鎵�鏈塪eptId
+ List<Long> deptList = sysDeptService.deptIdBySub(sysUser.getDeptId());
+ ardAlarmpointsWellParam.setDeptList(deptList);
+ //鏍规嵁deptId鑾峰彇瀵瑰簲鍏磋叮鐐规暟鎹�
+ return Results.succeed(ardAlarmpointsWellService.conditionList(ardAlarmpointsWellParam));
+ }
+
+
}
--
Gitblit v1.9.3