|
|
@ -9,10 +9,7 @@ import com.ccic.safeliab.vo.InsDemoVO; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@RequestMapping("/ex/exam-schedule") |
|
|
|
@RequestMapping("/ex/exam-schedule") |
|
|
@ -23,9 +20,8 @@ public class ExamScheduleController { |
|
|
|
public R select( @RequestParam(required = false) String examName, |
|
|
|
public R select( @RequestParam(required = false) String examName, |
|
|
|
@RequestParam(required = false) String paperName, |
|
|
|
@RequestParam(required = false) String paperName, |
|
|
|
@RequestParam(required = false) String regulatedIndustry, |
|
|
|
@RequestParam(required = false) String regulatedIndustry, |
|
|
|
@RequestParam(required = false) String validDate, |
|
|
|
@RequestParam(required = false) String validDate |
|
|
|
@RequestParam(defaultValue = "1") int page, |
|
|
|
) { |
|
|
|
@RequestParam(defaultValue = "10") int pageSize) { |
|
|
|
|
|
|
|
// 模拟数据库查询
|
|
|
|
// 模拟数据库查询
|
|
|
|
List<ExamSchedule> examList = new ArrayList<>(); |
|
|
|
List<ExamSchedule> examList = new ArrayList<>(); |
|
|
|
ExamScheduleVO insDemoVO = new ExamScheduleVO(); |
|
|
|
ExamScheduleVO insDemoVO = new ExamScheduleVO(); |
|
|
@ -42,26 +38,20 @@ public class ExamScheduleController { |
|
|
|
result.put("total", examList.size()); |
|
|
|
result.put("total", examList.size()); |
|
|
|
return R.ok().data(result); |
|
|
|
return R.ok().data(result); |
|
|
|
} |
|
|
|
} |
|
|
|
@GetMapping("/cancel") |
|
|
|
@PostMapping("/cancel") |
|
|
|
public R cancel(@RequestParam(required = false) String[] ids) { |
|
|
|
public R cancel(@RequestBody List<String> ids) { |
|
|
|
ExamScheduleVO insDemoVO = new ExamScheduleVO(); |
|
|
|
int result = service.doCancel(ids); |
|
|
|
return R.ok().data(service.list(Condition.getQueryWrapper(insDemoVO))); |
|
|
|
return R.ok().data(result); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/publish") |
|
|
|
|
|
|
|
public R publish(@RequestParam(required = false) String[] ids) { |
|
|
|
|
|
|
|
ExamScheduleVO insDemoVO = new ExamScheduleVO(); |
|
|
|
|
|
|
|
return R.ok().data(service.list(Condition.getQueryWrapper(insDemoVO))); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
@GetMapping("/delete") |
|
|
|
@PostMapping("/publish") |
|
|
|
public R delete(@RequestParam(required = false) String[] ids) { |
|
|
|
public R publish(@RequestBody List<String> ids) { |
|
|
|
ExamScheduleVO insDemoVO = new ExamScheduleVO(); |
|
|
|
int result = service.doPublish(ids); |
|
|
|
return R.ok().data(service.list(Condition.getQueryWrapper(insDemoVO))); |
|
|
|
return R.ok().data(result); |
|
|
|
} |
|
|
|
} |
|
|
|
@PostMapping("/update") |
|
|
|
@PostMapping("/delete") |
|
|
|
public R update(@RequestBody ExamScheduleVO examSchedule) { |
|
|
|
public R delete(@RequestBody List<String> ids) { |
|
|
|
examSchedule.setPublishStatus(0); |
|
|
|
int result = service.doDelete(ids); |
|
|
|
boolean result = service.saveOrUpdate(examSchedule); |
|
|
|
return R.ok().data(result); |
|
|
|
return R.ok().data("success."); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/insert") |
|
|
|
@PostMapping("/insert") |
|
|
@ -70,22 +60,39 @@ public class ExamScheduleController { |
|
|
|
boolean result = service.saveOrUpdate(examSchedule); |
|
|
|
boolean result = service.saveOrUpdate(examSchedule); |
|
|
|
return R.ok().data("success."); |
|
|
|
return R.ok().data("success."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getIndustry") |
|
|
|
@GetMapping("/getIndustry") |
|
|
|
public R getIndustry(){ |
|
|
|
public R getIndustry(){ |
|
|
|
return R.ok().data(service.getIndustry()); |
|
|
|
return R.ok().data(service.getIndustry()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getExamDataById") |
|
|
|
@GetMapping("/getExamDataById") |
|
|
|
public R getExamDataById(@RequestParam(required = false) String id){ |
|
|
|
public R getExamDataById(@RequestParam(required = false) String id){ |
|
|
|
return R.ok().data(service.getExamDataById(id)); |
|
|
|
return R.ok().data(service.getExamDataById(id)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getPaper") |
|
|
|
@GetMapping("/getPaper") |
|
|
|
public R getPaper(){ |
|
|
|
public R getPaper(){ |
|
|
|
return R.ok().data(service.getPaper()); |
|
|
|
return R.ok().data(service.getPaper()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/show") |
|
|
|
@GetMapping("/paperStatusCheck") |
|
|
|
public R show() { |
|
|
|
public R paperStatusCheck() { |
|
|
|
|
|
|
|
return R.ok().data("success."); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/paperDeleteCheck") |
|
|
|
|
|
|
|
public R paperDeleteCheck() { |
|
|
|
return R.ok().data("success."); |
|
|
|
return R.ok().data("success."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getDetailById") |
|
|
|
|
|
|
|
public R getAnswerStatus(@RequestParam(required = false) String id) { |
|
|
|
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
param.put("examParticipation",service.getExamParticipation(id)); |
|
|
|
|
|
|
|
param.put("examAnswer",service.getExamAnswerDetails(id)); |
|
|
|
|
|
|
|
return R.ok().data(param); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|