|
@ -1,5 +1,6 @@
|
|
package com.yihu.iot.controller.monitorPlatform;
|
|
package com.yihu.iot.controller.monitorPlatform;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.yihu.iot.service.monitorPlatform.MonitorPlatformService;
|
|
import com.yihu.iot.service.monitorPlatform.MonitorPlatformService;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
@ -52,12 +53,18 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
|
|
|
|
@RequestMapping(value = "/smartDeviceDistribution",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/smartDeviceDistribution",method = RequestMethod.GET)
|
|
@ApiOperation("智能设备发放")
|
|
@ApiOperation("智能设备发放")
|
|
public MixEnvelop smartDeviceDistribution(@ApiParam(name="type",value="设备类型")
|
|
|
|
@RequestParam(value="type",required = false) String type,
|
|
|
|
@ApiParam(name="name",value="产品名称")
|
|
|
|
@RequestParam(value="name",required = false) String name){
|
|
|
|
|
|
public MixEnvelop smartDeviceDistribution(@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 MixEnvelop.getSuccess("查询成功",monitorPlatformService.smartDeviceDistribution(type,name));
|
|
|
|
|
|
return MixEnvelop.getSuccess("查询成功",monitorPlatformService.smartDeviceDistribution(startTime,endTime,deviceType,area,hospital));
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return MixEnvelop.getError("查询失败");
|
|
return MixEnvelop.getError("查询失败");
|
|
@ -159,8 +166,8 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
if(pageSize==null){
|
|
if(pageSize==null){
|
|
pageSize = 10;
|
|
pageSize = 10;
|
|
}
|
|
}
|
|
|
|
|
|
return MixEnvelop.getSuccess("查询成功",monitorPlatformService.deviceUseData(page,pageSize,deviceSn));
|
|
|
|
|
|
JSONObject jsonObject = monitorPlatformService.deviceUseData(page,pageSize,deviceSn);
|
|
|
|
return MixEnvelop.getSuccess("查询成功",jsonObject.getJSONArray("list"),jsonObject.getInteger("total"));
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return MixEnvelop.getError("查询失败");
|
|
return MixEnvelop.getError("查询失败");
|
|
@ -197,7 +204,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
|
|
if(pageSize==null){
|
|
if(pageSize==null){
|
|
pageSize = 10;
|
|
pageSize = 10;
|
|
}
|
|
}
|
|
return MixEnvelop.getSuccess("查询成功",monitorPlatformService.deviceOverhaulList(page,pageSize,deviceSn));
|
|
|
|
|
|
return MixEnvelop.getSuccess("查询成功",monitorPlatformService.deviceOverhaulList(page,pageSize,deviceSn),monitorPlatformService.deviceOverhaulListTotal(deviceSn));
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return MixEnvelop.getError("查询失败");
|
|
return MixEnvelop.getError("查询失败");
|