|
|
@@ -2009,6 +2009,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
/*需要加载表单公式的时候isFormLoading==true*/
|
|
|
Document document = null;
|
|
|
Map<String, Object> reData = new HashMap<>();
|
|
|
+ //编号
|
|
|
+ Map<String, Object> bhData = new HashMap<>();
|
|
|
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
@@ -2167,7 +2169,36 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
if (trindex <= 10) {
|
|
|
if (StringUtils.isNotBlank(node.getPartitionCode())) {
|
|
|
- reData.put(element.attr("keyName"), node.getPartitionCode());
|
|
|
+ bhData.put(element.attr("keyName"), node.getPartitionCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 编号 //编号为父节点划分编号 “编号:”、“工程编号:”、“编号”、“分项工程编号”、“分部分项编号” 优先使用自己节点,没有编码找寻父级子分项或分项节点
|
|
|
+ if (bhtitle.size() >= 1 && contractInfo.getIsReferenceNumber() == 2) {
|
|
|
+ String nodePartitionCode = "";
|
|
|
+ if(StringUtils.isNotEmpty(node.getPartitionCode())){
|
|
|
+ nodePartitionCode=node.getPartitionCode();
|
|
|
+ }else {
|
|
|
+ List<WbsTreeContract> list = wbsTreeContractService.getBaseMapper().selectList(Wrappers.<WbsTreeContract>query().lambda().in(WbsTreeContract::getPKeyId, node.getAncestorsPId()).in(WbsTreeContract::getNodeType, Arrays.asList(4, 5)));
|
|
|
+ if(!list.isEmpty()){
|
|
|
+ // 获取第一个节点类型为5的元素
|
|
|
+ WbsTreeContract result = list.stream().filter(item -> item.getNodeType() == 5).findFirst().orElse(null);
|
|
|
+ if(result!=null){
|
|
|
+ nodePartitionCode=result.getPartitionCode();
|
|
|
+ }else {
|
|
|
+ WbsTreeContract result2 = list.stream().filter(item -> item.getNodeType() == 4).findFirst().orElse(null);
|
|
|
+ if(result2!=null){
|
|
|
+ nodePartitionCode=result2.getPartitionCode();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (Element element : bhtitle) {
|
|
|
+ int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
+ if (trindex <= 10) {
|
|
|
+ if (StringUtils.isNotBlank(nodePartitionCode)) {
|
|
|
+ bhData.put(element.attr("keyName"), nodePartitionCode);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2341,6 +2372,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(bhData!=null){
|
|
|
+ reData.putAll(bhData);
|
|
|
+ }
|
|
|
// if(reData.size()>0){
|
|
|
// //处理key重复导致pdf数据错位
|
|
|
// for (Iterator<Map.Entry<String, Object>> iterator = reData.entrySet().iterator(); iterator.hasNext(); ) {
|