策略配置-策略运行
This commit is contained in:
@ -3,7 +3,6 @@ package com.xzzn.web.controller.ems;
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.ems.domain.EmsDevicesSetting;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SiteDeviceListVo;
|
||||
import com.xzzn.ems.service.IEmsDeviceSettingService;
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.ems.domain.EmsStrategyRunning;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.ems.service.IEmsStrategyService;
|
||||
|
||||
/**
|
||||
* 策略Controller
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/strategyRunning")
|
||||
public class EmsStrategyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEmsStrategyService emsStrategyService;
|
||||
|
||||
/**
|
||||
* 获取站点策略配置
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(String siteId) {
|
||||
return success(emsStrategyService.selectEmsStrategyRunningList(siteId));
|
||||
}
|
||||
/**
|
||||
* 停止策略
|
||||
*/
|
||||
@GetMapping(value = "/stop")
|
||||
public AjaxResult stop(Long id)
|
||||
{
|
||||
return toAjax(emsStrategyService.stopRunningStrategy(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主策略列表
|
||||
*/
|
||||
@GetMapping(value = "/getMainStrategyList")
|
||||
public AjaxResult getMainStrategyList()
|
||||
{
|
||||
return success(emsStrategyService.getMainStrategyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取辅助策略列表
|
||||
*/
|
||||
@GetMapping(value = "/getAuxStrategyList")
|
||||
public AjaxResult getAuxStrategyList()
|
||||
{
|
||||
return success(emsStrategyService.getAuxStrategyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置策略
|
||||
*/
|
||||
@PostMapping(value = "/configStrategy")
|
||||
public AjaxResult configStrategy(@RequestBody EmsStrategyRunning emsStrategyRunning)
|
||||
{
|
||||
emsStrategyRunning.setCreateBy(getUsername());
|
||||
emsStrategyRunning.setUpdateBy(getUsername());
|
||||
return toAjax(emsStrategyService.configStrategy(emsStrategyRunning));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user