Kaynağa Gözat

文件上传功能修复

user5 2 yıl önce
ebeveyn
işleme
25f3fdfbb3

+ 3 - 3
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java

@@ -1562,7 +1562,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		//序号
 		int count=1;
 		//成果文件
-		if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
+		if (null != ruralProjectcontentinfo.getFileAttachmentList() && ruralProjectcontentinfo.getFileAttachmentList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
 			for (int i=0;i<infos.size();i++){
 				if (null != infos.get(i).getWorkAttachments() &&infos.get(i).getWorkAttachments().size()>0){
@@ -1580,7 +1580,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 			}
 		}
 		//依据性文件
-		if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+		if (null != ruralProjectcontentinfo.getFileGistdataList() && ruralProjectcontentinfo.getFileGistdataList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
 			for (int i=0;i<infos.size();i++){
 				if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
@@ -1598,7 +1598,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 			}
 		}
 		//其它文件
-		if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+		if (null != ruralProjectcontentinfo.getFileOtherList() && ruralProjectcontentinfo.getFileOtherList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
 			for (int i=0;i<infos.size();i++){
 				if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){

+ 3 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -4172,7 +4172,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         //序号
         int count=1;
         //成果文件
-        if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileAttachmentList() && ruralProjectcontentinfo.getFileAttachmentList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){
@@ -4190,7 +4190,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
             }
         }
         //依据性文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileGistdataList() && ruralProjectcontentinfo.getFileGistdataList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){
@@ -4208,7 +4208,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
             }
         }
         //其它文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileOtherList() && ruralProjectcontentinfo.getFileOtherList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){

+ 3 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordTwoService.java

@@ -479,7 +479,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
         //序号
         int count=1;
         //成果文件
-        if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileAttachmentList() && ruralProjectcontentinfo.getFileAttachmentList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
             for (int i=0;i<infos.size();i++){
                 if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
@@ -497,7 +497,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
             }
         }
         //依据性文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileGistdataList() && ruralProjectcontentinfo.getFileGistdataList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
             for (int i=0;i<infos.size();i++){
                 if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
@@ -515,7 +515,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
             }
         }
         //其它文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileOtherList() && ruralProjectcontentinfo.getFileOtherList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
             for (int i=0;i<infos.size();i++){
                 if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){

+ 7 - 7
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java

@@ -3,7 +3,6 @@ package com.jeeplus.modules.ruralprojectrecords.web;
 import com.alibaba.fastjson.JSON;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.config.Global;
-import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.utils.FreemarkerUtil;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.common.utils.StringUtils;
@@ -34,12 +33,13 @@ import freemarker.template.Template;
 import org.activiti.engine.HistoryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.IOException;
 import java.util.*;
@@ -430,7 +430,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         //序号
         int count=1;
         //成果文件
-        if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileAttachmentList() && ruralProjectcontentinfo.getFileAttachmentList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){
@@ -448,7 +448,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
             }
         }
         //依据性文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileGistdataList() && ruralProjectcontentinfo.getFileGistdataList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){
@@ -466,7 +466,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
             }
         }
         //其它文件
-        if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
+        if (null != ruralProjectcontentinfo.getFileOtherList() && ruralProjectcontentinfo.getFileOtherList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
             for (int i=0;i<infos.size();i++){
                 if (infos.get(i).getWorkAttachments().size()>0){

+ 2 - 2
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -349,9 +349,9 @@ END) as projectScale*/
 		ifnull(prrd.status,0) else 0
 		end) as downProjectReportRecordStatus,
 		(case
-		when a.submit_money = '1' and pfp.status = '5' then
+		when a.submit_money = '1' and prr.status = '5' then
 		'已归档'
-		when a.submit_money = '2' and ppf.status = '5' then
+		when a.submit_money = '2' and prr.status = '5' then
 		'已归档' else '未归档'
 		end) as downArchiveStatus,
 		/*,ifnull(prrd.status,0) as "downProjectReportRecordStatus"*/

+ 2 - 2
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -317,9 +317,9 @@
 		end) as completionStatus
 		,a.project_type as projectType,
 		(case
-		when a.submit_money = '1' and pfp.status = '5' then
+		when a.submit_money = '1' and prr.status = '5' then
 		'已归档'
-		when a.submit_money = '2' and ppf.status = '5' then
+		when a.submit_money = '2' and prr.status = '5' then
 		'已归档' else '未归档'
 		end) as downArchiveStatus,
 		wci.name AS "workContractInfo.name",