| | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('sy:syCar:GetPartsAlertLeve')") |
| | | @ApiOperation("获取点") |
| | | @ApiOperation("获取ID获取点位") |
| | | @GetMapping("GetPartsAlertLevel") |
| | | public Results GetPartsAlertLevel(Integer id){ |
| | | List<SysConfig> sysConfigs = configService.getAccPwd(); |
| | |
| | | Map<String, Object> map = EquipmentsHealthClient.GetPartsAlertLeve(GetPartsAlertLeveUrl, token,id); |
| | | return Results.succeed(map); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('sy:syCar:GetEquipmentAlertInfo')") |
| | | @ApiOperation("根据ID获取详细说明") |
| | | @GetMapping("GetEquipmentAlertInfo") |
| | | public Results GetEquipmentAlertInfo(Integer id){ |
| | | List<SysConfig> sysConfigs = configService.getAccPwd(); |
| | | String account = null,password = null,url = null; |
| | | for (int i = 0; i < sysConfigs.size(); i++) { |
| | | SysConfig sysConfig = sysConfigs.get(i); |
| | | if("eqHealthUrl".equals(sysConfig.getConfigKey())){ |
| | | url = sysConfig.getConfigValue(); |
| | | } |
| | | if("eqHealthAccount".equals(sysConfig.getConfigKey())){ |
| | | account = sysConfig.getConfigValue(); |
| | | } |
| | | if("eqHealthPassword".equals(sysConfig.getConfigKey())){ |
| | | password = sysConfig.getConfigValue(); |
| | | } |
| | | } |
| | | String tokenUrl = url+"/RoadFlowApi/Home/ValidLogin"; |
| | | Map<String, Object> loginResult = EquipmentsHealthClient.getToken(tokenUrl, account, password); |
| | | String token = (String) ((Map<String, Object>) ((Map<String, Object>) loginResult.get("data")).get("data")).get("token"); |
| | | String GetEquipmentAlertInfoUrl = url + "/RoadFlowApi/ZX/MeasureData/GetEquipmentAlertInfo"; |
| | | Map<String, Object> map = EquipmentsHealthClient.GetEquipmentAlertInfo(GetEquipmentAlertInfoUrl, token,id); |
| | | return Results.succeed(map); |
| | | } |
| | | } |