Sfoglia il codice sorgente

项目档案信息查询优化

user5 3 anni fa
parent
commit
ea66840cbb
25 ha cambiato i file con 1176 aggiunte e 175 eliminazioni
  1. 6 2
      src/main/java/com/jeeplus/modules/bzshbExamine/web/BzshbExaminController.java
  2. 7 0
      src/main/java/com/jeeplus/modules/projectAccessory/dao/ProjectTemplateDao.java
  3. 9 0
      src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectAccessoryRelationInfo.java
  4. 543 0
      src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java
  5. 3 3
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java
  6. 17 7
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java
  7. 9 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  8. 3 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordTwoService.java
  9. 273 24
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  10. 9 4
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java
  11. 26 12
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  12. 13 6
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewTwoController.java
  13. 8 4
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  14. 27 13
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewController.java
  15. 5 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewTwoController.java
  16. 2 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  17. 7 0
      src/main/java/com/jeeplus/modules/workclientinfo/dao/WorkClientAttachmentDao.java
  18. 10 0
      src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java
  19. 86 64
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  20. 86 11
      src/main/resources/mappings/modules/projectAccessory/ProjectTemplateDao.xml
  21. 1 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  22. 21 0
      src/main/resources/mappings/modules/workclientinfo/WorkClientAttachmentDao.xml
  23. 1 9
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingList.jsp
  24. 1 9
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostList.jsp
  25. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp

+ 6 - 2
src/main/java/com/jeeplus/modules/bzshbExamine/web/BzshbExaminController.java

@@ -268,7 +268,11 @@ public class BzshbExaminController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+
+
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -310,7 +314,7 @@ public class BzshbExaminController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         //获取子项目列表信息
         List<SubProjectInfo> subProjectInfos=this.queryReportDetails(projectcontentinfo.getProject().getId());
         //获取合同信息

+ 7 - 0
src/main/java/com/jeeplus/modules/projectAccessory/dao/ProjectTemplateDao.java

@@ -75,6 +75,13 @@ public interface ProjectTemplateDao extends CrudDao<ProjectTemplateInfo>,TreeDao
     List<ProjectTemplateInfo> getProjectTemplateList(ProjectAccessoryRelationInfo projectTemplateInfo);
 
     /**
+     * 查询所有的附件类型信息
+     * @param projectTemplateInfo
+     * @return
+     */
+    List<ProjectTemplateInfo> getProjectTemplateAllList(ProjectAccessoryRelationInfo projectTemplateInfo);
+
+    /**
      * 根据名称查询信息
      * @param name
      * @return

+ 9 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectAccessoryRelationInfo.java

@@ -19,6 +19,7 @@ public class ProjectAccessoryRelationInfo extends TreeEntity<ProjectAccessoryRel
 	private String attachName;		// 名称
 	private String projectType;		// 项目类型字典key
 	private String attachType;		// 附件类型字典key
+	private List<String> attachTypeList;		// 附件类型字典key集合
 	private String attachId;		// 附件类型id
 	private Integer requiredStage;		// 必填阶段(1.上传报告,2.归档)
 	private String parentIds;		// 所有父ID
@@ -184,4 +185,12 @@ public class ProjectAccessoryRelationInfo extends TreeEntity<ProjectAccessoryRel
 	public void setRequiredStageList(List<Integer> requiredStageList) {
 		this.requiredStageList = requiredStageList;
 	}
+
+	public List<String> getAttachTypeList() {
+		return attachTypeList;
+	}
+
+	public void setAttachTypeList(List<String> attachTypeList) {
+		this.attachTypeList = attachTypeList;
+	}
 }

+ 543 - 0
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -13,7 +13,11 @@ import com.jeeplus.modules.projectAccessory.dao.ProjectTemplateDao;
 import com.jeeplus.modules.projectAccessory.entity.CollectAccessoryInfo;
 import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
 import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.Office;
@@ -22,10 +26,12 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
 import java.util.*;
 
 /**
@@ -362,6 +368,543 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
 
         return projectTemplateList;
     }
+
+    /**
+     * 文件展示数据处理
+     * @param mainDictDetails
+     * @param relateInfo
+     * @param engineeringId
+     * @param projectRecords
+     * @param projectcontentinfo
+     */
+    public void disposeProjectTemplateFile(List<MainDictDetail> mainDictDetails, ProjectAccessoryRelationInfo relateInfo,
+                                           String engineeringId, RuralProjectRecords projectRecords, Projectcontentinfo projectcontentinfo,String screenType){
+        //创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+        if(screenType.contains("1000")){
+            BigDecimal submitScale = projectRecords.getSubmitScale();
+            // 送审金额大于等于1000万时
+            if(submitScale.compareTo(BigDecimal.valueOf(1000))!=-1){
+                relateInfo.setFlag(true);
+            }else {
+                relateInfo.setFlag(false);
+            }
+        }
+
+        List<String> mainDictValueList = Lists.newArrayList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            mainDictValueList.add(mainDict.getValue());
+        }
+        relateInfo.setAttachTypeList(mainDictValueList);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+        for (MainDictDetail mainDict : mainDictDetails) {
+            switch (mainDict.getValue()) {
+                case "11":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("11")){
+                            List<ProjectTemplateInfo> fileAttachmentList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: fileAttachmentList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+                        }
+                    }
+                    break;
+                case "12":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("12")){
+                            List<ProjectTemplateInfo> projectTemplateList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: projectTemplateList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileGistdataList(projectTemplateList);
+                        }
+                    }
+                    break;
+                case "13":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("13")){
+                            List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
+                            projectcontentinfo.setFileOtherList(fileOtherList);
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    /**
+     * 文件展示数据处理
+     * @param mainDictDetails
+     * @param relateInfo
+     * @param engineeringId
+     * @param projectRecords
+     * @param projectcontentinfo
+     */
+    public void disposeProjectTemplateFile(List<MainDictDetail> mainDictDetails, ProjectAccessoryRelationInfo relateInfo,
+                                           String engineeringId, RuralProjectRecords projectRecords, ProjectMaterialDefectRecord projectcontentinfo,String screenType){
+        //创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+        if(screenType.contains("1000")){
+            BigDecimal submitScale = projectRecords.getSubmitScale();
+            // 送审金额大于等于1000万时
+            if(submitScale.compareTo(BigDecimal.valueOf(1000))!=-1){
+                relateInfo.setFlag(true);
+            }else {
+                relateInfo.setFlag(false);
+            }
+        }
+
+        List<String> mainDictValueList = Lists.newArrayList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            mainDictValueList.add(mainDict.getValue());
+        }
+        relateInfo.setAttachTypeList(mainDictValueList);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+        for (MainDictDetail mainDict : mainDictDetails) {
+            switch (mainDict.getValue()) {
+                case "11":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("11")){
+                            List<ProjectTemplateInfo> fileAttachmentList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: fileAttachmentList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+                        }
+                    }
+                    break;
+                case "12":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("12")){
+                            List<ProjectTemplateInfo> projectTemplateList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: projectTemplateList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileGistdataList(projectTemplateList);
+                        }
+                    }
+                    break;
+                case "13":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("13")){
+                            List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
+                            projectcontentinfo.setFileOtherList(fileOtherList);
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    /**
+     * 文件展示数据处理
+     * @param mainDictDetails
+     * @param relateInfo
+     * @param engineeringId
+     * @param projectRecords
+     * @param projectcontentinfo
+     */
+    public void disposeProjectTemplateFile(List<MainDictDetail> mainDictDetails, ProjectAccessoryRelationInfo relateInfo,
+                                       String engineeringId, RuralProjectRecords projectRecords, RuralProjectcontentinfo projectcontentinfo,String screenType){
+        //创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+        if(screenType.contains("1000")){
+            BigDecimal submitScale = projectRecords.getSubmitScale();
+            // 送审金额大于等于1000万时
+            if(submitScale.compareTo(BigDecimal.valueOf(1000))!=-1){
+                relateInfo.setFlag(true);
+            }else {
+                relateInfo.setFlag(false);
+            }
+        }
+
+        List<String> mainDictValueList = Lists.newArrayList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            mainDictValueList.add(mainDict.getValue());
+        }
+        relateInfo.setAttachTypeList(mainDictValueList);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+        for (MainDictDetail mainDict : mainDictDetails) {
+            switch (mainDict.getValue()) {
+                case "11":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("11")){
+                            List<ProjectTemplateInfo> fileAttachmentList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: fileAttachmentList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+                        }
+                    }
+                    break;
+                case "12":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("12")){
+                            List<ProjectTemplateInfo> projectTemplateList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: projectTemplateList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileGistdataList(projectTemplateList);
+                        }
+                    }
+                    break;
+                case "13":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("13")){
+                            List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
+                            projectcontentinfo.setFileOtherList(fileOtherList);
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    /**
+     * 文件展示数据处理
+     * @param mainDictDetails
+     * @param relateInfo
+     * @param engineeringId
+     * @param projectRecords
+     * @param projectcontentinfo
+     */
+    public void disposeProjectTemplateFile(List<MainDictDetail> mainDictDetails, ProjectAccessoryRelationInfo relateInfo,
+                                       String engineeringId, RuralProjectRecords projectRecords, ProjectReportRecord projectcontentinfo,String screenType){
+        //创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+        if("1000".equals(screenType)){
+            BigDecimal submitScale = projectRecords.getSubmitScale();
+            // 送审金额大于等于1000万时
+            if(submitScale.compareTo(BigDecimal.valueOf(1000))!=-1){
+                relateInfo.setFlag(true);
+            }else {
+                relateInfo.setFlag(false);
+            }
+        }
+
+        List<String> mainDictValueList = Lists.newArrayList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            mainDictValueList.add(mainDict.getValue());
+        }
+        relateInfo.setAttachTypeList(mainDictValueList);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+        for (MainDictDetail mainDict : mainDictDetails) {
+            switch (mainDict.getValue()) {
+                case "11":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("11")){
+                            List<ProjectTemplateInfo> fileAttachmentList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: fileAttachmentList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+                        }
+                    }
+                    break;
+                case "12":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("12")){
+                            List<ProjectTemplateInfo> projectTemplateList = stringListMap.get(key);
+                            for (ProjectTemplateInfo info: projectTemplateList) {
+                                info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                                if(engineeringId.equals(projectRecords.getEngineeringType())){
+                                    if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                        if(!info.getAttachTypes().contains("zip")){
+                                            info.setAttachTypes(info.getAttachTypes()+",zip");
+                                        }
+                                        if(!info.getAttachTypes().contains("rar")){
+                                            info.setAttachTypes(info.getAttachTypes()+",rar");
+                                        }
+                                    }
+                                }
+                            }
+                            projectcontentinfo.setFileGistdataList(projectTemplateList);
+                        }
+                    }
+                    break;
+                case "13":
+                    for (String key: stringListMap.keySet()) {
+                        if(key.contains("13")){
+                            List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
+                            projectcontentinfo.setFileOtherList(fileOtherList);
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    /**
+     *
+     * @param projectTemplateInfo
+     * @return
+     */
+    public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo,String screenType){
+        //查询所有被选择为必填项展示列,并查询附件信息
+        List<ProjectTemplateInfo> projectTemplateList = dao.getProjectTemplateAllList(projectTemplateInfo);
+        //查询所有分类下的所有附件信息
+        List<String> attachmentIdList = Lists.newArrayList();
+        for (ProjectTemplateInfo info: projectTemplateList) {
+            attachmentIdList.add(info.getId());
+        }
+        WorkClientAttachment attchmentInfo = new WorkClientAttachment();
+        attchmentInfo.setProjectId(projectTemplateInfo.getId());
+        attchmentInfo.setAttachmentIdList(attachmentIdList);
+        List<WorkClientAttachment> attachmentList = workattachmentService.getInfoList(attchmentInfo);
+        //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+        workattachmentService.clientAttachmentManageOnUrl(attachmentList);
+        //对查询出来的文件数据进行分组
+        Map<String, List<WorkClientAttachment>> stringListMap = dataMessageAttachmentDispose(attachmentList);
+        //将分组后的数据放到对应的数据分支中
+        for (ProjectTemplateInfo info: projectTemplateList) {
+            List<WorkClientAttachment> attachments = Lists.newArrayList();
+            for (String key : stringListMap.keySet()) {
+                if (info.getId().equals(key)) {
+                    attachments = stringListMap.get(key);
+                    //判断是否为必填项,若为必填项则添加必填判定字段
+                    info.setMustFlag(0);
+                    info.setWorkAttachments(attachments);
+                }
+            }
+            //判断是否为必填项,若为必填项则添加必填判定字段
+            if(info.getRequiredStage() == projectTemplateInfo.getRequiredStage() || (null != projectTemplateInfo.getRequiredStageList() && projectTemplateInfo.getRequiredStageList().contains(info.getRequiredStage()))){
+                info.setMustFlag(1);
+                //判定必填项的下的是否有附件信息
+                if (attachments.size()!=0){
+                    info.setFileFlag(1);
+                }
+            } else {
+                info.setMustFlag(0);
+                info.setFileFlag(0);
+            }
+            if (("咨询效果评价表").equals(info.getAttachName()) && projectTemplateInfo.isFlag()){
+                info.setMustFlag(1);
+                //判定必填项的下的是否有附件信息
+                if (attachments.size()!=0){
+                    info.setFileFlag(1);
+                }
+            }
+            if(StringUtils.isNotBlank(screenType) && screenType.contains("其他资料") && "其他资料".equals(info.getAttachName())){
+                if (screenType.contains("其他资料")){
+                    info.setMustFlag(1);
+                    //判定必填项的下的是否有附件信息
+                    if (null != info.getWorkAttachments() && info.getWorkAttachments().size()!=0){
+                        info.setFileFlag(1);
+                    }
+                }else{
+                    if (1==info.getMustFlag()){
+                        info.setMustFlag(0);
+                    }
+                }
+            }
+        }
+
+		/*for (ProjectTemplateInfo info: projectTemplateList) {
+			WorkClientAttachment attchment = new WorkClientAttachment();
+			attchment.setProjectId(projectTemplateInfo.getId());
+			attchment.setAttachmentId(info.getId());
+			List<WorkClientAttachment> attachments = workattachmentService.getList(attchment);
+			//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+			workattachmentService.clientAttachmentManageOnUrl(attachments);
+			info.setWorkAttachments(attachments);
+			//判断是否为必填项,若为必填项则添加必填判定字段
+			info.setMustFlag(0);
+			*//*if(requiredStageList.contains(info.getRequiredStage())){
+				info.setMustFlag(1);
+			}else{
+				info.setMustFlag(0);
+			}*//*
+		}*/
+        //查询没有被选择必填项的数据并查询是否已经上传附件,若有则添加到展示列中
+        List<ProjectTemplateInfo> otherProjectTemplateList = dao.projectAccessoryListByParentId(projectTemplateInfo);
+
+        //查询所有分类下的所有附件信息
+        List<String> otherAttachmentIdList = Lists.newArrayList();
+        for (ProjectTemplateInfo info: otherProjectTemplateList) {
+            otherAttachmentIdList.add(info.getId());
+        }
+        WorkClientAttachment otherAttchmentInfo = new WorkClientAttachment();
+        otherAttchmentInfo.setProjectId(projectTemplateInfo.getId());
+        otherAttchmentInfo.setAttachmentIdList(otherAttachmentIdList);
+        List<WorkClientAttachment> otherAttachmentList = workattachmentService.getInfoList(otherAttchmentInfo);
+        //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+        workattachmentService.clientAttachmentManageOnUrl(otherAttachmentList);
+        //对查询出来的文件数据进行分组
+        Map<String, List<WorkClientAttachment>> otherStringListMap = dataMessageAttachmentDispose(otherAttachmentList);
+        //将分组后的数据放到对应的数据分支中
+        for (ProjectTemplateInfo info: otherProjectTemplateList) {
+            for (String key : otherStringListMap.keySet()) {
+                if (info.getId().equals(key)) {
+                    List<WorkClientAttachment> attachments = otherStringListMap.get(key);
+                    //判断是否为必填项,若为必填项则添加必填判定字段
+                    if(attachments.size()>0){
+                        info.setWorkAttachments(attachments);
+                        info.setMustFlag(0);
+                        projectTemplateList.add(info);
+                    }
+                }
+            }
+
+        }
+
+		/*for (ProjectTemplateInfo otherInfo: otherProjectTemplateList) {
+			WorkClientAttachment attchment = new WorkClientAttachment();
+			attchment.setProjectId(projectTemplateInfo.getId());
+			attchment.setAttachmentId(otherInfo.getId());
+			List<WorkClientAttachment> attachments = workattachmentService.getList(attchment);
+			//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+			workattachmentService.clientAttachmentManageOnUrl(attachments);
+			if(attachments.size()>0){
+				otherInfo.setWorkAttachments(attachments);
+
+				otherInfo.setMustFlag(0);
+				projectTemplateList.add(otherInfo);
+			}
+		}*/
+
+        return projectTemplateList;
+    }
+
+
+    /**
+     * 文件数据分组
+     * @param dataList
+     * @return
+     */
+    public Map<String, List<ProjectTemplateInfo>> dataMessageParentAttachmentDispose(List<ProjectTemplateInfo> dataList) {
+        //所有有效数据均添加到list中,下边将list中的数据根据店号和收银员的id进行分割处理
+        Map<String, List<ProjectTemplateInfo>> result = attachmentParentListGroup2MapTwo(dataList);
+        return result;
+    }
+
+    private Map<String, List<ProjectTemplateInfo>> attachmentParentListGroup2MapTwo(List<ProjectTemplateInfo> list) {
+        Map<String, List<ProjectTemplateInfo>> userSignSerialMap = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(list)) {
+            // 分组
+            for (ProjectTemplateInfo vo : list) {
+                List<ProjectTemplateInfo> tempList = userSignSerialMap.get(vo.getParentIds());
+                /*如果取不到数据,那么直接new一个空的ArrayList**/
+                if (tempList == null) {
+                    tempList = new ArrayList<>();
+                    tempList.add(vo);
+                    userSignSerialMap.put(vo.getParentIds(), tempList);
+                }
+                else {
+                    /*某个vo之前已经存放过了,则直接追加数据到原来的List里**/
+                    tempList.add(vo);
+                }
+            }
+        }
+        return userSignSerialMap;
+    }
+
+    /**
+     * 文件数据分组
+     * @param dataList
+     * @return
+     */
+    public Map<String, List<WorkClientAttachment>> dataMessageAttachmentDispose(List<WorkClientAttachment> dataList) {
+        //所有有效数据均添加到list中,下边将list中的数据根据店号和收银员的id进行分割处理
+        Map<String, List<WorkClientAttachment>> result = attachmentListGroup2MapTwo(dataList);
+        return result;
+    }
+
+    private Map<String, List<WorkClientAttachment>> attachmentListGroup2MapTwo(List<WorkClientAttachment> list) {
+        Map<String, List<WorkClientAttachment>> userSignSerialMap = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(list)) {
+            // 分组
+            for (WorkClientAttachment vo : list) {
+                List<WorkClientAttachment> tempList = userSignSerialMap.get(vo.getAttachmentId());
+                /*如果取不到数据,那么直接new一个空的ArrayList**/
+                if (tempList == null) {
+                    tempList = new ArrayList<>();
+                    tempList.add(vo);
+                    userSignSerialMap.put(vo.getAttachmentId(), tempList);
+                }
+                else {
+                    /*某个vo之前已经存放过了,则直接追加数据到原来的List里**/
+                    tempList.add(vo);
+                }
+            }
+        }
+        return userSignSerialMap;
+    }
+
     public List<ProjectTemplateInfo> getProjectTemplateUrgentList(ProjectAccessoryRelationInfo projectTemplateInfo){
         //查询所有被选择为必填项展示列,并查询附件信息
         List<ProjectTemplateInfo> projectTemplateList = dao.getProjectTemplateList(projectTemplateInfo);

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

@@ -1543,7 +1543,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
 			for (int i=0;i<infos.size();i++){
-				if (infos.get(i).getWorkAttachments().size()>0){
+				if (null != infos.get(i).getWorkAttachments() &&infos.get(i).getWorkAttachments().size()>0){
 					for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
 						Map<String,String> map=new HashMap<>();
 						map.put("count",count+"");
@@ -1561,7 +1561,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
 			for (int i=0;i<infos.size();i++){
-				if (infos.get(i).getWorkAttachments().size()>0){
+				if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
 					for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
 						Map<String,String> map=new HashMap<>();
 						map.put("count",count+"");
@@ -1579,7 +1579,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
 			List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
 			for (int i=0;i<infos.size();i++){
-				if (infos.get(i).getWorkAttachments().size()>0){
+				if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
 					for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
 						Map<String,String> map=new HashMap<>();
 						map.put("count",count+"");

+ 17 - 7
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java

@@ -144,7 +144,10 @@ public class ProjectReportDefectRecordController extends BaseController {
 		relateInfo.setId(ruralProjectRecords.getId());
 		//查询报告文件、依据性文件、其他文件必填列表以及数据
 		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-		for (MainDictDetail mainDict : mainDictDetails) {
+
+		projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,materialDefectRecord,"其他资料");
+
+		/*for (MainDictDetail mainDict : mainDictDetails) {
 			relateInfo.setAttachType(mainDict.getValue());
 			switch (mainDict.getValue()) {
 				case "11":
@@ -206,7 +209,7 @@ public class ProjectReportDefectRecordController extends BaseController {
 					break;
 			}
 
-		}
+		}*/
 
 		if(null != projectContractInfo){
 			if(projectContractInfo.getWorkClientInfoList().size()>0){
@@ -304,7 +307,9 @@ public class ProjectReportDefectRecordController extends BaseController {
 		relateInfo.setId(ruralProjectRecords.getId());
 		//查询报告文件、依据性文件、其他文件必填列表以及数据
 		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-		for (MainDictDetail mainDict : mainDictDetails) {
+
+		projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,materialDefectRecord,"其他资料");
+		/*for (MainDictDetail mainDict : mainDictDetails) {
 			relateInfo.setAttachType(mainDict.getValue());
 			switch (mainDict.getValue()) {
 				case "11":
@@ -366,7 +371,7 @@ public class ProjectReportDefectRecordController extends BaseController {
 					break;
 			}
 
-		}
+		}*/
 
 		if(null != projectContractInfo){
 			if(projectContractInfo.getWorkClientInfoList().size()>0){
@@ -564,7 +569,10 @@ public class ProjectReportDefectRecordController extends BaseController {
 		relateInfo.setId(ruralProjectRecords.getId());
 		//查询报告文件、依据性文件、其他文件必填列表以及数据
 		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-		for (MainDictDetail mainDict : mainDictDetails) {
+
+		projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,materialDefectRecord,"其他资料");
+
+		/*for (MainDictDetail mainDict : mainDictDetails) {
 			relateInfo.setAttachType(mainDict.getValue());
 			switch (mainDict.getValue()) {
 				case "11":
@@ -626,7 +634,7 @@ public class ProjectReportDefectRecordController extends BaseController {
 					break;
 			}
 
-		}
+		}*/
 
 		ProjectRecords projectRecords = new ProjectRecords();
 		try {
@@ -656,7 +664,9 @@ public class ProjectReportDefectRecordController extends BaseController {
 				defectRecord.setAct(act);
 			}
 		}
-
+		defectRecord.setFileAttachmentList(materialDefectRecord.getFileAttachmentList());
+		defectRecord.setFileGistdataList(materialDefectRecord.getFileGistdataList());
+		defectRecord.setFileOtherList(materialDefectRecord.getFileOtherList());
 		if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("view")){
 			return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
 		}else if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("modify")){

+ 9 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -210,6 +210,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String engineeringType;	//工程类型id
 	private String engineeringName;	//工程类型名称
 	private String submitMoney;		//送审金额
+	private String submitMoneyStr;		//项目等级
 	private String modifyFlag;		//修改判定参数
 	private Integer newRecordNotifyFlag; //新归档代办判定条件
 	private String newRecordNotifyId; //新归档代办判定条件
@@ -2225,4 +2226,12 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setZiXunBDE(String ziXunBDE) {
 		this.ziXunBDE = ziXunBDE;
 	}
+
+	public String getSubmitMoneyStr() {
+		return submitMoneyStr;
+	}
+
+	public void setSubmitMoneyStr(String submitMoneyStr) {
+		this.submitMoneyStr = submitMoneyStr;
+	}
 }

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

@@ -481,7 +481,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
         if (ruralProjectcontentinfo.getFileAttachmentList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileAttachmentList();
             for (int i=0;i<infos.size();i++){
-                if (infos.get(i).getWorkAttachments().size()>0){
+                if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
                     for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
                         Map<String,String> map=new HashMap<>();
                         map.put("count",count+"");
@@ -499,7 +499,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
         if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileGistdataList();
             for (int i=0;i<infos.size();i++){
-                if (infos.get(i).getWorkAttachments().size()>0){
+                if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
                     for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
                         Map<String,String> map=new HashMap<>();
                         map.put("count",count+"");
@@ -517,7 +517,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
         if (ruralProjectcontentinfo.getFileGistdataList().size()>0){
             List<ProjectTemplateInfo> infos=ruralProjectcontentinfo.getFileOtherList();
             for (int i=0;i<infos.size();i++){
-                if (infos.get(i).getWorkAttachments().size()>0){
+                if (null != infos.get(i).getWorkAttachments() && infos.get(i).getWorkAttachments().size()>0){
                     for (WorkClientAttachment attachment:infos.get(i).getWorkAttachments()){
                         Map<String,String> map=new HashMap<>();
                         map.put("count",count+"");

+ 273 - 24
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -47,6 +47,7 @@ import com.jeeplus.modules.ruralprojectrecords.entity.*;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.utils.ImportExcelUtil;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.statement.entity.ReportDataEntity;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
 import com.jeeplus.modules.sys.dao.UserDao;
@@ -2084,7 +2085,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 		//查询报告文件、依据性文件、其他文件必填列表以及数据
 		List<MainDictDetail> mainDictDetails = this.attachmentTemplateList();
-		for (MainDictDetail mainDict : mainDictDetails) {
+		disposeProjectFileView(mainDictDetails,relateInfo,engineeringId,projectRecords,projectcontentinfo);
+
+		/*for (MainDictDetail mainDict : mainDictDetails) {
+
 			relateInfo.setAttachType(mainDict.getValue());
 			switch (mainDict.getValue()) {
 				case "11":
@@ -2126,7 +2130,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 					break;
 			}
 
-		}
+		}*/
 
 		//添加当前文件服务器类型
 		projectcontentinfo.setUploadMode(uploadMode);
@@ -2134,6 +2138,82 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	}
 
 	/**
+	 * 文件展示数据处理
+	 * @param mainDictDetails
+	 * @param relateInfo
+	 * @param engineeringId
+	 * @param projectRecords
+	 * @param projectcontentinfo
+	 */
+	public void disposeProjectFileView(List<MainDictDetail> mainDictDetails,ProjectAccessoryRelationInfo relateInfo,
+						String engineeringId,RuralProjectRecords projectRecords,RuralProjectcontentinfo projectcontentinfo){
+		//创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+		List<String> mainDictValueList = Lists.newArrayList();
+		for (MainDictDetail mainDict : mainDictDetails) {
+			mainDictValueList.add(mainDict.getValue());
+		}
+		relateInfo.setAttachTypeList(mainDictValueList);
+		List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo);
+		Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+		for (MainDictDetail mainDict : mainDictDetails) {
+			switch (mainDict.getValue()) {
+				case "11":
+					for (String key: stringListMap.keySet()) {
+						if(key.contains("11")){
+							List<ProjectTemplateInfo> fileAttachmentList = stringListMap.get(key);
+							for (ProjectTemplateInfo info: fileAttachmentList) {
+								info.setAttachTypes(info.getAttachTypes().toLowerCase());
+								if(engineeringId.equals(projectRecords.getEngineeringType())){
+									if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+										if(!info.getAttachTypes().contains("zip")){
+											info.setAttachTypes(info.getAttachTypes()+",zip");
+										}
+										if(!info.getAttachTypes().contains("rar")){
+											info.setAttachTypes(info.getAttachTypes()+",rar");
+										}
+									}
+								}
+							}
+							projectcontentinfo.setFileAttachmentList(fileAttachmentList);
+						}
+					}
+					break;
+				case "12":
+					for (String key: stringListMap.keySet()) {
+						if(key.contains("12")){
+							List<ProjectTemplateInfo> projectTemplateList = stringListMap.get(key);
+							for (ProjectTemplateInfo info: projectTemplateList) {
+								info.setAttachTypes(info.getAttachTypes().toLowerCase());
+								if(engineeringId.equals(projectRecords.getEngineeringType())){
+									if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+										if(!info.getAttachTypes().contains("zip")){
+											info.setAttachTypes(info.getAttachTypes()+",zip");
+										}
+										if(!info.getAttachTypes().contains("rar")){
+											info.setAttachTypes(info.getAttachTypes()+",rar");
+										}
+									}
+								}
+							}
+							projectcontentinfo.setFileGistdataList(projectTemplateList);
+						}
+					}
+					break;
+				case "13":
+					for (String key: stringListMap.keySet()) {
+						if(key.contains("13")){
+							List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
+							projectcontentinfo.setFileOtherList(fileOtherList);
+						}
+					}
+					break;
+			}
+		}
+	}
+
+
+	/**
 	 * 项目列表新增文件信息获取
 	 * @param projectRecords  项目信息
 	 * @return
@@ -2209,7 +2289,9 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 		//查询报告文件、依据性文件、其他文件必填列表以及数据
 		List<MainDictDetail> mainDictDetails = this.attachmentTemplateListByUserId();
-		for (MainDictDetail mainDict : mainDictDetails) {
+
+		disposeProjectFileView(mainDictDetails,relateInfo,engineeringId,projectRecords,projectcontentinfo);
+		/*for (MainDictDetail mainDict : mainDictDetails) {
 			relateInfo.setAttachType(mainDict.getValue());
 			switch (mainDict.getValue()) {
 				case "11":
@@ -2251,7 +2333,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 					break;
 			}
 
-		}
+		}*/
 
 		//添加当前文件服务器类型
 		projectcontentinfo.setUploadMode(uploadMode);
@@ -2262,6 +2344,171 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	/**
 	 *
 	 * @param projectTemplateInfo
+	 * @return
+	 */
+	public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo){
+		//查询所有被选择为必填项展示列,并查询附件信息
+		List<ProjectTemplateInfo> projectTemplateList = projectTemplateDao.getProjectTemplateAllList(projectTemplateInfo);
+		//查询所有分类下的所有附件信息
+		List<String> attachmentIdList = Lists.newArrayList();
+		for (ProjectTemplateInfo info: projectTemplateList) {
+			attachmentIdList.add(info.getId());
+		}
+		WorkClientAttachment attchmentInfo = new WorkClientAttachment();
+		attchmentInfo.setProjectId(projectTemplateInfo.getId());
+		attchmentInfo.setAttachmentIdList(attachmentIdList);
+		List<WorkClientAttachment> attachmentList = workattachmentService.getInfoList(attchmentInfo);
+		//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+		workattachmentService.clientAttachmentManageOnUrl(attachmentList);
+		//对查询出来的文件数据进行分组
+		Map<String, List<WorkClientAttachment>> stringListMap = dataMessageAttachmentDispose(attachmentList);
+		//将分组后的数据放到对应的数据分支中
+		for (ProjectTemplateInfo info: projectTemplateList) {
+			for (String key : stringListMap.keySet()) {
+				if (info.getId().equals(key)) {
+					List<WorkClientAttachment> attachments = stringListMap.get(key);
+					//判断是否为必填项,若为必填项则添加必填判定字段
+					info.setMustFlag(0);
+					info.setWorkAttachments(attachments);
+				}
+			}
+		}
+
+		/*for (ProjectTemplateInfo info: projectTemplateList) {
+			WorkClientAttachment attchment = new WorkClientAttachment();
+			attchment.setProjectId(projectTemplateInfo.getId());
+			attchment.setAttachmentId(info.getId());
+			List<WorkClientAttachment> attachments = workattachmentService.getList(attchment);
+			//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+			workattachmentService.clientAttachmentManageOnUrl(attachments);
+			info.setWorkAttachments(attachments);
+			//判断是否为必填项,若为必填项则添加必填判定字段
+			info.setMustFlag(0);
+			*//*if(requiredStageList.contains(info.getRequiredStage())){
+				info.setMustFlag(1);
+			}else{
+				info.setMustFlag(0);
+			}*//*
+		}*/
+		//查询没有被选择必填项的数据并查询是否已经上传附件,若有则添加到展示列中
+		List<ProjectTemplateInfo> otherProjectTemplateList = projectTemplateDao.projectAccessoryListByParentId(projectTemplateInfo);
+
+		//查询所有分类下的所有附件信息
+		List<String> otherAttachmentIdList = Lists.newArrayList();
+		for (ProjectTemplateInfo info: otherProjectTemplateList) {
+			otherAttachmentIdList.add(info.getId());
+		}
+		WorkClientAttachment otherAttchmentInfo = new WorkClientAttachment();
+		otherAttchmentInfo.setProjectId(projectTemplateInfo.getId());
+		otherAttchmentInfo.setAttachmentIdList(otherAttachmentIdList);
+		List<WorkClientAttachment> otherAttachmentList = workattachmentService.getInfoList(otherAttchmentInfo);
+		//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+		workattachmentService.clientAttachmentManageOnUrl(otherAttachmentList);
+		//对查询出来的文件数据进行分组
+		Map<String, List<WorkClientAttachment>> otherStringListMap = dataMessageAttachmentDispose(otherAttachmentList);
+		//将分组后的数据放到对应的数据分支中
+		for (ProjectTemplateInfo info: otherProjectTemplateList) {
+			for (String key : otherStringListMap.keySet()) {
+				if (info.getId().equals(key)) {
+					List<WorkClientAttachment> attachments = otherStringListMap.get(key);
+					//判断是否为必填项,若为必填项则添加必填判定字段
+					if(attachments.size()>0){
+						info.setWorkAttachments(attachments);
+						info.setMustFlag(0);
+						projectTemplateList.add(info);
+					}
+				}
+			}
+
+		}
+
+		/*for (ProjectTemplateInfo otherInfo: otherProjectTemplateList) {
+			WorkClientAttachment attchment = new WorkClientAttachment();
+			attchment.setProjectId(projectTemplateInfo.getId());
+			attchment.setAttachmentId(otherInfo.getId());
+			List<WorkClientAttachment> attachments = workattachmentService.getList(attchment);
+			//数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+			workattachmentService.clientAttachmentManageOnUrl(attachments);
+			if(attachments.size()>0){
+				otherInfo.setWorkAttachments(attachments);
+
+				otherInfo.setMustFlag(0);
+				projectTemplateList.add(otherInfo);
+			}
+		}*/
+
+		return projectTemplateList;
+	}
+
+
+	/**
+	 * 文件数据分组
+	 * @param dataList
+	 * @return
+	 */
+	public Map<String, List<ProjectTemplateInfo>> dataMessageParentAttachmentDispose(List<ProjectTemplateInfo> dataList) {
+		//所有有效数据均添加到list中,下边将list中的数据根据店号和收银员的id进行分割处理
+		Map<String, List<ProjectTemplateInfo>> result = attachmentParentListGroup2MapTwo(dataList);
+		return result;
+	}
+
+	private Map<String, List<ProjectTemplateInfo>> attachmentParentListGroup2MapTwo(List<ProjectTemplateInfo> list) {
+		Map<String, List<ProjectTemplateInfo>> userSignSerialMap = new HashMap<>();
+		if (CollectionUtils.isNotEmpty(list)) {
+			// 分组
+			for (ProjectTemplateInfo vo : list) {
+				List<ProjectTemplateInfo> tempList = userSignSerialMap.get(vo.getParentIds());
+				/*如果取不到数据,那么直接new一个空的ArrayList**/
+				if (tempList == null) {
+					tempList = new ArrayList<>();
+					tempList.add(vo);
+					userSignSerialMap.put(vo.getParentIds(), tempList);
+				}
+				else {
+					/*某个vo之前已经存放过了,则直接追加数据到原来的List里**/
+					tempList.add(vo);
+				}
+			}
+		}
+		return userSignSerialMap;
+	}
+
+	/**
+	 * 文件数据分组
+	 * @param dataList
+	 * @return
+	 */
+	public Map<String, List<WorkClientAttachment>> dataMessageAttachmentDispose(List<WorkClientAttachment> dataList) {
+		//所有有效数据均添加到list中,下边将list中的数据根据店号和收银员的id进行分割处理
+		Map<String, List<WorkClientAttachment>> result = attachmentListGroup2MapTwo(dataList);
+		return result;
+	}
+
+	private Map<String, List<WorkClientAttachment>> attachmentListGroup2MapTwo(List<WorkClientAttachment> list) {
+		Map<String, List<WorkClientAttachment>> userSignSerialMap = new HashMap<>();
+		if (CollectionUtils.isNotEmpty(list)) {
+			// 分组
+			for (WorkClientAttachment vo : list) {
+				List<WorkClientAttachment> tempList = userSignSerialMap.get(vo.getAttachmentId());
+				/*如果取不到数据,那么直接new一个空的ArrayList**/
+				if (tempList == null) {
+					tempList = new ArrayList<>();
+					tempList.add(vo);
+					userSignSerialMap.put(vo.getAttachmentId(), tempList);
+				}
+				else {
+					/*某个vo之前已经存放过了,则直接追加数据到原来的List里**/
+					tempList.add(vo);
+				}
+			}
+		}
+		return userSignSerialMap;
+	}
+
+
+	/**
+	 *
+	 * @param projectTemplateInfo
 	 * @param requiredStageList
 	 * @return
 	 */
@@ -2389,26 +2636,28 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			info.setFlag(0);
 			list.add(info);
 			//处理附件信息
-			for (WorkClientAttachment attachment: info.getWorkAttachments()) {
-				ProjectTemplateInfo attach = new ProjectTemplateInfo();
-				ProjectTemplateInfo parent = new ProjectTemplateInfo();
-				parent.setId(info.getId());
-				attach.setId(attachment.getId());
-				attach.setParent(parent);
-				attach.setMustFlag(0);
-				attach.setParentIds("0,"+info.getId()+",");
-				attach.setFlag(1);
-				attach.setAttachName(attachment.getAttachmentName());
-				attach.setUrl(attachment.getUrl());
-				attach.setAttachTypes(attachment.getType());
-				attach.setCollectFlag(attachment.getCollectFlag());
-				attach.setCreateBy(UserUtils.getUser());
-				attach.setCreateDate(attachment.getCreateDate());
-				attach.setFileSize(attachment.getFileSize());
-				attach.setDescription(attachment.getDescription());
-				//添加临时查看url(阿里云)
-				attach.setTemporaryUrl(attachment.getTemporaryUrl());
-				list.add(attach);
+			if(null != info.getWorkAttachments()){
+				for (WorkClientAttachment attachment: info.getWorkAttachments()) {
+					ProjectTemplateInfo attach = new ProjectTemplateInfo();
+					ProjectTemplateInfo parent = new ProjectTemplateInfo();
+					parent.setId(info.getId());
+					attach.setId(attachment.getId());
+					attach.setParent(parent);
+					attach.setMustFlag(0);
+					attach.setParentIds("0,"+info.getId()+",");
+					attach.setFlag(1);
+					attach.setAttachName(attachment.getAttachmentName());
+					attach.setUrl(attachment.getUrl());
+					attach.setAttachTypes(attachment.getType());
+					attach.setCollectFlag(attachment.getCollectFlag());
+					attach.setCreateBy(UserUtils.getUser());
+					attach.setCreateDate(attachment.getCreateDate());
+					attach.setFileSize(attachment.getFileSize());
+					attach.setDescription(attachment.getDescription());
+					//添加临时查看url(阿里云)
+					attach.setTemporaryUrl(attachment.getTemporaryUrl());
+					list.add(attach);
+				}
 			}
 		}
 		return list;

+ 9 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -1333,7 +1333,10 @@ public class RuralCostProjectMessageController extends BaseController {
             relateInfo.setId(ruralProjectRecords.getId());
             //查询报告文件、依据性文件、其他文件必填列表以及数据
             List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-            for (MainDictDetail mainDict : mainDictDetails) {
+            //文件处理
+            projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+
+            /*for (MainDictDetail mainDict : mainDictDetails) {
                 relateInfo.setAttachType(mainDict.getValue());
                 switch (mainDict.getValue()) {
                     case "11":
@@ -1375,7 +1378,7 @@ public class RuralCostProjectMessageController extends BaseController {
                         break;
                 }
 
-            }
+            }*/
         //}
 
         if(null != projectContractInfo){
@@ -1450,7 +1453,9 @@ public class RuralCostProjectMessageController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"1000");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1499,7 +1504,7 @@ public class RuralCostProjectMessageController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);

+ 26 - 12
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -232,7 +232,10 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(records.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,records,projectcontentinfo,"");
+
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -274,7 +277,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserListByType(records.getSubmitMoney());
@@ -613,7 +616,10 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontent,"");
+
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -655,7 +661,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //添加当前文件服务器类型
         projectcontent.setUploadMode(uploadMode);
@@ -1233,7 +1239,9 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1275,7 +1283,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         if(null != projectContractInfo){
             if(projectContractInfo.getWorkClientInfoList().size()>0){
@@ -1455,7 +1463,9 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1497,7 +1507,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
@@ -1591,7 +1601,9 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1633,7 +1645,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
@@ -2096,7 +2108,9 @@ public class RuralCostProjectMessageNewController extends BaseController {
         relateInfo.setId(records.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,records,projectcontentinfo,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -2138,7 +2152,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();

+ 13 - 6
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewTwoController.java

@@ -160,7 +160,10 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"1000");
+
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -209,7 +212,7 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         if(null != projectContractInfo){
             if(projectContractInfo.getWorkClientInfoList().size()>0){
@@ -343,7 +346,9 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -386,7 +391,7 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
 
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
@@ -479,7 +484,9 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -522,7 +529,7 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);

+ 8 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -1364,7 +1364,9 @@ public class RuralProjectMessageController extends BaseController {
             relateInfo.setId(ruralProjectRecords.getId());
             //查询报告文件、依据性文件、其他文件必填列表以及数据
             List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-            for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+            /*for (MainDictDetail mainDict : mainDictDetails) {
                 relateInfo.setAttachType(mainDict.getValue());
                 switch (mainDict.getValue()) {
                     case "11":
@@ -1406,7 +1408,7 @@ public class RuralProjectMessageController extends BaseController {
                         break;
                 }
 
-            }
+            }*/
         //}
 
 
@@ -1480,7 +1482,9 @@ public class RuralProjectMessageController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1522,7 +1526,7 @@ public class RuralProjectMessageController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         ProjectRecords projectRecords = new ProjectRecords();
         try {
             MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);

+ 27 - 13
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewController.java

@@ -243,7 +243,9 @@ public class RuralProjectMessageNewController extends BaseController {
         relateInfo.setId(records.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,records,projectcontentinfo,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -285,7 +287,7 @@ public class RuralProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserListByType(records.getSubmitMoney());
@@ -586,7 +588,9 @@ public class RuralProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -628,7 +632,7 @@ public class RuralProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //添加当前文件服务器类型
         projectcontent.setUploadMode(uploadMode);
@@ -650,6 +654,13 @@ public class RuralProjectMessageNewController extends BaseController {
         if(null != reported){
             model.addAttribute("reportedView", 1);
         }
+        projectcontent.setFileAttachmentList(projectcontentinfo.getFileAttachmentList());
+        projectcontent.setFileGistdataList(projectcontentinfo.getFileGistdataList());
+        projectcontent.setFileOtherList(projectcontentinfo.getFileOtherList());
+
+        /*projectcontent.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+        projectcontent.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+        projectcontent.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));*/
 
         if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().contains("view")) {
             List<MainDictDetail> achievementTypes = DictUtils.getMainDictList("achievement_type");
@@ -661,9 +672,6 @@ public class RuralProjectMessageNewController extends BaseController {
                     }
                 }
             }
-            projectcontent.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileAttachmentList()));
-            projectcontent.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileGistdataList()));
-            projectcontent.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileOtherList()));
             return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView";
         }
         if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().contains("report")) {
@@ -1133,7 +1141,9 @@ public class RuralProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1175,7 +1185,7 @@ public class RuralProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
 
         if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
@@ -1354,7 +1364,9 @@ public class RuralProjectMessageNewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1396,7 +1408,7 @@ public class RuralProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         ProjectRecords projectRecords = new ProjectRecords();
         try {
@@ -1811,7 +1823,9 @@ public class RuralProjectMessageNewController extends BaseController {
         relateInfo.setId(records.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,records,projectcontentinfo,"");
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -1853,7 +1867,7 @@ public class RuralProjectMessageNewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();

+ 5 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewTwoController.java

@@ -200,7 +200,10 @@ public class RuralProjectMessageNewTwoController  extends BaseController {
         relateInfo.setId(records.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,records,projectcontentinfo,"");
+
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -242,7 +245,7 @@ public class RuralProjectMessageNewTwoController  extends BaseController {
                     break;
             }
 
-        }
+        }*/
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();

+ 2 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java

@@ -821,7 +821,7 @@ public class RuralProjectViewController extends BaseController {
         relateInfo.setId(ruralProjectRecords.getId());
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-        for (MainDictDetail mainDict : mainDictDetails) {
+        /*for (MainDictDetail mainDict : mainDictDetails) {
             relateInfo.setAttachType(mainDict.getValue());
             switch (mainDict.getValue()) {
                 case "11":
@@ -835,7 +835,7 @@ public class RuralProjectViewController extends BaseController {
                     break;
             }
 
-        }
+        }*/
         //}
         //获取复核标准
         String reviewId="";

+ 7 - 0
src/main/java/com/jeeplus/modules/workclientinfo/dao/WorkClientAttachmentDao.java

@@ -22,6 +22,13 @@ public interface WorkClientAttachmentDao extends CrudDao<WorkClientAttachment> {
     List<WorkClientAttachment> getList(WorkClientAttachment attchment);
 
     /**
+     * 批量查询数据信息(项目文件专用)
+     * @param attchment
+     * @return
+     */
+    List<WorkClientAttachment> getInfoList(WorkClientAttachment attchment);
+
+    /**
      * 全过程阶段信息查询
      * @param attchment
      * @return

+ 10 - 0
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java

@@ -9,6 +9,7 @@ import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * 添加附件Entity
@@ -23,6 +24,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	private String attachmentUser;		// 上传人
 	private String attachmentName;		// 文件名
 	private String attachmentId; //外联 客户编号
+	private List<String> attachmentIdList; //外联 客户编号
 	private String attachmentFlag; //附件类别
 	private String companyId; //附件类别
 	private String projectId; //项目id
@@ -166,4 +168,12 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setDivIdType(String divIdType) {
 		this.divIdType = divIdType;
 	}
+
+	public List<String> getAttachmentIdList() {
+		return attachmentIdList;
+	}
+
+	public void setAttachmentIdList(List<String> attachmentIdList) {
+		this.attachmentIdList = attachmentIdList;
+	}
 }

+ 86 - 64
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -2606,7 +2606,9 @@ public class WorkProjectNotifyController extends BaseController {
 					relateInfo.setId(ruralProjectRecords.getId());
 					//查询报告文件、依据性文件、其他文件必填列表以及数据
 					List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-					for (MainDictDetail mainDict : mainDictDetails) {
+					//文件处理
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+					/*for (MainDictDetail mainDict : mainDictDetails) {
 						relateInfo.setAttachType(mainDict.getValue());
 						switch (mainDict.getValue()) {
 							case "11":
@@ -2656,7 +2658,7 @@ public class WorkProjectNotifyController extends BaseController {
 								break;
 						}
 
-					}
+					}*/
 					if(null != projectReportRecord){
 						projectReportRecord.setUploadMode(uploadMode);
 					}
@@ -2788,15 +2790,19 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("identificationName","项目上报审核意见");
 						if(StringUtils.isNotBlank(reported.getJingHeJianLv())){
 							if(Double.valueOf(reported.getJingHeJianLv())>30 || Double.valueOf(reported.getJingHeJianLv())< -30 ){
-								projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-								projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-								projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+								projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+								projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+								projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 
 								return "modules/ruralprojectrecords/cost/newReported/bzshbReportedAudit";
 							}
 						}
 						return "modules/ruralprojectrecords/cost/newReported/reportedAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
+
 						return "modules/ruralprojectrecords/ruralporjectmessage/reportedModify";
 					} else {
 						ruralProjectMessageService.getInfoByView(reported);
@@ -3091,15 +3097,6 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 						model.addAttribute("identification", "projectReported");
 						model.addAttribute("identificationName","项目上报审核意见");
-						if(StringUtils.isNotBlank(reported.getJingHeJianLv())){
-							/*if(Double.valueOf(reported.getJingHeJianLv())>30 || Double.valueOf(reported.getJingHeJianLv())< -30 ){
-								projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-								projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-								projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
-
-								return "modules/ruralprojectrecords/cost/newReported/bzshbReportedAudit";
-							}*/
-						}
 						return "modules/ruralprojectrecords/reported/reportedAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/ruralprojectrecords/reported/reportedModify";
@@ -4003,7 +4000,10 @@ public class WorkProjectNotifyController extends BaseController {
 					relateInfo.setId(ruralProjectRecords.getId());
 					//查询报告文件、依据性文件、其他文件必填列表以及数据
 					List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-					for (MainDictDetail mainDict : mainDictDetails) {
+
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+
+					/*for (MainDictDetail mainDict : mainDictDetails) {
 						relateInfo.setAttachType(mainDict.getValue());
 						switch (mainDict.getValue()) {
 							case "11":
@@ -4045,7 +4045,7 @@ public class WorkProjectNotifyController extends BaseController {
 								break;
 						}
 
-					}
+					}*/
 					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
 						projectcontentinfo.setHome(workProjectNotify.getHome());
 					}else{
@@ -4545,7 +4545,9 @@ public class WorkProjectNotifyController extends BaseController {
 					relateInfo.setId(ruralProjectRecords.getId());
 					//查询报告文件、依据性文件、其他文件必填列表以及数据
 					List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-					for (MainDictDetail mainDict : mainDictDetails) {
+					//文件处理
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+					/*for (MainDictDetail mainDict : mainDictDetails) {
 						relateInfo.setAttachType(mainDict.getValue());
 						switch (mainDict.getValue()) {
 							case "11":
@@ -4587,7 +4589,7 @@ public class WorkProjectNotifyController extends BaseController {
 								break;
 						}
 
-					}
+					}*/
 					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
 						projectcontentinfo.setHome(workProjectNotify.getHome());
 					}else{
@@ -4978,7 +4980,10 @@ public class WorkProjectNotifyController extends BaseController {
 					relateInfo.setId(ruralProjectRecords.getId());
 					//查询报告文件、依据性文件、其他文件必填列表以及数据
 					List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-					for (MainDictDetail mainDict : mainDictDetails) {
+					//文件处理
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+
+					/*for (MainDictDetail mainDict : mainDictDetails) {
 						relateInfo.setAttachType(mainDict.getValue());
 						switch (mainDict.getValue()) {
 							case "11":
@@ -5020,7 +5025,7 @@ public class WorkProjectNotifyController extends BaseController {
 								break;
 						}
 
-					}
+					}*/
 					if (StringUtils.isNotBlank(workProjectNotify.getHome())) {
 						projectcontentinfo.setHome(workProjectNotify.getHome());
 					} else {
@@ -5384,7 +5389,9 @@ public class WorkProjectNotifyController extends BaseController {
 						relateInfo.setId(ruralProjectRecords.getId());
 						//查询报告文件、依据性文件、其他文件必填列表以及数据
 						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-						for (MainDictDetail mainDict : mainDictDetails) {
+					//文件处理
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"其他资料");
+						/*for (MainDictDetail mainDict : mainDictDetails) {
 							relateInfo.setAttachType(mainDict.getValue());
 							switch (mainDict.getValue()) {
 								case "11":
@@ -5445,7 +5452,7 @@ public class WorkProjectNotifyController extends BaseController {
 									materialDefectRecord.setFileOtherList(projectOtherList);
 									break;
 							}
-						}
+						}*/
 
 						materialDefectRecord.setUploadMode(uploadMode);
 						model.addAttribute("projectcontentinfo", projectcontentinfo);
@@ -5455,14 +5462,14 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("materialDefectRecord", materialDefectRecord);
 						model.addAttribute("project", materialDefectRecord.getReport().getProject());
 						if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
-							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
-							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
-							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 							return "modules/ruralprojectrecords/record/projectRepordDescriptionView";
 						}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
-							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
-							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 							if ("2".equals(ruralProjectRecords.getProjectType())){
 								model.addAttribute("identification","projectRepordDescription");
 							}
@@ -5473,11 +5480,14 @@ public class WorkProjectNotifyController extends BaseController {
 							model.addAttribute("identificationName","资料缺失说明审核意见");
 							return "modules/ruralprojectrecords/record/projectRepordDescriptionAudit";
 						} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 							return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
 						} else {
-							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
-							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
-							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 							return "modules/ruralprojectrecords/record/projectRepordDescriptionView";
 						}
 				}else if (workProjectNotify.getType().equals("46")) {    //工作内容报告变更
@@ -5738,7 +5748,8 @@ public class WorkProjectNotifyController extends BaseController {
 						relateInfo.setId(ruralProjectRecords.getId());
 						//查询报告文件、依据性文件、其他文件必填列表以及数据
 						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-						for (MainDictDetail mainDict : mainDictDetails) {
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"1000");
+						/*for (MainDictDetail mainDict : mainDictDetails) {
 							relateInfo.setAttachType(mainDict.getValue());
 							switch (mainDict.getValue()) {
 								case "11":
@@ -5795,7 +5806,7 @@ public class WorkProjectNotifyController extends BaseController {
 									break;
 							}
 
-						}
+						}*/
 					//}
 					projectReportRecord.setUploadMode(uploadMode);
 					//获取项目基础信息
@@ -5877,14 +5888,14 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("datalistTwo", reviewAuditList);
 
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						if ("2".equals(ruralProjectRecords.getProjectType())){
 							model.addAttribute("identification", "projectcontentinfoFile");
 							model.addAttribute("identifications","referenceRemarks");
@@ -5897,11 +5908,14 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("identificationName","归档审核意见");
 						return "modules/projectcontentinfo/projectReportRecordAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/projectcontentinfo/projectReportRecordModifyApply";
 					} else {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 
 					}
@@ -6005,7 +6019,8 @@ public class WorkProjectNotifyController extends BaseController {
 						relateInfo.setId(ruralProjectRecords.getId());
 						//查询报告文件、依据性文件、其他文件必填列表以及数据
 						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-						for (MainDictDetail mainDict : mainDictDetails) {
+					projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+						/*for (MainDictDetail mainDict : mainDictDetails) {
 							relateInfo.setAttachType(mainDict.getValue());
 							switch (mainDict.getValue()) {
 								case "11":
@@ -6047,7 +6062,7 @@ public class WorkProjectNotifyController extends BaseController {
 									break;
 							}
 
-						}
+						}*/
 					projectReportRecord.setUploadMode(uploadMode);
 					//获取项目基础信息
 					ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
@@ -6141,14 +6156,14 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("workReviewList", workReviewAudits);
 
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						if ("1".equals(ruralProjectRecords.getProjectType())){
 							model.addAttribute("identification", "projectcontentinfoFile");
 						}
@@ -6164,6 +6179,9 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 						return "modules/ruralprojectrecords/record/projectReportRecordAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						if("1".equals(ruralProjectRecords.getEmergencyProject())){
 							List<RuralReportConsultant> consultants=reConsultants(ruralProjectRecords,projectReportData);
 							model.addAttribute("info", consultants);
@@ -6172,9 +6190,9 @@ public class WorkProjectNotifyController extends BaseController {
 							return "modules/ruralprojectrecords/record/projectReportRecordModifyApply";
 						}
 					} else {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 
 					}
@@ -6306,7 +6324,8 @@ public class WorkProjectNotifyController extends BaseController {
 						relateInfo.setId(ruralProjectRecords.getId());
 						//查询报告文件、依据性文件、其他文件必填列表以及数据
 						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
-						for (MainDictDetail mainDict : mainDictDetails) {
+						projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectcontentinfo,"");
+						/*for (MainDictDetail mainDict : mainDictDetails) {
 							relateInfo.setAttachType(mainDict.getValue());
 							switch (mainDict.getValue()) {
 								case "11":
@@ -6348,7 +6367,7 @@ public class WorkProjectNotifyController extends BaseController {
 									break;
 							}
 
-						}
+						}*/
 					l2 = System.currentTimeMillis();
 					projectReportRecord.setUploadMode(uploadMode);
 					//获取项目基础信息
@@ -6446,14 +6465,14 @@ public class WorkProjectNotifyController extends BaseController {
 							}
 						}
 						model.addAttribute("list", workReviewAudits);
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						if ("2".equals(ruralProjectRecords.getProjectType())){
 							model.addAttribute("identification", "projectcontentinfoFile");
 						}
@@ -6469,6 +6488,9 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 						return "modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						if("1".equals(ruralProjectRecords.getEmergencyProject())){
 							List<RuralReportConsultant> consultants=reConsultants(ruralProjectRecords,projectReportData);
 							model.addAttribute("info", consultants);
@@ -6477,9 +6499,9 @@ public class WorkProjectNotifyController extends BaseController {
 							return "modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModifyApply";
 						}
 					} else {
-						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
-						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
-						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/view/projectReportRecordView";
 
 					}

+ 86 - 11
src/main/resources/mappings/modules/projectAccessory/ProjectTemplateDao.xml

@@ -81,19 +81,47 @@
 		SELECT
 			<include refid="workReviewStandardColumns"/>
 		FROM project_template_structure_info a
-		where a.parent_id =#{attachType}
-		and a.id not in(select attach_id from project_accessory_relation_info b
 		<where>
-			b.attachment_project_type = #{attachmentProjectType}
-			and b.attach_type = #{attachType}
-			<if test="attachmentProjectSort != null and attachmentProjectSort!=''">
-				and b.attachment_project_sort = #{attachmentProjectSort}
-			</if>
-			<if test="attachmentProjectApprovalMoney != null and attachmentProjectApprovalMoney!=''">
-				and b.attachment_project_approval_money = #{attachmentProjectApprovalMoney}
-			</if>
+			<choose>
+				<when test="attachType != null and attachType!=''">
+					and a.parent_id =#{attachType}
+				</when>
+				<otherwise>
+					<if test="attachTypeList != null and attachTypeList.size>0">
+						and a.parent_id in
+						<foreach collection="attachTypeList" item="attachType" separator="," open="(" close=")">
+							#{attachType}
+						</foreach>
+					</if>
+				</otherwise>
+			</choose>
+			and a.id not in(select attach_id from project_accessory_relation_info b
+			<where>
+				b.attachment_project_type = #{attachmentProjectType}
+
+				<choose>
+					<when test="attachTypeList != null and attachTypeList.size>0">
+						and b.attach_type in
+						<foreach collection="attachTypeList" item="attachType" separator="," open="(" close=")">
+							#{attachType}
+						</foreach>
+					</when>
+					<otherwise>
+						<if test="attachType != null and attachType!=''">
+							and b.attach_type = #{attachType}
+						</if>
+					</otherwise>
+				</choose>
+				<if test="attachmentProjectSort != null and attachmentProjectSort!=''">
+					and b.attachment_project_sort = #{attachmentProjectSort}
+				</if>
+				<if test="attachmentProjectApprovalMoney != null and attachmentProjectApprovalMoney!=''">
+					and b.attachment_project_approval_money = #{attachmentProjectApprovalMoney}
+				</if>
+			</where>
+			)
 		</where>
-		)
+
 	</select>
 
 	<select id="getProjectTemplateListById" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
@@ -305,6 +333,53 @@
 		order by z.indexNum asc
 	</select>
 
+	<select id="getProjectTemplateAllList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
+		select * from (
+		SELECT
+		<include refid="workReviewStandardColumns"/>
+		,b.required_stage as "requiredStage"
+		from project_template_structure_info a
+		left join project_accessory_relation_info b on b.attach_id = a.id
+		<where>
+			b.attachment_project_type = #{attachmentProjectType}
+			<choose>
+				<when test="attachType != null and attachType!=''">
+					and b.attach_type = #{attachType}
+				</when>
+				<otherwise>
+					<if test="attachTypeList != null and attachTypeList.size>0">
+						and b.attach_type in
+						<foreach collection="attachTypeList" item="attachType" separator="," open="(" close=")">
+							#{attachType}
+						</foreach>
+					</if>
+				</otherwise>
+			</choose>
+			<if test="attachmentProjectSort != null and attachmentProjectSort!=''">
+				and b.attachment_project_sort = #{attachmentProjectSort}
+			</if>
+			<choose>
+				<when test="attachmentProjectApprovalMoney!=null and attachmentProjectApprovalMoney!=''">
+					and b.attachment_project_approval_money = #{attachmentProjectApprovalMoney}
+				</when>
+				<otherwise>
+					and b.attachment_project_approval_money is null
+				</otherwise>
+			</choose>
+		</where>
+
+		<choose>
+			<when test="requiredStage!=null and requiredStage != '' and requiredStage == 1">
+				order by a.index_num asc,b.required_stage asc
+			</when>
+			<otherwise>
+				order by a.index_num asc,b.required_stage asc
+			</otherwise>
+		</choose>
+		) z group by z.id
+		order by z.indexNum asc
+	</select>
+
 	<select id="getProjectTemplateInfoByName" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
 		SELECT
 		<include refid="workReviewStandardColumns"/>

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

@@ -1650,6 +1650,7 @@
 	<select id="projectPlanFindList" resultType="RuralProjectRecords" >
 		SELECT
 		<include refid="projectRecordsColumns"/>
+		,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as submitMoneyStr
 		,
 		wci.name AS "workContractInfo.name",
 		prd.number AS "projectReportNumber",

+ 21 - 0
src/main/resources/mappings/modules/workclientinfo/WorkClientAttachmentDao.xml

@@ -221,6 +221,27 @@
         ORDER BY a.sort,a.update_date DESC
     </select>
 
+    <select id="getInfoList" resultType="WorkClientAttachment" >
+        SELECT
+        <include refid="workClientAttachmentColumns"/>
+        FROM work_attachment a
+        <include refid="workClientAttachmentJoins"/>
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="attachmentIdList.size>0">
+                and a.attachment_id in
+                <foreach collection="attachmentIdList" item="attachmentId" separator="," open="(" close=")">
+                    #{attachmentId}
+                </foreach>
+            </if>
+            <if test="projectId != null and projectId != ''">
+                AND project_id = #{projectId}
+            </if>
+        </where>
+
+        ORDER BY a.sort,a.update_date DESC
+    </select>
+
     <select id="getListOnOverAll" resultType="WorkClientAttachment" >
         SELECT
         <include refid="workClientAttachmentColumns"/>

+ 1 - 9
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingList.jsp

@@ -314,15 +314,7 @@
 					,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
 					,"projectStatus":"${projectRecords.projectStatus}"
 					,"procId":"${projectRecords.processInstanceId}"
-					,"submitMoneyStr":
-							<c:choose>
-							<c:when test="${'500'<= projectRecords.submitScale}">
-							"A级"
-					</c:when>
-					<c:otherwise>
-					"B级"
-					</c:otherwise>
-					</c:choose>
+					,"submitMoneyStr":"${projectRecords.submitMoneyStr}"
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
 					</shiro:hasPermission>

+ 1 - 9
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostList.jsp

@@ -319,15 +319,7 @@
 					,"endDate":"<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"
 					,"projectStatus":"${projectRecords.projectStatus}"
 					,"procId":"${projectRecords.processInstanceId}"
-					,"submitMoneyStr":
-							<c:choose>
-							<c:when test="${'500'<= projectRecords.submitScale}">
-							"A级"
-					</c:when>
-					<c:otherwise>
-					"B级"
-					</c:otherwise>
-					</c:choose>
+					,"submitMoneyStr":"${projectRecords.submitMoneyStr}"
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
 					</shiro:hasPermission>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp

@@ -66,6 +66,7 @@
 
 									}else{
 										top.layer.msg("请上传成果文件!", {icon: 0});
+										$("#onsubmit").val(true);
 										return false;
 									}
 								}
@@ -83,6 +84,7 @@
 
 										}else{
 											top.layer.msg("请上传依据性文件!", {icon: 0});
+											$("#onsubmit").val(true);
 											return false;
 										}
 									}
@@ -101,6 +103,7 @@
 
 										}else{
 											top.layer.msg("请上传其它文件!", {icon: 0});
+											$("#onsubmit").val(true);
 											return false;
 										}
 									}