he2802 2 years ago
parent
commit
e8a8b048f5

+ 3 - 1
zhongzheng-admin-data/src/main/java/com/zhongzheng/controller/common/UserStudyLogController.java

@@ -168,7 +168,9 @@ public class UserStudyLogController extends BaseController {
         /*if (!ToolsUtils.checkSignFromOldSys(bo.getStamp(), bo.getSign())) {
             throw new CustomException("签名错误");
         }*/
-        iClassGradeUserService.exportListVideoUserPeriod(451L,"D:\\test\\网课");
+    //    iClassGradeUserService.exportListVideoUserPeriod(451L,"D:\\test\\网课");
+    //    iClassGradeUserService.exportListBKUserPeriod(451L,"D:\\test\\网课");
+        iClassGradeUserService.exportCertificateList(451L,"D:\\test\\网课");
         return AjaxResult.success();
     }
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/alioss/service/OssService.java

@@ -45,4 +45,6 @@ public interface OssService {
 
     void processObject(String targetImage ,String sourceImage,String styleType) ;
 
+    void fileDownloadLocal(String key, String localPath);
+
 }

+ 19 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/alioss/service/impl/OssServiceImpl.java

@@ -28,8 +28,10 @@ import sun.misc.BASE64Decoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.sql.rowset.serial.SerialBlob;
 import javax.sql.rowset.serial.SerialException;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.net.URL;
 import java.net.URLConnection;
 import java.sql.SQLException;
@@ -419,6 +421,23 @@ public class OssServiceImpl implements OssService {
         }
     }
 
+    @Override
+    public void fileDownloadLocal(String key, String localPath) {
+        OSSObject ossObject = ossClient.getObject(ALIYUN_OSS_BUCKET_NAME, key);
+        InputStream in = ossObject.getObjectContent();
+        try {
+            OutputStream fos = new FileOutputStream(localPath);
+            int temp ;
+            while ((temp = in.read()) != -1){
+                fos.write(temp);
+            }
+            in.close();
+            fos.close();
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
     public void zipFile(List<String> fileList, ZipOutputStream zipOut,String dir) {
         if (CollectionUtils.isEmpty(fileList)) {
             return;

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/IClassGradeUserService.java

@@ -154,5 +154,9 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 
 	List<ClassPeriodStudentVo> listBKUserPeriod(ClassGradeUserQueryBo bo);
 
+	Boolean exportListBKUserPeriod(Long userId,String dirPath);
+
+	Boolean exportCertificateList(Long userId,String dirPath);
+
     List<UserUsbRecordVo> getListUserSubscribe(UserUsbRecordBo bo);
 }

+ 549 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -85,6 +85,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -205,6 +206,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Value("${oldSys.host}")
     private String OLD_SYS_HOST;
 
+
     @Autowired
     private IUserPeriodService iUserPeriodService;
 
@@ -226,6 +228,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Autowired
     private IQuestionChapterExamService iQuestionChapterExamService;
 
+    @Autowired
+    private IUserCertificateService iUserCertificateService;
+
 
     private String SEVEN_OFFICIALPUSH_INFOACCOUNT;
     private String SEVEN_OFFICIALPUSH_TOKEN;
@@ -3725,6 +3730,11 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
     @Override
     public Boolean exportListVideoUserPeriod(Long userId, String dirPath) {
+        dirPath = dirPath+"/网课记录";
+        File rootDir = new File(dirPath);
+        if(!rootDir.exists()){
+            rootDir.mkdirs();
+        }
         ClassGradeUserQueryBo userQueryBo  = new ClassGradeUserQueryBo();
         userQueryBo.setUserId(userId);
         //查询班级学员信息
@@ -3776,7 +3786,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         List<ClassPeriodStudentExportListVo> exportList = new ArrayList<>();
         for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
             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.setVideoProcess(classPeriodStudentVo.getStuAllNum()+"/"+classPeriodStudentVo.getSecAllNum());
             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);
         String filePath = dirPath+"/网课记录.xlsx";
         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;
     }
 
@@ -3828,6 +4317,65 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         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
     public List<UserUsbRecordVo> getListUserSubscribe(UserUsbRecordBo bo) {
         if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() == 6){

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodStudentVo.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.grade.vo;
 
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
 import com.zhongzheng.common.annotation.Excel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -264,4 +265,7 @@ public class ClassPeriodStudentVo {
 	@ApiModelProperty("商品年份")
 	private String goodsYear;
 
+	@ApiModelProperty("业务层次ID")
+	private Long businessId;
+
 }

+ 49 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/DangAnBkUserExportVo.java

@@ -0,0 +1,49 @@
+package com.zhongzheng.modules.grade.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+/**
+ * 学员记录视图对象 mall_package
+ *
+ * @author ruoyi
+ * @date 2021-11-10
+ */
+@Data
+@ExcelTarget("classPeriodStudentExportVo")
+public class DangAnBkUserExportVo {
+	private static final long serialVersionUID = 1L;
+	/** 学员编码 */
+	@Excel(name = "姓名")
+	@ApiModelProperty("姓名")
+	private String realName;
+
+	/** 学员编码 */
+	@Excel(name = "身份证号码")
+	@ApiModelProperty("身份证号码")
+	private String idCard;
+
+	@Excel(name = "报名时间")
+	@ApiModelProperty("报名时间")
+	private String createTime;
+
+	@Excel(name = "课程")
+	private String goodsName;
+
+	@Excel(name = "年份")
+	private String goodsYear;
+
+	@Excel(name = "业务类型")
+	private String businessName;
+
+	@Excel(name = "专业")
+	private String categoryName;
+
+	@Excel(name = "资料审核")
+	private String profileStatus;
+}

+ 53 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/DangAnCertificateExportVo.java

@@ -0,0 +1,53 @@
+package com.zhongzheng.modules.grade.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * 学员记录视图对象 mall_package
+ *
+ * @author ruoyi
+ * @date 2021-11-10
+ */
+@Data
+public class DangAnCertificateExportVo {
+	private static final long serialVersionUID = 1L;
+	/** 学员编码 */
+	@Excel(name = "姓名")
+	@ApiModelProperty("姓名")
+	private String realname;
+
+	/** 学员编码 */
+	@Excel(name = "身份证号码")
+	@ApiModelProperty("身份证号码")
+	private String idCard;
+
+	@Excel(name = "发证时间")
+	@ApiModelProperty("发证时间")
+	private String pushDate;
+
+	@Excel(name = "编号")
+	@ApiModelProperty("编号")
+	private String certificateCode;
+
+	@Excel(name = "课程")
+	private String goodsName;
+
+	@Excel(name = "业务类型")
+	private String businessName;
+
+	@Excel(name = "专业")
+	private String categoryName;
+
+	@Excel(name = "培训机构")
+	private String orgName;
+
+	@Excel(name = "培训时间")
+	private String trainTimeTxt;
+
+	@Excel(name = "培训学时")
+	private String classHours;
+}

+ 87 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/DangAnPeriodExportAllVo.java

@@ -0,0 +1,87 @@
+package com.zhongzheng.modules.grade.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+/**
+ * 学员记录视图对象 mall_package
+ *
+ * @author ruoyi
+ * @date 2021-11-10
+ */
+@Data
+public class DangAnPeriodExportAllVo {
+	private static final long serialVersionUID = 1L;
+
+	/** 学员编码 */
+	@Excel(name = "姓名")
+	@ApiModelProperty("姓名")
+	private String realName;
+
+	/** 学员编码 */
+	@Excel(name = "身份证号码")
+	@ApiModelProperty("身份证号码")
+	private String idCard;
+
+
+	@Excel(name = "课程")
+	private String goodsName;
+
+	@Excel(name = "年份")
+	private String goodsYear;
+
+	@Excel(name = "业务类型")
+	private String businessName;
+
+	@Excel(name = "专业")
+	private String categoryName;
+
+	@Excel(name = "模块标题")
+	@ApiModelProperty("模块标题")
+	private String moduleName;
+	@Excel(name = "章标题")
+	@ApiModelProperty("章标题")
+	private String chapterName;
+	@Excel(name = "节标题")
+	@ApiModelProperty("节/卷标题")
+	private String sectionName;
+
+
+	@Excel(name = "类型")
+	@ApiModelProperty("类型")
+	private String sectionType;
+
+	@Excel(name = "学时")
+	@ApiModelProperty("学时")
+	private String classHour;
+
+	@Excel(name = "开始学习时间")
+	@ApiModelProperty("开始学习时间")
+	private String startTimeTxt;
+
+	@Excel(name = "结束学习时间")
+	@ApiModelProperty("结束学习时间")
+	private String endTimeTxt;
+
+
+
+	@Excel(name = "做题成绩")
+	@ApiModelProperty("做题成绩")
+	private BigDecimal score;
+
+	@Excel(name = "记录")
+	@ApiModelProperty("记录")
+	private String numIndex;
+
+	@Excel(name = "审核时间")
+	@ApiModelProperty("审核时间")
+	private String auditTimeTxt;
+
+	@Excel(name = "审核人")
+	@ApiModelProperty("审核人")
+	private String auditPeopleTxt;
+}

+ 73 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/DangAnStudentExportAllVo.java

@@ -0,0 +1,73 @@
+package com.zhongzheng.modules.grade.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+/**
+ * 学员记录视图对象 mall_package
+ *
+ * @author ruoyi
+ * @date 2021-11-10
+ */
+@Data
+public class DangAnStudentExportAllVo {
+	private static final long serialVersionUID = 1L;
+
+	/** 学员编码 */
+	@Excel(name = "姓名")
+	@ApiModelProperty("姓名")
+	private String realName;
+
+	/** 学员编码 */
+	@Excel(name = "身份证号码")
+	@ApiModelProperty("身份证号码")
+	private String idCard;
+
+
+	@Excel(name = "课程")
+	private String goodsName;
+
+	@Excel(name = "年份")
+	private String goodsYear;
+
+	@Excel(name = "业务类型")
+	private String businessName;
+
+	@Excel(name = "专业")
+	private String categoryName;
+
+	@Excel(name = "模块标题")
+	@ApiModelProperty("模块标题")
+	private String moduleName;
+	@Excel(name = "章标题")
+	@ApiModelProperty("章标题")
+	private String chapterName;
+	@Excel(name = "节标题")
+	@ApiModelProperty("节标题")
+	private String sectionName;
+	@Excel(name = "类型")
+	@ApiModelProperty("类型")
+	private String sectionType;
+	@Excel(name = "学习/做题时间")
+	@ApiModelProperty("学习/做题时间")
+	private String studyTimeTxt;
+	@Excel(name = "学习/做题时长")
+	@ApiModelProperty("学习/做题时长")
+	private String studyTimeLongTxt;
+
+	@Excel(name = "做题成绩")
+	@ApiModelProperty("做题成绩")
+	private BigDecimal score;
+
+	@Excel(name = "做题正确率")
+	@ApiModelProperty("做题正确率")
+	private String rate;
+
+	@Excel(name = "学习终端")
+	@ApiModelProperty("学习终端")
+	private String plat;
+}

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserCertificateService.java

@@ -32,6 +32,8 @@ public interface IUserCertificateService extends IService<UserCertificate> {
 
 	List<UserCertificateVo> selectList(UserCertificateQueryBo bo);
 
+
+
 	UserCertificateVo selectDetail(UserCertificateQueryBo bo);
 
 	/**

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserCertificateServiceImpl.java

@@ -84,6 +84,7 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateMappe
         return list;
     }
 
+
     @Override
     public UserCertificateVo selectDetail(UserCertificateQueryBo bo) {
         UserCertificateVo userCertificateVo = this.baseMapper.selectDetail(bo);

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -147,6 +147,7 @@
         <result property="goodsYear" column="goods_year"/>
         <result property="createTime" column="create_time"/>
         <result property="profileStatus" column="profile_status"/>
+        <result property="businessId" column="business_id"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
@@ -1807,6 +1808,7 @@
         g.stand_price,
         g.goods_id,
         g.year as goods_year,
+        g.business_id,
         cgu.period_status,
         cg.class_start_time,
         cg.class_end_time,
@@ -1927,6 +1929,8 @@
     <select id="listBKUserPeriod" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo"
             resultMap="ClassPeriodStudentVo">
         SELECT
+        u.realname,
+        u.id_card,
         g.goods_name,
         g.create_time,
         g.year as goods_year,

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -2063,7 +2063,7 @@
           AND goods_id = #{goodsId}
           AND current_status = 1
         <if test="orderGoodsId != null and orderGoodsId != '' ">
-            AND grade_id = #{orderGoodsId}
+            AND order_goods_id = #{orderGoodsId}
         </if>
         <if test="gradeId != null and gradeId != '' ">
             AND grade_id = #{gradeId}