From 55bfebcee6b804faaa65d41105d4333a4117aab5 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期五, 19 七月 2024 16:39:18 +0800
Subject: [PATCH] 雷达查询加入自定义权限修改提交
---
ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 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 f844901..24aa518 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
@@ -84,6 +84,7 @@
List<TreeDeptWell> treeDeptWells = new ArrayList<>();
if ((int) mapResult.get("code") == 200) {
List<Map<String, Object>> listResult = (List<Map<String, Object>>) JSON.parse((String) mapResult.get("resdata"));
+// System.out.println(String.valueOf(listResult));
//寰幆寰楀埌鏉冮檺涓嬪尮閰嶆暟鎹�
for (int i = 0; i < listResult.size(); i++) {
String equipNumber = (String) listResult.get(i).get("EquipNumber");
@@ -164,7 +165,7 @@
//濡傛灉璇ョ埗绫婚泦鍚堝湪缁撴瀯涓凡缁忓瓨鍦ㄥ苟涓斾笉鏄澶囨暟鎹氨涓嶇敤閲嶅娣诲姞浜�
Long treeId = treeDeptWells.get(l).getDeptId();
Integer id = treeDeptWells.get(l).getId();
- if(ancestor.equals(treeId)){
+ if(ancestor.equals(treeId) && id==null){
wellTrue = true;
}
}
@@ -182,13 +183,17 @@
}
}
}
- List<TreeDeptWell> tree = sysDeptService.wellTree(treeDeptWells);
- TreeSelectWellJson treeSelectWellJson = new TreeSelectWellJson();
- treeSelectWellJson.setWellList(tree);
- treeSelectWellJson.setCount0(count0);
- treeSelectWellJson.setCount1(count1);
- treeSelectWellJson.setCount2(count2);
- return Results.succeed(treeSelectWellJson);
+ if(treeDeptWells.size()>0){
+ List<TreeDeptWell> tree = sysDeptService.wellTree(treeDeptWells);
+ TreeSelectWellJson treeSelectWellJson = new TreeSelectWellJson();
+ treeSelectWellJson.setWellList(tree);
+ treeSelectWellJson.setCount0(count0);
+ treeSelectWellJson.setCount1(count1);
+ treeSelectWellJson.setCount2(count2);
+ return Results.succeed(treeSelectWellJson);
+ }else {
+ return Results.error("鏃犲尮閰嶆暟鎹�");
+ }
} else {
//閿欒鎻愮ず
return Results.error((String) mapResult.get("errmsg"));
@@ -316,7 +321,13 @@
if(listResult.size()>0){
for(int i = 0 ; i<listResult.size(); i++){
Map<String , Object> mapTemp = listResult.get(i);
- BigDecimal value = (BigDecimal)mapTemp.get("Value"); //鏁板��
+ //BigDecimal value = (BigDecimal)mapTemp.get("Value"); //鏁板��
+ BigDecimal value = null; //鏁板��
+ try{
+ value = (BigDecimal)mapTemp.get("Value");
+ }catch(Exception e){
+ value = BigDecimal.valueOf(((Number)mapTemp.get("Value")).floatValue());
+ }
String measureStr = (String)mapTemp.get("MeasureDate"); //娴嬮噺鏃堕棿
measureStr = measureStr.substring(measureStr.indexOf("(")+1, measureStr.indexOf(")",2));
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
--
Gitblit v1.9.3