Kaynağa Gözat

add 证书模板

he2802 3 yıl önce
ebeveyn
işleme
21052d5bca

+ 30 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java

@@ -378,6 +378,36 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
                     UserCertificateAddBo addBo = mergeData(bo,goodsVo,vo,tpVo.getTpId(),ossPath);
                     iUserCertificateService.insertByAddBo(addBo);
                 }
+                else if("certificate08".equals(tpVo.getKeyValue())){
+                    CertificatePhotoVo vo = new CertificatePhotoVo();
+                    String code = "XYPX02YJ"+nowDate.substring(0, 4)+getCertificateCode();
+                    vo.setCode(code);
+                    vo.setRealname(userVo.getRealname());
+                    vo.setIdCard(userVo.getIdCard());
+                    String date = DateUtils.timestampToDate(goodsVo.getCreateTime());
+                    vo.setYear(date.substring(0, 4));
+                    vo.setType("选修");
+                    vo.setMajor("网络班");
+                    String sex = "男";
+                    if(Validator.isNotEmpty(userVo.getSex())&&userVo.getSex()==2){
+                        sex = "女";
+                    }
+                    vo.setSex(sex);
+                    vo.setClassHours(goodsVo.getClassHours()+"");
+                    vo.setDateY(nowDate.substring(0, 4));
+                    vo.setDateM(nowDate.substring(5, 7));
+                    vo.setDateD(nowDate.substring(8, 10));
+                    vo.setMajor("一级建造师继续教育培训");
+                    vo.setRemark1("其中水");
+                    vo.setRemark2("利水电课 "+goodsVo.getClassHours()+" 学时,测试成绩合格。");
+                    vo.setTrainStartTime(studyRecordVo.getFirstStartTime()); //培训开始时间
+                    vo.setTrainEndTime(classGradeUser.getPeriodWaitTime());//学时变为待审核时间,也是学习完成时间
+                    List<String> chapterListTxt = changeChapterList(chapterList);
+                    vo.setChapterList(chapterListTxt);
+                    String ossPath =drawPicOneBuild(vo);
+                    UserCertificateAddBo addBo = mergeData(bo,goodsVo,vo,tpVo.getTpId(),ossPath);
+                    iUserCertificateService.insertByAddBo(addBo);
+                }
             }
         }
         return null;