Merge remote-tracking branch 'origin/master'

hehai
zhiyong.ning 4 years ago
commit 7710bc2e58
  1. 2
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  2. 25
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  3. 2
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  4. 9
      src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java
  5. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  6. 4
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  7. 21
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -25,7 +25,7 @@ public interface ProjectRcordControllerApi {
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid);
R getUserExperimentscore(Integer page,Integer size,Integer userid, Integer systemId);
@ApiOperation(value = "个人实验概览",notes = "个人实验概览")
R queryScore(Integer userId);

@ -18,8 +18,6 @@ import java.util.HashMap;
import java.util.List;
/**
*
*
* @author
* @email
* @date 2020-08-19 16:07:02
@ -40,13 +38,17 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
ProjectRecordVo recordVo = new ProjectRecordVo();
if (!StringUtils.isEmpty(month)) {
recordVo.setMonth(month);
}if(!StringUtils.isEmpty(startTime)) {
}
if (!StringUtils.isEmpty(startTime)) {
recordVo.setStartTime(startTime);
}if(!StringUtils.isEmpty(endTime)) {
}
if (!StringUtils.isEmpty(endTime)) {
recordVo.setEndTime(endTime);
}if(!StringUtils.isEmpty(recordState)) {
}
if (!StringUtils.isEmpty(recordState)) {
recordVo.setRecordstate(recordState);
}if(!StringUtils.isEmpty(condition)){
}
if (!StringUtils.isEmpty(condition)) {
recordVo.setCondition(condition);
}
PageUtils page1 = projectRecordService.querySchoolRecord(page, size, recordVo);
@ -56,6 +58,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 用户端虚拟仿真实验记录
*
* @param page
* @param size
* @param
@ -70,6 +73,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 科大用户端虚拟仿真实验记录
*
* @param page
* @param size
* @param
@ -84,6 +88,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 用户端教学实验记录
*
* @param page
* @param size
* @param userid
@ -91,14 +96,15 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/experimentRecord")
public R getUserExperimentscore(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userid){
PageUtils page1 = projectRecordService.queryExperimentPage(page,size,userid);
public R getUserExperimentscore(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer userid, @RequestParam Integer systemId) {
PageUtils page1 = projectRecordService.queryExperimentPage(page, size, userid, systemId);
return R.ok().put("data", page1);
}
/**
* 个人实验预览
*
* @param userId
* @return
*/
@ -112,6 +118,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 个人实验预览
*
* @param userid
* @return
*/
@ -125,6 +132,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 导出个人虚拟仿真实验记录
*
* @param response
* @param userId
* @throws Exception
@ -138,6 +146,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 导出个人教学实验记录
*
* @param response
* @param userId
* @throws Exception

@ -27,7 +27,7 @@ public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
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);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity, Integer systemId);
List<ProjectRecordExportVo> getByUserRecordImport(ProjectRecordEntity projectRecordEntity);

@ -76,7 +76,9 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 待评分
*/
private Integer tobescored;
/** 记录状态(0 未修改,1 已修改)*/
/**
* 记录状态0 未修改1 已修改
*/
private Integer recordState;
// =====================================记录实验项目信息
/**
@ -109,4 +111,9 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
*/
private Integer schoolId;
/**
* 系统id
*/
private Integer systemId;
}

@ -20,7 +20,7 @@ public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid,Integer systemId);
ProjectRecordVo queryUserScore(Integer userId);

@ -69,14 +69,14 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
}
@Override
public PageUtils queryExperimentPage(Integer page, Integer size, Integer userid) {
public PageUtils queryExperimentPage(Integer page, Integer size, Integer userid, Integer systemId) {
ProjectRecordEntity projectRecord = new ProjectRecordEntity().setUserid(userid).setIsdel(Constant.IsDel.NOT_DEL.getType());
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserExperimentRecord(page1, projectRecord);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserExperimentRecord(page1, projectRecord, systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos);

@ -23,8 +23,7 @@
<select id="getByKDUserRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT
her.reportId as reportId,
SELECT her.reportId as reportId,
her.projectId,
projectName,
her.score,
@ -32,15 +31,11 @@
her.startTime,
her.creationTime as endTime,
her.className
FROM
hr_experimental_report her
FROM hr_experimental_report her
LEFT JOIN hr_project_management tp ON her.projectId = tp.projectId
WHERE
her.studentId = #{pro.userid}
AND
her.isdel = 0
AND
tp.projectPermissions = #{projectPermissions}
WHERE her.studentId = #{pro.userid}
AND her.isdel = 0
AND tp.projectPermissions = #{projectPermissions}
order by her.creationTime desc
</select>
@ -81,12 +76,14 @@
startingTime as startTime,
endTime,
recordState,
tet.experimental_class_name as experimentalClassName
tet.experimental_class_name as experimentalClassName,
systemId
FROM tms_project_record tpr
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_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid}
and systemId = #{systemId}
AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0
AND
@ -139,7 +136,7 @@
<select id="queryScore" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT count(*) as experimentNumber, sum(timeConsuming) as totalTime, avg(score) as avgScore
FROM hr_experimental_report
where studentId = 547
where studentId = #{studentId}
</select>
<select id="getBySchoolRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">

Loading…
Cancel
Save