exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/query/ThCertQuery.java
@@ -15,6 +15,9 @@ //证书生成结束时间 private String endTime; //身份证号 private String idcard; //机构代码 private String trainOrgName; exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/query/ThStudyDetailQuery.java
@@ -17,6 +17,10 @@ @DateTimeFormat(pattern = "yyyy-MM-dd") private Date endTime; //0 全部 1正常记录 2异常记录 private Long status; private Integer pageNum; /** 每页显示记录数 */ exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyDetailVO.java
@@ -29,6 +29,8 @@ private Byte finishStatus; private Long duration; private String durationDesc; private Long difference; private String differenceDesc; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime startTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudyRecordManagerServiceImpl.java
@@ -28,6 +28,7 @@ import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.time.Duration; import java.util.*; import java.util.stream.Collectors; @@ -78,6 +79,9 @@ List<String> idcards = thStudyDetailVOS.stream().map(ThStudyDetailVO::getIdcard).collect(Collectors.toList()); List<ThStudent> studentList = studentService.getNameByIdcards(idcards); for(ThStudyDetailVO thStudyDetailVO : thStudyDetailVOS){ Duration between = Duration.between(thStudyDetailVO.getStartTime(), thStudyDetailVO.getFinishTime()); thStudyDetailVO.setDifference(between.getSeconds()); thStudyDetailVO.setDifferenceDesc(ConvertTimeUtils.convertTimeToString(thStudyDetailVO.getDifference())); thStudyDetailVO.setDurationDesc(ConvertTimeUtils.convertTimeToString(thStudyDetailVO.getDuration())); thStudyDetailVO.setStartPositionDesc(ConvertTimeUtils.convertTimeToString(thStudyDetailVO.getStartPosition())); thStudyDetailVO.setFinishPositionDesc(ConvertTimeUtils.convertTimeToString(thStudyDetailVO.getFinishPosition())); exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java
@@ -1363,20 +1363,20 @@ errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"结束位置不可为空")); continue; } if(StringUtils.isEmpty(studentDetailReqDTO.getLessonReportUrl())){ errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学时报告不可为空")); continue; } // if(StringUtils.isEmpty(studentDetailReqDTO.getLessonReportUrl())){ // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学时报告不可为空")); // continue; // } //认证记录集合 // if(CollectionUtils.isEmpty(studentDetailReqDTO.getAuthList())){ // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"认证记录集合不可为空")); // continue; // } //学习轨迹集合 if(CollectionUtils.isEmpty(studentDetailReqDTO.getTrackList())){ errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹集合不可为空")); continue; } // if(CollectionUtils.isEmpty(studentDetailReqDTO.getTrackList())){ // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹集合不可为空")); // continue; // } /*boolean authFlag = false; for(ThStudytAuthReqDTO item : studentDetailReqDTO.getAuthList()){ @@ -1409,32 +1409,32 @@ if(authFlag){ continue; }*/ boolean trackFlag = false; for(ThStudyTrackReqDTO item : studentDetailReqDTO.getTrackList()){ if(StringUtils.isEmpty(item.getUuid()) || !UUID.checkIsUuid(item.getUuid())){ trackFlag = true; errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+")不符合规范")); break; } if(item.getStartTime() == null){ trackFlag = true; errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),轨迹开始时间不可为空")); break; } if(item.getEndTime() == null){ trackFlag = true; errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),轨迹结束时间不可为空")); break; } if(item.getTimeInterval() == null) { trackFlag = true; errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),时间间隔(秒)不可为空")); break; } } if(trackFlag){ continue; } // boolean trackFlag = false; // for(ThStudyTrackReqDTO item : studentDetailReqDTO.getTrackList()){ // if(StringUtils.isEmpty(item.getUuid()) || !UUID.checkIsUuid(item.getUuid())){ // trackFlag = true; // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+")不符合规范")); // break; // } // if(item.getStartTime() == null){ // trackFlag = true; // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),轨迹开始时间不可为空")); // break; // } // if(item.getEndTime() == null){ // trackFlag = true; // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),轨迹结束时间不可为空")); // break; // } // if(item.getTimeInterval() == null) { // trackFlag = true; // errorDataRespDTOS.add(new ThErrorDataRespDTO(studentDetailReqDTO.getUuid(),"学习轨迹uuid("+item.getUuid()+"),时间间隔(秒)不可为空")); // break; // } // } // if(trackFlag){ // continue; // } saveStudyDetailReqDTOS.add(studentDetailReqDTO); //判断需要修改的批次学生 exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml
@@ -20,6 +20,9 @@ <if test="trainOrgName!=null and trainOrgName!=''"> and a.train_org_name =#{trainOrgName} </if> <if test="idcard!=null and idcard!=''"> and a.idcard like concat('%',#{idcard},'%') </if> </where> order by a.create_time desc </select> exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml
@@ -37,6 +37,13 @@ <if test="query.endTime != null"><!-- 结束时间检索 --> and date_format(d.create_time,'%y-%m-%d') <= date_format(#{query.endTime},'%y-%m-%d') </if> <if test="query.status == 0"></if> <if test="query.status == 1"> and TIMESTAMPDIFF(SECOND, start_time, finish_time) = d.duration </if> <if test="query.status == 2"> and TIMESTAMPDIFF(SECOND, start_time, finish_time) < d.duration </if> ORDER BY d.id DESC