package com.project.zcustom.controller.engineering;

import com.project.zcustom.controller.core.AjaxResult;
import com.project.zcustom.controller.core.BaseController;
import com.project.zcustom.service.unit.ILargeProjectService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/large/one")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatProjectProductionController extends BaseController {

    private final ILargeProjectService largeProjectService;

    /**
     * 已接入项目数量(在建)
     */
    @GetMapping("/getProjectNumX/{subdivision}")
    public AjaxResult getProjectNumX(@PathVariable String subdivision) {
        return AjaxResult.success("查询成功", largeProjectService.getProjectNumX(subdivision));
    }

    /**
     * 已接入项目数量(施工)
     */
    @GetMapping("/getProjectNumY/{subdivision}")
    public AjaxResult getProjectNumY(@PathVariable String subdivision) {
        return AjaxResult.success("查询成功", largeProjectService.getProjectNumY(subdivision));
    }
}
