|
@@ -1750,6 +1750,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean signReport(UserSubscribeSignReportBo bo) {
|
|
|
//获取考试预约信息
|
|
|
UserSubscribe userSubscribe = getById(bo.getSubscribeId());
|
|
@@ -1758,8 +1759,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
}
|
|
|
//获取考试专业
|
|
|
Goods goods = iGoodsService.getById(userSubscribe.getGoodsId());
|
|
|
- Major major = majorService.getById(goods.getMajorId());
|
|
|
- bo.setMajor(major.getCategoryName());
|
|
|
+ if (ObjectUtils.isNotNull(goods.getMajorId())){
|
|
|
+ Major major = majorService.getById(goods.getMajorId());
|
|
|
+ bo.setMajor(major.getCategoryName());
|
|
|
+ }
|
|
|
String applyDate = DateUtils.timestampToDateFormat(Long.valueOf(userSubscribe.getApplySiteExamTime()), "yyyy-MM-dd");
|
|
|
bo.setApplySiteStartTime(String.format("%s %s",applyDate,userSubscribe.getApplySiteStartTime()));
|
|
|
//获取承诺书模板
|
|
@@ -1971,13 +1974,17 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
g.setColor(Color.BLACK);
|
|
|
|
|
|
g.drawString(bo.getApplySiteStartTime(), 668, 3341);
|
|
|
- g.drawString(bo.getMajor(), 673, 3464);
|
|
|
- g.drawString(bo.getIdCard(), 729, 3593);
|
|
|
+ if (ObjectUtils.isNotNull(bo.getMajor())){
|
|
|
+ g.drawString(bo.getMajor(), 673, 3464);
|
|
|
+ }
|
|
|
+ if (ObjectUtils.isNotNull(bo.getIdCard())){
|
|
|
+ g.drawString(bo.getIdCard(), 729, 3593);
|
|
|
+ }
|
|
|
g.drawString(bo.getPhone(), 681, 3725);
|
|
|
g.drawString(DateUtils.getDate(), 673, 3860);
|
|
|
|
|
|
//用户签名
|
|
|
- String replace = imageStr.replace("data:image/jpeg;base64,", "");
|
|
|
+ String replace = imageStr.replace("data:image/png;base64,", "");
|
|
|
byte[] imageBytes = DatatypeConverter.parseBase64Binary(replace);
|
|
|
ByteArrayInputStream inputStream = new ByteArrayInputStream(imageBytes);
|
|
|
BufferedImage qrImage = ImageIO.read(inputStream);
|