|
@@ -880,6 +880,8 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
ZhcxCommissionCheckDetailWordVO checkDetailWordVO = new ZhcxCommissionCheckDetailWordVO();
|
|
|
checkDetailWordVO.setTitleContent(item.getName());
|
|
|
checkDetailWordVO.setLevel(item.getLevel());
|
|
|
+ checkDetailWordVO.setSummary(item.getSummary());
|
|
|
+ checkDetailWordVO.setAnnex(item.getAnnex());
|
|
|
checkDetailWordVO.setDetailList(new LinkedList<>());
|
|
|
if (!"-1".equals(item.getPid())) {
|
|
|
//目前标题最多到三级
|
|
@@ -1011,6 +1013,25 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
buildTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.HEADING_3, 15, true, res.getChapterno() + "." + res.getTitleContent(), null);
|
|
|
}
|
|
|
}
|
|
|
+ //摘要及图片
|
|
|
+ if (StringUtils.isNotBlank(res.getSummary())) {
|
|
|
+ buildTitleContent(builder, DEFAULT_FONT_NAME, StyleIdentifier.HEADING_5, 10, false, res.getSummary(), null);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(res.getAnnex())) {
|
|
|
+ // 文件存储路径目录
|
|
|
+ String filePath = sysConfigService.getContentByConfigCode(Constants.CONFIG_FILE_ROOT_PATH);
|
|
|
+ String outputDir = filePath + "\\by_files\\driveinspection_files\\"; // 写死
|
|
|
+ String[] annexArr = res.getAnnex().split("\\^\\_\\^");
|
|
|
+ for (String imginfo : annexArr) {
|
|
|
+ String[] imgArr = imginfo.split("-;-");
|
|
|
+ String imgFullName = imgArr[1] + "." + imgArr[0].split("\\.")[1];
|
|
|
+ String imgPath = outputDir + imgFullName;
|
|
|
+ Shape shape = builder.insertImage(imgPath);
|
|
|
+ shape.setWidth(80); // 宽度 200 磅
|
|
|
+ shape.setHeight(80); // 高度 150 磅
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (ObjectUtil.isNotEmpty(res.getDetailList())) {
|
|
|
// 插入表头
|
|
|
builder.insertCell();
|
|
@@ -1113,18 +1134,22 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
// 将第一页页眉的内容克隆到当前页眉
|
|
|
for (Node node : firstPageHeader.getChildNodes(NodeType.ANY, true).toArray()) {
|
|
|
Node clonedNode = node.deepClone(true);
|
|
|
-// if (StringUtils.isNotBlank(clonedNode.getText())) {
|
|
|
- currentHeader.appendChild(clonedNode);
|
|
|
-// }
|
|
|
-// if (node.getNodeType() == NodeType.TABLE) {
|
|
|
- break;
|
|
|
-// }
|
|
|
+ if (node.getNodeType() == NodeType.PARAGRAPH || node.getNodeType() == NodeType.TABLE) {
|
|
|
+ currentHeader.appendChild(clonedNode);
|
|
|
+ }
|
|
|
+ if (node.getNodeType() == NodeType.TABLE) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
// 复制第一页页脚的内容到当前页脚
|
|
|
for (Node node : firstPageFooter.getChildNodes(NodeType.ANY, true).toArray()) {
|
|
|
Node clonedNode = node.deepClone(true);
|
|
|
- footer.appendChild(clonedNode);
|
|
|
- break;
|
|
|
+ if (node.getNodeType() == NodeType.PARAGRAPH || node.getNodeType() == NodeType.TABLE) {
|
|
|
+ footer.appendChild(clonedNode);
|
|
|
+ }
|
|
|
+ if (node.getNodeType() == NodeType.TABLE) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//刷新目录
|
|
@@ -1686,7 +1711,7 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
//buildTableTextContent(builder, 60, 9, DEFAULT_FONT_NAME, false, detailWordVO.getTestmethod());
|
|
|
// 标准测试时间
|
|
|
buildTableTextContent(builder, 50, 9, DEFAULT_FONT_NAME, false,
|
|
|
- String.valueOf(detailWordVO.getTesttime() != null ? detailWordVO.getTesttime() : "").replace(".0",""));
|
|
|
+ String.valueOf(detailWordVO.getTesttime() != null ? detailWordVO.getTesttime() : "").replace(".0", ""));
|
|
|
// 接收标准
|
|
|
builder.insertCell();
|
|
|
buildTableTextContent(builder, 50, 9, DEFAULT_FONT_NAME, false, detailWordVO.getAcceptancecriteria());
|
|
@@ -1941,11 +1966,11 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
stringBuilder.append("模式2必填");
|
|
|
}
|
|
|
// 标准测试时间新增必填校验
|
|
|
- if ("否".equals(isTitle) && testTime == null ) {
|
|
|
+ if ("否".equals(isTitle) && testTime == null) {
|
|
|
stringBuilder.append("标准测试时间必填");
|
|
|
}
|
|
|
// 接收标准必填校验
|
|
|
- if("否".equals(isTitle) && StringUtils.isBlank(acceptancecriteria)){
|
|
|
+ if ("否".equals(isTitle) && StringUtils.isBlank(acceptancecriteria)) {
|
|
|
stringBuilder.append("接收标准必填");
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(stringBuilder)) {
|