123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- package com.bizmatics.controller.web;
- import com.bizmatics.common.core.bean.ApiResult;
- import com.bizmatics.model.Device;
- import com.bizmatics.model.DeviceAnalogVariableList;
- import com.bizmatics.model.DeviceAttribute;
- import com.bizmatics.model.vo.HookupComponentCompleteOneVo;
- import com.bizmatics.model.vo.HookupComponentCompleteVo;
- import com.bizmatics.model.vo.HookupOneVo;
- import com.bizmatics.service.HookupService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * 配电图相关查询接口
- *
- * @author ya
- * @since 2022-03-07
- */
- @RestController
- @RequestMapping("/hookup")
- public class HookupController {
- @Autowired
- private HookupService hookupService;
- /**
- * 设备下拉框
- * @param siteId 站点ID
- * @return
- */
- @GetMapping("getDeviceAttributeList")
- public ApiResult<List<DeviceAttribute>> getDeviceAttributeList(@RequestParam Integer siteId) {
- return ApiResult.success(hookupService.getDeviceAttributeList(siteId));
- }
- /**
- * 变量下拉框
- * @param monitoringDeviceId 监控设备ID
- * @return
- */
- @GetMapping("getDeviceAnalogVariableList")
- public ApiResult<List<DeviceAnalogVariableList>> getDeviceAnalogVariableList(@RequestParam Integer monitoringDeviceId) {
- return ApiResult.success(hookupService.getDeviceAnalogVariableList(monitoringDeviceId));
- }
- /**
- * 配电图模板基础信息
- * @param siteId 站点ID
- * @return
- */
- @GetMapping("gethookupComponentBasics")
- public ApiResult<List<HookupOneVo>> gethookupComponentBasics(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId) {
- return ApiResult.success(hookupService.gethookupComponentBasics(siteId));
- }
- /**
- * 配电图数据查询
- * @param siteId 站点ID
- * @return
- */
- @GetMapping("getHookupComponentComplete")
- public ApiResult<List<HookupComponentCompleteVo>> getHookupComponentComplete(@RequestParam Integer siteId) {
- return ApiResult.success(hookupService.getHookupComponentComplete(siteId));
- }
- /**
- * 配电图保存
- * @param hookupComponentCompleteOneVoList
- * @return
- */
- @PostMapping("setHookupComponentComplete")
- public ApiResult<Void> setHookupComponentComplete(@RequestBody List<HookupComponentCompleteOneVo> hookupComponentCompleteOneVoList) {
- hookupService.setHookupComponentComplete(hookupComponentCompleteOneVoList);
- return ApiResult.success();
- }
- }
|