package com.jwipc.spe.controller;

import com.jwipc.spe.dto.SupAppraiseDimensionDTO;
import com.jwipc.spe.dto.SupAppraiseQuotaDTO;
import com.jwipc.spe.logic.SupAppraiseDimensionLogic;
import com.jwipc.spe.logic.SupAppraiseQuotaLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import static com.jwipc.spe.constant.ModuleConst.MODULE_ROOT;

/**
 * @author Al
 * @create 2024-02-28 15:36
 * 考核指标
 */
@Controller
@RequestMapping(MODULE_ROOT + "/supAppraiseDimension")
@RequiredArgsConstructor
public class SupAppraiseDimensionPageController {
    private final SupAppraiseDimensionLogic supAppraiseDimensionLogic;
    //主页面
    @GetMapping("/index")
    public String index() {
        return MODULE_ROOT + "/supAppraiseDimension/list";
    }
    //新增详情页
    @GetMapping("/detail")
    public String detail(Model model, Integer id) {
        SupAppraiseDimensionDTO supAppraiseDimension;
        supAppraiseDimension = supAppraiseDimensionLogic.getById(id);
        model.addAttribute("supAppraiseDimension", supAppraiseDimension);
        return MODULE_ROOT + "/supAppraiseDimension/detail";
    }

}
