|
@@ -78,15 +78,18 @@ public class CwFillingbatchService {
|
|
|
queryWrapper.eq("a.name", info.getName());
|
|
|
}
|
|
|
}
|
|
|
- //查询归档信息
|
|
|
+ //查询归档信息 将相关信息查询出来后设置好层级后,前端组件会自动组装成树状表
|
|
|
IPage<CwFillingbatchInfoDTO> list = cwFillingBatchInfoMapper.findList(page, queryWrapper);
|
|
|
- List<CwFillingbatchInfoDTO> projectList = cwFillingBatchInfoMapper.findProjectList();
|
|
|
- for (CwFillingbatchInfoDTO record : list.getRecords()) {
|
|
|
- //设置层级
|
|
|
- record.setLevel("1");
|
|
|
- }
|
|
|
List<CwFillingbatchInfoDTO> records = list.getRecords();
|
|
|
- records.addAll(projectList);
|
|
|
+ if (CollectionUtil.isNotEmpty(records)){
|
|
|
+ List<CwFillingbatchInfoDTO> projectList = cwFillingBatchInfoMapper.findProjectList();
|
|
|
+ for (CwFillingbatchInfoDTO record : list.getRecords()) {
|
|
|
+ //设置层级
|
|
|
+ record.setLevel("1");
|
|
|
+ }
|
|
|
+ records.addAll(projectList);
|
|
|
+ }
|
|
|
+
|
|
|
return list;
|
|
|
}
|
|
|
|