From 740f379847e21878429b7cb48bebfa9d2b72ab94 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 20 九月 2023 11:38:57 +0800
Subject: [PATCH] 设备健康列表
---
ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java b/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
index 1f3aab1..4ba7c26 100644
--- a/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
+++ b/ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
@@ -61,6 +61,7 @@
@ApiOperation("鏍规嵁鏉冮檺鑾峰彇璁惧鍒楄〃")
@GetMapping("getEquipmentListByUser")
public Results getEquipmentListByUser(){
+ //鏌ヨ鐢ㄦ埛ID
String usersId = SecurityUtils.getUserId();
//鏍规嵁userId鏌ヨ閮ㄩ棬Id
SysUser sysUser = sysUserService.selectUserById(usersId);
@@ -77,9 +78,6 @@
return Results.succeed("娌℃湁璁惧淇℃伅");
}
Map<String, Object> mapResult = (Map<String, Object>) JSON.parse((String) result);
- JSONArray jsonArray = new JSONArray();
- //ancestors瀛楁鏈�闀跨殑鏁版嵁
- String longest = "";
//绛夌骇
int count0 = 0,count1 = 0,count2 = 0;
//瑁呮暟鎹�
@@ -91,10 +89,6 @@
String equipNumber = (String) listResult.get(i).get("EquipNumber");
if(equipNumber!=null){
for (int j = 0; j < list.size(); j++) {
- String ancestors = list.get(j).getAncestors();
- if (ancestors.length() > longest.length()) {
- longest = ancestors;
- }
String wellId = list.get(j).getWellId();
if(wellId!=null){
if(wellId.equals(equipNumber)){
@@ -156,15 +150,6 @@
String thisAncestors = healthVo.getAncestors();
List<String> ancestorsA = Arrays.asList(thisAncestors.split(","));
ancestorsA.removeAll(userParentId);
-// for (int k = 0; k < userParentId.size(); k++) {
-// String a = userParentId.get(k);
-// for (int l = 0; l < ancestorsA.size(); l++) {
-// String b = ancestorsA.get(l);
-// if(a.equals(b)){
-// ancestorsA.remove(b);
-// }
-// }
-// }
for (int k = 0; k < ancestorsA.size(); k++) {
Long ancestor = Long.parseLong(ancestorsA.get(k));
//寰幆鏈�缁圠ist鍒ゆ柇鏄惁鏈夎鏁版嵁鐨勭埗绾э紝濡傛灉娌℃湁灏卞~杩涘幓
--
Gitblit v1.9.3