|
@@ -20,12 +20,8 @@ import org.springblade.core.tool.utils.RegexUtil;
|
|
|
import org.springblade.manager.dto.FormulaBean;
|
|
|
import org.springblade.manager.dto.ParamElements;
|
|
|
import org.springblade.manager.dto.WbsParamBean;
|
|
|
-import org.springblade.manager.entity.ElementFormulaMapping;
|
|
|
-import org.springblade.manager.entity.Formula;
|
|
|
-import org.springblade.manager.entity.WbsParam;
|
|
|
-import org.springblade.manager.service.IElementFormulaMappingService;
|
|
|
-import org.springblade.manager.service.IFormulaService;
|
|
|
-import org.springblade.manager.service.IWbsParamService;
|
|
|
+import org.springblade.manager.entity.*;
|
|
|
+import org.springblade.manager.service.*;
|
|
|
import org.springblade.manager.vo.ParamBean;
|
|
|
import org.springblade.manager.vo.ParamSearch;
|
|
|
import org.springblade.manager.wrapper.WbsParamWrapper;
|
|
@@ -51,6 +47,7 @@ public class WbsParamController {
|
|
|
private final JdbcTemplate jdbcTemplate;
|
|
|
private final IFormulaService formulaService;
|
|
|
private final IElementFormulaMappingService elementFormulaMappingService;
|
|
|
+ private final IWbsTreeService wbsTreeService;
|
|
|
|
|
|
/**
|
|
|
* 保存或修改
|
|
@@ -262,6 +259,7 @@ public class WbsParamController {
|
|
|
"where c.is_deleted=0 and a.is_deleted=0 and a.parent_id="+ps.getNodeId()+" and c.param_id ="+ps.getParamId()+")as BB " +
|
|
|
"on AA.id=BB.id"));
|
|
|
}else if(ParamSearch.PRI.equals(ps.getScopeType())){
|
|
|
+ WbsTree wtp = this.wbsTreeService.getById(ps.getNodeId());
|
|
|
return R.data(this.jdbcTemplate.queryForList(
|
|
|
"select AA.id,AA.tableName,BB.elementName,BB.mappingId from (" +
|
|
|
" select id ,node_name AS tableName,init_table_id" +
|
|
@@ -270,8 +268,9 @@ public class WbsParamController {
|
|
|
" AND is_deleted = 0" +
|
|
|
" AND parent_id = " +ps.getNodeId()+
|
|
|
" AND project_id = " +ps.getProjectId()+
|
|
|
+ " AND wbs_id= "+wtp.getWbsId()+
|
|
|
" ORDER BY wt.sort, wt.node_name, wt.create_time) as AA left join (select a.id as id, b.e_name as elementName ,c.id as mappingId,c.is_deleted from m_wbs_tree_private a inner join m_wbs_form_element b on b.f_id=a.init_table_id inner join m_element_formula_mapping c on c.element_id=b.id " +
|
|
|
- "where a.project_id="+ps.getProjectId()+" and c.is_deleted=0 and a.is_deleted=0 and a.parent_id="+ps.getNodeId()+" and c.param_id ="+ps.getParamId()+")as BB on AA.id=BB.id"));
|
|
|
+ "where a.project_id="+ps.getProjectId()+" and c.is_deleted=0 and a.is_deleted=0 and a.parent_id="+ps.getNodeId()+" and c.scope=35 and c.param_id ="+ps.getParamId()+" and a.wbs_id="+wtp.getWbsId()+" )as BB on AA.id=BB.id"));
|
|
|
}
|
|
|
return R.fail("暂无数据");
|
|
|
}
|