package servlet;

import core.process.C_ReviewerFillReview;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/home/reviewer-fill-review")
public class S_ReviewerFillReview extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("id");
        Map<String,String> vMap = servlet.Utils.getVMap(vName,request);

        C_ReviewerFillReview p=new C_ReviewerFillReview();
        p.setGraduationDesignId(id);
        p.setVMap(vMap);
        try {
            p.TeacherTeamFillOpeningReportOpinion();
        } catch (Exception e) {
            e.printStackTrace();
            response.sendRedirect("/op_fail.jsp");
        }

    }
    static String[] vName = {
            "score",
            "opinion"
    };
}