|
|
@@ -37,6 +37,7 @@ import com.zhongzheng.modules.base.service.IUserProfileService;
|
|
|
import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
|
|
|
import com.zhongzheng.modules.course.domain.Major;
|
|
|
+import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
|
|
|
import com.zhongzheng.modules.course.service.*;
|
|
|
import com.zhongzheng.modules.course.vo.CourseBusinessVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseChapterVo;
|
|
|
@@ -228,6 +229,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
@Autowired
|
|
|
private IUserCertificateService iUserCertificateService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CourseMenuMapper courseMenuMapper;
|
|
|
+
|
|
|
|
|
|
private String SEVEN_OFFICIALPUSH_INFOACCOUNT;
|
|
|
private String SEVEN_OFFICIALPUSH_TOKEN;
|
|
|
@@ -4380,6 +4384,27 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
dir.mkdirs();
|
|
|
}
|
|
|
ossService.fileDownloadLocal(vo.getCertificatePath(),imgDirPath+"/"+vo.getCertificateCode()+".jpg");
|
|
|
+
|
|
|
+ ClassGradeUserQueryBo bo = new ClassGradeUserQueryBo();
|
|
|
+ bo.setGoodsId(vo.getGoodsId());
|
|
|
+ //获取章列表
|
|
|
+ List<CourseChapterVo> chapterList = iClassGradeUserService.findChapterList(bo);
|
|
|
+ BigDecimal totalTime = new BigDecimal(0);
|
|
|
+ BigDecimal publicTotalTime = new BigDecimal(0);
|
|
|
+ List<DangAnCertificateItemExportVo> exportItemList = new ArrayList<>();
|
|
|
+ for(CourseChapterVo chapterVo : chapterList){
|
|
|
+ DangAnCertificateItemExportVo itemExportVo = BeanUtil.toBean(vo, DangAnCertificateItemExportVo.class);
|
|
|
+ if(Validator.isEmpty(chapterVo.getCommonSign())||chapterVo.getCommonSign()==0){
|
|
|
+ totalTime=totalTime.add(new BigDecimal(courseMenuMapper.countChapterTotalTime(chapterVo.getChapterId())));
|
|
|
+ }else if(chapterVo.getCommonSign()==1){
|
|
|
+ publicTotalTime=publicTotalTime.add(new BigDecimal(courseMenuMapper.countChapterTotalTime(chapterVo.getChapterId())));
|
|
|
+ }
|
|
|
+ itemExportVo.setChapterName(chapterVo.getName()+"(学时:"+totalTime.divide(new BigDecimal(45*60),BigDecimal.ROUND_HALF_UP)+")");
|
|
|
+ exportItemList.add(itemExportVo);
|
|
|
+ }
|
|
|
+ ExcelUtil<DangAnCertificateItemExportVo> util = new ExcelUtil<DangAnCertificateItemExportVo>(DangAnCertificateItemExportVo.class);
|
|
|
+ String filePath2 = dirPath+"/"+vo.getCertificateCode()+"/培训内容.xlsx";
|
|
|
+ util.exportEasyExcelUtil(exportItemList,DangAnCertificateItemExportVo.class,filePath2);
|
|
|
}
|
|
|
ExcelUtil<DangAnCertificateExportVo> util2 = new ExcelUtil<DangAnCertificateExportVo>(DangAnCertificateExportVo.class);
|
|
|
String filePath2 = dirPath+"/证书证明.xlsx";
|
|
|
@@ -4507,8 +4532,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
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"));
|
|
|
- if(Validator.isNotEmpty(vo.getStatus())&&vo.getStatus()==1){
|
|
|
- item.setStatus("有效");
|
|
|
+ if(Validator.isNotEmpty(vo.getGoodsStatus())&&vo.getGoodsStatus()==1){
|
|
|
+ item.setStatus("正常");
|
|
|
}else{
|
|
|
item.setStatus("无效");
|
|
|
}
|
|
|
@@ -4544,7 +4569,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
item.setRate(itemExportVo.getRightRate()+"");
|
|
|
}
|
|
|
if(ObjectUtils.isNull(itemExportVo.getFromPlat())){
|
|
|
- item.setPlat("PC");
|
|
|
+ item.setPlat(null);
|
|
|
}
|
|
|
else if(itemExportVo.getFromPlat()==1){
|
|
|
item.setPlat("小程序");
|