소스 검색

储备文件管理,文件下载路径为空错误

lem 4 년 전
부모
커밋
c75cf9e574
1개의 변경된 파일24개의 추가작업 그리고 17개의 파일을 삭제
  1. 24 17
      src/main/java/com/jeeplus/modules/sg/managementcenter/reserveManagement/web/ReserveProcessController.java

+ 24 - 17
src/main/java/com/jeeplus/modules/sg/managementcenter/reserveManagement/web/ReserveProcessController.java

@@ -212,33 +212,40 @@ public class ReserveProcessController extends BaseController {
                 String c = "";
                 String d = "";
                 String path = upload.getBudgetStatement();
-                String[] split = path.split("\\|");
-                for (int i = 0; i < split.length; i++) {
-                    a += "http://" + request.getServerName() + split[i] + "|";
+                if (null != path && !"".equals(path)) {
+                    String[] split = path.split("\\|");
+                    for (int i = 0; i < split.length; i++) {
+                        a += "http://" + request.getServerName() + split[i] + "|";
+                    }
+                    upload.setBudgetStatement(a);
                 }
-                upload.setBudgetStatement(a);
 
                 String projectProposal = upload.getProjectProposal();
-                String[] split1 = projectProposal.split("\\|");
-                for (int i = 0; i < split1.length; i++) {
-                    b += "http://" + request.getServerName() + split1[i] + "|";
+                if (null != projectProposal && !"".equals(projectProposal)) {
+                    String[] split1 = projectProposal.split("\\|");
+                    for (int i = 0; i < split1.length; i++) {
+                        b += "http://" + request.getServerName() + split1[i] + "|";
+                    }
+                    upload.setProjectProposal(b);
                 }
-                upload.setProjectProposal(b);
 
                 String drawings = upload.getDrawings();
-                String[] split2 = drawings.split("\\|");
-                for (int i = 0; i < split2.length; i++) {
-                    c += "http://" + request.getServerName() + split2[i] + "|";
+                if (null != drawings && !"".equals(drawings)) {
+                    String[] split2 = drawings.split("\\|");
+                    for (int i = 0; i < split2.length; i++) {
+                        c += "http://" + request.getServerName() + split2[i] + "|";
+                    }
+                    upload.setDrawings(c);
                 }
-                upload.setDrawings(c);
 
                 String drawingSpecification = upload.getDrawingSpecification();
-                String[] split3 = drawingSpecification.split("\\|");
-                for (int i = 0; i < split3.length; i++) {
-                    d += "http://" + request.getServerName() + split3[i] + "|";
+                if (null != drawingSpecification && !"".equals(drawingSpecification)) {
+                    String[] split3 = drawingSpecification.split("\\|");
+                    for (int i = 0; i < split3.length; i++) {
+                        d += "http://" + request.getServerName() + split3[i] + "|";
+                    }
+                    upload.setDrawingSpecification(d);
                 }
-                upload.setDrawingSpecification(d);
-
             }
         }
         return getBootstrapData(page);