|
|
@@ -15,6 +15,11 @@ import com.zhongzheng.modules.base.service.ICertificateTpService;
|
|
|
import com.zhongzheng.modules.base.vo.CertificatePhotoVo;
|
|
|
import com.zhongzheng.modules.base.vo.CertificateTpVo;
|
|
|
import com.zhongzheng.modules.course.domain.CourseBusiness;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
+import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
+import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -42,6 +47,9 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, CertificateTp> implements ICertificateTpService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IGoodsService iGoodsService;
|
|
|
+
|
|
|
@Override
|
|
|
public CertificateTpVo queryById(Long tpId){
|
|
|
CertificateTp db = this.baseMapper.selectById(tpId);
|
|
|
@@ -97,31 +105,50 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
|
|
|
return this.updateById(update);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成用户证书
|
|
|
+ * @param bo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
- public String makeCertificatePhoto(CertificateTpQueryBo bo) {
|
|
|
- if("certificate01".equals(bo.getKeyValue())){
|
|
|
- CertificatePhotoVo vo = new CertificatePhotoVo();
|
|
|
- vo.setCode("XYZC21011234");
|
|
|
- vo.setRealname("李盛仁");
|
|
|
- vo.setIdCard("445224199901040003");
|
|
|
- vo.setYear("2021");
|
|
|
- vo.setType("专业");
|
|
|
- vo.setMajor("网络班");
|
|
|
- vo.setClassHours("42");
|
|
|
- vo.setDateY("2022");
|
|
|
- vo.setDateM("2");
|
|
|
- vo.setDateD("16");
|
|
|
- List<String> chapterList = new ArrayList<>();
|
|
|
- chapterList.add("①.绿色施工");
|
|
|
- chapterList.add("②.绿色施工");
|
|
|
- chapterList.add("③.绿色施工");
|
|
|
- chapterList.add("④.绿色施工");
|
|
|
- chapterList.add("⑤.绿色施工");
|
|
|
- chapterList.add("⑥.绿色施工");
|
|
|
- chapterList.add("⑦.绿色施工");
|
|
|
- chapterList.add("⑧.绿色施工");
|
|
|
- vo.setChapterList(chapterList);
|
|
|
- drawPic(vo);
|
|
|
+ public String makeCertificatePhoto(ClassGradeUserQueryBo bo) {
|
|
|
+ GoodsVo goodsVo = iGoodsService.selectDetail(bo.getGoodsId());
|
|
|
+ if(Validator.isNotEmpty(goodsVo.getCertificateIds())){
|
|
|
+ String[] s = goodsVo.getCertificateIds().split(",");
|
|
|
+ List<Long> tpIds = new ArrayList<>();
|
|
|
+ for(String each : s) {
|
|
|
+ tpIds.add(Long.valueOf(each));
|
|
|
+ }
|
|
|
+ CertificateTpQueryBo queryBo = new CertificateTpQueryBo();
|
|
|
+ queryBo.setTpIds(tpIds);
|
|
|
+ List<CertificateTpVo> list = queryList(queryBo);
|
|
|
+ for(CertificateTpVo tpVo : list){
|
|
|
+ if("certificate01".equals(tpVo.getKeyValue())){
|
|
|
+ CertificatePhotoVo vo = new CertificatePhotoVo();
|
|
|
+ vo.setCode("XYZC21011234");
|
|
|
+ vo.setRealname("李盛仁");
|
|
|
+ vo.setIdCard("445224199901040003");
|
|
|
+ vo.setYear("2021");
|
|
|
+ vo.setType("专业");
|
|
|
+ vo.setMajor("网络班");
|
|
|
+ vo.setClassHours("42");
|
|
|
+ vo.setDateY("2022");
|
|
|
+ vo.setDateM("2");
|
|
|
+ vo.setDateD("16");
|
|
|
+ List<String> chapterList = new ArrayList<>();
|
|
|
+ chapterList.add("①.绿色施工");
|
|
|
+ chapterList.add("②.绿色施工");
|
|
|
+ chapterList.add("③.绿色施工");
|
|
|
+ chapterList.add("④.绿色施工");
|
|
|
+ chapterList.add("⑤.绿色施工");
|
|
|
+ chapterList.add("⑥.绿色施工");
|
|
|
+ chapterList.add("⑦.绿色施工");
|
|
|
+ chapterList.add("⑧.绿色施工");
|
|
|
+ vo.setChapterList(chapterList);
|
|
|
+ drawPic(vo);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
return null;
|