|
@@ -406,8 +406,8 @@ public class WbsTreeServiceImpl extends BaseServiceImpl<WbsTreeMapper, WbsTree>
|
|
String elementIds = wbsFormElements.stream().map(WbsFormElement::getId).map(String::valueOf).collect(Collectors.joining(","));
|
|
String elementIds = wbsFormElements.stream().map(WbsFormElement::getId).map(String::valueOf).collect(Collectors.joining(","));
|
|
if (Func.isNotEmpty(elementIds)) {
|
|
if (Func.isNotEmpty(elementIds)) {
|
|
/*TYPE==1就是WBS级别*/
|
|
/*TYPE==1就是WBS级别*/
|
|
- Integer scopeA=type==1? FormulaBean.WBS_GLOBAL:FormulaBean.PRO_GLOBAL;
|
|
|
|
- Integer scopeB=type==1? FormulaBean.WBS_PART:FormulaBean.PRO_PART;
|
|
|
|
|
|
+ Integer scopeA= com.mixsmart.utils.StringUtils.isEquals(type,1)? FormulaBean.WBS_GLOBAL:FormulaBean.PRO_GLOBAL;
|
|
|
|
+ Integer scopeB=com.mixsmart.utils.StringUtils.isEquals(type,1)? FormulaBean.WBS_PART:FormulaBean.PRO_PART;
|
|
List<Long> longs = this.jdbcTemplate.queryForList("select a.id from m_wbs_form_element a inner join m_element_formula_mapping b on a.id=b.element_id where a.id in(" + elementIds + ") and b.scope="+scopeA, Long.class);
|
|
List<Long> longs = this.jdbcTemplate.queryForList("select a.id from m_wbs_form_element a inner join m_element_formula_mapping b on a.id=b.element_id where a.id in(" + elementIds + ") and b.scope="+scopeA, Long.class);
|
|
wbsFormElements.forEach(e -> {
|
|
wbsFormElements.forEach(e -> {
|
|
e.setGlobalFormula(longs.contains(e.getId()) ? 1 : 0);
|
|
e.setGlobalFormula(longs.contains(e.getId()) ? 1 : 0);
|
|
@@ -422,6 +422,7 @@ public class WbsTreeServiceImpl extends BaseServiceImpl<WbsTreeMapper, WbsTree>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<WbsFormElementVO> selectFormElements4Formula(String id) {
|
|
public List<WbsFormElementVO> selectFormElements4Formula(String id) {
|
|
|
|
+ /*元素库查询专用*/
|
|
return this.wbsTreeMapper.selectFormElements4TableId(id);
|
|
return this.wbsTreeMapper.selectFormElements4TableId(id);
|
|
}
|
|
}
|
|
|
|
|