|
@@ -85,6 +85,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
+import java.io.File;
|
|
|
import java.io.FileOutputStream;
|
|
import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
@@ -205,6 +206,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
@Value("${oldSys.host}")
|
|
@Value("${oldSys.host}")
|
|
|
private String OLD_SYS_HOST;
|
|
private String OLD_SYS_HOST;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IUserPeriodService iUserPeriodService;
|
|
private IUserPeriodService iUserPeriodService;
|
|
|
|
|
|
|
@@ -226,6 +228,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IQuestionChapterExamService iQuestionChapterExamService;
|
|
private IQuestionChapterExamService iQuestionChapterExamService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IUserCertificateService iUserCertificateService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private String SEVEN_OFFICIALPUSH_INFOACCOUNT;
|
|
private String SEVEN_OFFICIALPUSH_INFOACCOUNT;
|
|
|
private String SEVEN_OFFICIALPUSH_TOKEN;
|
|
private String SEVEN_OFFICIALPUSH_TOKEN;
|
|
@@ -3725,6 +3730,11 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Boolean exportListVideoUserPeriod(Long userId, String dirPath) {
|
|
public Boolean exportListVideoUserPeriod(Long userId, String dirPath) {
|
|
|
|
|
+ dirPath = dirPath+"/网课记录";
|
|
|
|
|
+ File rootDir = new File(dirPath);
|
|
|
|
|
+ if(!rootDir.exists()){
|
|
|
|
|
+ rootDir.mkdirs();
|
|
|
|
|
+ }
|
|
|
ClassGradeUserQueryBo userQueryBo = new ClassGradeUserQueryBo();
|
|
ClassGradeUserQueryBo userQueryBo = new ClassGradeUserQueryBo();
|
|
|
userQueryBo.setUserId(userId);
|
|
userQueryBo.setUserId(userId);
|
|
|
//查询班级学员信息
|
|
//查询班级学员信息
|
|
@@ -3776,7 +3786,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
List<ClassPeriodStudentExportListVo> exportList = new ArrayList<>();
|
|
List<ClassPeriodStudentExportListVo> exportList = new ArrayList<>();
|
|
|
for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
|
ClassPeriodStudentExportListVo vo = BeanUtil.toBean(classPeriodStudentVo, ClassPeriodStudentExportListVo.class);
|
|
ClassPeriodStudentExportListVo vo = BeanUtil.toBean(classPeriodStudentVo, ClassPeriodStudentExportListVo.class);
|
|
|
- vo.setStudyTime(DateUtils.timestampToDateFormat(classPeriodStudentVo.getStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(classPeriodStudentVo.getEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
|
+ vo.setStudyTime(DateUtils.timestampToDateFormat(classPeriodStudentVo.getStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(classPeriodStudentVo.getEndTime(),"yyyy-MM-dd HH:mm:ss" ));
|
|
|
vo.setProcess((classPeriodStudentVo.getRecordNum()+classPeriodStudentVo.getStuAllNum())+"/"+(classPeriodStudentVo.getExamNum()+classPeriodStudentVo.getSecAllNum()));
|
|
vo.setProcess((classPeriodStudentVo.getRecordNum()+classPeriodStudentVo.getStuAllNum())+"/"+(classPeriodStudentVo.getExamNum()+classPeriodStudentVo.getSecAllNum()));
|
|
|
vo.setVideoProcess(classPeriodStudentVo.getStuAllNum()+"/"+classPeriodStudentVo.getSecAllNum());
|
|
vo.setVideoProcess(classPeriodStudentVo.getStuAllNum()+"/"+classPeriodStudentVo.getSecAllNum());
|
|
|
vo.setBusinessName(classPeriodStudentVo.getEducationName()+"-"+classPeriodStudentVo.getProjectName()+"-"+classPeriodStudentVo.getBusinessName());
|
|
vo.setBusinessName(classPeriodStudentVo.getEducationName()+"-"+classPeriodStudentVo.getProjectName()+"-"+classPeriodStudentVo.getBusinessName());
|
|
@@ -3800,6 +3810,485 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
ExcelUtil<ClassPeriodStudentExportListVo> util = new ExcelUtil<ClassPeriodStudentExportListVo>(ClassPeriodStudentExportListVo.class);
|
|
ExcelUtil<ClassPeriodStudentExportListVo> util = new ExcelUtil<ClassPeriodStudentExportListVo>(ClassPeriodStudentExportListVo.class);
|
|
|
String filePath = dirPath+"/网课记录.xlsx";
|
|
String filePath = dirPath+"/网课记录.xlsx";
|
|
|
util.exportEasyExcelUtil(exportList,ClassPeriodStudentExportListVo.class,filePath);
|
|
util.exportEasyExcelUtil(exportList,ClassPeriodStudentExportListVo.class,filePath);
|
|
|
|
|
+
|
|
|
|
|
+ //next
|
|
|
|
|
+ for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
|
|
|
+ String goodsDirPath = dirPath+"/"+classPeriodStudentVo.getGoodsName();
|
|
|
|
|
+ List<DangAnStudentExportAllVo> studyList = new ArrayList<>();
|
|
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo1 = new ClassGradeUserQueryBo();
|
|
|
|
|
+ classGradeUserQueryBo1.setUserId(classPeriodStudentVo.getUserId());
|
|
|
|
|
+ classGradeUserQueryBo1.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
|
|
+ classGradeUserQueryBo1.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
|
|
+ classGradeUserQueryBo1.setOrderGoodsId(classPeriodStudentVo.getOrderGoodsId());
|
|
|
|
|
+ List<UserPeriodExportV2Vo> periodVoList = listUserStudyRecordV2Week(classGradeUserQueryBo1);
|
|
|
|
|
+ for (UserPeriodExportV2Vo cVo : periodVoList) {
|
|
|
|
|
+ for (UserPeriodItemExportVo rVo : cVo.getRecordList()) {
|
|
|
|
|
+ DangAnStudentExportAllVo item = BeanUtil.toBean(classPeriodStudentVo, DangAnStudentExportAllVo.class);
|
|
|
|
|
+ item.setBusinessName(classPeriodStudentVo.getEducationName()+"-"+classPeriodStudentVo.getProjectName()+"-"+classPeriodStudentVo.getBusinessName());
|
|
|
|
|
+ item.setModuleName(cVo.getModuleName());
|
|
|
|
|
+ item.setChapterName(cVo.getChapterName());
|
|
|
|
|
+ item.setSectionName(cVo.getSectionName());
|
|
|
|
|
+ item.setStudyTimeTxt(DateUtils.timestampToDateFormat(rVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(rVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss" ));
|
|
|
|
|
+ if(Validator.isNotEmpty(rVo.getVideoCurrentTime())){
|
|
|
|
|
+ item.setStudyTimeLongTxt(DateUtils.secToTime(rVo.getVideoCurrentTime().intValue()));
|
|
|
|
|
+ }
|
|
|
|
|
+ item.setScore(rVo.getScore());
|
|
|
|
|
+ if(Validator.isNotEmpty(rVo.getRightRate())){
|
|
|
|
|
+ item.setRate(rVo.getRightRate()+"");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getFromPlat()==1){
|
|
|
|
|
+ item.setPlat("小程序");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getFromPlat()==2){
|
|
|
|
|
+ item.setPlat("PC");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getFromPlat()==3){
|
|
|
|
|
+ item.setPlat("h5");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getSectionType()==1){
|
|
|
|
|
+ item.setSectionType("录播");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getSectionType()==2){
|
|
|
|
|
+ item.setSectionType("直播");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getSectionType()==3){
|
|
|
|
|
+ item.setSectionType("回放");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(rVo.getSectionType()==4){
|
|
|
|
|
+ item.setSectionType("题卷");
|
|
|
|
|
+ }
|
|
|
|
|
+ studyList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ExcelUtil<DangAnStudentExportAllVo> util2 = new ExcelUtil<DangAnStudentExportAllVo>(DangAnStudentExportAllVo.class);
|
|
|
|
|
+ String filePath2 = goodsDirPath+"/学习记录.xlsx";
|
|
|
|
|
+ util2.exportEasyExcelUtil(studyList,DangAnStudentExportAllVo.class,filePath2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //next
|
|
|
|
|
+ for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
|
|
|
+ String goodsDirPath = dirPath+"/"+classPeriodStudentVo.getGoodsName()+"/学时记录";
|
|
|
|
|
+ List<DangAnPeriodExportAllVo> studyList = new ArrayList<>();
|
|
|
|
|
+ ClassGradeUserQueryBo bo = new ClassGradeUserQueryBo();
|
|
|
|
|
+ bo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
|
|
+ bo.setOrderGoodsId(classPeriodStudentVo.getOrderGoodsId());
|
|
|
|
|
+ bo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
|
|
+ bo.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
|
|
+ CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
|
|
+ businessQueryBo.setId(classPeriodStudentVo.getBusinessId());
|
|
|
|
|
+ String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
|
|
+
|
|
|
|
|
+ List<ClassPeriodVo> classPeriodVos = baseMapper.listPeriodAudit(bo);
|
|
|
|
|
+ classPeriodVos.addAll(baseMapper.listPeriodAuditSection(bo));
|
|
|
|
|
+ Collections.sort(classPeriodVos);
|
|
|
|
|
+ for (ClassPeriodVo classPeriodVo : classPeriodVos) {
|
|
|
|
|
+ //为模块搜索下面的章 和节 并搜索学时记录
|
|
|
|
|
+ if (classPeriodVo.getType() == 1) {
|
|
|
|
|
+ CourseModuleVo moduleVo = iCourseModuleService.queryById(classPeriodVo.getId());
|
|
|
|
|
+ List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), bo.getGradeId(),bo.getOrderGoodsId());
|
|
|
|
|
+ Collections.sort(classPeriodChapterVos);
|
|
|
|
|
+ classPeriodChapterVos.addAll(baseMapper.listperiodModuleExam(bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
|
|
|
|
|
+ for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
|
|
|
|
|
+ if (classPeriodChapterVo.getType() == 2) {
|
|
|
|
|
+ Long ChapterEndTime = 0L;
|
|
|
|
|
+ Long ChapterStartTime = 0L;
|
|
|
|
|
+ List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
|
|
|
|
|
+ Collections.sort(classPeriodSectionVos);
|
|
|
|
|
+ classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
|
|
|
|
|
+ for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
|
|
|
|
|
+ if (classPeriodSectionVo.getType() == 3) {
|
|
|
|
|
+ //节
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodSectionVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setChapterId(classPeriodChapterVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos){
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodSectionVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodSectionVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ if (Validator.isNotEmpty(photoList) && photoList.size() > 0) {
|
|
|
|
|
+ if(fullName.contains("继续教育")&&fullName.contains("施工现场专业人员")){
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setModuleName(moduleVo.getModuleName());
|
|
|
|
|
+ exportAllVo.setChapterName(classPeriodChapterVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodSectionVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodSectionVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("节");
|
|
|
|
|
+ BigDecimal secTime = new BigDecimal(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+ exportAllVo.setClassHour(secTime.divide(new BigDecimal(45*60),BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/模块_"+exportAllVo.getModuleName()+"/章_"+exportAllVo.getChapterName()+"/节_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setExamId(classPeriodSectionVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodSectionVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setChapterId(classPeriodChapterVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setType(2);
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos){
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodSectionVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodSectionVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setModuleName(moduleVo.getModuleName());
|
|
|
|
|
+ exportAllVo.setChapterName(classPeriodChapterVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodSectionVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodSectionVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("试卷");
|
|
|
|
|
+ exportAllVo.setScore(classPeriodSectionVo.getPerformance());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/模块_"+exportAllVo.getModuleName()+"/章_"+exportAllVo.getChapterName()+"/卷_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodSectionVo.setModuleId(classPeriodVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setChapterId(classPeriodChapterVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ classPeriodSectionVo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ classPeriodSectionVo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodChapterVo.setStudyEndTime(ChapterEndTime);
|
|
|
|
|
+ classPeriodChapterVo.setStudyStartTime(ChapterStartTime);
|
|
|
|
|
+ classPeriodChapterVo.setClassPeriodSectionList(classPeriodSectionVos);
|
|
|
|
|
+ } else if (classPeriodChapterVo.getType() == 5) {
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setExamId(classPeriodChapterVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodChapterVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodChapterVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setType(3);
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos) {
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodChapterVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodChapterVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodChapterVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodChapterVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodChapterVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ classPeriodChapterVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ classPeriodChapterVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodChapterVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodChapterVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodChapterVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodChapterVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodChapterVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setModuleName(moduleVo.getModuleName());
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodChapterVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodChapterVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodChapterVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodChapterVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodChapterVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("试卷");
|
|
|
|
|
+ exportAllVo.setScore(classPeriodChapterVo.getPerformance());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/模块_"+exportAllVo.getModuleName()+"/卷_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodVo.setClassPeriods(classPeriodChapterVos);
|
|
|
|
|
+ }
|
|
|
|
|
+ //为章搜索节记录和学时记录
|
|
|
|
|
+ if (classPeriodVo.getType() == 2) {
|
|
|
|
|
+ Long ChapterEndTime = 0L;
|
|
|
|
|
+ Long ChapterStartTime = 0L;
|
|
|
|
|
+ List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
|
|
|
|
|
+ Collections.sort(classPeriodSectionVos);
|
|
|
|
|
+ for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodSectionVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setChapterId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(0L);
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos){
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodSectionVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodSectionVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ if (Validator.isNotEmpty(photoList) && photoList.size() > 0) {
|
|
|
|
|
+ if(fullName.contains("继续教育")&&fullName.contains("施工现场专业人员")){
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setChapterName(classPeriodVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodSectionVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodSectionVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("节");
|
|
|
|
|
+ BigDecimal secTime = new BigDecimal(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+ exportAllVo.setClassHour(secTime.divide(new BigDecimal(45*60),BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/章_"+exportAllVo.getChapterName()+"/节_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
|
|
|
|
|
+ for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setExamId(classPeriodSectionVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodSectionVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setChapterId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(0L);
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos){
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodSectionVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodSectionVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
|
|
|
|
|
+ classPeriodVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setChapterName(classPeriodVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodSectionVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodSectionVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodSectionVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("试卷");
|
|
|
|
|
+ exportAllVo.setScore(classPeriodSectionVo.getPerformance());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/章_"+exportAllVo.getChapterName()+"/卷_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodSectionVo.setModuleId(0L);
|
|
|
|
|
+ classPeriodSectionVo.setChapterId(classPeriodVo.getId());
|
|
|
|
|
+ classPeriodSectionVo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ classPeriodSectionVo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ classPeriodSectionVo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodSectionVos.addAll(classPeriodSectionVos1);
|
|
|
|
|
+ classPeriodVo.setClassPeriodSectionList(classPeriodSectionVos);
|
|
|
|
|
+ classPeriodVo.setStudyEndTime(ChapterEndTime);
|
|
|
|
|
+ classPeriodVo.setStudyStartTime(ChapterStartTime);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //为节搜索学时记录
|
|
|
|
|
+ if (classPeriodVo.getType() == 3) {
|
|
|
|
|
+ UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
|
|
|
|
|
+ userPeriodQueryBo.setSectionId(classPeriodVo.getId());
|
|
|
|
|
+ userPeriodQueryBo.setCourseId(classPeriodVo.getCourseId());
|
|
|
|
|
+ userPeriodQueryBo.setGoodsId(bo.getGoodsId());
|
|
|
|
|
+ userPeriodQueryBo.setUserId(classPeriodVo.getUserId());
|
|
|
|
|
+ userPeriodQueryBo.setChapterId(0L);
|
|
|
|
|
+ userPeriodQueryBo.setModuleId(0L);
|
|
|
|
|
+ userPeriodQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
|
+ userPeriodQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
|
|
|
|
|
+ List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for(UserPeriodStatusVo userPeriodStatusVo : userPeriodStatusVos){
|
|
|
|
|
+ index++;
|
|
|
|
|
+ LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
|
|
|
|
|
+ lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
|
|
|
|
|
+
|
|
|
|
|
+ List<UserStudyRecordPhotoVo> photoList = entity2PhotoVo(userStudyRecordPhotoService.list(lqw));
|
|
|
|
|
+ classPeriodVo.setUserStudyRecordPhotoList(photoList);
|
|
|
|
|
+ classPeriodVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodVo.setStatus(userPeriodStatusVo.getStatus());
|
|
|
|
|
+ classPeriodVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
|
|
|
|
|
+ classPeriodVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
|
|
|
|
|
+ if (photoList.size() > 0) {
|
|
|
|
|
+ if(fullName.contains("继续教育")&&fullName.contains("施工现场专业人员")){
|
|
|
|
|
+ classPeriodVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ classPeriodVo.setStudyStartTime(photoList.get(0).getCreateTime());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ classPeriodVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
|
|
|
|
|
+ classPeriodVo.setPeriodId(userPeriodStatusVo.getPeriodId());
|
|
|
|
|
+ classPeriodVo.setPeriodStatusId(userPeriodStatusVo.getId());
|
|
|
|
|
+ classPeriodVo.setAuditTime(userPeriodStatusVo.getAuditTime());
|
|
|
|
|
+ classPeriodVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
|
|
|
|
|
+ classPeriodVo.setDurationTime(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+
|
|
|
|
|
+ DangAnPeriodExportAllVo exportAllVo = BeanUtil.toBean(classPeriodStudentVo, DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ exportAllVo.setSectionName(classPeriodVo.getTypeName());
|
|
|
|
|
+ exportAllVo.setNumIndex("第"+index+"次");
|
|
|
|
|
+ exportAllVo.setStartTimeTxt(DateUtils.timestampToDateFormat(classPeriodVo.getStudyStartTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setEndTimeTxt(DateUtils.timestampToDateFormat(classPeriodVo.getStudyEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditTimeTxt(DateUtils.timestampToDateFormat(classPeriodVo.getAuditTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ exportAllVo.setAuditPeopleTxt(classPeriodVo.getAuditUserName());
|
|
|
|
|
+ exportAllVo.setSectionType("节");
|
|
|
|
|
+ BigDecimal secTime = new BigDecimal(userPeriodStatusVo.getDurationTime());
|
|
|
|
|
+ exportAllVo.setClassHour(secTime.divide(new BigDecimal(45*60),BigDecimal.ROUND_HALF_UP).toString());
|
|
|
|
|
+ studyList.add(exportAllVo);
|
|
|
|
|
+
|
|
|
|
|
+ String imgDirPath = goodsDirPath+"/节_"+exportAllVo.getSectionName();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ for(UserStudyRecordPhotoVo photoVo:photoList){
|
|
|
|
|
+ ossService.fileDownloadLocal(photoVo.getPhoto(),imgDirPath+"/"+photoVo.getCreateTime()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ String goodsPeriodPath = goodsDirPath+"/学时记录.xlsx";
|
|
|
|
|
+ ExcelUtil<DangAnPeriodExportAllVo> util3 = new ExcelUtil<DangAnPeriodExportAllVo>(DangAnPeriodExportAllVo.class);
|
|
|
|
|
+ util3.exportEasyExcelUtil(studyList,DangAnPeriodExportAllVo.class,goodsPeriodPath);
|
|
|
|
|
+ }
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3828,6 +4317,65 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
return this.baseMapper.listBKUserPeriod(bo);
|
|
return this.baseMapper.listBKUserPeriod(bo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Boolean exportListBKUserPeriod(Long userId,String dirPath) {
|
|
|
|
|
+ ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
|
|
|
+ queryBo.setUserId(userId);
|
|
|
|
|
+ List<ClassPeriodStudentVo> list = this.baseMapper.listBKUserPeriod(queryBo);
|
|
|
|
|
+ List<DangAnBkUserExportVo> exportList = new ArrayList<>();
|
|
|
|
|
+ for(ClassPeriodStudentVo vo : list){
|
|
|
|
|
+ DangAnBkUserExportVo item = BeanUtil.toBean(vo, DangAnBkUserExportVo.class);
|
|
|
|
|
+ item.setCreateTime(DateUtils.timestampToDateFormat(vo.getCreateTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ item.setBusinessName(vo.getEducationName()+"-"+vo.getProjectName()+"-"+vo.getBusinessName());
|
|
|
|
|
+ if(Validator.isNotEmpty(vo.getProfileStatus())){
|
|
|
|
|
+ if(vo.getProfileStatus()==3){
|
|
|
|
|
+ item.setProfileStatus("不通过");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(vo.getProfileStatus()==2){
|
|
|
|
|
+ item.setProfileStatus("待审");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(vo.getProfileStatus()==1){
|
|
|
|
|
+ item.setProfileStatus("通过");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ exportList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ ExcelUtil<DangAnBkUserExportVo> util2 = new ExcelUtil<DangAnBkUserExportVo>(DangAnBkUserExportVo.class);
|
|
|
|
|
+ String filePath2 = dirPath+"/报名记录.xlsx";
|
|
|
|
|
+ util2.exportEasyExcelUtil(exportList,DangAnBkUserExportVo.class,filePath2);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Boolean exportCertificateList(Long userId, String dirPath) {
|
|
|
|
|
+ dirPath = dirPath+"/证书证明";
|
|
|
|
|
+ File rootDir = new File(dirPath);
|
|
|
|
|
+ if(!rootDir.exists()){
|
|
|
|
|
+ rootDir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ UserCertificateQueryBo queryBo = new UserCertificateQueryBo();
|
|
|
|
|
+ queryBo.setUserId(userId);
|
|
|
|
|
+ List<UserCertificateVo> list = iUserCertificateService.selectList(queryBo);
|
|
|
|
|
+ List<DangAnCertificateExportVo> exportList = new ArrayList<>();
|
|
|
|
|
+ for(UserCertificateVo vo : list){
|
|
|
|
|
+ DangAnCertificateExportVo item = BeanUtil.toBean(vo, DangAnCertificateExportVo.class);
|
|
|
|
|
+ item.setTrainTimeTxt(DateUtils.timestampToDateFormat(vo.getTrainStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(vo.getTrainEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
+ item.setBusinessName(vo.getEducationName()+"-"+vo.getProjectName()+"-"+vo.getBusinessName());
|
|
|
|
|
+ item.setClassHours(vo.getClassHours()+"");
|
|
|
|
|
+ exportList.add(item);
|
|
|
|
|
+ String imgDirPath = dirPath+"/"+vo.getCertificateCode();
|
|
|
|
|
+ File dir = new File(imgDirPath);
|
|
|
|
|
+ if(!dir.exists()){
|
|
|
|
|
+ dir.mkdirs();
|
|
|
|
|
+ }
|
|
|
|
|
+ ossService.fileDownloadLocal(vo.getCertificatePath(),imgDirPath+"/"+vo.getCertificateCode()+".jpg");
|
|
|
|
|
+ }
|
|
|
|
|
+ ExcelUtil<DangAnCertificateExportVo> util2 = new ExcelUtil<DangAnCertificateExportVo>(DangAnCertificateExportVo.class);
|
|
|
|
|
+ String filePath2 = dirPath+"/证书证明.xlsx";
|
|
|
|
|
+ util2.exportEasyExcelUtil(exportList,DangAnCertificateExportVo.class,filePath2);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<UserUsbRecordVo> getListUserSubscribe(UserUsbRecordBo bo) {
|
|
public List<UserUsbRecordVo> getListUserSubscribe(UserUsbRecordBo bo) {
|
|
|
if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() == 6){
|
|
if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() == 6){
|