|
@@ -121,6 +121,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
this.constantMap.put(PJI,this.projectInfoService.getById(info.getPId()));
|
|
|
/*wbs节点链*/
|
|
|
List<WbsTreeContract> nodes = wpService.chain(contractId,id,primaryKeyId,null);
|
|
|
+ if(Func.isEmpty(nodes)){
|
|
|
+ nodes=wpService.chain(contractId,one.getRelateId(),primaryKeyId,null);
|
|
|
+ }
|
|
|
this.constantMap.put(CHAIN,nodes.stream().map(WbsTreeContract::getNodeName).collect(Collectors.toList()));
|
|
|
/*节点参数*/
|
|
|
this.constantMap.put(WP,getWpMap(one));
|
|
@@ -230,8 +233,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
String tn = miss.substring(0,miss.indexOf(StringPool.COLON));
|
|
|
String key =miss.substring(miss.indexOf(StringPool.COLON)+1);
|
|
|
String targetIds=tableNamePkIdsMaps.stream().filter(m->StringUtils.isEquals(m.get("tableName"),tn)).map(m->m.get("pkId")).map(StringUtils::handleNull).collect(Collectors.joining(","));
|
|
|
- List<Map<String,Object>> tableDatas= this.jdbcTemplate.queryForList("select * from "+tn+" where p_key_id in ("+targetIds+")");
|
|
|
- fill(tableDatas,removeList,tn,key);
|
|
|
+ if(Func.isNotEmpty(targetIds)){
|
|
|
+ List<Map<String,Object>> tableDatas= this.jdbcTemplate.queryForList("select * from "+tn+" where p_key_id in ("+targetIds+")");
|
|
|
+ fill(tableDatas,removeList,tn,key);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -340,7 +345,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/*元素动态绑定*/
|
|
|
this.formDataMap.values().stream().filter(e->e.getIsCurrentNodeElement()&&e.getFormula()==null).forEach(e->{
|
|
|
/*执行列表里不存在,且元素的名称和节点参数名称匹配成功*/
|
|
|
- total.stream().filter(p->e.getEName().contains(p.getName())&&!this.formDataList.contains(e)).findAny().ifPresent(d->{
|
|
|
+ total.stream().filter(p->e.getEName().contains(p.getName().replace("【水】","").trim())&&!this.formDataList.contains(e)).findAny().ifPresent(d->{
|
|
|
Formula formula=new Formula();
|
|
|
formula.setOutm(Formula.FULL);
|
|
|
if(RegexUtil.match(ParamElements.LEVEL_REG,d.getV())){
|