|
|
|
@ -501,7 +501,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
expandedKeys = companyTree.getChildren().stream().filter(item -> CollectionUtils.isNotEmpty(item.getChildren())).map(TreeSelect::getKey).collect(Collectors.toList());
|
|
|
|
|
expandedKeys.add(companyTree.getKey());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
disableTreeItem(Collections.singletonList(companyTree),TreeSelect.DEPARTMENT);
|
|
|
|
|
Map<String, Object> result = new HashMap<>(3);
|
|
|
|
|
result.put("selectTree", companyTree);
|
|
|
|
|
result.put("expandedKeys", expandedKeys);
|
|
|
|
@ -509,6 +509,23 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 树节点是否禁用
|
|
|
|
|
*
|
|
|
|
|
* @param companyTreeList TreeSelect组件数据集合
|
|
|
|
|
*/
|
|
|
|
|
private void disableTreeItem(List<TreeSelect> companyTreeList, String enableTreeType) {
|
|
|
|
|
if (CollectionUtils.isNotEmpty(companyTreeList)) {
|
|
|
|
|
for (TreeSelect treeSelect : companyTreeList) {
|
|
|
|
|
treeSelect.setDisabled(!enableTreeType.equals(treeSelect.getType()));
|
|
|
|
|
List<TreeSelect> children = treeSelect.getChildren();
|
|
|
|
|
if (CollectionUtils.isNotEmpty(children)) {
|
|
|
|
|
disableTreeItem(children, enableTreeType);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void trueDimension(RecordSetTrans recordSetTrans,String versionId,String currentUser,String currentDate){
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
rs.execute("delete from jcl_chart_subcompany where versionid = "+versionId);
|
|
|
|
|