|
|
|
@ -2,24 +2,20 @@ package com.msdw.tms.controller; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.msdw.tms.api.ExperimentalTeachingControllerApi; |
|
|
|
|
import com.msdw.tms.api.UserControllerApi; |
|
|
|
|
import com.msdw.tms.common.utils.Constant; |
|
|
|
|
import com.msdw.tms.common.utils.PageUtils; |
|
|
|
|
import com.msdw.tms.common.utils.R; |
|
|
|
|
import com.msdw.tms.entity.ExperimentalTeachingEntity; |
|
|
|
|
import com.msdw.tms.entity.UserEntity; |
|
|
|
|
import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO; |
|
|
|
|
import com.msdw.tms.entity.vo.ExperimentalTeachingVO; |
|
|
|
|
import com.msdw.tms.entity.vo.UserEntityVo; |
|
|
|
|
import com.msdw.tms.service.ExperimentalTeachingService; |
|
|
|
|
import com.msdw.tms.service.UserService; |
|
|
|
|
import org.apache.ibatis.annotations.Param; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Calendar; |
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
|
@RequestMapping("tms/exp") |
|
|
|
@ -32,6 +28,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 根据id查询实验班级详情 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@GetMapping("/getById/{id}") |
|
|
|
|
public R getById(@PathVariable("id") Integer id){ |
|
|
|
|
ExperimentalTeachingEntity et = experimentalTeachingService.getById(id); |
|
|
|
@ -40,6 +37,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 根据邀请码查询 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@GetMapping("/getInvitationCode") |
|
|
|
|
public R getInvitationCode(@RequestParam Integer invitationCode) { |
|
|
|
|
ExperimentalTeachingEntity one = experimentalTeachingService.getOne(new QueryWrapper<ExperimentalTeachingEntity>().eq("invitation_code", invitationCode) |
|
|
|
@ -49,15 +47,19 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 查询 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@GetMapping("/list") |
|
|
|
|
public R list(@RequestParam Integer page, |
|
|
|
|
@RequestParam Integer size, |
|
|
|
|
Integer month, Integer type, Integer status, String startTime, String stopTime, String searchContent,@RequestParam Integer schoolId){ |
|
|
|
|
public R list(@RequestParam Integer page, @RequestParam Integer size, |
|
|
|
|
Integer month, Integer type, Integer status,Integer systemId, String startTime, |
|
|
|
|
String stopTime, String searchContent,@RequestParam Integer schoolId){ |
|
|
|
|
ExperimentalTeachingVO vo = new ExperimentalTeachingVO(); |
|
|
|
|
vo.setSchoolId(schoolId); |
|
|
|
|
if (month!=null){ |
|
|
|
|
vo.setMonth(month); |
|
|
|
|
} |
|
|
|
|
if (systemId!=null){ |
|
|
|
|
vo.setSystemId(systemId); |
|
|
|
|
} |
|
|
|
|
if (type!=null){ |
|
|
|
|
vo.setType(type); |
|
|
|
|
} |
|
|
|
@ -80,6 +82,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 保存 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@PostMapping("/save") |
|
|
|
|
public R save(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity){ |
|
|
|
|
experimentalTeachingService.save(experimentalTeachingEntity); |
|
|
|
@ -89,6 +92,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 修改 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@PostMapping("/update") |
|
|
|
|
public R update(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity) throws ParseException { |
|
|
|
|
//添加实验结束时间
|
|
|
|
@ -117,6 +121,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr |
|
|
|
|
/** |
|
|
|
|
* 删除 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
@PostMapping("/delete") |
|
|
|
|
public R delete(@RequestBody Integer[] ids){ |
|
|
|
|
experimentalTeachingService.removeByIds(Arrays.asList(ids)); |
|
|
|
|