package com.hdkj.lt.mq.controller;


import com.hdkj.lt.core.mvc.BaseController;
import com.hdkj.lt.mq.entity.dto.BrakerScopeDTO;
import com.hdkj.lt.mq.service.voltageLimitViolation.FhzgVoltageLimitViolationPowerCutService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/fhzgLimitPowerCut")
@RequiredArgsConstructor
public class FhzgLimitPowerCutController extends BaseController {
    private final FhzgVoltageLimitViolationPowerCutService fhzgVoltageLimitViolationPowerCutService;

    /**
     * 获取停电区域列表
     *
     * @param message
     * @return
     */
    @PostMapping("/analysisLimitTransferScheme")
    @ApiOperation(value = "解析全口径低电压JSON数据")
    public void analysisLimitTransferScheme(@RequestBody String message) {
        //JSONObject jsonObject = new JSONObject(message);
        //Long planIdL = jsonObject.getLong("planId");
        Long planIdL = Long.valueOf(message);
        fhzgVoltageLimitViolationPowerCutService.analysisLimitTransferScheme(planIdL);
    }
}
