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.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.UserEntity;
import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import java.text.ParseException;
@ -20,6 +17,7 @@ public interface ExperimentalTeachingControllerApi {
@ApiParam(name = "month", value = "月份:1、近一个月内 3、近三个月内 6、近六个月内", required = false) Integer month,
@ApiParam(name = "type", value = "类型:1、手动发布 2、定时发布", required = false) Integer type,
@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 = "stopTime", value = "结束时间", required = false) String stopTime,
@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.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.PageUtils;
import com.msdw.tms.common.utils.R;
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.ExperimentalTeachingEntityVO;
import com.msdw.tms.entity.vo.UserEntityVo;
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.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("tms/project")
@ -40,7 +30,7 @@ public class ExperimentalProjectController implements ExperimentalProjectControl
return R.ok().put("experimental_project_name", one);
}
/**
/**nm
* 根据id查询实验班级详情
*/
@GetMapping("/getById/{id}")

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

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

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

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

Loading…
Cancel
Save