兵兵 před 4 roky
rodič
revize
40adc51f1e

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

@ -740,8 +740,8 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
    @GetMapping(value="/getEquipmentStatistics")
    @ApiOperation("设备库存、使用数、总备案、失联率、物联率")
    public Envelop getEquipmentStatistics(@RequestParam(value = "deviceType",required = false)
                                          @ApiParam(name="deviceType",value = "设备类型,1血糖仪,2血压计,5健康小屋",required = false) String deviceType,
    public Envelop getEquipmentStatistics(@RequestParam(value = "deviceType",required = true,defaultValue = "1,2,5")
                                          @ApiParam(name="deviceType",value = "设备类型,1血糖仪,2血压计,5健康小屋",required = true) String deviceType,
                                          @RequestParam(value="deviceName",required = false,defaultValue = "")
                                          @ApiParam(name="deviceName",value = "设备名称(品牌)",required = false) String deviceName,
                                          @RequestParam(value = "showLevel",defaultValue = "0")
@ -777,8 +777,8 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
            @RequestParam(value="startTime",required = false) String startTime,
            @ApiParam(name="endTime",value="结束时间YYYY-MM-DD",defaultValue = "")
            @RequestParam(value="endTime",required = false) String endTime,
            @ApiParam(name="deviceType",value="设备类型",defaultValue = "")
            @RequestParam(value="deviceType",required = false) String deviceType,
            @ApiParam(name="deviceType",value="设备类型",required = true)
            @RequestParam(value="deviceType",required = true,defaultValue = "1,2,5") String deviceType,
            @ApiParam(name="area",value="地区",defaultValue = "")
            @RequestParam(value="area",required = false) String area,
            @ApiParam(name="hospital",value="机构",defaultValue = "")
@ -797,8 +797,8 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
    @GetMapping(value="/getBrandsDetail")
    @ApiOperation("获取设备品牌列表")
    public Envelop getBrandsDetail(
            @ApiParam(name="deviceType",value ="设备类型",required = false)
            @RequestParam(value="deviceType",required = false)String deviceType){
            @ApiParam(name="deviceType",value ="设备类型",required = true)
            @RequestParam(value="deviceType",required = true,defaultValue = "1,2,5")String deviceType){
        return success(monitorPlatformService.getBrandsDetail(deviceType));
    }

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

@ -1193,7 +1193,7 @@ public class MonitorPlatformService  {
                result.put("lostContact",lostContact);
            }
            //deviceType包含小屋且设备名称为空||deviceType包含小屋且设备名称为健康小屋。
          if ((deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isBlank(deviceName))||(deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)&&"健康小屋".equals(deviceName))){
          if ((deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceType))||(deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)&&"健康小屋".equals(deviceName))){
                String sql = "select COUNT(*) from xmiot.iot_equipmet_detail";
                Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
                JSONObject tmp = new JSONObject();
@ -1302,7 +1302,7 @@ public class MonitorPlatformService  {
            sql.append(sqlCondition);
            total=jdbcTemplate.queryForObject(sql.toString(),Integer.class);
        }
        if (deviceType.contains("5")){
        if ((org.apache.commons.lang3.StringUtils.isNoneBlank(deviceType)&&deviceType.contains("5"))||org.apache.commons.lang3.StringUtils.isBlank(deviceType)){
            String sqll = "select COUNT(*) from xmiot.iot_equipmet_detail";
            Integer count = jdbcTemplate.queryForObject(sqll,Integer.class);
            result.put("totalAll",grantCount+count);