[feat][M]: 新增查看预约记录 管理员接口

master
Romesum 5 years ago
parent a2910c20c4
commit 2a623e570a

@ -96,6 +96,16 @@ public class LabRecordController {
return ResultVOUtil.success(labRecordDTOList); return ResultVOUtil.success(labRecordDTOList);
} }
/**
* author
*
*/
@GetMapping("/getRecordList")
public ResultVO getRecord() {
List<LabRecordDTO> labRecordDTOList = labrecordService.findRecordList();
return ResultVOUtil.success(labRecordDTOList);
}
/** /**
* *
*/ */
@ -140,6 +150,7 @@ public class LabRecordController {
.ltId(labTimeBean.getLtId()) .ltId(labTimeBean.getLtId())
.ucId(uc_id) .ucId(uc_id)
.status(0) .status(0)
.createTime(new Date())
.build(); .build();
labrecordService.add(labRecordBean1); labrecordService.add(labRecordBean1);
} }

@ -39,13 +39,47 @@ public interface LabRecordDTOMapper {
" tb_lab_time.lab_id = tb_lab.lab_id AND " + " tb_lab_time.lab_id = tb_lab.lab_id AND " +
" tb_user_course.u_id = #{uId} " + " tb_user_course.u_id = #{uId} " +
"GROUP BY " + "GROUP BY " +
" tb_lab_record.uc_id, " +
" tb_lab_time.`year`, " + " tb_lab_time.`year`, " +
" tb_lab_time.semester, " + " tb_lab_time.semester, " +
" tb_lab_time.`day`, " + " tb_lab_time.`day`, " +
" tb_lab_time.time, " + " tb_lab_time.time, " +
" tb_lab_record.`status`") " tb_lab_record.`status`" +
"ORDER BY tb_lab_record.create_time desc")
List<LabRecordDTO> getRecordListByUId(Integer uId); List<LabRecordDTO> getRecordListByUId(Integer uId);
@Select("SELECT " +
" tb_lab_time.`year`, " +
" tb_lab_time.semester, " +
" COUNT( tb_lab_time.`week` ) AS `week`, " +
" tb_lab_time.`day`, " +
" tb_lab_time.time, " +
" tb_lab_record.`status`, " +
" tb_user_course.`name` AS course_name, " +
" tb_user_course.population, " +
" tb_user_course.classes, " +
" tb_lab.`name` AS lab_name, " +
" tb_lab.position " +
"FROM " +
" tb_lab_time " +
" INNER JOIN tb_lab_record ON tb_lab_time.lt_id = tb_lab_record.lt_id " +
" INNER JOIN tb_lab ON tb_lab_time.lab_id = tb_lab.lab_id, " +
" tb_user_course " +
"WHERE " +
" tb_lab_time.lt_id = tb_lab_record.lt_id " +
" AND tb_lab_record.uc_id = tb_user_course.uc_id " +
" AND tb_lab_time.lab_id = tb_lab.lab_id " +
"GROUP BY " +
" tb_lab_record.uc_id, " +
" tb_lab_time.`year`, " +
" tb_lab_time.semester, " +
" tb_lab_time.`day`, " +
" tb_lab_time.time, " +
" tb_lab_record.`status` " +
"ORDER BY " +
" tb_lab_record.create_time DESC")
List<LabRecordDTO> getRecordList();
@Select("SELECT " + @Select("SELECT " +
" tb_lab_time.`week` " + " tb_lab_time.`week` " +
@ -66,7 +100,6 @@ public interface LabRecordDTOMapper {
List<WeekVO> getWeekBooked(Integer labId, String year, Integer semester, Integer day, Integer time, Integer uc_id); List<WeekVO> getWeekBooked(Integer labId, String year, Integer semester, Integer day, Integer time, Integer uc_id);
@Select("SELECT " + @Select("SELECT " +
" tb_user_course.`name` AS course_name, " + " tb_user_course.`name` AS course_name, " +
" tb_user.nickname, " + " tb_user.nickname, " +

@ -73,6 +73,12 @@ public interface LabRecordService {
*/ */
List<LabRecordDTO> findRecordListByUId(Integer uId); List<LabRecordDTO> findRecordListByUId(Integer uId);
/**
* author
*
*/
List<LabRecordDTO> findRecordList();
/** /**
* author * author
* LTidUCidLR * LTidUCidLR

@ -174,6 +174,16 @@ public class LabRecordServiceImpl implements LabRecordService{
return labRecordDTOMapper.getRecordListByUId(13); return labRecordDTOMapper.getRecordListByUId(13);
} }
/**
*
* @return
*/
@Override
public List<LabRecordDTO> findRecordList() {
return labRecordDTOMapper.getRecordList();
}
@Transactional @Transactional
@Override @Override
public void deleteByLtIdAndUcId(Integer ltId, Integer ucId) { public void deleteByLtIdAndUcId(Integer ltId, Integer ucId) {

Loading…
Cancel
Save