hehai
chen 4 years ago
parent e3f48ad9b5
commit f70bd31d39
  1. 4
      src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java
  2. 12
      src/main/java/com/msdw/tms/controller/ExperimentalProjectController.java
  3. 25
      src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java
  4. 2
      src/main/java/com/msdw/tms/entity/ExperimentalTeachingEntity.java
  5. 2
      src/main/java/com/msdw/tms/entity/vo/ExperimentalTeachingVO.java
  6. 11
      src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java

@ -2,12 +2,9 @@ package com.msdw.tms.api;
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 io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import java.text.ParseException; import java.text.ParseException;
@ -20,6 +17,7 @@ public interface ExperimentalTeachingControllerApi {
@ApiParam(name = "month", value = "月份:1、近一个月内 3、近三个月内 6、近六个月内", required = false) Integer month, @ApiParam(name = "month", value = "月份:1、近一个月内 3、近三个月内 6、近六个月内", required = false) Integer month,
@ApiParam(name = "type", value = "类型:1、手动发布 2、定时发布", required = false) Integer type, @ApiParam(name = "type", value = "类型:1、手动发布 2、定时发布", required = false) Integer type,
@ApiParam(name = "status", value = "状态:1、待开始 2、进行中 3、已结束", required = false) Integer status, @ApiParam(name = "status", value = "状态:1、待开始 2、进行中 3、已结束", required = false) Integer status,
@ApiParam(name = "systemId", value = "系统id", required = false) Integer systemId,
@ApiParam(name = "startTime", value = "开始时间", required = false) String startTime, @ApiParam(name = "startTime", value = "开始时间", required = false) String startTime,
@ApiParam(name = "stopTime", value = "结束时间", required = false) String stopTime, @ApiParam(name = "stopTime", value = "结束时间", required = false) String stopTime,
@ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent, @ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent,

@ -2,26 +2,16 @@ 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.ExperimentalProjectControllerApi; import com.msdw.tms.api.ExperimentalProjectControllerApi;
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.ExperimentalProjectEntity; import com.msdw.tms.entity.ExperimentalProjectEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.UserEntity;
import com.msdw.tms.entity.vo.ExperimentalProjectEntityVO; import com.msdw.tms.entity.vo.ExperimentalProjectEntityVO;
import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO;
import com.msdw.tms.entity.vo.UserEntityVo;
import com.msdw.tms.service.ExperimentalProjectService; import com.msdw.tms.service.ExperimentalProjectService;
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.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map;
@RestController @RestController
@RequestMapping("tms/project") @RequestMapping("tms/project")
@ -40,7 +30,7 @@ public class ExperimentalProjectController implements ExperimentalProjectControl
return R.ok().put("experimental_project_name", one); return R.ok().put("experimental_project_name", one);
} }
/** /**nm
* 根据id查询实验班级详情 * 根据id查询实验班级详情
*/ */
@GetMapping("/getById/{id}") @GetMapping("/getById/{id}")

@ -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));

@ -45,6 +45,8 @@ public class ExperimentalTeachingEntity {
private Integer isCode; private Integer isCode;
//绑定用户Id //绑定用户Id
private Integer userId; private Integer userId;
//绑定系统Id
private Integer systemId;
//创建时间 //创建时间
private String creationTime; private String creationTime;
//实验倒计时 //实验倒计时

@ -18,4 +18,6 @@ public class ExperimentalTeachingVO {
private Integer status; private Integer status;
//学校id //学校id
private Integer schoolId; private Integer schoolId;
//绑定系统Id
private Integer systemId;
} }

@ -1,31 +1,20 @@
package com.msdw.tms.service.impl; package com.msdw.tms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.Query;
import com.msdw.tms.dao.ClassTeachingDao; import com.msdw.tms.dao.ClassTeachingDao;
import com.msdw.tms.dao.ExperimentalTeachingDao; import com.msdw.tms.dao.ExperimentalTeachingDao;
import com.msdw.tms.dao.UserDao;
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.ProjectRecordVo; import com.msdw.tms.entity.vo.ProjectRecordVo;
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.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@Service("experimentalTeachingService") @Service("experimentalTeachingService")
public class ExperimentalTeachingServiceImpl extends ServiceImpl<ExperimentalTeachingDao, ExperimentalTeachingEntity> implements ExperimentalTeachingService { public class ExperimentalTeachingServiceImpl extends ServiceImpl<ExperimentalTeachingDao, ExperimentalTeachingEntity> implements ExperimentalTeachingService {

Loading…
Cancel
Save