|
@@ -111,7 +111,7 @@ public class WbsParamController {
|
|
|
}else if(pb.isPrivate()){
|
|
|
elementMap= this.jdbcTemplate.queryForList(
|
|
|
"select c.e_name as name ,c.id from m_wbs_tree_private a " +
|
|
|
- "inner join m_wbs_tree_private b on a.id=b.parent_id " +
|
|
|
+ "inner join m_wbs_tree_private b on (a.id=b.parent_id and a.wbs_id=b.wbs_id) " +
|
|
|
"inner join m_wbs_form_element c on b.init_table_id=c.f_id " +
|
|
|
"where b.project_id="+pb.getProjectId()+" and a.p_key_id="+pb.getNodeId()+" and b.is_deleted=0 and c.is_deleted=0 ");
|
|
|
}
|
|
@@ -137,7 +137,7 @@ public class WbsParamController {
|
|
|
this.formulaService.save(formula);
|
|
|
tmpMap.clear();
|
|
|
finalElementMap.forEach(m->{
|
|
|
- if(m.get("name").toString().contains(e.getName())){
|
|
|
+ if(StringUtils.handleNull(m.get("name")).contains(e.getName())){
|
|
|
ElementFormulaMapping efm = new ElementFormulaMapping();
|
|
|
efm.setScope(FormulaBean.PARAM);
|
|
|
efm.setParamId(e.getId());
|
|
@@ -339,12 +339,12 @@ public class WbsParamController {
|
|
|
/*project*/
|
|
|
elementMap= this.jdbcTemplate.queryForList(
|
|
|
"select c.e_name as name ,c.id from m_wbs_tree_private a " +
|
|
|
- "inner join m_wbs_tree_private b on a.id=b.parent_id " +
|
|
|
+ "inner join m_wbs_tree_private b on (a.id=b.parent_id and a.wbs_id=b.wbs_id) " +
|
|
|
"inner join m_wbs_form_element c on b.init_table_id=c.f_id " +
|
|
|
"where b.project_id="+projectId+" and a.p_key_id="+nodeId+" and b.is_deleted=0 and c.is_deleted=0 ");
|
|
|
}
|
|
|
|
|
|
- List<Long> longList=this.jdbcTemplate.queryForList("select element_id from m_element_formula_mapping where param_id in("+paramList.stream().map(WbsParam::getId).map(String::valueOf).collect(Collectors.joining(","))+")",Long.class);
|
|
|
+ List<Long> longList=this.jdbcTemplate.queryForList("select element_id from m_element_formula_mapping where is_deleted=0 and scope=35 and param_id in("+paramList.stream().map(WbsParam::getId).map(String::valueOf).collect(Collectors.joining(","))+")",Long.class);
|
|
|
if(Func.isNotEmpty(elementMap)){
|
|
|
Map<String,Object> tmpMap=new HashMap<>();
|
|
|
List<Map<String, Object>> finalElementMap = elementMap;
|