|
@@ -38,33 +38,33 @@ public class WbsTreeContractController extends BladeController {
|
|
|
@ApiOperation(value = "查询当前节点下所有元素表信息", notes = "传入节点primaryKeyId、type、合同段id、项目id")
|
|
|
public R searchNodeAllTable(String primaryKeyId, String type, String contractId, String projectId) {
|
|
|
List<AppWbsTreeContractVO> list = iWbsTreeContractService.searchNodeAllTable(primaryKeyId, type, contractId, projectId);
|
|
|
- boolean flag = false;
|
|
|
- Set<Long> l1 = new HashSet<>();
|
|
|
- for (AppWbsTreeContractVO vo : list) {
|
|
|
- if (vo.getNodeName().contains("_PL_")){
|
|
|
- l1.add(vo.getId());
|
|
|
- flag = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag){
|
|
|
- for (Long aLong : l1) {
|
|
|
- List<AppWbsTreeContractVO> vos = new ArrayList<>();
|
|
|
- for (AppWbsTreeContractVO vo : list) {
|
|
|
- if (aLong.equals(vo.getId())){
|
|
|
- vos.add(vo);
|
|
|
- }
|
|
|
- }
|
|
|
- list = list.stream().filter(l -> {
|
|
|
- if (l.getId().equals(aLong)){
|
|
|
- return false;
|
|
|
- }else {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }).collect(Collectors.toList());
|
|
|
- vos = vos.stream().sorted(Comparator.comparing(AppWbsTreeContractVO::getPKeyId)).collect(Collectors.toList());
|
|
|
- list.addAll(vos);
|
|
|
- }
|
|
|
- }
|
|
|
+// boolean flag = false;
|
|
|
+// Set<Long> l1 = new HashSet<>();
|
|
|
+// for (AppWbsTreeContractVO vo : list) {
|
|
|
+// if (vo.getNodeName().contains("_PL_")){
|
|
|
+// l1.add(vo.getId());
|
|
|
+// flag = true;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (flag){
|
|
|
+// for (Long aLong : l1) {
|
|
|
+// List<AppWbsTreeContractVO> vos = new ArrayList<>();
|
|
|
+// for (AppWbsTreeContractVO vo : list) {
|
|
|
+// if (aLong.equals(vo.getId())){
|
|
|
+// vos.add(vo);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// list = list.stream().filter(l -> {
|
|
|
+// if (l.getId().equals(aLong)){
|
|
|
+// return false;
|
|
|
+// }else {
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// }).collect(Collectors.toList());
|
|
|
+// vos = vos.stream().sorted(Comparator.comparing(AppWbsTreeContractVO::getPKeyId)).collect(Collectors.toList());
|
|
|
+// list.addAll(vos);
|
|
|
+// }
|
|
|
+// }
|
|
|
if (list.size() > 0) {
|
|
|
list.stream().forEach(l->{
|
|
|
if (StringUtils.isNotBlank(l.getHtmlUrl())){
|