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