班级实验实现

hehai
mzh820631607 4 years ago
parent 769d0968a6
commit f522e25bb5
  1. 2
      src/main/java/com/msdw/tms/api/ClassTeachingApi.java
  2. 4
      src/main/java/com/msdw/tms/controller/ClassTeachingController.java
  3. 2
      src/main/resources/mapper/tms/ClassTeachingDao.xml

@ -14,7 +14,7 @@ public interface ClassTeachingApi {
@ApiOperation(value = "查询班级实验列表信息",notes = "查询班级实验列表信息") @ApiOperation(value = "查询班级实验列表信息",notes = "查询班级实验列表信息")
R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime, R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime,
String condition, Integer status, Integer isCode,Integer isUserId); String condition, Integer status, Integer isCode);
@ApiOperation(value = "查看成绩",notes = "查看成绩") @ApiOperation(value = "查看成绩",notes = "查看成绩")
R queryAchievement(); R queryAchievement();

@ -33,7 +33,7 @@ public class ClassTeachingController implements ClassTeachingApi {
@Override @Override
@GetMapping("userRecord") @GetMapping("userRecord")
public R queryTestRecord(@RequestParam Integer page, @RequestParam Integer size, Integer month,@RequestParam String startTime,@RequestParam String endTime, public R queryTestRecord(@RequestParam Integer page, @RequestParam Integer size, Integer month,@RequestParam String startTime,@RequestParam String endTime,
String condition, @RequestParam Integer status,@RequestParam Integer isCode,@RequestParam Integer isUserId){ String condition, @RequestParam Integer status,@RequestParam Integer isCode){
ProjectRecordVo recordVo = new ProjectRecordVo(); ProjectRecordVo recordVo = new ProjectRecordVo();
if (isCode==0){ if (isCode==0){
if (status!=0) {//不限定实验状态 if (status!=0) {//不限定实验状态
@ -52,7 +52,7 @@ public class ClassTeachingController implements ClassTeachingApi {
recordVo.setEndTime(endTime); recordVo.setEndTime(endTime);
} }
} }
recordVo.setIsCode(isCode).setUserId(isUserId); recordVo.setIsCode(isCode);
PageUtils page1 = classTeachingService.queryClassRecord(page,size,recordVo); PageUtils page1 = classTeachingService.queryClassRecord(page,size,recordVo);
return R.ok().put("page", page1); return R.ok().put("page", page1);
}else if (isCode==1){ }else if (isCode==1){

@ -21,11 +21,9 @@
WHERE WHERE
`status` = #{cla.status} `status` = #{cla.status}
and is_code = #{cla.isCode} and is_code = #{cla.isCode}
and user_id = #{cla.userId}
<if test="cla.condition!=null">and ( project_name like concat('%',#{cla.condition},'%') or experimental_class_name like concat('%',#{cla.condition},'%') )</if> <if test="cla.condition!=null">and ( project_name like concat('%',#{cla.condition},'%') or experimental_class_name like concat('%',#{cla.condition},'%') )</if>
<if test="cla.startTime!=null and cla.endTime!=null">and stop_time between #{cla.endTime} and #{cla.startTime}</if> <if test="cla.startTime!=null and cla.endTime!=null">and stop_time between #{cla.endTime} and #{cla.startTime}</if>
<if test="cla.month!=null">and DATE_SUB(CURDATE(), INTERVAL #{cla.month} month ) &lt;= date(stop_time)</if> <if test="cla.month!=null">and DATE_SUB(CURDATE(), INTERVAL #{cla.month} month ) &lt;= date(stop_time)</if>
</select> </select>
<!-- <if test="cla.condition!=null">and ( project_name like concat('%',#{cla.condition},'%') or experimental_class_name like concat('%',#{cla.condition},'%') )</if>-->
</mapper> </mapper>
Loading…
Cancel
Save