| | |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.config.pdfutils.PdfUtils; |
| | | import com.ltkj.web.controller.system.SysDeptController; |
| | | import jodd.util.StringUtil; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | if (null != list && !list.isEmpty()) { |
| | | LtkjExamJcbgd jcbgd = list.get(0); |
| | | if (jcbgd != null) { |
| | | tjPdfVO.setTs(jcbgd.getYxbx()); |
| | | tjPdfVO.setSj(jcbgd.getBgNr()); |
| | | String yxbx = jcbgd.getYxbx(); |
| | | String bgNr = jcbgd.getBgNr(); |
| | | // 正则表达式:匹配数字后跟 '.' 或 '、' |
| | | String regex = "\\d+[\\.,、]"; |
| | | // 使用正则替换,匹配的数字后添加换行符 |
| | | if(StringUtil.isNotBlank(yxbx)) yxbx = yxbx.replaceAll(regex, "\n$0"); |
| | | if(StringUtil.isBlank(bgNr)) bgNr = ""; |
| | | if(StringUtil.isBlank(yxbx)) yxbx = ""; |
| | | tjPdfVO.setTs(yxbx); |
| | | tjPdfVO.setSj(bgNr); |
| | | tjPdfVO.setShys(jcbgd.getShysxm()); |
| | | tjPdfVO.setProName(jcbgd.getXmmc()); |
| | | ids += "|" + jcbgd.getXmdm(); |
| | |
| | | } |
| | | } |
| | | } |
| | | // if(!tjPdfVOS.isEmpty()){ |
| | | // tjPdfVOS=tjPdfVOS.stream().sorted(Comparator.comparing(TjPdfVO::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // tjPdfVOS = tjPdfVOS.stream() |
| | | // .sorted(Comparator.comparingInt( |
| | | // tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | // )) |
| | | // .collect(Collectors.toList()); |
| | | // } |
| | | printReport.put(entry.getKey(), tjPdfVOS); |
| | | } |
| | | } |