aijinhui
2023-09-21 0cbee75268be328b0ac969360969c464217a94a2
ard-work/src/main/java/com/ruoyi/health/controller/HealthController.java
@@ -296,7 +296,7 @@
    @PreAuthorize("@ss.hasPermi('sy:syCar:getTrend')")
    @ApiOperation("获取某油井一段时间的测量趋势")
    @GetMapping("getTrend")
    public Results getTrend(GetTrendParam getTrendParam){
    public JSONObject getTrend(GetTrendParam getTrendParam){
        String url = configService.getHealth();
        Map<String , Object> map = new HashMap<String , Object>();
        map.put("MeasureKey", getTrendParam.getMeasureKey());
@@ -305,12 +305,14 @@
        JSONObject j = new JSONObject();
        String result = ARDSoapUtil.postSoapResult(url ,"GetTrend" ,  map);
        if ("".equals(result)){
            return Results.succeed("没有测点信息");
            j.put("msg", "没有测点信息");
            j.put("code", 500);
        }
        Map<String,Object> mapResult = (Map<String, Object>) JSON.parse((String)result);
        if ( (int) mapResult.get("code") == 200){
            j.put("code", mapResult.get("code"));
            List<Map<String , Object>> listResult = (List<Map<String, Object>>)JSON.parse((String)mapResult.get("resdata"));
            if(listResult.size()>0){
            for(int i = 0 ; i<listResult.size(); i++){
                Map<String , Object> mapTemp = listResult.get(i);
                int id = (Integer)mapTemp.get("id");   //主键id
@@ -323,11 +325,14 @@
                j.put(id +"" , mapTemp);
            }
        }else{
                j.put("msg","无数据");
            }
        }else{
            //错误提示
            j.put("errmsg", mapResult.get("errmsg"));
            j.put("msg", mapResult.get("errmsg"));
            j.put("code", mapResult.get("code"));
        }
        return Results.succeed(j);
        return j;
    }
    @PreAuthorize("@ss.hasPermi('sy:syCar:getWaveDataByIndex')")