|
|
@@ -1833,11 +1833,12 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
List<FormData> inspectionList = new ArrayList<>();
|
|
|
/*1检验表5评定表*/
|
|
|
List<NodeTable> mainTable = tec.getTableAll().stream().filter(e -> (e.getTableType().equals(1) || e.getTableType().equals(5)) && !e.getNodeName().contains("附表") && tec.getCurrentNode().getNodeType() > 3).collect(Collectors.toList());
|
|
|
+ List<NodeTable> mainFBTable = tec.getTableAll().stream().filter(e -> (e.getTableType().equals(1) || e.getTableType().equals(5)) && e.getNodeName().contains("附表") && tec.getCurrentNode().getNodeType() > 3).collect(Collectors.toList());
|
|
|
if (Func.isEmpty(mainTable)) {
|
|
|
return;
|
|
|
}
|
|
|
List<NodeTable> mainTableList = mainTable.stream().collect(Collectors.groupingBy(NodeTable::getInitTableName)).values().stream().map(l -> l.get(0)).collect(Collectors.toList());
|
|
|
- /*NodeTable main = mainTable.get(0);*/
|
|
|
+ // 删除多少的主表信息
|
|
|
List<Long> pkeyIdsMain = mainTableList.stream().map(NodeTable::getPKeyId).collect(Collectors.toList());
|
|
|
if (mainTable.size() > 1) {
|
|
|
List<Long> removeIds = mainTable.stream().map(NodeTable::getPKeyId).filter(x -> !pkeyIdsMain.contains(x)).collect(Collectors.toList());
|
|
|
@@ -1854,6 +1855,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/*this.wbsTreeContractMapper.deleteLogicByIds(removeIds);*/
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
/*多余的表删除之后需要,裁剪多余表头数据保留全部实测数据然后重新设置增页大小*/
|
|
|
for (NodeTable mt : mainTableList) {
|
|
|
tec.getKeyMappers().stream().filter(e -> e.getPkId().equals(mt.getPKeyId())).map(KeyMapper::getCode).forEach(e -> {
|
|
|
@@ -1877,7 +1880,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if (Func.isNotEmpty(inspectionList)) {
|
|
|
+ // 校验附表的数据
|
|
|
/*检查是否存在附表,不存在挂载*/
|
|
|
List<NodeTable> subTabList = tec.getTableAll().stream().filter(e -> e.getNodeName().contains("附表") && (e.getTableType() == 1 || e.getTableType() == 5)).collect(Collectors.toList());
|
|
|
if (subTabList.size() == 0) {
|
|
|
@@ -1894,13 +1897,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
SubTable sta = new SubTable(subTableFds, tec, mainTableList);
|
|
|
sta.put(inspectionList);
|
|
|
/*把附表数据刷入对应的附表元素对象*/
|
|
|
- sta.flush();
|
|
|
+ sta.flush(inspectionList.size()==0);
|
|
|
/*把主表的表头表尾信息拷贝*/
|
|
|
headerFooterSub(subTableFds, tec);
|
|
|
/*如果识别到手填内容需要在附表写入数据后,更新评定关联数据*/
|
|
|
-
|
|
|
+ /*if (Func.isNotEmpty(inspectionList)) {
|
|
|
}else {
|
|
|
- if(StringUtils.isNotEmpty(tec.getIsRemoveForSubTab())&&"1".equals(tec.getIsRemoveForSubTab())){
|
|
|
+ // if(StringUtils.isNotEmpty(tec.getIsRemoveForSubTab())&&"1".equals(tec.getIsRemoveForSubTab())){
|
|
|
List<NodeTable> subTabList = tec.getTableAll().stream().filter(e -> e.getNodeName().contains("附表") && (e.getTableType() == 1 || e.getTableType() == 5)).collect(Collectors.toList());
|
|
|
if(!subTabList.isEmpty()){
|
|
|
String queryIds = subTabList.stream().map(e -> e.getPKeyId() + "").collect(Collectors.joining(","));
|
|
|
@@ -1911,8 +1914,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
this.wbsTreeContractMapper.deleteLogicByIds(ids);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ // }
|
|
|
+ }*/
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|