|
@@ -43,6 +43,7 @@ import org.springblade.common.utils.ForestNodeMergerEx;
|
|
|
import org.springblade.manager.vo.*;
|
|
|
import org.springblade.manager.mapper.ArchiveTreeContractMapper;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
+import org.springblade.meter.vo.NodeSortVO;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -1352,7 +1353,7 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<InspectTreeVO> getUnitAllNode(Long projectId,String types) {
|
|
|
+ public List<InspectTreeVO> getUnitAllNode(Long projectId,String types) {
|
|
|
/**
|
|
|
* 1业主2监理3施工4影像5竣工图,根据勾选的类型,返回单位首节点集合,勾选哪个单位回显哪个
|
|
|
* 如果勾选了施工,又勾选了影像和竣工图,则只返回施工,
|
|
@@ -1383,6 +1384,9 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
//结果集
|
|
|
List<InspectTreeVO> unitAllNode = baseMapper.getUnitAllNode(projectId,ownerUnit,supervisorUnit,buildUnit);
|
|
|
unitAllNode.add(firstNode);
|
|
|
+ List<InspectTreeVO> list = org.springblade.manager.utils.ForestNodeMerger.merge(unitAllNode);
|
|
|
+ List<Long> ids = new ArrayList<>();
|
|
|
+ gatherSortNode(list,ids);
|
|
|
return org.springblade.manager.utils.ForestNodeMerger.merge(unitAllNode);
|
|
|
}
|
|
|
|
|
@@ -1427,6 +1431,18 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
return vos;
|
|
|
}
|
|
|
|
|
|
+ //递归方法
|
|
|
+ private void gatherSortNode(List<InspectTreeVO>list, List<Long> ids){
|
|
|
+ for (InspectTreeVO vo : list) {
|
|
|
+ if (vo.getChildren().size() == 0){
|
|
|
+ ids.add(vo.getId());
|
|
|
+ continue;
|
|
|
+ }else {
|
|
|
+ gatherSortNode(vo.getChildren(), ids);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 在线验收-开始抽检
|
|
|
*/
|