API:backend list of medium term examine
Former-commit-id: 658970485bb13ae1d0191e378fe60cc30711f441
This commit is contained in:
parent
f2e77c6968
commit
581ea3e967
|
|
@ -2,16 +2,19 @@ package com.xjy.ai.api.controller.glcc;
|
|||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xjy.ai.api.annotion.GuestAccess;
|
||||
import com.xjy.ai.common.constant.Constants;
|
||||
import com.xjy.ai.common.response.DataPacketUtil;
|
||||
import com.xjy.ai.common.response.ResponseData;
|
||||
import com.xjy.ai.common.utils.ValidatorUtils;
|
||||
import com.xjy.ai.model.service.glcc.MediumTermExamineMaterialService;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineBackendVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineInfoVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineMaterialVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineResultVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
|
@ -53,10 +56,17 @@ public class GlccMediumTermExamineMaterialController {
|
|||
|
||||
@ApiOperation("中期考核列表")
|
||||
@GetMapping("/getMediumTermExamineInfoList")
|
||||
@GuestAccess
|
||||
public ResponseEntity<ResponseData> list(int curPage, int pageSize, String keyword,
|
||||
@ApiParam("是否通过 0不通过 1通过") @RequestParam(defaultValue = "-1")Integer pass) {
|
||||
Page<MediumTermExamineResultVo> page = mediumTermExamineMaterialService.pageResultList(curPage, pageSize, keyword, pass);
|
||||
return DataPacketUtil.ok(page.getTotal(), page.getRecords());
|
||||
}
|
||||
|
||||
@ApiOperation("后台中期考核列表")
|
||||
@GetMapping("/getMediumTermExamineBackendInfoList")
|
||||
@RequiresRoles(value = Constants.SUPER_USER_ROLE, logical = Logical.OR)
|
||||
public ResponseEntity<ResponseData> list(int curPage, int pageSize, String keyword) {
|
||||
Page<MediumTermExamineBackendVo> page = mediumTermExamineMaterialService.pageBackendInfoList(curPage, pageSize, keyword);
|
||||
return DataPacketUtil.ok(page.getTotal(), page.getRecords());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.xjy.ai.model.dao.glcc.mapper;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xjy.ai.model.dao.glcc.entity.GlccMediumTermExamineMaterial;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineBackendVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineResultVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -19,4 +20,6 @@ import java.util.List;
|
|||
public interface GlccMediumTermExamineMaterialMapper extends BaseMapper<GlccMediumTermExamineMaterial> {
|
||||
|
||||
List<MediumTermExamineResultVo> getPageResultList(Page page, String keyword,@Param("evaluation") List<String> evaluation);
|
||||
|
||||
List<MediumTermExamineBackendVo> getpageBackendInfoList(Page page, String keyword);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.xjy.ai.model.dao.glcc.mapper.GlccMediumTermExamineMaterialMapper;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjy.ai.model.service.glcc.MediumTermExamineMaterialService;
|
||||
import com.xjy.ai.model.service.glcc.TutorEvaluationService;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineBackendVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineInfoVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineMaterialVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineResultVo;
|
||||
|
|
@ -65,4 +66,12 @@ public class MediumTermExamineMaterialServiceImpl extends ServiceImpl<GlccMedium
|
|||
page.setRecords(mediumTermExamineResultVos);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<MediumTermExamineBackendVo> pageBackendInfoList(int curPage, int pageSize, String keyword) {
|
||||
Page page = new Page<MediumTermExamineBackendVo>(curPage, pageSize);
|
||||
List<MediumTermExamineBackendVo> mediumTermExamineBackendVos = baseMapper.getpageBackendInfoList(page, keyword);
|
||||
page.setRecords(mediumTermExamineBackendVos);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.xjy.ai.model.service.glcc;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xjy.ai.model.dao.glcc.entity.GlccMediumTermExamineMaterial;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineBackendVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineInfoVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineMaterialVo;
|
||||
import com.xjy.ai.model.service.glcc.vo.MediumTermExamineResultVo;
|
||||
|
|
@ -22,4 +23,6 @@ public interface MediumTermExamineMaterialService extends IService<GlccMediumTer
|
|||
MediumTermExamineInfoVo getGlccMediumTermExamineInfo(int taskId);
|
||||
|
||||
Page<MediumTermExamineResultVo> pageResultList(int curPage, int pageSize, String keyword, Integer pass);
|
||||
|
||||
Page<MediumTermExamineBackendVo> pageBackendInfoList(int curPage, int pageSize, String keyword);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
package com.xjy.ai.model.service.glcc.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MediumTermExamineBackendVo {
|
||||
//学生姓名
|
||||
private String studentName;
|
||||
|
||||
//学生邮箱
|
||||
private String studentEmail;
|
||||
|
||||
//导师姓名
|
||||
private String tutorName;
|
||||
|
||||
//课题名称
|
||||
private String taskName;
|
||||
|
||||
//答辩视频
|
||||
private String defenceVideoUrl;
|
||||
|
||||
//代码/pr地址
|
||||
private String codeOrPrUrl;
|
||||
|
||||
//ppt附件id
|
||||
private Integer pptAttachmentId;
|
||||
|
||||
//提交时间
|
||||
private Date createdOn;
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public String getTutorName() {
|
||||
return tutorName;
|
||||
}
|
||||
|
||||
public void setTutorName(String tutorName) {
|
||||
this.tutorName = tutorName;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getStudentEmail() {
|
||||
return studentEmail;
|
||||
}
|
||||
|
||||
public void setStudentEmail(String studentEmail) {
|
||||
this.studentEmail = studentEmail;
|
||||
}
|
||||
|
||||
public String getDefenceVideoUrl() {
|
||||
return defenceVideoUrl;
|
||||
}
|
||||
|
||||
public void setDefenceVideoUrl(String defenceVideoUrl) {
|
||||
this.defenceVideoUrl = defenceVideoUrl;
|
||||
}
|
||||
|
||||
public String getCodeOrPrUrl() {
|
||||
return codeOrPrUrl;
|
||||
}
|
||||
|
||||
public void setCodeOrPrUrl(String codeOrPrUrl) {
|
||||
this.codeOrPrUrl = codeOrPrUrl;
|
||||
}
|
||||
|
||||
public Integer getPptAttachmentId() {
|
||||
return pptAttachmentId;
|
||||
}
|
||||
|
||||
public void setPptAttachmentId(Integer pptAttachmentId) {
|
||||
this.pptAttachmentId = pptAttachmentId;
|
||||
}
|
||||
|
||||
public Date getCreatedOn() {
|
||||
return createdOn;
|
||||
}
|
||||
|
||||
public void setCreatedOn(Date createdOn) {
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
}
|
||||
|
|
@ -40,5 +40,19 @@
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getpageBackendInfoList"
|
||||
resultType="com.xjy.ai.model.service.glcc.vo.MediumTermExamineBackendVo">
|
||||
select a.defence_video_url,b.student_name, b.mail as student_mail, a.created_on,
|
||||
a.PPT_attachment_id, a.code_or_pr_url,e.tutor_name, e.task_name, e.project_intro
|
||||
from glcc_medium_term_examine_material as a
|
||||
left join glcc_registration_student as b on a.student_reg_id = b.id
|
||||
left join (select c.id, c.tutor_name, c.task_name, d.project_name, d.project_intro
|
||||
from glcc_registration_task as c left join glcc_registration_information as d on c.reg_id = d.id ) as e on a.task_id = e.id
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
e.task_name like CONCAT('%',#{keyword},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue