package com.jwipc.spe.controller;

import com.jwipc.spe.dto.SupAppraiseQuotaDTO;
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 + "/supAppraiseQuota")
@RequiredArgsConstructor
public class SupAppraiseQuotaPageController {
    private final SupAppraiseQuotaLogic supAppraiseQuotaLogic;
    @GetMapping("/index")
    public String index() {
        return MODULE_ROOT + "/supAppraiseQuota/list";
    }
    @GetMapping("/detail")
    public String detail(Model model, Integer id) {
        SupAppraiseQuotaDTO supAppraiseQuota;
        supAppraiseQuota = supAppraiseQuotaLogic.getById(id);
        model.addAttribute("supAppraiseQuota", supAppraiseQuota);
        return MODULE_ROOT + "/supAppraiseQuota/detail";
    }
}
