|
@@ -7,10 +7,7 @@ import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
@@ -57,7 +54,7 @@ public class ReviewJobController {
|
|
|
|
|
|
@RequestMapping(value = "/uploadJob", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/uploadJob", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public void uploadJob(String name, String description, String paperId,String startTime, String endTime,List<String>workerList,String workerDistribution, HttpServletResponse response){
|
|
|
|
|
|
+ public void uploadJob(String name, String description, String paperId, String startTime, String endTime, @RequestParam("workerList")List<String>workerList, String workerDistribution, HttpServletResponse response){
|
|
try {
|
|
try {
|
|
PrintWriter out = response.getWriter();
|
|
PrintWriter out = response.getWriter();
|
|
String jobId = reviewJobService.uploadJob(name, description, paperId, startTime, endTime, workerList, workerDistribution);
|
|
String jobId = reviewJobService.uploadJob(name, description, paperId, startTime, endTime, workerList, workerDistribution);
|
|
@@ -80,7 +77,7 @@ public class ReviewJobController {
|
|
|
|
|
|
@RequestMapping(value = "/updateJob", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/updateJob", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public void updateJob(String jobId, String name, String description, String paperId,String startTime, String endTime,List<String>workerList,String workerDistribution, HttpServletResponse response){
|
|
|
|
|
|
+ public void updateJob(String jobId, String name, String description, String paperId,String startTime, String endTime,@RequestParam("workerList")List<String>workerList,String workerDistribution, HttpServletResponse response){
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
if(reviewJobService.updateJob(jobId, name, description, paperId, startTime, endTime, workerList, workerDistribution)){
|
|
if(reviewJobService.updateJob(jobId, name, description, paperId, startTime, endTime, workerList, workerDistribution)){
|
|
result.put("status", "200");
|
|
result.put("status", "200");
|