package cn.com.qmth.stmms.monitor;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.qmth.stmms.biz.utils.TaskLock;
import cn.com.qmth.stmms.biz.utils.TaskLockUtil;

@Controller("taskMonitor")
@RequestMapping("/monitor/task")
public class TaskMonitorController {

    @RequestMapping
    @ResponseBody
    public Object list(HttpServletRequest request, @RequestParam Integer examId, @RequestParam String subjectCode,
            @RequestParam Integer groupNumber) {
        TaskLock taskLock = TaskLockUtil.getFormalTask(examId + "_" + subjectCode + "_" + groupNumber);
        return taskLock.list();
    }

}
