소스 검색

导出bug

wangys 5 년 전
부모
커밋
ac3bafe66d
1개의 변경된 파일25개의 추가작업 그리고 8개의 파일을 삭제
  1. 25 8
      efunbox-base/efunbox-base-api/src/main/java/cn/efunbox/manage/base/service/impl/ManageServiceImpl.java

+ 25 - 8
efunbox-base/efunbox-base-api/src/main/java/cn/efunbox/manage/base/service/impl/ManageServiceImpl.java

@@ -527,16 +527,25 @@ public class ManageServiceImpl implements ManageService {
                 cell.setCellValue(m.getIncomeStatus().toString());
 
                 cell = r.createCell(3);
-                cell.setCellValue(m.getProduct().getName());
+                if(Objects.nonNull(m.getProduct())){
+                    cell.setCellValue(m.getProduct().getName());
+                }
 
                 cell = r.createCell(4);
-                cell.setCellValue(m.getProject().getName());
+                if(Objects.nonNull(m.getProject())){
+                    cell.setCellValue(m.getProject().getName());
+                }
 
                 cell = r.createCell(5);
-                cell.setCellValue(m.getDepartment().getName());
+                if(Objects.nonNull(m.getDepartment())){
+                    cell.setCellValue(m.getDepartment().getName());
+                }
 
                 cell = r.createCell(6);
-                cell.setCellValue(m.getToDepartment().getName());
+                if(Objects.nonNull(m.getToDepartment())){
+                    cell.setCellValue(m.getToDepartment().getName());
+                }
+
 
                 cell = r.createCell(7);
                 cell.setCellValue(m.getRemark());
@@ -547,16 +556,24 @@ public class ManageServiceImpl implements ManageService {
 
             }else {
                 cell = r.createCell(2);
-                cell.setCellValue(m.getCostType().getName());
+                if(Objects.nonNull(m.getCostType())){
+                    cell.setCellValue(m.getCostType().getName());
+                }
 
                 cell = r.createCell(3);
-                cell.setCellValue(m.getDepartment().getName());
+                if(Objects.nonNull(m.getDepartment())){
+                    cell.setCellValue(m.getDepartment().getName());
+                }
 
                 cell = r.createCell(4);
-                cell.setCellValue(m.getProject().getName());
+                if(Objects.nonNull(m.getProject())){
+                    cell.setCellValue(m.getProject().getName());
+                }
 
                 cell = r.createCell(5);
-                cell.setCellValue(m.getToDepartment().getName());
+                if(Objects.nonNull(m.getToDepartment())){
+                    cell.setCellValue(m.getToDepartment().getName());
+                }
 
                 cell = r.createCell(6);
                 cell.setCellValue(m.getRemark());