修复和完善0.2

hehai
mzh820631607 4 years ago
parent 2a25da330e
commit 850f7c87e0
  1. 5
      src/main/java/com/msdw/tms/api/ClassTeachingApi.java
  2. 9
      src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java
  3. 11
      src/main/java/com/msdw/tms/api/UserInfoControllerApi.java
  4. 31
      src/main/java/com/msdw/tms/config/CheckCodeQuartzConfig.java
  5. 1
      src/main/java/com/msdw/tms/config/quartz/CheckCodeQuartz.java
  6. 38
      src/main/java/com/msdw/tms/config/quartz/TimeOutQuartz.java
  7. 20
      src/main/java/com/msdw/tms/controller/ClassTeachingController.java
  8. 35
      src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java
  9. 15
      src/main/java/com/msdw/tms/controller/StudentController.java
  10. 54
      src/main/java/com/msdw/tms/controller/UserInfoController.java
  11. 2
      src/main/java/com/msdw/tms/dao/ClassTeachingDao.java
  12. 13
      src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java
  13. 2
      src/main/java/com/msdw/tms/dao/StudentDao.java
  14. 2
      src/main/java/com/msdw/tms/dao/SystemSetttingDao.java
  15. 8
      src/main/java/com/msdw/tms/dao/UserInfoDao.java
  16. 45
      src/main/java/com/msdw/tms/entity/ExperimentalReportEntity.java
  17. 31
      src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java
  18. 4
      src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java
  19. 2
      src/main/java/com/msdw/tms/entity/vo/StudentVo.java
  20. 12
      src/main/java/com/msdw/tms/service/ExperimentalReportService.java
  21. 5
      src/main/java/com/msdw/tms/service/UserInfoService.java
  22. 1
      src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java
  23. 31
      src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java
  24. 19
      src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java
  25. 3
      src/main/java/com/msdw/tms/service/impl/StudentServiceImpl.java
  26. 123
      src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java
  27. 18
      src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java
  28. 11
      src/main/resources/mapper/tms/ClassTeachingDao.xml
  29. 53
      src/main/resources/mapper/tms/ExperimentalReportDao.xml
  30. 3
      src/main/resources/mapper/tms/ExperimentalTeachingDao.xml
  31. 8
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  32. 12
      src/main/resources/mapper/tms/StudentDao.xml
  33. 11
      src/main/resources/mapper/tms/SystemSetting.xml
  34. 70
      src/main/resources/mapper/tms/UserInfoDao.xml
  35. 2
      src/test/java/com/msdw/tms/SnowflakeIdUtils.java
  36. 8
      src/test/java/com/msdw/tms/Test.java
  37. 27
      src/test/java/com/msdw/tms/service/ExperimentalTeachingTest.java
  38. 4
      src/test/java/com/msdw/tms/service/QuestionsServiceTest.java

@ -1,9 +1,11 @@
package com.msdw.tms.api; package com.msdw.tms.api;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
@Api(value = "用户端班级实验", tags = "用户端班级实验信息") @Api(value = "用户端班级实验", tags = "用户端班级实验信息")
public interface ClassTeachingApi { public interface ClassTeachingApi {
@ -22,4 +24,7 @@ public interface ClassTeachingApi {
@ApiOperation(value = "校验是否需要邀请码",notes = "校验是否需要邀请码") @ApiOperation(value = "校验是否需要邀请码",notes = "校验是否需要邀请码")
R check(Integer userId,Integer projectId); R check(Integer userId,Integer projectId);
@ApiOperation(value = "查看实验报告",notes = "查看实验报告")
R queryExperimentalReport(ExperimentalReportEntity entity);
} }

@ -7,6 +7,9 @@ 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;
@Api(value = "实验教学",tags = "实验教学") @Api(value = "实验教学",tags = "实验教学")
public interface ExperimentalTeachingControllerApi { public interface ExperimentalTeachingControllerApi {
@ -22,10 +25,10 @@ public interface ExperimentalTeachingControllerApi {
@ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent); @ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent);
@ApiOperation(value = "添加实验教学",notes = "添加实验教学") @ApiOperation(value = "添加实验教学",notes = "添加实验教学")
R save(ExperimentalTeachingEntity experimentalTeachingEntity); R save(ExperimentalTeachingEntity experimentalTeachingEntity) throws ParseException;
@ApiOperation(value = "修改用户个人档案",notes = "修改用户个人档案") @ApiOperation(value = "修改用户个人档案",notes = "修改用户个人档案")
R update(ExperimentalTeachingEntity experimentalTeachingEntity); R update(ExperimentalTeachingEntity experimentalTeachingEntity) throws ParseException;
@ApiOperation(value = "删除用户个人档案",notes = "删除用户个人档案") @ApiOperation(value = "删除用户个人档案",notes = "删除用户个人档案")
R delete(Integer[] ids); R delete(Integer[] ids);
@ -36,4 +39,6 @@ public interface ExperimentalTeachingControllerApi {
@ApiOperation(value = "查询邀请码是否存在",notes = "查询邀请码是否存在") @ApiOperation(value = "查询邀请码是否存在",notes = "查询邀请码是否存在")
R getInvitationCode(Integer invitationCode); R getInvitationCode(Integer invitationCode);
@ApiOperation(value = "校验实验名称是否重复", notes = "校验实验名称是否重复")
R checkExperimentalName(String experimentalName);
} }

@ -4,16 +4,23 @@ import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.UserEntity; import com.msdw.tms.entity.UserEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.vo.UserEntityVo; import com.msdw.tms.entity.vo.UserEntityVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
@Api(value = "用户管理",tags = "用户管理") @Api(value = "用户管理",tags = "用户管理")
public interface UserInfoControllerApi { public interface UserInfoControllerApi {
@ApiOperation(value = "个人中心信息修改",notes = "个人中心信息修改") // @ApiOperation(value = "个人中心信息修改",notes = "个人中心信息修改")
R update(UserInfoEntity userEntity); // R update(UserInfoEntity userEntity);
@ApiOperation(value = "注册",notes = "注册") @ApiOperation(value = "注册",notes = "注册")
R save(UserInfoEntity entity); R save(UserInfoEntity entity);
@ApiOperation(value = "个人中心信息展示",notes = "个人中心信息展示")
R userInfo(Integer id);
@ApiOperation(value = "个人中心-信息修改",notes = "个人中心-信息修改")
R updateUser(UserProsonalEntityVo userProsonalEntityVo);
} }

@ -1,6 +1,7 @@
package com.msdw.tms.config; package com.msdw.tms.config;
import com.msdw.tms.config.quartz.CheckCodeQuartz; import com.msdw.tms.config.quartz.CheckCodeQuartz;
import com.msdw.tms.config.quartz.TimeOutQuartz;
import org.quartz.*; import org.quartz.*;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -10,19 +11,16 @@ public class CheckCodeQuartzConfig {
//定义任务详情 //定义任务详情
@Bean @Bean
public JobDetail orderjobDetail() { public JobDetail orderjobDetail() {
//指定job的名称和持久化保存任务
return JobBuilder return JobBuilder
.newJob(CheckCodeQuartz.class) //自定义任务 .newJob(CheckCodeQuartz.class)
.withIdentity("checkCodeQuartz") //为任务定义名称 .withIdentity("checkCodeQuartz")
.storeDurably() .storeDurably()
.build(); .build();
} }
//定义触发器 //定义触发器
@Bean @Bean
public Trigger orderTrigger() { public Trigger orderTrigger() {
//通知调度器,程序多久执行一次
CronScheduleBuilder scheduleBuilder CronScheduleBuilder scheduleBuilder
// = CronScheduleBuilder.cronSchedule("5/20 * * ? * *"); //时间表达式 每分钟的5,25秒执行任务
= CronScheduleBuilder.cronSchedule("0 0 18 * * ? "); //时间表达式,每天的18点执行任务 = CronScheduleBuilder.cronSchedule("0 0 18 * * ? "); //时间表达式,每天的18点执行任务
return TriggerBuilder return TriggerBuilder
.newTrigger() .newTrigger()
@ -30,4 +28,27 @@ public class CheckCodeQuartzConfig {
.withIdentity("checkCodeQuartz") .withIdentity("checkCodeQuartz")
.withSchedule(scheduleBuilder).build(); .withSchedule(scheduleBuilder).build();
} }
//定义任务详情
@Bean
public JobDetail timeOutJob() {
//指定job的名称和持久化保存任务
return JobBuilder
.newJob(TimeOutQuartz.class) //自定义任务
.withIdentity("timeOut") //为任务定义名称
.storeDurably()
.build();
}
//定义触发器
@Bean
public Trigger timeTrigger() {
//通知调度器,程序多久执行一次
CronScheduleBuilder scheduleBuilder
// = CronScheduleBuilder.cronSchedule("5/20 * * ? * *"); //时间表达式 每分钟的5,25秒执行任务
= CronScheduleBuilder.cronSchedule("0 */1 * * * ?"); //时间表达式,每分钟执行一次
return TriggerBuilder
.newTrigger()
.forJob(timeOutJob())
.withIdentity("timeOut")
.withSchedule(scheduleBuilder).build();
}
} }

@ -21,4 +21,5 @@ public class CheckCodeQuartz implements Job {
log.info("清理过期验证码"); log.info("清理过期验证码");
} }
} }

@ -0,0 +1,38 @@
package com.msdw.tms.config.quartz;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.service.ExperimentalTeachingService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@Slf4j
@Component
public class TimeOutQuartz implements Job {
@Autowired
private ExperimentalTeachingService service;
/**
* 将超时/结束的实验状态修改为3结束
* @param jobExecutionContext
* @throws JobExecutionException
*/
@Override
@Transactional
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
// log.info("查询并关闭超时/结束任务");
UpdateWrapper<ExperimentalTeachingEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.le("stop_time",new Date()).ge("stop_time","1970-11-29 00:00:00").set("status",3);
boolean result = service.update(updateWrapper);
}
}

@ -3,11 +3,12 @@ package com.msdw.tms.controller;
import com.msdw.tms.api.ClassTeachingApi; import com.msdw.tms.api.ClassTeachingApi;
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.BroadcastEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ExperimentalStudentEntity; import com.msdw.tms.entity.ExperimentalStudentEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.entity.vo.ProjectRecordVo;
import com.msdw.tms.service.ClassTeachingService; import com.msdw.tms.service.ClassTeachingService;
import com.msdw.tms.service.ExperimentalReportService;
import com.msdw.tms.service.ExperimentalStudentService; import com.msdw.tms.service.ExperimentalStudentService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -24,6 +25,9 @@ public class ClassTeachingController implements ClassTeachingApi {
private ClassTeachingService classTeachingService; private ClassTeachingService classTeachingService;
@Autowired @Autowired
private ExperimentalStudentService experimentalStudentService; private ExperimentalStudentService experimentalStudentService;
@Autowired
private ExperimentalReportService experimentalReportService;
/** /**
* 用户端查看班级实验列表 * 用户端查看班级实验列表
@ -140,4 +144,18 @@ public class ClassTeachingController implements ClassTeachingApi {
PageUtils page1 = classTeachingService.querySimulationPlayList(page,size); PageUtils page1 = classTeachingService.querySimulationPlayList(page,size);
return R.ok().put("data",page1); return R.ok().put("data",page1);
} }
/**
* 学生查看实验报告
* @param entity
* @return
*/
@Override
@PostMapping("/queryExperimentalReport")
public R queryExperimentalReport(@RequestBody ExperimentalReportEntity entity){
R result = experimentalReportService.queryReport(entity);
return R.ok().put("data",result);
}
} }

@ -16,9 +16,9 @@ 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.text.ParseException;
import java.util.List; import java.text.SimpleDateFormat;
import java.util.Map; import java.util.*;
@RestController @RestController
@RequestMapping("tms/exp") @RequestMapping("tms/exp")
@ -74,6 +74,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr
PageUtils list = experimentalTeachingService.queryExperimentalTeaching(page,size,vo); PageUtils list = experimentalTeachingService.queryExperimentalTeaching(page,size,vo);
return R.ok().put("list",list); return R.ok().put("list",list);
} }
/** /**
* 保存 * 保存
*/ */
@ -87,7 +88,25 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr
* 修改 * 修改
*/ */
@PostMapping("/update") @PostMapping("/update")
public R update(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity){ public R update(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity) throws ParseException {
//添加实验结束时间
ExperimentalTeachingEntity byId = experimentalTeachingService.getById(experimentalTeachingEntity.getId());
if (byId.getType()==1){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = byId.getExperimentDuration();
int d = time.indexOf("d");
int h = time.indexOf("h");
int m = time.indexOf("m");
int dd = Integer.parseInt(time.substring(0, d));
int hh = Integer.parseInt(time.substring(d + 1, h));
int mm = Integer.parseInt(time.substring(h + 1, m));
int newTime = dd*24*60 + hh*60 + mm;
Calendar nowTime = Calendar.getInstance();
Date date = new Date();
nowTime.setTime(date);
nowTime.add(Calendar.MINUTE,newTime);
experimentalTeachingEntity.setStopTime(sdf.format(nowTime.getTime()));
}
experimentalTeachingService.updateById(experimentalTeachingEntity); experimentalTeachingService.updateById(experimentalTeachingEntity);
return R.ok(); return R.ok();
@ -103,6 +122,14 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr
return R.ok(); return R.ok();
} }
@Override
@GetMapping("/check")
public R checkExperimentalName(@RequestParam String experimentalName){
QueryWrapper<ExperimentalTeachingEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("experimental_name",experimentalName);
if (experimentalTeachingService.count(queryWrapper)>0){return R.error(200,"实验名称不能重复");}
return R.ok();
}
// /** // /**
// * 修改 // * 修改
// */ // */

@ -67,7 +67,7 @@ public class StudentController implements StudentControllerApi{
userInfoList.setAccount(account) userInfoList.setAccount(account)
.setPhone(phone) .setPhone(phone)
.setEmail(studentVo.getEmail()) .setEmail(studentVo.getEmail())
.setSchoolId(studentVo.getSchoolId()) .setSchoolId(studentVo.getSchoolAppellationId())
.setUserName(studentVo.getUserName()); .setUserName(studentVo.getUserName());
userInfoService.saveUserInfo(userInfoList); userInfoService.saveUserInfo(userInfoList);
@ -111,18 +111,27 @@ public class StudentController implements StudentControllerApi{
* @return * @return
*/ */
@Override @Override
@Transactional
@PutMapping("/updateStudent") @PutMapping("/updateStudent")
public R updateStudent(@RequestBody StudentVo studentVo) { public R updateStudent(@RequestBody StudentVo studentVo) {
studentVo.setSchoolId(ConstantUtils.Keda_schoolId);//设定学校id studentVo.setSchoolId(ConstantUtils.Keda_schoolId);//设定学校id
Integer studentId = studentVo.getStudentId(); Integer studentId = studentVo.getStudentId();
String phone = studentVo.getPhone();
if (studentId==null){ if (studentId==null){
return R.error(400,"studentId不能为空"); return R.error(400,"studentId不能为空");
} }
studentService.updateWorkNumber(studentId);//先将原本的学号重置为00,便于判重 studentService.updateWorkNumber(studentId);//先将原本的学号重置为00,便于判重
userInfoService.updateAccount(studentVo.getUserId());//将手机号码/账号重置
Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),ConstantUtils.Keda_schoolId); Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),ConstantUtils.Keda_schoolId);
Integer res = userInfoService.queryStudentAccount(studentVo.getAccount(),ConstantUtils.Keda_schoolId); Integer res = userInfoService.queryStudentAccount(studentVo.getAccount(),ConstantUtils.Keda_schoolId);
Integer re = userInfoService.queryStudentPhone(phone, ConstantUtils.Keda_schoolId);
if (phone!=null&&phone!=""){
if (re==1){
return R.error("手机号码不能重复");
}
}
if (result==1){ if (result==1){
return R.error("学号不能重复"); return R.error("学号不能重复");
}else if (res==1){ }else if (res==1){

@ -6,7 +6,9 @@ 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.UserEntity; import com.msdw.tms.entity.UserEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.UserPersonalFileEntity;
import com.msdw.tms.entity.vo.UserEntityVo; import com.msdw.tms.entity.vo.UserEntityVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import com.msdw.tms.service.StudentService; import com.msdw.tms.service.StudentService;
import com.msdw.tms.service.UserInfoService; import com.msdw.tms.service.UserInfoService;
import com.msdw.tms.service.UserService; import com.msdw.tms.service.UserService;
@ -15,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -27,6 +30,9 @@ public class UserInfoController implements UserInfoControllerApi {
@Autowired @Autowired
private StudentService studentService; private StudentService studentService;
@Autowired
private UserService userService;
/** /**
* 列表 * 列表
*/ */
@ -78,7 +84,7 @@ public class UserInfoController implements UserInfoControllerApi {
/** /**
* 修改 * 修改
*/ */
@Override // @Override
@PutMapping("/update") @PutMapping("/update")
public R update(@RequestBody UserInfoEntity userEntity){ public R update(@RequestBody UserInfoEntity userEntity){
userInfoService.updateById(userEntity); userInfoService.updateById(userEntity);
@ -95,4 +101,50 @@ public class UserInfoController implements UserInfoControllerApi {
return R.ok(); return R.ok();
} }
/**
* 查询个人信息
* @param id
* @return
*/
@Override
@GetMapping("/userinfo/{id}")
public R userInfo(@PathVariable("id") Integer id){
HashMap<String,UserProsonalEntityVo> userEntityVoList = userService.queryUserInfo(id);
// UserEntityVo userEntityVo = userService.queryUserId(id);
return R.ok().put("data",userEntityVoList);
}
/**
* 修改
*/
@Override
@Transactional
@PutMapping("/updateUser")
public R updateUser(@RequestBody UserProsonalEntityVo vo){
List<UserPersonalFileEntity> entityList = vo.getPersonalFileEntities();
UserInfoEntity userInfo = vo.getUserInfoEntity();
Integer userId = userInfo.getUserId();
String password = userInfo.getPassword();
String userPassword = userInfoService.queryPasword(userId);
if (userPassword.equals(password)==true){
return R.error(400,"false,the password is the same!!!");
}else{
userInfoService.updateUserInfoById(userInfo);
for (int i = 0;i<entityList.size();i++){
UserPersonalFileEntity personalFile = entityList.get(i);
Integer personalFileId = personalFile.getPersonalFileId();
if (personalFile.getPersonalCareerId()==null){
return R.error(403,"false,personalCareerId can not be empty!!!");
}
if(personalFileId==null){
userService.insertPersonalInfo(personalFile);
}else{
userService.updateUserPersonal(personalFile);
}
}
return R.ok();
}
}
} }

@ -17,4 +17,6 @@ public interface ClassTeachingDao {
void updateSurplusTime(@Param("cla") ProjectRecordVo recordVo); void updateSurplusTime(@Param("cla") ProjectRecordVo recordVo);
void updateSurplusTimeNull(@Param("cla") ProjectRecordVo recordVo); void updateSurplusTimeNull(@Param("cla") ProjectRecordVo recordVo);
IPage<BroadcastEntity> querySimulationPlayList(Page page1); IPage<BroadcastEntity> querySimulationPlayList(Page page1);
void updateSurplusTimeUp(ProjectRecordVo recordVo);
} }

@ -0,0 +1,13 @@
package com.msdw.tms.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.ExperimentalReportVo;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ExperimentalReportDao extends BaseMapper<ExperimentalReportEntity> {
ExperimentalReportVo queryReport(ExperimentalReportEntity entity);
}

@ -24,7 +24,7 @@ public interface StudentDao extends BaseMapper<StudentEntity> {
Integer updateStudent(StudentVo studentVo); Integer updateStudent(StudentVo studentVo);
void updateWorkNumber(String workNumber); void updateWorkNumber(String workNumber,Integer studentId);
boolean addStudentInfo(UserInfoEntity userInfoEntity); boolean addStudentInfo(UserInfoEntity userInfoEntity);

@ -53,4 +53,6 @@ public interface SystemSetttingDao {
Integer queryDepartmentNameGrade(String staffGradeName,Integer organizationId); Integer queryDepartmentNameGrade(String staffGradeName,Integer organizationId);
Integer queryDepartmentNameOrganization(String staffProfessionalArchitectureName,Integer schoolId); Integer queryDepartmentNameOrganization(String staffProfessionalArchitectureName,Integer schoolId);
boolean judgmentGrade(String name,Integer schoolId);
} }

@ -5,6 +5,7 @@ import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.vo.StaffVo; import com.msdw.tms.entity.vo.StaffVo;
import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -47,4 +48,11 @@ public interface UserInfoDao extends BaseMapper<UserInfoEntity> {
boolean setNUM(Integer userId); boolean setNUM(Integer userId);
List<StaffVo> queryUserInfo(StaffVo staffVo); List<StaffVo> queryUserInfo(StaffVo staffVo);
List<UserProsonalEntityVo> queryPersonalInfo(Integer userid);
List<UserProsonalEntityVo> queryPersonalFileES(Integer userid);
List<Integer> queryEmail(String email);
} }

@ -0,0 +1,45 @@
package com.msdw.tms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
@TableName("tms_experimental_report")
@Data
@Accessors(chain = true)
public class ExperimentalReportEntity {
//实验报告主键
@TableId(type = IdType.AUTO)
private Integer reportId;
//绑定实验id
private Integer projectId;
//实验原理
private String principle;
//实验内容
private String content;
//实验步骤
private String step;
//实验数据
private String data;
//实验分析
private String analysis;
//实验结论
private String conclusion;
//实验总结
private String summarize;
//对本实验过程的方法及手段的改进建议
private String improvement;
//老师评语
private String comment;
//绑定学生id
private Integer studentId;
//绑定老师id
private Integer teacherId;
//学时
private String period;
//实验室名称
private String laboratory;
}

@ -0,0 +1,31 @@
package com.msdw.tms.entity.vo;
import com.msdw.tms.entity.ExperimentalReportEntity;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class ExperimentalReportVo extends ExperimentalReportEntity {
//学生用户id
private int userId;
//学生姓名
private String userName;
//学号
private String workNumber;
//学生班级id
private int experimentId;
//学生班级
private String experimentalClassName;
//项目名称
private String projectName;
//实验目标
private String experimentGoal;
//指导老师
private String teacherName;
//实验时间(提交时间)
private String submitTime;
//实验成绩
private Integer score;
}

@ -84,6 +84,10 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 封装多个项目id * 封装多个项目id
*/ */
private List<Integer> projectIds; private List<Integer> projectIds;
/**
* 学生ID
*/
private Integer studentId;
// /** // /**
// * 班级实验状态,0 不限,1 未发布,2 进行中,3 已完成 // * 班级实验状态,0 不限,1 未发布,2 进行中,3 已完成

@ -36,4 +36,6 @@ public class StudentVo extends StudentEntity {
private String uniqueIdentificationAccount; private String uniqueIdentificationAccount;
//绑定所属院校名称 //绑定所属院校名称
private String schoolAppellationName; private String schoolAppellationName;
//绑定所属院校id
private Integer schoolAppellationId;
} }

@ -0,0 +1,12 @@
package com.msdw.tms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.ExperimentalReportVo;
public interface ExperimentalReportService extends IService<ExperimentalReportEntity> {
R queryReport(ExperimentalReportEntity entity);
}

@ -5,7 +5,9 @@ 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.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -29,4 +31,7 @@ public interface UserInfoService extends IService<UserInfoEntity> {
Integer queryStudentPhone(String phone,Integer schoolId); Integer queryStudentPhone(String phone,Integer schoolId);
HashMap<String, UserProsonalEntityVo> queryUserInfo(Integer id);
void updateAccount(Integer userId);
} }

@ -41,6 +41,7 @@ public class ClassTeachingServiceImpl implements ClassTeachingService {
recordVo.setIsdel(Constant.IsDel.NOT_DEL.getType()); recordVo.setIsdel(Constant.IsDel.NOT_DEL.getType());
this.classMapper.updateSurplusTimeNull(recordVo);//将已结束的实验的倒计时重置为0 this.classMapper.updateSurplusTimeNull(recordVo);//将已结束的实验的倒计时重置为0
this.classMapper.updateSurplusTime(recordVo);//倒计时:设定倒计时的剩余时间 this.classMapper.updateSurplusTime(recordVo);//倒计时:设定倒计时的剩余时间
this.classMapper.updateSurplusTimeUp(recordVo);//倒计时:设定距离实验开始的剩余时间
IPage<ProjectRecordVo> schoolRecord = this.classMapper.getByClassRecord(page1, recordVo); IPage<ProjectRecordVo> schoolRecord = this.classMapper.getByClassRecord(page1, recordVo);
PageUtils pageUtils = new PageUtils(schoolRecord); PageUtils pageUtils = new PageUtils(schoolRecord);
return pageUtils; return pageUtils;

@ -0,0 +1,31 @@
package com.msdw.tms.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.dao.ExperimentalReportDao;
import com.msdw.tms.dao.ExperimentalTeachingDao;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.ExperimentalReportVo;
import com.msdw.tms.service.ExperimentalReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ExperimentalReportServiceImpl extends ServiceImpl<ExperimentalReportDao,ExperimentalReportEntity> implements ExperimentalReportService {
@Autowired
private ExperimentalReportDao reportDao;
@Override
public R queryReport(ExperimentalReportEntity entity) {
if (entity.getStudentId()==null|entity.getProjectId()==null){
return R.error(400,"studentId / projectId不能为空");
}
ExperimentalReportVo result = reportDao.queryReport(entity);
return R.ok().put("data",result);
}
}

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.Query; import com.msdw.tms.common.utils.Query;
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.dao.UserDao;
import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity;
@ -17,7 +18,9 @@ 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 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.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -25,6 +28,8 @@ 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 {
@Autowired
private ClassTeachingDao classTeachingDao;
// @Override // @Override
// public PageUtils queryPage(Map<String, Object> params) { // public PageUtils queryPage(Map<String, Object> params) {
@ -37,11 +42,25 @@ public class ExperimentalTeachingServiceImpl extends ServiceImpl<ExperimentalTea
// } // }
@Override @Override
@Transactional
public PageUtils queryExperimentalTeaching(Integer page, Integer size, ExperimentalTeachingEntityVO vo) { public PageUtils queryExperimentalTeaching(Integer page, Integer size, ExperimentalTeachingEntityVO vo) {
ProjectRecordVo recordVo = new ProjectRecordVo();
recordVo.setStartTime(vo.getStartTime()).setEndTime(vo.getStopTime());
classTeachingDao.updateSurplusTimeNull(recordVo);//将已结束的实验的倒计时重置为0
classTeachingDao.updateSurplusTime(recordVo);//倒计时:设定倒计时的剩余时间
Page<T> page1 = new Page<>(page, size); Page<T> page1 = new Page<>(page, size);
ExperimentalTeachingDao userDao = this.getBaseMapper(); ExperimentalTeachingDao userDao = this.getBaseMapper();
IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo); IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo);
PageUtils pageUtils = new PageUtils(list); PageUtils pageUtils = new PageUtils(list);
return pageUtils; return pageUtils;
} }
// @Override
// public PageUtils queryExperimentalTeaching(Integer page, Integer size, ExperimentalTeachingEntityVO vo) {
// Page<T> page1 = new Page<>(page, size);
// ExperimentalTeachingDao userDao = this.getBaseMapper();
// IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo);
// PageUtils pageUtils = new PageUtils(list);
// return pageUtils;
// }
} }

@ -94,7 +94,6 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao,StudentEntity> im
} }
} }
@Transactional
@Override @Override
public boolean updateStudent(StudentVo studentVo) { public boolean updateStudent(StudentVo studentVo) {
try { try {
@ -108,7 +107,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao,StudentEntity> im
@Override @Override
public void updateWorkNumber(Integer studentId) { public void updateWorkNumber(Integer studentId) {
studentDao.updateWorkNumber("00");//将学号重置为00 studentDao.updateWorkNumber("00",studentId);//将学号重置为00
} }
@Override @Override

@ -60,6 +60,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
staffVo.setUniqueIdentificationAccount(String.valueOf(System.currentTimeMillis())).setIsdel(Constant.IsDel.NOT_DEL.getType()).setPassword(ConstantUtils.INITIAL_PASSWORD); staffVo.setUniqueIdentificationAccount(String.valueOf(System.currentTimeMillis())).setIsdel(Constant.IsDel.NOT_DEL.getType()).setPassword(ConstantUtils.INITIAL_PASSWORD);
String account = staffVo.getAccount(); String account = staffVo.getAccount();
String phone = staffVo.getPhone(); String phone = staffVo.getPhone();
String email = staffVo.getEmail();
String workNumber = staffVo.getWorkNumber(); String workNumber = staffVo.getWorkNumber();
List<StaffEntity> staff = staffVo.getStaff(); List<StaffEntity> staff = staffVo.getStaff();
if (phone!=null&&phone!=""){ if (phone!=null&&phone!=""){
@ -68,6 +69,12 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
return R.error(400,"手机号不能重复"); return R.error(400,"手机号不能重复");
} }
} }
if (email!=null&&email!=""){
List<Integer> resultE = userInfoDao.queryEmail(email);
if (resultE.size()>0){
return R.error(400,"手机号不能重复");
}
}
List<StaffVo> resultA = userInfoDao.queryAccount(account); List<StaffVo> resultA = userInfoDao.queryAccount(account);
// List<Integer> resultW = systemSetttingDao.queryWorkNumber(workNumber); // List<Integer> resultW = systemSetttingDao.queryWorkNumber(workNumber);
if(resultA.size()>0){ if(resultA.size()>0){
@ -122,18 +129,16 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
staffVo.setPlatformId(ConstantUtils.PLATFORMID); staffVo.setPlatformId(ConstantUtils.PLATFORMID);
String account = staffVo.getAccount(); String account = staffVo.getAccount();
String phone = staffVo.getPhone(); String phone = staffVo.getPhone();
String email = staffVo.getEmail();
String workNumber = staffVo.getWorkNumber(); String workNumber = staffVo.getWorkNumber();
List<StaffEntity> staff = staffVo.getStaff();//获取员工数据 List<StaffEntity> staff = staffVo.getStaff();//获取员工数据
StaffVo result = userInfoDao.queryAccountUpdate(staffVo.getUserId()); StaffVo result = userInfoDao.queryAccountUpdate(staffVo.getUserId());
// String roleIds = result.get(0).getRoleId();
// StaffVo staffVo1 = result.get(0);
String roleIds = result.getRoleId(); String roleIds = result.getRoleId();
String[] splitOld = staffVo.getRoleId().split(","); String[] splitOld = staffVo.getRoleId().split(",");
String[] splitNew = roleIds.split(","); String[] splitNew = roleIds.split(",");
if (splitOld.length==splitNew.length&&splitNew.length<2){ if (splitOld.length==splitNew.length&&splitNew.length<3){
for (int i = 0;i<splitNew.length;i++){ for (int i = 0;i<splitNew.length;i++){
// for (int i = 0;i<splitNew.length+1;i++){
boolean a = systemSetttingDao.updateStaff(staff.get(i)); boolean a = systemSetttingDao.updateStaff(staff.get(i));
if (!a){throw new RuntimeException();} if (!a){throw new RuntimeException();}
} }
@ -161,6 +166,12 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
return R.error(400,"手机号不能重复"); return R.error(400,"手机号不能重复");
} }
} }
if (email!=null&&email!=""){
List<Integer> resultE = userInfoDao.queryEmail(email);
if (resultE.size()>0){
return R.error(400,"手机号不能重复");
}
}
if(resultA.size()>0){ if(resultA.size()>0){
return R.error(400,"账号不能重复"); return R.error(400,"账号不能重复");
}else if (resultW.size()>0){ }else if (resultW.size()>0){
@ -220,6 +231,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
} }
@Override @Override
@Transactional
public Map<String, String> upload(MultipartFile file) throws IOException { public Map<String, String> upload(MultipartFile file) throws IOException {
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
List<StaffVo> staffs = ExcelImportHelper.readStaff(file); List<StaffVo> staffs = ExcelImportHelper.readStaff(file);
@ -233,10 +245,16 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
Long ii = 1L; Long ii = 1L;
try { try {
for (int i = 0;i<staffs.size();i++){ for (int i = 0;i<staffs.size();i++){
++ii;
StaffVo staffVo = staffs.get(i); StaffVo staffVo = staffs.get(i);
String phone = staffVo.getPhone(); String phone = staffVo.getPhone();
String email = staffVo.getEmail();
String workNumber = staffVo.getWorkNumber(); String workNumber = staffVo.getWorkNumber();
String account = staffVo.getAccount(); String account = staffVo.getAccount();
String gradeName = staffVo.getStaffGradeName();
String architectureName = staffVo.getStaffProfessionalArchitectureName();
String gradeNameTwo = staffVo.getStaffGradeNameTwo();
String architectureNameTwo = staffVo.getStaffProfessionalArchitectureNameTwo();
StaffVo staff = new StaffVo(); StaffVo staff = new StaffVo();
staff.setSchoolId(ConstantUtils.Keda_schoolId);//设定科大学校id staff.setSchoolId(ConstantUtils.Keda_schoolId);//设定科大学校id
String schoolAppellationName = staffVo.getSchoolAppellationName(); String schoolAppellationName = staffVo.getSchoolAppellationName();
@ -246,17 +264,14 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
if (resultU.size()>0){//重复的数据 if (resultU.size()>0){//重复的数据
StaffExportVo vo = new StaffExportVo(); StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("用户信息已存在"); vo.setFailureMsg("用户信息已存在");
++ii;
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i); staffs.remove(i);
i--; i--;
failVo1.add(vo); failVo1.add(vo);
continue; continue;
} }else if (resultW.size()>0){
if (resultW.size()>0){
StaffExportVo vo = new StaffExportVo(); StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("重复的工号"); vo.setFailureMsg("重复的工号");
++ii;
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i); staffs.remove(i);
i--; i--;
@ -265,7 +280,6 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
}else if (resultA.size()>0){ }else if (resultA.size()>0){
StaffExportVo vo = new StaffExportVo(); StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("重复的账号"); vo.setFailureMsg("重复的账号");
++ii;
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i); staffs.remove(i);
i--; i--;
@ -276,24 +290,107 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
if (resultP.size()>0){ if (resultP.size()>0){
StaffExportVo vo = new StaffExportVo(); StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("重复的手机号码"); vo.setFailureMsg("重复的手机号码");
++ii;
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i); staffs.remove(i);
i--; i--;
failVo1.add(vo); failVo1.add(vo);
continue; continue;
} }
}else if (email!=null&&email!=""){
List<Integer> resultE = userInfoDao.queryEmail(email);
if (resultE.size()>0){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("重复的邮箱号");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
} }
++ii; }
if (!staffs.isEmpty()&&staffs.size()>0){ if (!staffs.isEmpty()&&staffs.size()>0){
staffVo.setPassword(ConstantUtils.INITIAL_PASSWORD).setUniqueIdentificationAccount(String.valueOf(System.currentTimeMillis())); staffVo.setPassword(ConstantUtils.INITIAL_PASSWORD).setUniqueIdentificationAccount(String.valueOf(System.currentTimeMillis()));
userInfoDao.addUserinfo(staffVo);
staff.setPlatformId(ConstantUtils.PLATFORMID).setUserId(staffVo.getUserId()); staff.setPlatformId(ConstantUtils.PLATFORMID).setUserId(staffVo.getUserId());
staffVo.setPlatformId(ConstantUtils.PLATFORMID);
String[] split = staffVo.getRoleId().split(","); String[] split = staffVo.getRoleId().split(",");
String s = "";
for (String str : split) {
s=s+str;
}
if (s.indexOf("2")!=-1){
if (architectureName!=null&&architectureName!=""){
if (gradeName==null|gradeName==""){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("二级部门不能为空");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}else{
Integer b = systemSetttingDao.queryDepartmentNameOrganization(architectureName, ConstantUtils.Keda_schoolId);
if (b==null){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("不存在的一级部门");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}
boolean a = systemSetttingDao.judgmentGrade(architectureName,ConstantUtils.Keda_schoolId);
if (!a){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("不存在此子级部门");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}
}
}
}else if (s.indexOf("3")!=-1){
if (architectureNameTwo!=null&&architectureNameTwo!=""){
if (gradeNameTwo==null|gradeNameTwo==""){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("二级部门不能为空");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}else{
Integer b = systemSetttingDao.queryDepartmentNameOrganization(architectureNameTwo, ConstantUtils.Keda_schoolId);
if (b==null){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("不存在的一级部门");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}
boolean a = systemSetttingDao.judgmentGrade(architectureNameTwo,ConstantUtils.Keda_schoolId);
if (!a){
StaffExportVo vo = new StaffExportVo();
vo.setFailureMsg("不存在此子级部门");
vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName());
staffs.remove(i);
i--;
failVo1.add(vo);
continue;
}
}
}
}
userInfoDao.addUserinfo(staffVo);
for (String str : split){ for (String str : split){
if (Integer.parseInt(str)==2){ if (Integer.parseInt(str)==2){
Integer gradeId = systemSetttingDao.queryDepartmentNameGrade(staffVo.getStaffGradeName(),ConstantUtils.Keda_schoolId);
Integer organizationId = systemSetttingDao.queryDepartmentNameOrganization(staffVo.getStaffProfessionalArchitectureName(),ConstantUtils.Keda_schoolId); Integer organizationId = systemSetttingDao.queryDepartmentNameOrganization(staffVo.getStaffProfessionalArchitectureName(),ConstantUtils.Keda_schoolId);
Integer gradeId = systemSetttingDao.queryDepartmentNameGrade(staffVo.getStaffGradeName(),organizationId);
staffVo.setStaffGradeId(gradeId).setStaffProfessionalArchitectureId(organizationId); staffVo.setStaffGradeId(gradeId).setStaffProfessionalArchitectureId(organizationId);
boolean b = systemSetttingDao.addStaffManager(staffVo); boolean b = systemSetttingDao.addStaffManager(staffVo);
if(!b){throw new RuntimeException();} if(!b){throw new RuntimeException();}

@ -11,6 +11,7 @@ import com.msdw.tms.entity.response.CommonCode;
import com.msdw.tms.entity.response.ResponseResult; import com.msdw.tms.entity.response.ResponseResult;
import com.msdw.tms.entity.response.ResultCode; import com.msdw.tms.entity.response.ResultCode;
import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import com.msdw.tms.service.UserInfoService; import com.msdw.tms.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -114,4 +115,21 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoDao, UserInfoEntity
} }
} }
@Override
public HashMap<String, UserProsonalEntityVo> queryUserInfo(Integer id) {
HashMap map = new HashMap();
//用户sql user
List<UserProsonalEntityVo> userInfo = userInfoDao.queryPersonalInfo(id);
map.put("userInfo",userInfo);
List<UserProsonalEntityVo> prosonalEntityESVos = userInfoDao.queryPersonalFileES(id);//档案里无学校信息时
map.put("userPersonalFile",prosonalEntityESVos);
return map;
}
@Override
public void updateAccount( Integer userId) {
userInfoDao.setNUM(userId);
}
} }

@ -64,13 +64,22 @@
now( ) >= start_time now( ) >= start_time
AND stop_time >= now( ) AND stop_time >= now( )
AND is_del = 0 AND is_del = 0
AND `status` !=3
</update> </update>
<update id="updateSurplusTimeNull" parameterType="com.msdw.tms.entity.ExperimentalTeachingEntity"> <update id="updateSurplusTimeNull" parameterType="com.msdw.tms.entity.ExperimentalTeachingEntity">
UPDATE tms_experimental_teaching UPDATE tms_experimental_teaching
SET surplus_time = 0 SET surplus_time = 0
WHERE WHERE
now( ) >= stop_time is_del = 0
AND ( now( ) >= stop_time OR `status` = 3 )
</update>
<update id="updateSurplusTimeUp">
UPDATE tms_experimental_teaching
SET surplus_time = TIMEDIFF(start_time,NOW( ) )
WHERE
start_time > now()
AND is_del = 0 AND is_del = 0
AND `status` !=3
</update> </update>
<select id="querySimulationPlayList" resultType="com.msdw.tms.entity.BroadcastEntity"> <select id="querySimulationPlayList" resultType="com.msdw.tms.entity.BroadcastEntity">

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.msdw.tms.dao.ExperimentalReportDao">
<resultMap id="reportMap" type="com.msdw.tms.entity.vo.ExperimentalReportVo">
<result property="experimentalClassName" column="experimental_class_name"></result>
<result property="startTime" column="start_time"></result>
<result property="experimentGoal" column="experiment_goal"></result>
<result property="projectName" column="project_name"></result>
</resultMap>
<select id="queryReport" resultType="com.msdw.tms.entity.vo.ExperimentalReportVo">
SELECT
u.userId,
u.userName,
stu.workNumber,
tet.project_name,
tet.id AS experimentId,
tet.experimental_class_name,
hpm.experimentalGoal AS experiment_goal,
tpr.submitTime,
tpr.score,
( SELECT userName FROM hr_user_info WHERE userId = ( SELECT teacherId FROM tms_experimental_report WHERE studentId = #{studentId} AND projectId = #{projectId} ) ) AS teacherName,
ter.period,
ter.laboratory,
ter.principle,
ter.content,
ter.step,
ter.`data`,
ter.analysis,
ter.conclusion,
ter.summarize,
ter.improvement,
ter.`comment`
FROM
hr_user_info u,
student stu,
tms_experimental_report ter,
hr_project_management hpm,
tms_experimental_teaching tet,
tms_project_record tpr
WHERE
u.userId = stu.userId
AND stu.studentId = ter.studentId
AND hpm.projectId = tet.project_id
AND ter.projectId = tet.project_id
AND stu.userId = tpr.userId
AND tet.project_id = tpr.projectId
AND tet.stop_time = tpr.endTime
AND ter.studentId = #{studentId}
AND ter.projectId = #{projectId}
AND ter.isdel = 0
</select>
</mapper>

@ -19,7 +19,8 @@
invitation_code, invitation_code,
is_code, is_code,
user_id, user_id,
creation_time creation_time,
surplus_time
FROM FROM
tms_experimental_teaching tms_experimental_teaching
WHERE WHERE

@ -28,7 +28,7 @@
recordState recordState
FROM FROM
tms_project_record tpr tms_project_record tpr
LEFT JOIN tms_project tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
WHERE WHERE
tpr.userId = #{pro.userid} tpr.userId = #{pro.userid}
AND AND
@ -48,7 +48,7 @@
tet.experimental_class_name as experimentalClassName tet.experimental_class_name as experimentalClassName
FROM FROM
tms_project_record tpr tms_project_record tpr
LEFT JOIN tms_project tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
WHERE WHERE
tpr.userId = #{pro.userid} tpr.userId = #{pro.userid}
@ -68,7 +68,7 @@
tet.experimental_class_name tet.experimental_class_name
FROM FROM
tms_project_record tpr tms_project_record tpr
LEFT JOIN tms_project tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
LEFT JOIN tms_experimental_teaching tet ON tpr.projectId = tet.project_id LEFT JOIN tms_experimental_teaching tet ON tpr.projectId = tet.project_id
WHERE WHERE
tpr.userId = #{userid} tpr.userId = #{userid}
@ -110,7 +110,7 @@
COUNT(DISTINCT CASE WHEN recordState = '0' THEN recordState END) as tobescored COUNT(DISTINCT CASE WHEN recordState = '0' THEN recordState END) as tobescored
FROM FROM
tms_project_record tpr tms_project_record tpr
LEFT JOIN tms_project tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
LEFT JOIN hr_user_info u ON tpr.userId = u.userId LEFT JOIN hr_user_info u ON tpr.userId = u.userId
LEFT JOIN school sc ON u.schoolId = sc.schoolId LEFT JOIN school sc ON u.schoolId = sc.schoolId
WHERE WHERE

@ -10,7 +10,7 @@
u.userName, u.userName,
u.account, u.account,
u.logInNumber, u.logInNumber,
u.schoolAppellationId, u.schoolId AS schoolAppellationId,
u.disableAccount, u.disableAccount,
u.lastLoginTime, u.lastLoginTime,
s.roleId, s.roleId,
@ -47,7 +47,7 @@
SELECT * FROM school WHERE schoolName = #{schoolAppellationName} SELECT * FROM school WHERE schoolName = #{schoolAppellationName}
</select> </select>
<select id="querySchoolAppellationName" resultType="java.lang.Integer"> <select id="querySchoolAppellationName" resultType="java.lang.Integer">
SELECT schoolAppellationId FROM school WHERE schoolName = #{schoolAppellationName} SELECT schoolId FROM school WHERE schoolName = #{schoolAppellationName}
</select> </select>
<insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId"> <insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId">
@ -94,9 +94,9 @@
<if test="account!=null">u.account = #{account},</if> <if test="account!=null">u.account = #{account},</if>
<if test="phone!=null">u.phone = #{phone},</if> <if test="phone!=null">u.phone = #{phone},</if>
<if test="phone==null">u.phone = NULL,</if> <if test="phone==null">u.phone = NULL,</if>
<if test="email!=null">u.email = #{email}</if> <if test="email!=null">u.email = #{email},</if>
<if test="email==null">u.email = NULL</if> <if test="email==null">u.email = NULL,</if>
<if test="schoolAppellationId!=null">u.schoolId = #{schoolAppellationId}</if>> <if test="schoolAppellationId!=null">u.schoolId = #{schoolAppellationId}</if>
</set> </set>
WHERE WHERE
u.userId = s.userId u.userId = s.userId
@ -106,7 +106,7 @@
<!-- <if test="schoolId!=null">s.schoolId = #{schoolId},</if>--> <!-- <if test="schoolId!=null">s.schoolId = #{schoolId},</if>-->
<!-- <if test="schoolId!=null">u.schoolId = #{schoolId},</if>--> <!-- <if test="schoolId!=null">u.schoolId = #{schoolId},</if>-->
<update id="updateWorkNumber"> <update id="updateWorkNumber">
update student set workNumber = #{workNumber} update student set workNumber = #{workNumber} where studentId = #{studentId}
</update> </update>
</mapper> </mapper>

@ -159,4 +159,15 @@
<select id="queryDepartmentNameOrganization" resultType="java.lang.Integer"> <select id="queryDepartmentNameOrganization" resultType="java.lang.Integer">
select staffProfessionalArchitectureId from staff_professional_architecture where schoolId = #{schoolId} and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName} select staffProfessionalArchitectureId from staff_professional_architecture where schoolId = #{schoolId} and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName}
</select> </select>
<select id="judgmentGrade" resultType="java.lang.Boolean">
SELECT
staffGradeName
FROM
staff_grade g,
staff_professional_architecture a
WHERE
g.staffProfessionalArchitectureId = a.staffProfessionalArchitectureId
AND a.schoolId = #{schoolId}
AND a.staffProfessionalArchitectureName = #{name}
</select>
</mapper> </mapper>

@ -6,10 +6,10 @@
<insert id="add" useGeneratedKeys="true" keyProperty="userId" keyColumn="userId"> <insert id="add" useGeneratedKeys="true" keyProperty="userId" keyColumn="userId">
insert into hr_user_info( insert into hr_user_info(
userName, uniqueIdentificationAccount, provinceId, userName, uniqueIdentificationAccount, provinceId,
cityId, schoolId, phone,account,password,roleId,schoolAppellationId,creationTime) cityId, schoolId, phone,account,password,roleId,schoolId,creationTime)
values( values(
#{userName}, #{uniqueIdentificationAccount}, #{provinceId}, #{userName}, #{uniqueIdentificationAccount}, #{provinceId},
#{cityId}, #{schoolId},#{phone}, #{account},#{password},#{roleId},#{schoolAppellationId},now()) #{cityId}, #{schoolId},#{phone}, #{account},#{password},#{roleId},#{schoolId},now())
</insert> </insert>
<update id="userInfupdateUserInfoById" parameterType="com.msdw.tms.entity.UserInfoEntity"> <update id="userInfupdateUserInfoById" parameterType="com.msdw.tms.entity.UserInfoEntity">
@ -123,7 +123,7 @@
<insert id="saveUserInfo" useGeneratedKeys="true" keyProperty="userId" keyColumn="userId"> <insert id="saveUserInfo" useGeneratedKeys="true" keyProperty="userId" keyColumn="userId">
INSERT INTO hr_user_info ( userName,email,phone,uniqueIdentificationAccount, schoolId, account,password, roleId,isdel,creationTime) INSERT INTO hr_user_info ( userName,email,phone,uniqueIdentificationAccount, schoolId, account,password, roleId,isdel,creationTime)
VALUES VALUES
( #{userName},#{email},#{phone},#{uniqueIdentificationAccount}, #{schoolAppellationId}, #{account}, #{password}, 4 ,0,now()) ( #{userName},#{email},#{phone},#{uniqueIdentificationAccount}, #{schoolId}, #{account}, #{password}, 4 ,0,now())
</insert> </insert>
<!-- <insert id="bacthAddStudents">--> <!-- <insert id="bacthAddStudents">-->
<!-- insert into hr_user_info(--> <!-- insert into hr_user_info(-->
@ -185,7 +185,7 @@
email = #{email}, email = #{email},
</if> </if>
<if test="schoolAppellationId !=null"> <if test="schoolAppellationId !=null">
schoolAppellationId = #{schoolAppellationId}, schoolId = #{schoolAppellationId},
</if> </if>
<if test="roleId !=null"> <if test="roleId !=null">
roleId = #{roleId} roleId = #{roleId}
@ -196,7 +196,67 @@
<update id="setNUM"> <update id="setNUM">
UPDATE hr_user_info u UPDATE hr_user_info u
SET SET
u.account = '00',u.phone = '00' u.account = '00',u.phone = null
WHERE userId = #{userId} WHERE userId = #{userId}
</update> </update>
<select id="queryPersonalFileES" parameterType="com.msdw.tms.entity.UserPersonalFileEntity"
resultType="hashMap">
SELECT
personalFileId,
schoolId,
schoolName,
disciplineId,
disciplineName,
professionalClassId,
professionalClassName,
professionalId,
professionalName,
personalCareerId
FROM
hr_personal_file
WHERE
userId = #{userId}
</select>
<select id="queryPersonalInfo" parameterType="com.msdw.tms.entity.UserInfoEntity"
resultType="hashMap">
SELECT
u.userId,
userName,
u.sex,
u.email,
u.phone,
u.account,
u.countries,
c.cityId,
c.cityName,
u.dateBirth,
u.weChatID,
u.IDNumber,
u.documentType,
u.educationDegree,
pro.provinceId,
pro.provinceName,
s.schoolId,
s.schoolName
FROM
hr_user_info u,
school s,
city c,
province pro
WHERE
u.provinceId = pro.provinceId
AND u.schoolId = s.schoolId
AND u.cityId = c.cityId
AND u.isdel = 0
AND u.provinceId = c.provinceId
AND u.userId = #{userid}
AND pro.isdel = 0
AND c.isdel = 0
AND s.isdel = 0
</select>
<select id="queryEmail" resultType="java.lang.Integer">
select useId from hr_user_info where email = #{email}
</select>
</mapper> </mapper>

@ -159,7 +159,7 @@ public class SnowflakeIdUtils {
return System.currentTimeMillis(); return System.currentTimeMillis();
} }
//==============================Test============================================= //==============================JustTest=============================================
/** /**
* 测试 * 测试

@ -1,8 +0,0 @@
package com.msdw.tms;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class Test {
}

@ -0,0 +1,27 @@
package com.msdw.tms.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.Date;
@SpringBootTest
public class ExperimentalTeachingTest {
@Autowired
private ExperimentalTeachingService service;
@Test
public void queryExperimentalName(){
// QueryWrapper<ExperimentalTeachingEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("experimental_name","测试");
// int count = service.count(queryWrapper);
//// System.out.println(new Date());
UpdateWrapper<ExperimentalTeachingEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.ge("stop_time",new Date()).set("status",3);
boolean result = service.update(updateWrapper);
}
}

@ -67,7 +67,7 @@ class QuestionsServiceTest {
System.out.println(questionsService.updateQuestionById(questions)); System.out.println(questionsService.updateQuestionById(questions));
} }
// @Test // @JustTest
// @Transactional // @Transactional
// void isnable() { // void isnable() {
// Integer id = 1; // Integer id = 1;
@ -120,7 +120,7 @@ class QuestionsServiceTest {
questionsService.downloadFiles(response); questionsService.downloadFiles(response);
} }
// @Test // @JustTest
// void evaluation() { // void evaluation() {
// EvaluationVO evaluation = questionsService.evaluation(); // EvaluationVO evaluation = questionsService.evaluation();
// System.out.println(evaluation.toString()); // System.out.println(evaluation.toString());

Loading…
Cancel
Save