Merge remote-tracking branch 'origin/master'

hehai
shijie 4 years ago
commit 488bd840e1
  1. 13
      src/main/java/com/msdw/tms/api/AchievementManagementApi.java
  2. 2
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  3. 38
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  4. 13
      src/main/java/com/msdw/tms/controller/ClassTeachingController.java
  5. 4
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  6. 9
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  7. 3
      src/main/java/com/msdw/tms/dao/ClassTeachingDao.java
  8. 2
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  9. 2
      src/main/java/com/msdw/tms/dao/UserDao.java
  10. 9
      src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java
  11. 8
      src/main/java/com/msdw/tms/entity/vo/AchievementManagementVO.java
  12. 10
      src/main/java/com/msdw/tms/service/AchievementManagementService.java
  13. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  14. 99
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  15. 43
      src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java
  16. 10
      src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java
  17. 7
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  18. 102
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  19. 10
      src/main/resources/mapper/tms/ClassTeachingDao.xml
  20. 5
      src/main/resources/mapper/tms/ExperimentalTeachingDao.xml
  21. 10
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  22. 5
      src/main/resources/mapper/tms/StudentDao.xml
  23. 4
      src/main/resources/mapper/tms/UserInfoDao.xml

@ -54,7 +54,7 @@ public interface AchievementManagementApi {
// R updateScore(@ApiParam(value = "recordid和score") ProjectRecordEntity entity);
@ApiOperation(value = "删除实验报告",notes = "根据实验记录主键reportId和实验报告主键recordId删除实验报告")
R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId);
R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId,@ApiParam(value = "实验报告主键",required = true) @RequestParam Integer recordId);
@ApiOperation(value = "班级实验报告列表查询",notes = "班级实验报告列表查询")
R queryEvaluationReport(@ApiParam(value = "搜索内容(学校名称/学生姓名)",required = false) String searchContant,
@ -78,4 +78,15 @@ public interface AchievementManagementApi {
@ApiOperation(value = "发布成绩",notes = "发布成绩--修改教师签名")
R updateSignatrue(@ApiParam(value = "实验报告主键reportId + 是否使用教师签名isSignature + 教师签名id signatureId + 教师评语comment") ExperimentalReportEntity entity);
@ApiOperation(value = "成绩管理删除项目",notes = "将项目管理表isdel置1")
R deleteReportByProjectId(@ApiParam(value = "项目id",required = true) Integer projectId);
@ApiOperation(value = "成绩管理:虚拟仿真实验成绩管理", notes = "成绩管理:虚拟仿真实验成绩管理")
R getImitationAchievement(@ApiParam(value = "projectId", required = false) Integer projectId);
@ApiOperation(value = "成绩管理:实验教学成绩管理", notes = "成绩管理:实验教学成绩管理")
R getTeachAchievement(@RequestParam(required = true) Integer id);
}

@ -18,7 +18,7 @@ public interface ProjectRcordControllerApi {
Integer recordState,String condition);
@ApiOperation(value = "用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录")
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions);
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid);

@ -3,6 +3,7 @@ package com.msdw.tms.controller;
import com.msdw.tms.api.AchievementManagementApi;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.*;
import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.ResultsVo;
import com.msdw.tms.service.AchievementManagementService;
import com.msdw.tms.service.ProjectRecordService;
@ -11,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@ -193,8 +195,8 @@ public class AchievementManagementController implements AchievementManagementApi
*/
@Override
@PostMapping("/deleteReport")
public R deleteReport(@RequestParam Integer reportId){
R result = service.deleteReport(reportId);
public R deleteReport(@RequestParam Integer reportId,@RequestParam Integer recordId){
R result = service.deleteReport(reportId,recordId);
return result;
}
@ -263,4 +265,36 @@ public class AchievementManagementController implements AchievementManagementApi
service.updateSignatrue(entity);
return R.ok();
}
/**
* 删除成绩管理中的项目
* @param projectId
* @return
*/
@Override
@PostMapping("/deleteReportById")
public R deleteReportByProjectId(@RequestParam Integer projectId) {
return service.deleteReportByProjectId(projectId);
}
/**
* 成绩管理:虚拟仿真实验成绩管理
*/
@Override
@GetMapping("/getImitationAchievement")
public R getImitationAchievement(@RequestParam(required = true) Integer projectId) {
List<AchievementManagementVO> result = service.getImitationAchievement(projectId);
return R.ok().put("data", result);
}
/**
* 成绩管理:实验教学成绩管理
*/
@Override
@GetMapping("/getTeachAchievement")
public R getTeachAchievement(@RequestParam(required = true) Integer id) {
List<AchievementManagementVO> result = service.getTeachAchievement(id);
return R.ok().put("data", result);
}
}

@ -54,9 +54,16 @@ public class ClassTeachingController implements ClassTeachingApi {
if (!StringUtils.isEmpty(condition)) {
recordVo.setCondition(condition);
}
if (!StringUtils.isEmpty(month)) {
// 设置固定时间(当自定义时间为空时)
if (!StringUtils.isEmpty(month) && StringUtils.isEmpty(startTime) && StringUtils.isEmpty(endTime)) {
recordVo.setMonth(month);
} else {
}
// 设置自定义时间
if (!StringUtils.isEmpty(startTime) || !StringUtils.isEmpty(endTime)) {
recordVo.setStartTime(startTime);
recordVo.setEndTime(endTime);
}
/*else {
recordVo.setMonth(null);
if (!StringUtils.isEmpty(startTime)) {
recordVo.setStartTime(startTime);
@ -64,7 +71,7 @@ public class ClassTeachingController implements ClassTeachingApi {
if (!StringUtils.isEmpty(endTime)) {
recordVo.setEndTime(endTime);
}
}
}*/
recordVo.setSchoolId(schoolId);
PageUtils page1 = classTeachingService.queryClassRecord(page, size, recordVo);
return R.ok().put("page", page1);

@ -63,8 +63,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/record")
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){
PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions);
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions,@RequestParam Integer systemId){
PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions,systemId);
return R.ok().put("data", page1);
}

@ -47,7 +47,7 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
AchievementManagementVO queryReport(Integer reportId);
void deleteReport(Integer reportId);
void deleteReport(Integer reportId,Integer recordId);
IPage<AchievementManagementVO> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId);
@ -72,4 +72,11 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
List<AchievementManagementVO> queryPythonTest(Integer eventId);
void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment);
void deleteReportById(Integer projectId);
//虚拟仿真成绩管理查询
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -23,4 +23,7 @@ public interface ClassTeachingDao {
void updateSurplusTimeLe(ProjectRecordVo recordVo);
void updateSurplusTimeGt(ProjectRecordVo recordVo);
int updateExperimentalNumber(Integer number, Integer id);
}

@ -23,7 +23,7 @@ import java.util.List;
@Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions);
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions,@Param("systemId") Integer systemId);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity);

@ -41,7 +41,7 @@ public interface UserDao extends BaseMapper<UserEntity> {
List<String> findPhoneSetTime(String phone, String checkCode,Integer types);
boolean saveCheckPhoneCode(CheckVo checkVo);
// boolean saveCheckPhoneCode(CheckVo checkVo);
List<Integer> queryPhone(CheckVo checkVo);
}

@ -22,6 +22,15 @@ public class GetByUserRecordResp {
private String submitTime;
private Integer timeSum;
private Integer userId;
private Integer systemId;
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public String getProjectName() {
return projectName;

@ -32,7 +32,7 @@ public class AchievementManagementVO extends ExperimentalReportEntity {
//提交时间
private String submitTime;
//=========================================================== 返回参数
//=========================================================== 返回参数
//项目名称
private String projectName;
@ -46,7 +46,7 @@ public class AchievementManagementVO extends ExperimentalReportEntity {
private String creationTime;
//类型(1虚拟仿真,2教学实验)
private Integer type;
private Integer type;
//
private Integer projectPermissions;
//创建时间
@ -55,6 +55,8 @@ public class AchievementManagementVO extends ExperimentalReportEntity {
//实验记录id(tms_experimental_report主键)
private Integer recordId;
private Integer reportId;
//老师签名 存放路径
private String signatureUrl;
//签名名称
@ -72,7 +74,7 @@ public class AchievementManagementVO extends ExperimentalReportEntity {
//平台id
private Integer systemId;
//=========================================================== python实验数据
//=========================================================== python实验数据
//判分点id
private Integer codeId;
//判分点-得分

@ -6,9 +6,11 @@ import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.ReportEntity;
import com.msdw.tms.entity.ResultsEntity;
import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.ResultsVo;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
public interface AchievementManagementService extends IService<ExperimentalReportEntity> {
@ -30,7 +32,7 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R queryReport(Integer reportId );
R deleteReport(Integer reportId);
R deleteReport(Integer reportId,Integer recordId);
R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size);
@ -41,4 +43,10 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R updateComment(ExperimentalReportEntity entity);
void updateSignatrue(ExperimentalReportEntity entity);
R deleteReportByProjectId(Integer projectId);
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -17,7 +17,7 @@ import java.util.List;
*/
public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions);
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid);

@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.*;
@Slf4j
@Service
public class AchievementManagementServiceImpl extends ServiceImpl<AchievementManagementDao, ExperimentalReportEntity> implements AchievementManagementService {
@ -58,39 +59,39 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
experimentalReportEntity.setReportId(reportId);
ExperimentalReportEntity experimentalReportEntity1 = baseMapper.getReport(experimentalReportEntity);
List<UserScoreVO> score = baseMapper.getScore(userScoreVO);
obj.put("score",score);
obj.put("experimentalReportEntity",experimentalReportEntity1);
obj.put("score", score);
obj.put("experimentalReportEntity", experimentalReportEntity1);
List<Integer> tradingJudgmentPointsIds = baseMapper.queryTradingJudgmentPointsId(reportId);
Integer size = tradingJudgmentPointsIds.size();
for (int i = 0;i<size; i++){
for (int i = 0; i < size; i++) {
Integer tradingJudgmentPointsId = tradingJudgmentPointsIds.get(i);
List<JudgmentPointsRuleVO> judgmentPointsRuleList = baseMapper.getUserAnswers(tradingJudgmentPointsId);
map.put("judgmentPointsRuleList"+i,judgmentPointsRuleList);
map.put("judgmentPointsRuleList" + i, judgmentPointsRuleList);
}
obj.put("userAnswersList",map);
return R.ok().put("data",obj);
obj.put("userAnswersList", map);
return R.ok().put("data", obj);
}
@Override
public R getTeacher(Integer projectId) {
String name = baseMapper.getTeacher(projectId);
return R.ok().put("name",name);
return R.ok().put("name", name);
}
@Override
public List<ResultsEntity> list(ResultsVo vo,Integer page,Integer size) {
public List<ResultsEntity> list(ResultsVo vo, Integer page, Integer size) {
List<ResultsEntity> list = achievementManagementDao.list(vo);
return list;
}
@Override
public List<ReportEntity> reportList(ResultsVo vo,Integer page,Integer size) {
public List<ReportEntity> reportList(ResultsVo vo, Integer page, Integer size) {
List<ReportEntity> reportList = achievementManagementDao.reportList(vo);
return reportList;
}
@Override
public List<ResultsEntity> newList(ResultsVo vo,Integer page,Integer size) {
public List<ResultsEntity> newList(ResultsVo vo, Integer page, Integer size) {
List<ResultsEntity> newList = achievementManagementDao.newList(vo);
return newList;
}
@ -152,36 +153,38 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
Integer eventId = report.getEventId();
ProjectRecordEntity record = projectRecordDao.queryReport(eventId);
String userName = userInfoDao.queryUserReport(record.getUserid());
if (report.getProjectId()!=null){
if (report.getProjectId() != null) {
String evaluationName = achievementManagementDao.queryEvaluationName(report.getProjectId());
report.setEvaluationName(evaluationName);
}
//python实验数据
Integer systemId = report.getSystemId();
if (systemId==1|systemId==4|systemId==5) {
if (systemId == 1 | systemId == 4 | systemId == 5) {
List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(eventId);
map.put("data", data);
}
report.setUserName(userName);
map.put("report",report);
map.put("record",record);
return R.ok().put("data",map);
map.put("report", report);
map.put("record", record);
return R.ok().put("data", map);
}
@Override
@Transactional
public R deleteReport(Integer reportId) {
achievementManagementDao.deleteReport(reportId);
public R deleteReport(Integer reportId,Integer recordId) {
achievementManagementDao.deleteReport(reportId,recordId);
return R.ok();
}
@Override
public R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size) {
Page<T> tPage = new Page<>(page,size);
IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage,searchContant,projectId);
public R queryEvaluationReport(String searchContant, Integer projectId, Integer page, Integer size) {
Page<T> tPage = new Page<>(page, size);
IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage, searchContant, projectId);
PageUtils result = new PageUtils(data);
return R.ok().put("data",result);
return R.ok().put("data", result);
}
@Override
@ -190,10 +193,10 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
List<Integer> list = new ArrayList<>();
String[] split = ids.split(",");
for (int i = 0;i<split.length;i++){
for (int i = 0; i < split.length; i++) {
list.add(Integer.parseInt(split[i]));
}
List<AchievementImportRequest> achievement = achievementManagementDao.queryAchievement(list);
List<AchievementImportRequest> achievement = achievementManagementDao.queryAchievement(list);
//2.加载模板流数据
ClassPathResource resource = new ClassPathResource("excel-template/川大成绩管理实验记录导出模板.xlsx");
@ -205,7 +208,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
@Override
public R queryAchievement(Integer systemId,Integer projectPermissions, String searchContant, String startingtime,
public R queryAchievement(Integer systemId, Integer projectPermissions, String searchContant, String startingtime,
String endtime, Integer month) {
try {
List<AchievementManagementVO> fictitious;
@ -213,14 +216,16 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
List<AchievementManagementVO> vo = new ArrayList<>();
List<Integer> educationResult = achievementManagementDao.countEducationProjectId();//获取教学实验的主键id
List<Integer> fictitiousResult = achievementManagementDao.countFictitiousProjectId();//获取教学实验的主键id
if (projectPermissions==null){projectPermissions=-9999;}
if (projectPermissions==0){//只查询练习项目
if (projectPermissions == null) {
projectPermissions = -9999;
}
if (projectPermissions == 0) {//只查询练习项目
fictitious = achievementManagementDao.queryFictitiousRecord(systemId, searchContant, startingtime, endtime, month, fictitiousResult);
vo = fictitious;
}else if (projectPermissions==1){//只查询考核项目
} else if (projectPermissions == 1) {//只查询考核项目
education = achievementManagementDao.queryEducationRecord(systemId, searchContant, startingtime, endtime, month, educationResult);
vo = education;
}else {//查询练习+考核项目
} else {//查询练习+考核项目
if (educationResult.size() == 0) {
if (fictitiousResult.size() > 0) {
fictitious = achievementManagementDao.queryFictitiousRecord(systemId, searchContant, startingtime, endtime, month, fictitiousResult);
@ -245,10 +250,10 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
}
}
return R.ok().put("data",vo);
}catch (RuntimeException e){
return R.ok().put("data", vo);
} catch (RuntimeException e) {
log.info(e.getMessage());
return R.error(500,"系统异常!!!");
return R.error(500, "系统异常!!!");
}
}
@ -267,14 +272,36 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
Integer signatureId = entity.getSignatureId();
Integer reportId = entity.getReportId();
String comment = entity.getComment();
if (comment==""){
if (comment == "") {
comment = null;
}
if (isSignature==1){
achievementManagementDao.updateSignatrue(1,signatureId,reportId,comment);
}else {
achievementManagementDao.updateSignatrue(0,null,reportId,comment);
if (isSignature == 1) {
achievementManagementDao.updateSignatrue(1, signatureId, reportId, comment);
} else {
achievementManagementDao.updateSignatrue(0, null, reportId, comment);
}
}
@Override
public R deleteReportByProjectId(Integer projectId) {
achievementManagementDao.deleteReportById(projectId);
return R.ok();
}
@Override
public List<AchievementManagementVO> getImitationAchievement(Integer projectId) {
List<AchievementManagementVO> list = achievementManagementDao.getImitationAchievement(projectId);
return list;
}
@Override
public List<AchievementManagementVO> getTeachAchievement(Integer id) {
return achievementManagementDao.getTeachAchievement(id);
}
}

@ -2,24 +2,34 @@ package com.msdw.tms.service.impl;
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.dao.ClassTeachingDao;
import com.msdw.tms.dao.ExperimentalTeachingDao;
import com.msdw.tms.entity.BroadcastEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.vo.ExperimentalTeachingVO;
import com.msdw.tms.entity.vo.ProjectRecordVo;
import com.msdw.tms.service.ClassTeachingService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.concurrent.locks.Lock;
@Service
public class ClassTeachingServiceImpl implements ClassTeachingService {
public class ClassTeachingServiceImpl extends ServiceImpl<ExperimentalTeachingDao, ExperimentalTeachingEntity> implements ClassTeachingService {
@Autowired
private ClassTeachingDao classMapper;
@Autowired
private ClassTeachingDao classTeachingDao;
@Override
public ExperimentalTeachingEntity queryInvitationcode(ExperimentalTeachingEntity experimentEntity) {
ExperimentalTeachingEntity ex = classMapper.queryInvitationCode(experimentEntity);
@ -44,8 +54,35 @@ public class ClassTeachingServiceImpl implements ClassTeachingService {
this.classMapper.updateSurplusTimeUp(recordVo);//倒计时:设定距离实验开始的剩余时间
this.classMapper.updateSurplusTimeLe(recordVo);
this.classMapper.updateSurplusTimeGt(recordVo);
IPage<ProjectRecordVo> schoolRecord = this.classMapper.getByClassRecord(page1, recordVo);
PageUtils pageUtils = new PageUtils(schoolRecord);
// IPage<ProjectRecordVo> schoolRecord = this.classMapper.getByClassRecord(page1, recordVo);
// PageUtils pageUtils = new PageUtils(schoolRecord);
ExperimentalTeachingVO vo = new ExperimentalTeachingVO();
// 状态
vo.setStatus(recordVo.getStatus());
// 月份
vo.setMonth(recordVo.getMonth());
// 学校
vo.setSchoolId(recordVo.getSchoolId());
// 开始时间
vo.setStartTime(recordVo.getStartTime());
// 结束时间
vo.setStopTime(recordVo.getEndTime());
// 查询条件
vo.setSearchContent(recordVo.getCondition());
// BeanUtils.copyProperties(recordVo,vo);
ExperimentalTeachingDao userDao = this.getBaseMapper();
IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo);
for (int i = 0; i < list.getRecords().size(); i++) {
Integer number = list.getRecords().get(i).getExperimentalNumber();
Integer id = list.getRecords().get(i).getId();
//读取另一个表,将数据更新进 tms_experimental_teaching
int isTure = classTeachingDao.updateExperimentalNumber(number,id);
if(isTure < 0){
return null;
}
}
PageUtils pageUtils = new PageUtils(list);
return pageUtils;
}

@ -36,6 +36,16 @@ public class ExperimentalTeachingServiceImpl extends ServiceImpl<ExperimentalTea
Page<T> page1 = new Page<>(page, size);
ExperimentalTeachingDao userDao = this.getBaseMapper();
IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo);
for (int i = 0; i < list.getRecords().size(); i++) {
Integer number = list.getRecords().get(i).getExperimentalNumber();
Integer id = list.getRecords().get(i).getId();
//读取另一个表,将数据更新进 tms_experimental_teaching
int isTure = classTeachingDao.updateExperimentalNumber(number,id);
if(isTure < 0){
return null;
}
}
PageUtils pageUtils = new PageUtils(list);
return pageUtils;
}

@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Override
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions) {
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId) {
/*GetByUserRecordResp projectRecord = new GetByUserRecordResp();
projectRecord.setUserId(userId);*/
@ -46,7 +46,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions,systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos);
@ -75,10 +75,11 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
ProjectRecordVo projectRecordVo = this.baseMapper.getByUserScore(userId, isdel);
Double totalTime = projectRecordVo.getTotalTime();
if (totalTime != null) {
DecimalFormat df = new DecimalFormat("0.00");
DecimalFormat df = new DecimalFormat("0.0");
double time = totalTime / 60;
String format = df.format(time);
projectRecordVo.setTotalTime(Double.parseDouble(format));
//projectRecordVo.setTotalTime(projectRecordVo.getTotalTime());
}

@ -82,9 +82,9 @@
</insert>
<update id="deleteReport">
UPDATE tms_project_record tpr,hr_experimental_report tcr
SET tpr.isdel = 1, tcr.isdel = 1
WHERE tpr.recordId = tcr.eventId AND tcr.reportId = #{reportId}
UPDATE tms_project_record tpr,tms_experimental_report ter
SET tpr.isdel = 1, ter.isdel = 1
WHERE tpr.recordId = #{recordId} AND ter.reportId = #{reportId}
</update>
<update id="updateComment">
UPDATE tms_experimental_report
@ -132,8 +132,9 @@
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
WHERE reportId = #{reportId}
</select>
<select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT
<!--
SELECT
u.userName,
sch.schoolName,
s.workNumber,
@ -158,14 +159,46 @@
AND tcr.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
<if test="searchContant!=null and searchContant!=''">AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
<if test="searchContant!=null and searchContant!=''">
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
-->
<select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT
r.reportId,
re.recordId,
sch.schoolName,
s.workNumber,
u.userName,
re.score,
re.submitTime,
r.eventId
FROM
tms_experimental_report r
INNER JOIN tms_experimental_teaching t ON t.id = r.projectId
INNER JOIN student s ON s.studentId = r.studentId
INNER JOIN school sch ON sch.schoolId = s.schoolId
INNER JOIN hr_user_info u ON u.userId = s.userId
INNER JOIN tms_project_record re ON re.projectId = t.project_id
WHERE
t.id = r.projectId
and r.eventId = re.recordId
AND r.projectId = #{projectId}
AND r.isdel = 0
AND t.is_del = 0
AND u.isdel = 0
<if test="searchContant!=null and searchContant!=''">
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY r.reportId DESC
</select>
<select id="queryAchievement" resultType="com.msdw.tms.entity.request.AchievementImportRequest">
SELECT
u.userName,
@ -359,10 +392,11 @@
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity">
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM
hr_experimental_report her where hpm.projectId = her.projectId ) as number
FROM hr_project_management hpm WHERE systemId = #{systemId}
tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number
FROM hr_project_management hpm
WHERE systemId = #{systemId}
AND hpm.isdel = 0
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPermissions =
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPer missions =
#{projectPermissions}
</if>
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%')
@ -380,7 +414,7 @@
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as
experimentalName,et.project_id as projectId,
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM
hr_experimental_report her where et.project_id = her.projectId ) as number
tms_project_record her where et.project_id = her.projectId and her.isdel = 0 ) as number
FROM tms_experimental_teaching et,hr_project_management pm
WHERE user_id = #{userId}
AND et.project_id = pm.projectId
@ -440,4 +474,52 @@
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId}
and ru.trading_judgment_points_id = tjp.id
</select>
<update id="deleteReportById">
UPDATE hr_project_management
SET hr_project_management.isdel = 1
WHERE hr_project_management.projectId = #{projectId}
</update>
<select id="getImitationAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT r.recordId,
schoolName,
userName,
workNumber,
score,
submitTime,
re.reportId
FROM tms_project_record r
INNER JOIN student s ON s.userId = r.userId
INNER JOIN hr_user_info u ON u.userId = r.userId
INNER JOIN school sch ON sch.schoolId = u.schoolId
inner join tms_experimental_report re on r.recordId = re.eventId
WHERE r.projectId = #{projectId}
AND r.isdel = 0
AND s.isdel = 0
AND u.isdel = 0
AND sch.isdel = 0
AND re.isdel = 0;
</select>
<select id="getTeachAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT r.recordId, schoolName,tet.experimental_class_name, userName, workNumber, score, submitTime, ter.reportId
from tms_project_record r
inner join student s on s.userId = r.userId
inner join hr_user_info u on u.userId = r.userId
inner join school sch on sch.schoolId = u.schoolId
inner join tms_experimental_report ter on r.recordId = ter.eventId
inner join tms_experimental_teaching tet on r.projectId = tet.project_id
WHERE
tet.id = #{id}
AND r.isdel = 0
AND s.isdel = 0
AND u.isdel = 0
AND sch.isdel = 0
AND ter.isdel = 0
AND tet.is_del = 0
</select>
</mapper>

@ -13,7 +13,8 @@
surplus_time,
experiment_duration,
experimental_name,
experimental_number,
(select count(*)
from tms_project_record WHERE projectId = project_id) as experimental_number,
start_time,
stop_time,
`status`,
@ -109,4 +110,11 @@
<select id="querySimulationPlayList" resultType="com.msdw.tms.entity.BroadcastEntity">
SELECT id,title,links,isdel FROM tms_broadcast
</select>
<update id="updateExperimentalNumber">
UPDATE tms_experimental_teaching
SET experimental_number = #{number}
WHERE
id = #{id}
</update>
</mapper>

@ -10,7 +10,8 @@
experimental_name,
project_id,
project_name,
experimental_number,
(select count(*)
from tms_project_record WHERE projectId = project_id) as experimental_number,
experiment_duration,
type,
start_time,
@ -38,7 +39,7 @@
AND creation_time between #{exp.startTime} and #{exp.stopTime}
</if>
<if test="exp.searchContent!=null">
AND (project_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') )
AND (experimental_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') )
</if>
<if test="exp.month!=null">
AND DATE_SUB(CURDATE(), INTERVAL #{exp.month} month ) &lt;= date(creation_time)

@ -52,13 +52,16 @@
r.startingTime,
r.submitTime,
r.timeSum,
c.userId
c.userId,
t.systemId
FROM hr_experiment_code c
INNER JOIN hr_project_management t ON t.projectId = c.projectId
INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId}
and r.isdel = 0
-- 教师端逻辑删除,学生端不做判断
-- and r.isdel = 0
and projectPermissions = #{projectPermissions}
and t.systemId = #{systemId}
GROUP BY c.recordId desc
</select>
@ -80,7 +83,8 @@
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid}
AND tpr.isdel = #{pro.isdel}
-- 教师端逻辑删除,学生端不做判断(下面这行删掉报错,用>=来表示不管0,1都让通过)
AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0
AND
ter.eventId = tpr.recordId

@ -43,9 +43,8 @@
AND u.isdel = 0
AND l.isdel = 0
AND s.isdel = 0
<if test="searchContent!=null">AND (u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%'))</if>
ORDER BY
lastLoginTime DESC,studentId DESC
<if test="searchContent!=null">AND (u.account LIKE CONCAT('%',#{searchContent},'%') OR u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%'))</if>
ORDER BY studentId DESC
</select>
<select id="queryStudentIdNumber" resultType="java.lang.Integer">

@ -215,7 +215,7 @@
</update>
<select id="queryPersonalFileES" parameterType="com.msdw.tms.entity.UserPersonalFileEntity"
resultType="hashMap">
resultType="com.msdw.tms.entity.vo.UserProsonalEntityVo">
SELECT
personalFileId,
schoolId,
@ -233,7 +233,7 @@
userId = #{userId}
</select>
<select id="queryPersonalInfo" parameterType="com.msdw.tms.entity.UserInfoEntity"
resultType="hashMap">
resultType="com.msdw.tms.entity.vo.UserProsonalEntityVo">
SELECT
u.userId,
userName,

Loading…
Cancel
Save