|
|
@ -36,7 +36,7 @@ public class LabTimeController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//通过ltId删除实验室可预约时间段
|
|
|
|
//通过ltId删除实验室可预约时间段
|
|
|
|
@PostMapping(value = "/deleteLabTime" , consumes = "application/json")
|
|
|
|
@PostMapping(value = "/deleteLabTime")
|
|
|
|
public ResultVO deleteLabTime(@RequestBody LabTimeBean labTime){
|
|
|
|
public ResultVO deleteLabTime(@RequestBody LabTimeBean labTime){
|
|
|
|
//查找实验室是否存在
|
|
|
|
//查找实验室是否存在
|
|
|
|
LabTimeBean labTime1 = labTimeService.findByLtId(labTime.getLtId());
|
|
|
|
LabTimeBean labTime1 = labTimeService.findByLtId(labTime.getLtId());
|
|
|
@ -61,14 +61,31 @@ public class LabTimeController {
|
|
|
|
return ResultVOUtil.success();
|
|
|
|
return ResultVOUtil.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//查找实验室
|
|
|
|
//通过ltId查找实验室预约时间段
|
|
|
|
@GetMapping(value = "/findByLabIdTime" , consumes = "application/json")
|
|
|
|
@GetMapping(value = "/findLabTimeById")
|
|
|
|
public ResultVO<Map<String,Object>> findByLabTimeId(@RequestParam("LabTimeId") Integer labTimeId){
|
|
|
|
public ResultVO<Map<String,Object>> findLabTimeById(@RequestParam("ltId") Integer lt_id){
|
|
|
|
LabTimeBean labTime1 = labTimeService.findByLtId(labTimeId);
|
|
|
|
LabTimeBean labTime1 = labTimeService.findByLtId(lt_id);
|
|
|
|
System.out.println(labTime1);
|
|
|
|
System.out.println(labTime1);
|
|
|
|
return ResultVOUtil.success(labTime1);
|
|
|
|
return ResultVOUtil.success(labTime1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查找实验室可预约时间段
|
|
|
|
|
|
|
|
@GetMapping(value = "/findlabtimebylabidandyearandsemester")
|
|
|
|
|
|
|
|
public ResultVO<Map<String,Object>> findLabTimeByLabIdAndYearAndSemester(@RequestParam("labId") Integer lab_id , @RequestParam("year") String year , @RequestParam("semester") Integer semester , @RequestParam("status") Integer status){
|
|
|
|
|
|
|
|
List<LabTimeBean> labTimeList1 = labTimeService.findByLabIdAndYearAndSemester(lab_id , year , semester);
|
|
|
|
|
|
|
|
System.out.println(labTimeList1);
|
|
|
|
|
|
|
|
LabTimeBean array[] = new LabTimeBean[labTimeList1.size()];
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
for(LabTimeBean labtime : labTimeList1){
|
|
|
|
|
|
|
|
if (labtime.getStatus().equals(status)) {
|
|
|
|
|
|
|
|
System.out.println(labtime.getTime());
|
|
|
|
|
|
|
|
array[i] = labtime;
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ResultVOUtil.success(array);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//查找所有实验室列表
|
|
|
|
//查找所有实验室列表
|
|
|
|
@GetMapping(value = "/getLabListTime")
|
|
|
|
@GetMapping(value = "/getLabListTime")
|
|
|
|
public ResultVO getLabTimeList(){
|
|
|
|
public ResultVO getLabTimeList(){
|
|
|
@ -76,4 +93,11 @@ public class LabTimeController {
|
|
|
|
return ResultVOUtil.success(labTimeList);
|
|
|
|
return ResultVOUtil.success(labTimeList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查找所有课程列表
|
|
|
|
|
|
|
|
@GetMapping(value = "/getLabTimelist")
|
|
|
|
|
|
|
|
public ResultVO getUserCourseList(){
|
|
|
|
|
|
|
|
List<LabTimeBean> labTimelist = labTimeService.findAll();
|
|
|
|
|
|
|
|
return ResultVOUtil.success(labTimelist);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|