From 9a5883db73ff33bdec2aa026eb0229109762474f Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 13 九月 2023 16:08:01 +0800
Subject: [PATCH] 设备健康列表
---
ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 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 faf2331..b8c777e 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
@@ -69,7 +69,7 @@
}
@PreAuthorize("@ss.hasPermi('sy:syCar:getMeasureByEquipName')")
- @ApiOperation("鑾峰彇鏌愪釜娌逛簳娴嬬偣鍒楄〃")
+ @ApiOperation("鏍规嵁name鑾峰彇鏌愪釜娌逛簳娴嬬偣鍒楄〃")
@GetMapping("getMeasureByEquipName")
public Results getMeasureByEquipName(String equipNumber){
String url = configService.getHealth();
@@ -271,12 +271,26 @@
}
@PreAuthorize("@ss.hasPermi('sy:syCar:getMeasureByEquipKey')")
- @ApiOperation("鑾峰彇鏌愪釜娌逛簳娴嬬偣鍒楄〃")
+ @ApiOperation("鏍规嵁key鑾峰彇鏌愪釜娌逛簳娴嬬偣鍒楄〃")
@GetMapping("getMeasureByEquipKey")
- public Results getMeasureByEquipKey(GetFMTrendParam getFMTrendParam){
+ public Results getMeasureByEquipKey(String equipKey){
+ JSONObject j = new JSONObject();
String url = configService.getHealth();
-
- return Results.succeed();
+ //鑾峰彇璁惧鐨勬祴鐐瑰垪琛�
+ Map<String, Object> hashMap = new HashMap<String, Object>();
+ hashMap.put("EquipKey", equipKey);
+ String eResult = ARDSoapUtil.postSoapResult(url, "GetMeasureByEquipKey", hashMap);
+ if ("".equals(eResult)) {
+ //杩斿洖缁撴灉涓虹┖
+ return Results.succeed("娌℃湁娴嬬偣淇℃伅");
+ }
+ Map<String, Object> map1 = (Map<String, Object>) JSON.parse((String) eResult);
+ if ((int) map1.get("code") == 200) {
+ j.put("code", map1.get("code"));
+ List<Map<String, Object>> list = (List<Map<String, Object>>) JSON.parse((String) map1.get("resdata"));
+ j.put("listResult", list);
+ }
+ return Results.succeed(j);
}
@PreAuthorize("@ss.hasPermi('sy:syCar:GetPartsAlertLeve')")
--
Gitblit v1.9.3