|
@@ -273,7 +273,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
Map<String, Measurement> itemsMap = new HashMap<>();
|
|
|
tec.formDataMap.values().stream().filter(FormData::getIsCurrentNodeElement).forEach(e -> {
|
|
|
String eName = e.getEName();
|
|
|
- if (eName.contains("实测") && !eName.contains("平均") && !eName.contains("合格率") && !eName.contains("判")) {
|
|
|
+ /*eName.contains("实测") && !eName.contains("平均") && !eName.contains("合格率") && !eName.contains("判")*/
|
|
|
+ if (eName.contains("实测")&& (!eName.contains("平均值") ||!eName.contains("代表值"))&& !eName.contains("合格率") && !eName.contains("判")) {
|
|
|
String point = FormulaUtils.parseItemName(eName);
|
|
|
/*评定匹配检验单的元素用相似匹配*/
|
|
|
Measurement measurement = itemsMap.computeIfAbsent(point, k -> new Measurement(point));
|
|
@@ -512,7 +513,17 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
if(Func.isNotEmpty(missingList)){
|
|
|
/*2从当前节点的兄弟节点中查找匹配的元素*/
|
|
|
CurrentNode currentNode = this.tec.getCurrentNode();
|
|
|
- List<Map<String,Object>> tableNamePkIdsMaps= this.jdbcTemplate.queryForList("select c.init_table_name tableName,c.p_key_id pkId,c.html_url url from (select b.id from m_wbs_tree_contract a join m_wbs_tree_contract b on (a.contract_id=b.contract_id and b.ancestors like CONCAT(a.ancestors,'%')) where a.p_key_id="+currentNode.getPkId()+" and b.is_deleted=0 and b.node_type=6 ORDER BY b.sort) k join m_wbs_tree_contract c on c.parent_id = k.id where c.contract_id="+tec.getContractId()+" and c.is_deleted=0 ");
|
|
|
+ /*List<Map<String,Object>> tableNamePkIdsMaps= this.jdbcTemplate.queryForList("select c.init_table_name tableName,c.p_key_id pkId,c.html_url url from (select b.id from m_wbs_tree_contract a join m_wbs_tree_contract b on (a.contract_id=b.contract_id and b.ancestors like CONCAT(a.ancestors,'%')) where a.p_key_id="+currentNode.getPkId()+" and b.is_deleted=0 and b.node_type=6 ORDER BY b.sort) k join m_wbs_tree_contract c on c.parent_id = k.id where c.contract_id="+tec.getContractId()+" and c.is_deleted=0 ");*/
|
|
|
+ WbsTreeContract parent = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId,currentNode.getParentPkeyId()));
|
|
|
+ if(parent==null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<Map<String,Object>> tableNamePkIdsMaps= this.jdbcTemplate.queryForList(
|
|
|
+ "select c.init_table_name tableName,c.p_key_id pkId,c.html_url url from" +
|
|
|
+ " (select id from m_wbs_tree_contract where contract_id="+currentNode.getContractId()+" and is_deleted=0 and node_type=6 and tree_code like '"+parent.getTreeCode()+"%' ORDER BY sort) k" +
|
|
|
+ " join m_wbs_tree_contract c on c.parent_id = k.id " +
|
|
|
+ "where c.contract_id="+currentNode.getContractId()+" and c.is_deleted=0 "
|
|
|
+ );
|
|
|
if(Func.isNotEmpty(tableNamePkIdsMaps)){
|
|
|
// removeList.clear();
|
|
|
missingList.forEach(miss->{
|
|
@@ -989,7 +1000,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
List<FormData> ele = new ArrayList<>();
|
|
|
relyList.forEach(rely->{
|
|
|
FormData formData= this.tec.getFormDataMap().get(rely);
|
|
|
- if(!formData.empty()){
|
|
|
+ if(formData!=null&&!formData.empty()){
|
|
|
ele.add(formData);
|
|
|
}
|
|
|
});
|
|
@@ -2452,10 +2463,11 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
List<FormulaDataBlock> formulaDataBlocks = this.getSqlList("select a.* from m_formula_data_block a join (select parent_id from m_wbs_tree_contract where tree_code like '" + treeCode.getLast() + "%' and contract_id =" + wtcEva.getContractId() + " and major_data_type=2 and is_deleted=0 ORDER BY tree_code)b on a.sw_id=b.parent_id ", FormulaDataBlock.class);
|
|
|
if (formulaDataBlocks!=null&&formulaDataBlocks.size() > 0) {
|
|
|
/*获取分部工程名称*/
|
|
|
- WbsTreeContract node = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getId, wtcEva.getParentId()).eq(WbsTreeContract::getContractId,wtcEva.getContractId()));
|
|
|
+/* WbsTreeContract node = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getId, wtcEva.getParentId()).eq(WbsTreeContract::getContractId,wtcEva.getContractId()));
|
|
|
WbsTreePrivate wtp = this.wtpId(node.getPKeyId());
|
|
|
WbsTreePrivate publicWtp = this.getOriginWtp(wtp.getPKeyId());
|
|
|
- this.getWpMap(publicWtp.getId(),wtp.getPKeyId());
|
|
|
+ List<WbsParam> list= this.getNodeWps(publicWtp.getId(),wtp.getPKeyId());*/
|
|
|
+
|
|
|
formulaDataBlocks.forEach(fdb -> {
|
|
|
List<ElementBlock> elementBlockList = JSON.parseArray(fdb.getVal(), ElementBlock.class);
|
|
|
elementBlockList.forEach(eb -> {
|