Przeglądaj źródła

Merge branch 'dev' of yeshijie/wlyy2.0 into dev

叶仕杰 5 lat temu
rodzic
commit
96f6fab7d3

+ 99 - 2
svr/svr-iot/src/main/java/com/yihu/iot/controller/monitorPlatform/MonitorPlatformController.java

@ -231,13 +231,110 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @RequestMapping(value = "/totalRange",method = RequestMethod.GET)
    @ApiOperation("85-发放率,96使用率,86绑定率,88指导率")
    public MixEnvelop totalRange(
            @ApiParam(name="startTime",value="开始时间",defaultValue = "")
            @RequestParam(value="startTime",required = false) String startTime,
            @ApiParam(name="endTime",value="结束时间",defaultValue = "")
            @RequestParam(value="endTime",required = false) String endTime,
            @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
            @RequestParam(value="deviceType",required = false) String deviceType,
            @ApiParam(name="area",value="地区",defaultValue = "")
            @RequestParam(value="area",required = false) String area,
            @ApiParam(name="hospital",value="机构",defaultValue = "")
            @RequestParam(value="hospital",required = false) String hospital,
            @ApiParam(name="quotaCode",value="85-发放率,96使用率,86绑定率,88指导率",defaultValue = "")
            @RequestParam(value="quotaCode",required = true) String quotaCode){
        try {
            return MixEnvelop.getSuccess("查询成功",monitorPlatformService.totalRange(startTime,endTime,deviceType,area,hospital,quotaCode));
        }catch (Exception e){
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "/diseaseUseRange",method = RequestMethod.GET)
    @ApiOperation("慢病患者设备使用率")
    public MixEnvelop diseaseUseRange(
            @ApiParam(name="startTime",value="开始时间",defaultValue = "")
            @RequestParam(value="startTime",required = false) String startTime,
            @ApiParam(name="endTime",value="结束时间",defaultValue = "")
            @RequestParam(value="endTime",required = false) String endTime,
            @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
            @RequestParam(value="deviceType",required = false) String deviceType,
            @ApiParam(name="area",value="地区",defaultValue = "")
            @RequestParam(value="area",required = false) String area,
            @ApiParam(name="hospital",value="机构",defaultValue = "")
            @RequestParam(value="hospital",required = false) String hospital){
        try {
            return MixEnvelop.getSuccess("查询成功",monitorPlatformService.diseaseUseRange(startTime,endTime,deviceType,area,hospital));
        }catch (Exception e){
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "/diseaseRange",method = RequestMethod.GET)
    @ApiOperation("慢病患者设备覆盖率")
    public MixEnvelop diseaseRange(
            @ApiParam(name="startTime",value="开始时间",defaultValue = "")
            @RequestParam(value="startTime",required = false) String startTime,
            @ApiParam(name="endTime",value="结束时间",defaultValue = "")
            @RequestParam(value="endTime",required = false) String endTime,
            @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
            @RequestParam(value="deviceType",required = false) String deviceType,
            @ApiParam(name="area",value="地区",defaultValue = "")
            @RequestParam(value="area",required = false) String area,
            @ApiParam(name="hospital",value="机构",defaultValue = "")
            @RequestParam(value="hospital",required = false) String hospital){
        try {
            return MixEnvelop.getSuccess("查询成功",monitorPlatformService.diseaseRange(startTime,endTime,deviceType,area,hospital));
        }catch (Exception e){
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
    @RequestMapping(value = "/yellowOrRedRange",method = RequestMethod.GET)
    @ApiOperation("红标黄标率")
    public MixEnvelop yellowOrRedRange(
            @ApiParam(name="startTime",value="开始时间",defaultValue = "")
            @RequestParam(value="startTime",required = false) String startTime,
            @ApiParam(name="endTime",value="结束时间",defaultValue = "")
            @RequestParam(value="endTime",required = false) String endTime,
            @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
            @RequestParam(value="deviceType",required = false) String deviceType,
            @ApiParam(name="area",value="地区",defaultValue = "")
            @RequestParam(value="area",required = false) String area,
            @ApiParam(name="hospital",value="机构",defaultValue = "")
            @RequestParam(value="hospital",required = false) String hospital,
            @ApiParam(name="diseaseCondition",value="红黄标 黄1,红2",defaultValue = "1")
            @RequestParam(value="diseaseCondition",required = true) Integer diseaseCondition){
        try {
            return MixEnvelop.getSuccess("查询成功",monitorPlatformService.yellowOrRedRange(startTime,endTime,deviceType,area,hospital,diseaseCondition));
        }catch (Exception e){
            e.printStackTrace();
            return MixEnvelop.getError("查询失败");
        }
    }
    /*****************************************************************************************************/
    /*****************************************************************************************************/
    @RequestMapping(value = "/equipmentDistribution",method = RequestMethod.GET)
    @RequestMapping(value = "/equipmentDistribution",method = RequestMethod.GET)
    @ApiOperation("设备发放情况")
    @ApiOperation("设备发放情况")
    public String equipmentDistribution(){
    public String equipmentDistribution(@ApiParam(name="startTime",value="开始时间",defaultValue = "")
                                            @RequestParam(value="startTime",required = false) String startTime,
                                        @ApiParam(name="endTime",value="结束时间",defaultValue = "")
                                            @RequestParam(value="endTime",required = false) String endTime,
                                        @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
                                            @RequestParam(value="deviceType",required = false) String deviceType,
                                        @ApiParam(name="area",value="地区",defaultValue = "")
                                            @RequestParam(value="area",required = false) String area,
                                        @ApiParam(name="hospital",value="机构",defaultValue = "")
                                            @RequestParam(value="hospital",required = false) String hospital){
        try {
        try {
            return monitorPlatformService.equipmentDistribution();
            return monitorPlatformService.equipmentDistribution(startTime,endTime,deviceType, area, hospital);
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();
            return error(-1,"查询失败");
            return error(-1,"查询失败");

+ 114 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java

@ -121,9 +121,15 @@ public class MonitorPlatformService  {
    /**
    /**
     * 设备发放情况
     * 设备发放情况
     */
     */
    public String equipmentDistribution(){
    public String equipmentDistribution(String startTime,String endTime,
                                        String deviceType,String area,String hospital){
        String url = "/wlyygc/iot_monitoring/equipmentDistribution";
        String url = "/wlyygc/iot_monitoring/equipmentDistribution";
        Map<String, Object> params = new HashMap<>();
        Map<String, Object> params = new HashMap<>();
        params.put("startTime",startTime);
        params.put("endTime",endTime);
        params.put("deviceType",deviceType);
        params.put("area",area);
        params.put("hospital",hospital);
        return sendGet(url,params);
        return sendGet(url,params);
    }
    }
@ -489,6 +495,113 @@ public class MonitorPlatformService  {
        return new JSONObject();
        return new JSONObject();
    }
    }
    /**
     * 85-发放率,96使用率,86绑定率,88指导率
     * @param startTime
     * @param endTime
     * @param deviceType
     * @param area
     * @param hospital
     * @return
     */
    public JSONObject totalRange(String startTime,String endTime,
                                                 String deviceType,String area,String hospital,String quotaCode){
        String url = "/wlyygc/iot_monitoring/totalRange";
        Map<String, Object> params = new HashMap<>();
        params.put("startTime",startTime);
        params.put("endTime",endTime);
        params.put("deviceType",deviceType);
        params.put("area",area);
        params.put("hospital",hospital);
        params.put("quotaCode",quotaCode);
        String response = sendGet(url,params);
        JSONObject json = JSONObject.parseObject(response);
        if(json.getInteger("status")==200){
            return json.getJSONObject("data");
        }
        return new JSONObject();
    }
    /**
     * 慢病患者设备使用率
     * @param startTime
     * @param endTime
     * @param deviceType
     * @param area
     * @param hospital
     * @return
     */
    public JSONObject diseaseUseRange(String startTime,String endTime,
                                String deviceType,String area,String hospital){
        String url = "/wlyygc/iot_monitoring/diseaseUseRange";
        Map<String, Object> params = new HashMap<>();
        params.put("startTime",startTime);
        params.put("endTime",endTime);
        params.put("deviceType",deviceType);
        params.put("area",area);
        params.put("hospital",hospital);
        String response = sendGet(url,params);
        JSONObject json = JSONObject.parseObject(response);
        if(json.getInteger("status")==200){
            return json.getJSONObject("data");
        }
        return new JSONObject();
    }
    /**
     * 慢病患者设备覆盖率
     * @param startTime
     * @param endTime
     * @param deviceType
     * @param area
     * @param hospital
     * @return
     */
    public JSONObject diseaseRange(String startTime,String endTime,
                                     String deviceType,String area,String hospital){
        String url = "/wlyygc/iot_monitoring/diseaseRange";
        Map<String, Object> params = new HashMap<>();
        params.put("startTime",startTime);
        params.put("endTime",endTime);
        params.put("deviceType",deviceType);
        params.put("area",area);
        params.put("hospital",hospital);
        String response = sendGet(url,params);
        JSONObject json = JSONObject.parseObject(response);
        if(json.getInteger("status")==200){
            return json.getJSONObject("data");
        }
        return new JSONObject();
    }
    /**
     * 慢病患者设备覆盖率
     * @param startTime
     * @param endTime
     * @param deviceType
     * @param area
     * @param hospital
     * @return
     */
    public JSONObject yellowOrRedRange(String startTime,String endTime,
                                  String deviceType,String area,String hospital,Integer diseaseCondition){
        String url = "/wlyygc/iot_monitoring/yellowOrRedRange";
        Map<String, Object> params = new HashMap<>();
        params.put("startTime",startTime);
        params.put("endTime",endTime);
        params.put("deviceType",deviceType);
        params.put("area",area);
        params.put("hospital",hospital);
        params.put("diseaseCondition",diseaseCondition);
        String response = sendGet(url,params);
        JSONObject json = JSONObject.parseObject(response);
        if(json.getInteger("status")==200){
            return json.getJSONObject("data");
        }
        return new JSONObject();
    }
    /**
    /**
     * 预警信息警报
     * 预警信息警报
     * @param page
     * @param page