| | |
| | | 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"); |
| | |
| | | } |
| | | } |
| | | } |
| | | 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")); |
| | |
| | | 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"); |
| | |
| | | } |
| | | j.put("data",listResult); |
| | | }else { |
| | | j.put("data","[]"); |
| | | j.put("data",new ArrayList<>()); |
| | | } |
| | | }else{ |
| | | //错误提示 |