package com.jiayue.ipfcst.dataexchange.controller;

import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
import com.jiayue.ipfcst.dataexchange.service.ImpactOnContainerOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 対池子内数据产生影响的操作触发
 *
 * @author: xiuwei
 * @version: 3.0
 */
@RestController
@RequestMapping("refreshContainer")
public class ImpactOnContainerOperationController {

  @Autowired
  ImpactOnContainerOperation impactOnContainerOperation;


  /**
   * 刷新所有数据点
   *
   * @return {@link ResponseVO}
   */
  @GetMapping("allDataPoint")
  public ResponseVO refreshAllDataPoint() {
    impactOnContainerOperation.refreshAllDataPoint();
    return ResponseVO.success();
  }


  /**
   * 刷新所有采集通道数据点
   *
   * @return {@link ResponseVO}
   */
  @GetMapping("allGatherTunnelDataPoint")
  public ResponseVO refreshAllGatherTunnelDataPoint() {
    impactOnContainerOperation.refreshAllGatherTunnelDataPoint();
    return ResponseVO.success();
  }


  /**
   * 刷新所有转发通道数据点
   *
   * @return {@link ResponseVO}
   */
  @GetMapping("allSenderTunnelDataPoint")
  public ResponseVO refreshAllSenderTunnelDataPoint() {
    impactOnContainerOperation.refreshAllSenderTunnelDataPoint();
    return ResponseVO.success();
  }


  /**
   * 刷新所有数据组装器数据点
   *
   * @return {@link ResponseVO}
   */
  @GetMapping("allPackerDataPoint")
  public ResponseVO refreshAllEquipmentDataPoint() {
    impactOnContainerOperation.refreshAllEquipmentDataPoint();
    return ResponseVO.success();
  }


}
