|
|
|
@ -1,10 +1,13 @@
|
|
|
|
|
package com.haiwei.web.controller.broad;
|
|
|
|
|
|
|
|
|
|
import com.haiwei.common.core.controller.BaseController;
|
|
|
|
|
import com.haiwei.common.core.domain.AjaxResult;
|
|
|
|
|
|
|
|
|
|
import static com.haiwei.common.core.domain.AjaxResult.*;
|
|
|
|
|
|
|
|
|
|
import com.haiwei.common.core.page.TableDataInfo;
|
|
|
|
|
import com.haiwei.common.utils.poi.ExcelUtil_2;
|
|
|
|
|
import com.haiwei.manage.domain.BaseDeviceType;
|
|
|
|
|
import com.haiwei.manage.domain.DeviceState;
|
|
|
|
|
import com.haiwei.manage.domain.RecordRaramData;
|
|
|
|
|
import com.haiwei.manage.domain.RecordRaramDataB;
|
|
|
|
@ -33,7 +36,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/broad")
|
|
|
|
|
public class ApiController {
|
|
|
|
|
public class ApiController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
IApiService iApiService;
|
|
|
|
@ -48,36 +51,36 @@ public class ApiController {
|
|
|
|
|
@ApiOperation(tags = {"首页", "文档归档"}, value = "客户-列表")
|
|
|
|
|
@GetMapping("/home/queryCustomer")
|
|
|
|
|
public AjaxResult queryCustomer() {
|
|
|
|
|
return success(baseCustomerService.selectBaseCustomerList(null));
|
|
|
|
|
return AjaxResult.success(baseCustomerService.selectBaseCustomerList(null));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"首页"}, value = "获取产品列表")
|
|
|
|
|
@GetMapping("/home/queryDevice")
|
|
|
|
|
public AjaxResult queryDevice() {
|
|
|
|
|
return success(baseDeviceTypeService.selectBaseDeviceTypeList(null));
|
|
|
|
|
return AjaxResult.success(baseDeviceTypeService.selectBaseDeviceTypeList(null));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "获取实时数据")
|
|
|
|
|
@GetMapping("/home/queryParam")
|
|
|
|
|
public AjaxResult queryPram(String name) {
|
|
|
|
|
return success(iApiService.queryPram(name));
|
|
|
|
|
return AjaxResult.success(iApiService.queryPram(name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "获取设备状态 msg字段")
|
|
|
|
|
@GetMapping("/home/queryDeviceState")
|
|
|
|
|
public AjaxResult queryDeviceState(String name) {
|
|
|
|
|
if (name.equals("60型一体机A") ){
|
|
|
|
|
return success(iApiService.queryDeviceState(2, 1,4,3));
|
|
|
|
|
return AjaxResult.success(iApiService.queryDeviceState(2, 1,4,3));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success(iApiService.queryDeviceState(8,7,10,9));
|
|
|
|
|
return AjaxResult.success(iApiService.queryDeviceState(8,7,10,9));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "设备介绍")
|
|
|
|
|
@GetMapping("/home/deviceInfo")
|
|
|
|
|
public AjaxResult deviceInfo(String name) {
|
|
|
|
|
return success(baseDeviceInfoService.selectBaseDeviceInfoListByName(name));
|
|
|
|
|
return AjaxResult.success(baseDeviceInfoService.selectBaseDeviceInfoListByName(name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// //查询数据
|
|
|
|
@ -89,9 +92,13 @@ public class ApiController {
|
|
|
|
|
// }
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "获取数据记录")
|
|
|
|
|
@GetMapping("/home/queryParamData")
|
|
|
|
|
public AjaxResult queryParamData(@RequestParam(defaultValue = "1") int timeInterval, Date beginTime, Date endTime) {
|
|
|
|
|
public TableDataInfo queryParamData(@RequestParam(defaultValue = "1") int timeInterval, Date beginTime, Date endTime) {
|
|
|
|
|
System.out.println("时间间隔" + timeInterval);
|
|
|
|
|
return success(iApiService.queryParamData(timeInterval, beginTime, endTime));
|
|
|
|
|
startPage();
|
|
|
|
|
List<RecordRaramData> recordRaramData = iApiService.queryParamData(timeInterval, beginTime, endTime);
|
|
|
|
|
return getDataTable(recordRaramData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "导出数据记录")
|
|
|
|
@ -123,7 +130,7 @@ public class ApiController {
|
|
|
|
|
@GetMapping("/home/queryParamDataB")
|
|
|
|
|
public AjaxResult queryParamDataB(@RequestParam(defaultValue = "1") int timeInterval, Date beginTime, Date endTime) {
|
|
|
|
|
System.out.println("时间间隔" + timeInterval);
|
|
|
|
|
return success(iApiService.queryParamData_B(timeInterval, beginTime, endTime));
|
|
|
|
|
return AjaxResult.success(iApiService.queryParamData_B(timeInterval, beginTime, endTime));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(tags = {"60脱水机"}, value = "导出数据记录")
|
|
|
|
|