|
|
@@ -4454,6 +4454,59 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean exportHandoutsStudyList(Long userId, String dirPath) {
|
|
|
+ dirPath = dirPath+"/资料记录";
|
|
|
+ File rootDir = new File(dirPath);
|
|
|
+ if(!rootDir.exists()){
|
|
|
+ rootDir.mkdirs();
|
|
|
+ }
|
|
|
+ UserQueryBo queryBo = new UserQueryBo();
|
|
|
+ queryBo.setUserId(userId);
|
|
|
+ List<ExamStudyRecordVo> list = iUserStudyRecordService.querDangAnHandoutsStudy(queryBo);
|
|
|
+ List<DangAnHandoutsListExportVo> exportList = new ArrayList<>();
|
|
|
+ for(ExamStudyRecordVo vo : list){
|
|
|
+ DangAnHandoutsListExportVo item = BeanUtil.toBean(vo, DangAnHandoutsListExportVo.class);
|
|
|
+ item.setBusinessName(vo.getEducationName()+"-"+vo.getProjectName()+"-"+vo.getBusinessName());
|
|
|
+ item.setServiceTimeTxt(DateUtils.timestampToDateFormat(vo.getServiceStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(vo.getServiceEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ exportList.add(item);
|
|
|
+ }
|
|
|
+ ExcelUtil<DangAnHandoutsListExportVo> util = new ExcelUtil<DangAnHandoutsListExportVo>(DangAnHandoutsListExportVo.class);
|
|
|
+ String filePath = dirPath+"/资料记录.xlsx";
|
|
|
+ util.exportEasyExcelUtil(exportList,DangAnHandoutsListExportVo.class,filePath);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean exportExamStudyList(Long userId, String dirPath) {
|
|
|
+ dirPath = dirPath+"/题库记录";
|
|
|
+ File rootDir = new File(dirPath);
|
|
|
+ if(!rootDir.exists()){
|
|
|
+ rootDir.mkdirs();
|
|
|
+ }
|
|
|
+ UserQueryBo queryBo = new UserQueryBo();
|
|
|
+ queryBo.setUserId(userId);
|
|
|
+ List<DangAnExamListExportVo> exportList = new ArrayList<>();
|
|
|
+ List<ExamStudyRecordVo> list = iUserStudyRecordService.querDangAnExamStudy(queryBo);
|
|
|
+ for(ExamStudyRecordVo vo : list){
|
|
|
+ DangAnExamListExportVo item = BeanUtil.toBean(vo, DangAnExamListExportVo.class);
|
|
|
+ item.setBusinessName(vo.getEducationName()+"-"+vo.getProjectName()+"-"+vo.getBusinessName());
|
|
|
+ item.setServiceTimeTxt(DateUtils.timestampToDateFormat(vo.getServiceStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(vo.getServiceEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ item.setProcess(vo.getStuAllNum()+"/"+vo.getExamNum());
|
|
|
+ item.setStudyTimeTxt(DateUtils.timestampToDateFormat(vo.getStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+DateUtils.timestampToDateFormat(vo.getEndTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ exportList.add(item);
|
|
|
+ }
|
|
|
+ ExcelUtil<DangAnExamListExportVo> util = new ExcelUtil<DangAnExamListExportVo>(DangAnExamListExportVo.class);
|
|
|
+ String filePath = dirPath+"/题库记录.xlsx";
|
|
|
+ util.exportEasyExcelUtil(exportList,DangAnExamListExportVo.class,filePath);
|
|
|
+
|
|
|
+ //next
|
|
|
+ for(ExamStudyRecordVo vo : list){
|
|
|
+ String goodsDirPath = dirPath+"/"+vo.getGoodsName();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<UserUsbRecordVo> getListUserSubscribe(UserUsbRecordBo bo) {
|
|
|
if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() == 6){
|