Procházet zdrojové kódy

批量归档调整

sangwenwei před 11 měsíci
rodič
revize
75f9047d71

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwFillingbatchInfoMapper.xml

@@ -52,7 +52,7 @@
             a.create_by_id,
             a.create_time,
             a.fillingbatch_id,
-            a.report_id,
+            pre.id as reportId,
             a.achive_no,
             a.status as projectStatus,
             a.sort,

+ 10 - 7
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/service/CwFillingbatchService.java

@@ -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;
     }