综合查询页面

This commit is contained in:
2025-09-05 13:45:39 +08:00
parent 15e230babb
commit aa37e2a881
23 changed files with 1300 additions and 7 deletions

View File

@ -0,0 +1,72 @@
package com.xzzn.web.controller.ems;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.DeviceCategory;
import com.xzzn.ems.domain.vo.*;
import com.xzzn.ems.service.IGeneralQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
*
* 综合查询
*
*/
@RestController
@RequestMapping("/ems/generalQuery")
public class EmsGeneralQueryController extends BaseController{
@Autowired
private IGeneralQueryService iGeneralQueryService;
/**
* 获取设备枚举
*/
@GetMapping("/getAllDeviceCategory")
public AjaxResult getDeviceCategory()
{
// 获取所有枚举的中文信息
List<String> deviceCategoryName = new ArrayList<>();
for (DeviceCategory category : DeviceCategory.values()) {
deviceCategoryName.add(category.getInfo());
}
return success(deviceCategoryName);
}
/**
* 点位模糊查询
*/
@PostMapping("/pointFuzzyQuery")
public AjaxResult pointFuzzyQuery(@RequestBody PointNameRequest request)
{
return success(iGeneralQueryService.getPointNameList(request));
}
/**
* 根据点位查询点位数据变化
*/
@PostMapping("/getPointValueList")
public AjaxResult getPointValueList(@RequestBody PointNameRequest request)
{
List<GeneralQueryResponse> result = new ArrayList<>();
try {
result = iGeneralQueryService.getPointValueList(request);
} catch (Exception e) {
return error("报错请重试!");
}
return success(result);
}
/**
* 获取设备枚举
*/
@GetMapping("/getAllBatteryIdsBySites/{siteIds}")
public AjaxResult getAllBatteryIdsBySites(@PathVariable String[] siteIds)
{
return success(iGeneralQueryService.getAllBatteryIdsBySites(siteIds));
}
}