Bläddra i källkod

添加案例库-我的案例,和案例项目申请成功后案例文件文件上传以及同步到对应知识库的功能

徐滕 2 veckor sedan
förälder
incheckning
09b24d7b42
43 ändrade filer med 6081 tillägg och 68 borttagningar
  1. 2 0
      src/main/java/com/jeeplus/modules/knowledgeSharing/dao/KnowledgeSharingDetailsDao.java
  2. 3 0
      src/main/java/com/jeeplus/modules/knowledgeSharing/dify/KnowledgeDifyController.java
  3. 9 0
      src/main/java/com/jeeplus/modules/knowledgeSharing/entity/KnowledgeSharingInfo.java
  4. 90 0
      src/main/java/com/jeeplus/modules/knowledgeSharing/service/KnowledgeSharingDetailsService.java
  5. 3 0
      src/main/java/com/jeeplus/modules/knowledgeSharing/web/KnowledgeBaseController.java
  6. 8 1
      src/main/java/com/jeeplus/modules/projectAccessory/dao/ProjectTemplateDao.java
  7. 67 7
      src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java
  8. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectMaterialDefectRecord.java
  9. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectReportRecord.java
  10. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java
  11. 4 4
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java
  12. 1 1
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectPlanService.java
  13. 6 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java
  14. 9 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectcontentinfo.java
  15. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/ProjectPaperFilingService.java
  16. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  17. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordTwoService.java
  18. 60 40
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  19. 181 4
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewTwoController.java
  20. 35 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsCaseBaseController.java
  21. 132 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java
  22. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java
  23. 2 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  24. 57 0
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  25. 3 0
      src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java
  26. 7 0
      src/main/java/com/jeeplus/modules/workprojectnotify/dao/WorkProjectNotifyDao.java
  27. 4 0
      src/main/java/com/jeeplus/modules/workprojectnotify/service/WorkProjectNotifyService.java
  28. 195 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  29. 15 2
      src/main/resources/mappings/modules/knowledgeSharing/KnowledgeSharingDetailsDao.xml
  30. 11 0
      src/main/resources/mappings/modules/projectAccessory/ProjectTemplateDao.xml
  31. 20 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  32. 20 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  33. 6 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  34. 9 0
      src/main/resources/mappings/modules/workprojectnotify/WorkProjectNotifyDao.xml
  35. 2448 0
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementForm.jsp
  36. 1330 0
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp
  37. 11 1
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp
  38. 1077 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralProjectRecordsOwnCaseBaseList.jsp
  39. 11 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp
  40. 15 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp
  41. 180 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp
  42. 3 0
      src/main/webapp/webpage/modules/sys/sysHome.jsp
  43. 16 0
      src/main/webapp/webpage/modules/workprojectnotify/workProjectNotifyList.jsp

+ 2 - 0
src/main/java/com/jeeplus/modules/knowledgeSharing/dao/KnowledgeSharingDetailsDao.java

@@ -61,4 +61,6 @@ public interface KnowledgeSharingDetailsDao extends CrudDao<KnowledgeSharingInfo
      * @return
      */
     int deleteComment(String id);
+
+    List<KnowledgeSharingInfo> getByProjectId(@Param("projectId") String projectId);
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/knowledgeSharing/dify/KnowledgeDifyController.java

@@ -63,6 +63,9 @@ public class KnowledgeDifyController extends BaseController {
                 case "6":   //案例讨论
                     model.addAttribute("difySrc", difySrc + "LzY2NuohCsayFwmG");
                     break;
+                case "10":   //项目案例资料
+                    model.addAttribute("difySrc", difySrc + "J2a3lQCLhywC8vYV");
+                    break;
                 default:
                     model.addAttribute("difySrc", difySrc + "LlXD0YzBLGPKBlqb");
                     break;

+ 9 - 0
src/main/java/com/jeeplus/modules/knowledgeSharing/entity/KnowledgeSharingInfo.java

@@ -34,6 +34,7 @@ public class KnowledgeSharingInfo extends DataEntity<KnowledgeSharingInfo> {
     private Office company;		// 公司ID
     private String viewUserId;		// 查看人员id
     private String readFlag;		// 查看结果(是否已浏览)
+    private String projectId;		// 关联的项目id
 
     private String isSync; //是否同步
 
@@ -194,4 +195,12 @@ public class KnowledgeSharingInfo extends DataEntity<KnowledgeSharingInfo> {
     public void setReadFlag(String readFlag) {
         this.readFlag = readFlag;
     }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
 }

+ 90 - 0
src/main/java/com/jeeplus/modules/knowledgeSharing/service/KnowledgeSharingDetailsService.java

@@ -48,6 +48,10 @@ public class KnowledgeSharingDetailsService extends CrudService<KnowledgeSharing
         return super.get(id);
     }
 
+    public List<KnowledgeSharingInfo> getByProjectId(String projectId) {
+        return dao.getByProjectId(projectId);
+    }
+
     public List<KnowledgeSharingInfo> findList(KnowledgeSharingInfo knowledgeSharingInfo) {
         List<KnowledgeSharingInfo> list = super.findList(knowledgeSharingInfo);
         return list;
@@ -148,6 +152,9 @@ public class KnowledgeSharingDetailsService extends CrudService<KnowledgeSharing
             case "6":
                 columnName = "案例讨论";
                 break;
+            case "10":
+                columnName = "项目案例资料";
+                break;
             default:
                 columnName = "学习园地";
                 break;
@@ -161,6 +168,19 @@ public class KnowledgeSharingDetailsService extends CrudService<KnowledgeSharing
         return knowledgeBaseList.isEmpty() ? null : knowledgeBaseList.get(0).getId();
     }
 
+    /**
+     * 根据id获取dify的分类id
+     */
+    public String getTypeIdByCaseBase(String columnId) throws Exception {
+        String columnName = "项目案例资料";
+        KnowledgeBase knowledgeBase = new KnowledgeBase();
+        knowledgeBase.setName(columnName);
+        JSONObject jsonObject = DifyApiClient.selectKnowledgeBaseList(1, 999, knowledgeBase);
+        JSONArray data = jsonObject.getJSONArray("data");
+        List<KnowledgeBase> knowledgeBaseList = JSON.parseArray(data.toString(), KnowledgeBase.class);
+        return knowledgeBaseList.isEmpty() ? null : knowledgeBaseList.get(0).getId();
+    }
+
 
     /**
      * 判断文件类型
@@ -520,4 +540,74 @@ public class KnowledgeSharingDetailsService extends CrudService<KnowledgeSharing
     public void deleteComment(String id) {
         dao.deleteComment(id);
     }
+
+    /**
+     * 将案例文件附件同步至dify
+     *
+     * @param knowledgeSharingInfo1
+     */
+    @Transactional(readOnly = false)
+    @Async
+    public void caseBaseSynchronizationToDify(KnowledgeSharingInfo knowledgeSharingInfo1, String saveFlag) throws Exception {
+        try {
+            KnowledgeSharingInfo knowledgeSharingInfo = new KnowledgeSharingInfo();
+            knowledgeSharingInfo.setId(knowledgeSharingInfo1.getId());
+            knowledgeSharingInfo.setColumnId(knowledgeSharingInfo1.getColumnId());
+            List<Workattachment> workattachments = knowledgeSharingInfo1.getWorkAttachments();
+            //如果没有附件,默认同步成功,无需执行同步
+            if (workattachments.isEmpty()) {
+                knowledgeSharingInfo1.setIsSync("1");
+                return;
+            }
+            //找到对应的分类名称
+            String typeId = getTypeIdByColumnId(knowledgeSharingInfo.getColumnId());
+            //处理附件,转为输入流
+            String aliyunUrl = Global.getAliyunUrl();
+            String aliDownloadUrl = Global.getAliDownloadUrl();
+            // 判断文件是否完全同步的状态
+            String allSyncStatus = "1";
+            for (Workattachment attachment : workattachments) {
+                String file = attachment.getUrl();
+                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                // 文件类型不合法的话,跳过当前文件
+                if (!isAllowedFileType(fileName)) {
+                    allSyncStatus = "0";
+                    continue;
+                }
+                String cons = "";
+                byte[] fileBytes;
+                if ("1".equals(saveFlag)) {
+                    //String key = file.split(cons + "/")[1];
+                    if (file.startsWith("/")) {
+                        file = file.substring(1);  // 去掉最前面的 "/"
+                    }
+                    // 转为 byte[] 数组
+                    fileBytes = new OSSClientUtil().downBytesByStream(file, fileName);
+                } else {
+                    if (file.contains(aliyunUrl)) {
+                        cons = aliyunUrl;
+                    } else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
+                        cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+                    } else {
+                        cons = aliDownloadUrl;
+                    }
+                    String key = file.split(cons + "/")[1];
+                    fileBytes = new OSSClientUtil().downBytesByStream(key, fileName);
+                }
+                try (InputStream inputStream = new ByteArrayInputStream(fileBytes)) {
+                    DifyApiClient.createByFileDifyApi(inputStream, attachment.getAttachmentName(), typeId);
+                }
+            }
+            knowledgeSharingInfo1.setIsSync(allSyncStatus);
+        } catch (Exception e) {
+            knowledgeSharingInfo1.setIsSync("0");
+        }
+        KnowledgeSharingInfo t = get(knowledgeSharingInfo1.getId());//从数据库取出记录的值
+        MyBeanUtils.copyBeanNotNull2Bean(knowledgeSharingInfo1, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        t.setOffice(UserUtils.getSelectOffice());
+        t.setCompany(UserUtils.getSelectCompany());
+        t.setModerator("系统管理员");
+        //添加信息
+        super.save(t);
+    }
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/knowledgeSharing/web/KnowledgeBaseController.java

@@ -106,6 +106,9 @@ public class KnowledgeBaseController {
                 case "6":   //案例讨论
                     model.addAttribute("difySrc", difySrc + "LzY2NuohCsayFwmG");
                     break;
+                case "10":   //项目案例资料
+                    model.addAttribute("difySrc", difySrc + "J2a3lQCLhywC8vYV");
+                    break;
                 default:
                     model.addAttribute("difySrc", difySrc + "LlXD0YzBLGPKBlqb");
                     break;

+ 8 - 1
src/main/java/com/jeeplus/modules/projectAccessory/dao/ProjectTemplateDao.java

@@ -49,6 +49,13 @@ public interface ProjectTemplateDao extends CrudDao<ProjectTemplateInfo>,TreeDao
      * @return
      */
     List<ProjectTemplateInfo> projectAccessoryListByParentId(ProjectAccessoryRelationInfo projectTemplateInfo);
+
+    /**
+     * 根据父id获取子信息
+     * @param parentId
+     * @return
+     */
+    List<ProjectTemplateInfo> getCaseBaseAccessoryListByParentId(String parentId);
     /**
      * 根据父id获取子信息并保留当前id项
      * @param parentId
@@ -86,7 +93,7 @@ public interface ProjectTemplateDao extends CrudDao<ProjectTemplateInfo>,TreeDao
      * @param name
      * @return
      */
-    ProjectTemplateInfo getProjectTemplateInfoByName(String name);
+    ProjectTemplateInfo getProjectTemplateInfoByName(@Param("name") String name,@Param("parentId") String parentId);
 
 
     ProjectTemplateInfo getProjectType(String id);

+ 67 - 7
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -396,7 +396,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             mainDictValueList.add(mainDict.getValue());
         }
         relateInfo.setAttachTypeList(mainDictValueList);
-        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType, projectRecords.getCaseStatus());
         Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
         for (MainDictDetail mainDict : mainDictDetails) {
             switch (mainDict.getValue()) {
@@ -450,6 +450,17 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                         }
                     }
                     break;
+
+                case "14":	//案例文件
+                    if(StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+                        for (String key: stringListMap.keySet()) {
+                            if(key.contains("14")){
+                                List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+                                projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+                            }
+                        }
+                    }
+                    break;
             }
         }
     }
@@ -481,7 +492,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             mainDictValueList.add(mainDict.getValue());
         }
         relateInfo.setAttachTypeList(mainDictValueList);
-        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType, projectRecords.getCaseStatus());
         Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
         for (MainDictDetail mainDict : mainDictDetails) {
             switch (mainDict.getValue()) {
@@ -535,6 +546,17 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                         }
                     }
                     break;
+
+                case "14":	//案例文件
+                    if(org.apache.commons.lang3.StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+                        for (String key: stringListMap.keySet()) {
+                            if(key.contains("14")){
+                                List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+                                projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+                            }
+                        }
+                    }
+                    break;
             }
         }
     }
@@ -566,7 +588,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             mainDictValueList.add(mainDict.getValue());
         }
         relateInfo.setAttachTypeList(mainDictValueList);
-        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType, projectRecords.getCaseStatus());
         Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
         for (MainDictDetail mainDict : mainDictDetails) {
             switch (mainDict.getValue()) {
@@ -620,6 +642,17 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                         }
                     }
                     break;
+
+                case "14":	//案例文件
+                    if(org.apache.commons.lang3.StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+                        for (String key: stringListMap.keySet()) {
+                            if(key.contains("14")){
+                                List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+                                projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+                            }
+                        }
+                    }
+                    break;
             }
         }
     }
@@ -651,7 +684,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             mainDictValueList.add(mainDict.getValue());
         }
         relateInfo.setAttachTypeList(mainDictValueList);
-        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType, projectRecords.getCaseStatus());
         Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
         for (MainDictDetail mainDict : mainDictDetails) {
             switch (mainDict.getValue()) {
@@ -705,6 +738,17 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                         }
                     }
                     break;
+
+                case "14":	//案例文件
+                    if(org.apache.commons.lang3.StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+                        for (String key: stringListMap.keySet()) {
+                            if(key.contains("14")){
+                                List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+                                projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+                            }
+                        }
+                    }
+                    break;
             }
         }
     }
@@ -714,9 +758,13 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
      * @param projectTemplateInfo
      * @return
      */
-    public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo,String screenType){
+    public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo,String screenType,String caseStatus){
         //查询所有被选择为必填项展示列,并查询附件信息
         List<ProjectTemplateInfo> projectTemplateList = dao.getProjectTemplateAllList(projectTemplateInfo);
+        if (StringUtils.isNotBlank(caseStatus) && "5".equals(caseStatus)) {
+            List<ProjectTemplateInfo> caseBaseProjectTemplateList = dao.getCaseBaseAccessoryListByParentId("14");
+            projectTemplateList.addAll(caseBaseProjectTemplateList);
+        }
         //查询所有分类下的所有附件信息
         List<String> attachmentIdList = Lists.newArrayList();
         for (ProjectTemplateInfo info: projectTemplateList) {
@@ -741,8 +789,12 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                     info.setWorkAttachments(attachments);
                 }
             }
+            if(info.getParentIds().equals("0,14,")){
+                System.out.println("213124512");
+
+            }
             //判断是否为必填项,若为必填项则添加必填判定字段
-            if(info.getRequiredStage() == projectTemplateInfo.getRequiredStage() || (null != projectTemplateInfo.getRequiredStageList() && projectTemplateInfo.getRequiredStageList().contains(info.getRequiredStage()))){
+            if(null !=info.getRequiredStage() && (info.getRequiredStage() == projectTemplateInfo.getRequiredStage() || (null != projectTemplateInfo.getRequiredStageList() && projectTemplateInfo.getRequiredStageList().contains(info.getRequiredStage())))){
                 info.setMustFlag(1);
                 //判定必填项的下的是否有附件信息
                 if (attachments.size()!=0){
@@ -806,13 +858,21 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
         workattachmentService.clientAttachmentManageOnUrl(otherAttachmentList);
         //对查询出来的文件数据进行分组
         Map<String, List<WorkClientAttachment>> otherStringListMap = dataMessageAttachmentDispose(otherAttachmentList);
+        List<String> projectTemplateIdList = Lists.newArrayList();
+        String projectTemplateIds = "";
+        for (ProjectTemplateInfo info: projectTemplateList) {
+            projectTemplateIdList.add(info.getId());
+        }
+        if(projectTemplateIdList.size()>0){
+            projectTemplateIds = StringUtils.join(projectTemplateIdList, ",");
+        }
         //将分组后的数据放到对应的数据分支中
         for (ProjectTemplateInfo info: otherProjectTemplateList) {
             for (String key : otherStringListMap.keySet()) {
                 if (info.getId().equals(key)) {
                     List<WorkClientAttachment> attachments = otherStringListMap.get(key);
                     //判断是否为必填项,若为必填项则添加必填判定字段
-                    if(attachments.size()>0){
+                    if(attachments.size()>0 && !projectTemplateIds.contains(info.getId())){
                         info.setWorkAttachments(attachments);
                         info.setMustFlag(0);
                         projectTemplateList.add(info);

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectMaterialDefectRecord.java

@@ -57,6 +57,7 @@ public class ProjectMaterialDefectRecord extends ActEntity<ProjectMaterialDefect
 	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
 	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
 	private List<ProjectTemplateInfo> fileOtherList;   //其他文件
+	private List<ProjectTemplateInfo> fileCaseBaseList;   //案例文件
 	private ProjectReportData projectReportData;		// 报告信息(仅作为展示用)
 	private List<String> chargeCriterionList;	//合同收费标准
 
@@ -378,6 +379,14 @@ public class ProjectMaterialDefectRecord extends ActEntity<ProjectMaterialDefect
 		this.fileOtherList = fileOtherList;
 	}
 
+	public List<ProjectTemplateInfo> getFileCaseBaseList() {
+		return fileCaseBaseList;
+	}
+
+	public void setFileCaseBaseList(List<ProjectTemplateInfo> fileCaseBaseList) {
+		this.fileCaseBaseList = fileCaseBaseList;
+	}
+
 	public String getHoldFlag() {
 		return holdFlag;
 	}

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectReportRecord.java

@@ -64,6 +64,7 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
 	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
 	private List<ProjectTemplateInfo> fileOtherList;   //其他文件
+	private List<ProjectTemplateInfo> fileCaseBaseList;   //其他文件
 	private ProjectReportData projectReportData;		// 报告信息(仅作为展示用)
 	private List<String> chargeCriterionList;	//合同收费标准
 	private List<WorkReviewAudit> projectReviewList;	//复核抽查标准
@@ -402,6 +403,14 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 		this.fileOtherList = fileOtherList;
 	}
 
+	public List<ProjectTemplateInfo> getFileCaseBaseList() {
+		return fileCaseBaseList;
+	}
+
+	public void setFileCaseBaseList(List<ProjectTemplateInfo> fileCaseBaseList) {
+		this.fileCaseBaseList = fileCaseBaseList;
+	}
+
 	public String getHoldFlag() {
 		return holdFlag;
 	}

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java

@@ -66,6 +66,7 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
 	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
 	private List<ProjectTemplateInfo> fileOtherList;   //其他文件
+	private List<ProjectTemplateInfo> fileCaseBaseList;   //案例文件
 	private List<ProjectTemplateInfo> overAllFileGistdataList;   //全过程依据性文件
 
 	private List<String> chargeCriterionList;	//合同收费标准
@@ -343,6 +344,14 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 		this.fileOtherList = fileOtherList;
 	}
 
+	public List<ProjectTemplateInfo> getFileCaseBaseList() {
+		return fileCaseBaseList;
+	}
+
+	public void setFileCaseBaseList(List<ProjectTemplateInfo> fileCaseBaseList) {
+		this.fileCaseBaseList = fileCaseBaseList;
+	}
+
 	public List<RuralReportConsultant> getReportedConsultantList() {
 		return reportedConsultantList;
 	}

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

@@ -650,7 +650,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 				//判定为非全过程项目进行备考表信息处理
 				if(!"3".equals(record.getProjectType())){
 					//查询其他资料对应附件结构信息
-					ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+					ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 					//获取上传阿里云盘文件地址
 					String uploadFilePath = downloadReference(reportRecord, record);
 					if(StringUtils.isNotBlank(uploadFilePath)){
@@ -1084,7 +1084,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 						//判定为非全过程项目进行备考表信息处理
 						if(!"3".equals(record.getProjectType())){
 							//查询其他资料对应附件结构信息
-							ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+							ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 							//获取上传阿里云盘文件地址
 							String uploadFilePath = downloadReference(reportRecord, record);
 							if(StringUtils.isNotBlank(uploadFilePath)){
@@ -1675,7 +1675,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 			//获取项目信息
 			RuralProjectRecords record = ruralProjectRecordsService.getById(reportRecord.getReport().getProject().getId());
 			//查询其他资料对应附件结构信息
-			ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+			ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 
 			//生成文件目录
 			//获取上传阿里云盘文件地址
@@ -1846,7 +1846,7 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 						//判定为非全过程项目进行备考表信息处理
 						if(!"3".equals(record.getProjectType())){
 							//查询其他资料对应附件结构信息
-							ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+							ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 							//获取上传阿里云盘文件地址
 							String uploadFilePath = downloadReference(reportRecord, record);
 							if(StringUtils.isNotBlank(uploadFilePath)){

+ 1 - 1
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectPlanService.java

@@ -70,7 +70,7 @@ public class ProjectPlanService extends CrudService<ProjectPlanDao, ProjectPlanI
 
         //项目计划生成excel文件并保存到项目档案信息中
         //查询其他资料对应附件结构信息
-        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询企业作业计划书或咨询实施规划及细则");
+        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询企业作业计划书或咨询实施规划及细则", "13");
 
         Set masterIdSet = new HashSet();
         //项目计划信息

+ 6 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java

@@ -499,4 +499,10 @@ public interface RuralProjectRecordsDao extends CrudDao<RuralProjectRecords> {
      * @return
      */
     List<RuralReportConsultant> getFZRReportConsultantByProjectId(String id);
+
+    /**
+     * 根据项目id查询该项目案例状态
+     * @param projectId
+     */
+    String getCaseBaseStatusByProjectId(String projectId);
 }

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

@@ -46,6 +46,7 @@ public class RuralProjectcontentinfo extends TreeEntity<RuralProjectcontentinfo>
 	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
 	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
 	private List<ProjectTemplateInfo> fileOtherList;   //其他文件
+	private List<ProjectTemplateInfo> fileCaseBaseList;   //案例文件
 
 	private String reportedId;
 
@@ -231,6 +232,14 @@ public class RuralProjectcontentinfo extends TreeEntity<RuralProjectcontentinfo>
 		this.fileOtherList = fileOtherList;
 	}
 
+	public List<ProjectTemplateInfo> getFileCaseBaseList() {
+		return fileCaseBaseList;
+	}
+
+	public void setFileCaseBaseList(List<ProjectTemplateInfo> fileCaseBaseList) {
+		this.fileCaseBaseList = fileCaseBaseList;
+	}
+
 	public String getReportedId() {
 		return reportedId;
 	}

+ 1 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/ProjectPaperFilingService.java

@@ -486,7 +486,7 @@ public class ProjectPaperFilingService extends CrudService<ProjectPaperFilingDao
                         if (CollectionUtils.isNotEmpty(paperFiling.getWorkAttachments())){
                             for (WorkClientAttachment workAttachment : paperFiling.getWorkAttachments()) {
                                 //查询其他资料对应附件结构信息
-                                ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+                                ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 
                                 //将备考表添加到附件中
                                 Workattachment workattachment = new Workattachment();

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

@@ -3288,7 +3288,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
 
         //查询其他资料对应附件结构信息
-        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 
         //生成文件目录
         //获取上传阿里云盘文件地址

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

@@ -386,7 +386,7 @@ public class RuralProjectRecordTwoService  extends CrudService<RuralProjectMessa
         }
 
         //查询其他资料对应附件结构信息
-        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+        ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
 
         //生成文件目录
         //获取上传阿里云盘文件地址

+ 60 - 40
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -943,7 +943,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		}*/
 		//项目送审之后处理项目合同文件信息
 		//查询咨询合同附件类型id
-		ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同");
+		ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同", "13");
 		//删除该项目咨询合同类型中老合同对应的附件信息
 		WorkClientAttachment attchment = new WorkClientAttachment();
 		attchment.setAttachmentId(projectTemplateInfo.getId());
@@ -1074,7 +1074,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 		//项目送审之后处理项目合同文件信息
 		//查询咨询合同附件类型id
-		ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同");
+		ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同", "13");
 		//删除该项目咨询合同类型中老合同对应的附件信息
 		WorkClientAttachment attchment = new WorkClientAttachment();
 		attchment.setAttachmentId(projectTemplateInfo.getId());
@@ -2939,7 +2939,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	 * 文件展示数据处理
 	 * @param mainDictDetails
 	 * @param relateInfo
-	 * @param engineeringId
+	 * @param engineeringId = {ArrayList@16602}  size = 15… View
 	 * @param projectRecords
 	 * @param projectcontentinfo
 	 */
@@ -2952,7 +2952,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			mainDictValueList.add(mainDict.getValue());
 		}
 		relateInfo.setAttachTypeList(mainDictValueList);
-		List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo);
+		List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,projectRecords.getCaseStatus());
 		Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
 		for (MainDictDetail mainDict : mainDictDetails) {
 			switch (mainDict.getValue()) {
@@ -2998,7 +2998,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 						}
 					}
 					break;
-				case "13":
+				case "13":	//其他文件
 					for (String key: stringListMap.keySet()) {
 						if(key.contains("13")){
 							List<ProjectTemplateInfo> fileOtherList = stringListMap.get(key);
@@ -3006,6 +3006,16 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 						}
 					}
 					break;
+				case "14":	//案例文件
+					if(StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+						for (String key: stringListMap.keySet()) {
+							if(key.contains("14")){
+								List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+								projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+							}
+						}
+					}
+					break;
 			}
 		}
 	}
@@ -3144,9 +3154,13 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	 * @param projectTemplateInfo
 	 * @return
 	 */
-	public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo){
+	public List<ProjectTemplateInfo> getProjectTemplateViewList(ProjectAccessoryRelationInfo projectTemplateInfo,String caseStatus){
 		//查询所有被选择为必填项展示列,并查询附件信息
 		List<ProjectTemplateInfo> projectTemplateList = projectTemplateDao.getProjectTemplateAllList(projectTemplateInfo);
+		if (StringUtils.isNotBlank(caseStatus) && "5".equals(caseStatus)) {
+			List<ProjectTemplateInfo> caseBaseProjectTemplateList = projectTemplateDao.getCaseBaseAccessoryListByParentId("14");
+			projectTemplateList.addAll(caseBaseProjectTemplateList);
+		}
 		//查询所有分类下的所有附件信息
 		List<String> attachmentIdList = Lists.newArrayList();
 		for (ProjectTemplateInfo info: projectTemplateList) {
@@ -3171,23 +3185,6 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				}
 			}
 		}
-
-		/*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);
 
@@ -3204,13 +3201,21 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		workattachmentService.clientAttachmentManageOnUrl(otherAttachmentList);
 		//对查询出来的文件数据进行分组
 		Map<String, List<WorkClientAttachment>> otherStringListMap = dataMessageAttachmentDispose(otherAttachmentList);
+		List<String> projectTemplateIdList = Lists.newArrayList();
+		String projectTemplateIds = "";
+		for (ProjectTemplateInfo info: projectTemplateList) {
+			projectTemplateIdList.add(info.getId());
+		}
+		if(projectTemplateIdList.size()>0){
+			projectTemplateIds = com.jeeplus.common.utils.StringUtils.join(projectTemplateIdList, ",");
+		}
 		//将分组后的数据放到对应的数据分支中
 		for (ProjectTemplateInfo info: otherProjectTemplateList) {
 			for (String key : otherStringListMap.keySet()) {
 				if (info.getId().equals(key)) {
 					List<WorkClientAttachment> attachments = otherStringListMap.get(key);
 					//判断是否为必填项,若为必填项则添加必填判定字段
-					if(attachments.size()>0){
+					if(attachments.size()>0 && !projectTemplateIds.contains(info.getId())){
 						info.setWorkAttachments(attachments);
 						info.setMustFlag(0);
 						projectTemplateList.add(info);
@@ -3220,21 +3225,6 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 		}
 
-		/*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;
 	}
 
@@ -3425,13 +3415,16 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileAttachmentList();
 		List<ProjectTemplateInfo> gistdataList = ruralProjectcontentinfo.getFileGistdataList();
 		List<ProjectTemplateInfo> otherAttachMentList = ruralProjectcontentinfo.getFileOtherList();
+		List<ProjectTemplateInfo> caseBaseAttachMentList = ruralProjectcontentinfo.getFileCaseBaseList();
 
 		List<ProjectTemplateInfo> attachmentList = disposeDataAttachment(fileAttachmentList);
 		List<ProjectTemplateInfo> gistList = disposeDataAttachment(gistdataList);
 		List<ProjectTemplateInfo> otherList = disposeDataAttachment(otherAttachMentList);
+		List<ProjectTemplateInfo> caseBaseList = disposeDataAttachment(caseBaseAttachMentList);
 		ruralProjectcontentinfo.setFileAttachmentList(attachmentList);
 		ruralProjectcontentinfo.setFileGistdataList(gistList);
 		ruralProjectcontentinfo.setFileOtherList(otherList);
+		ruralProjectcontentinfo.setFileCaseBaseList(caseBaseList);
 	}
 
 	public List<ProjectTemplateInfo> disposeDataAttachment(List<ProjectTemplateInfo> fileAttachmentList){
@@ -4314,7 +4307,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 			//项目送审之后处理项目合同文件信息
 			//查询咨询合同附件类型id
-			ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同");  //根据名称查询信息    11
+			ProjectTemplateInfo projectTemplateInfo = projectTemplateDao.getProjectTemplateInfoByName("咨询合同", "13");  //根据名称查询信息    11
 			//删除该项目咨询合同类型中老合同对应的附件信息   是不是就是合同附件表
 			WorkClientAttachment attchment = new WorkClientAttachment();
 			attchment.setAttachmentId(projectTemplateInfo.getId());
@@ -5676,6 +5669,25 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 										"待通知",
 										notifyRole));
 				//在外面新建实体类,在这里赋值,最后运行
+				//完成案例库审核后需要给项目创建人发送一个代办
+				if (records == null || StringUtils.isBlank(records.getId()) || StringUtils.isBlank(records.getCreateBy().getId())) {
+				}else{
+					String caseBaseContentStr = "待处理,请及时完善报告号为:" +records.getProjectReportNumber()+ " 的案例项目档案信息。";
+					String caseBaseTitleStr = "完善报告号为:" +records.getProjectReportNumber()+ " 的案例项目档案信息,待处理";
+					String caseBaseRemark = "待处理";
+					WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(
+							records.getId(),
+							records.getCreateBy(),
+							UserUtils.getSelectCompany().getId(),
+							caseBaseTitleStr, caseBaseContentStr, "113", "0", caseBaseRemark, "");
+					List<String> userIds = new ArrayList<>();
+					userIds.add(records.getCreateBy().getId());
+					workProjectNotify.setUser(records.getCreateBy());
+					workProjectNotify.setId("");
+					workProjectNotify.setNotifyRole("");
+					workProjectNotifyService.save(workProjectNotify);
+				}
+
 
 			} else {//流程结束但没正常结束0.0
 				WorkProjectNotify notify = new WorkProjectNotify();
@@ -6267,4 +6279,12 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	public RuralProjectRecords findUseableByProjectName(String projectName) {
     	return dao.findUseableByProjectName(projectName);
 	}
+
+	public RuralProjectRecords getCaseBaseByProjectId(RuralProjectRecords projectRecords) {
+		String caseStatus = dao.getCaseBaseStatusByProjectId(projectRecords.getId());
+		if(StringUtils.isNotBlank(caseStatus) && "5".equals(caseStatus)){
+			projectRecords.setCaseStatus(caseStatus);
+		}
+		return projectRecords;
+	}
 }

+ 181 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewTwoController.java

@@ -7,12 +7,16 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo;
+import com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingView;
+import com.jeeplus.modules.knowledgeSharing.service.KnowledgeSharingDetailsService;
+import com.jeeplus.modules.projectAccessory.dao.ProjectTemplateDao;
 import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportDataTwo;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
@@ -26,12 +30,15 @@ import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsServic
 import com.jeeplus.modules.sys.dao.OfficeDao;
 import com.jeeplus.modules.sys.dao.UserDao;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
-import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.UserService;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -65,11 +72,11 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
     @Autowired
     private ProjectReportDataService projectReportDataService;
     @Autowired
-    private ProjectContentDataService projectContentDataService;
+    private ProjectTemplateDao projectTemplateDao;
     @Autowired
     private ProjectcontentinfoService projectcontentinfoService;
     @Autowired
-    private ProjectReportChangeService projectReportChangeService;
+    private WorkProjectNotifyService workProjectNotifyService;
     @Autowired
     protected HistoryService historyService;
     @Autowired
@@ -94,6 +101,10 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
     private RestTemplate restTemplate;
     @Autowired
     private OfficeDao officeDao;
+    @Autowired
+    private WorkattachmentService workattachmentService;
+    @Autowired
+    private KnowledgeSharingDetailsService knowledgeSharingDetailsService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -249,6 +260,108 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
     }
 
     /**
+     * 根据信息获取归档信息并调转页面
+     */
+    @RequestMapping(value = "formCaseBase")
+    public String formCaseBase(ProjectReportRecord projectReportRecord, Model model) throws Exception {
+        //查询“配农网”工程类型id
+        String engineeringId = engineeringService.getEngineeringId("202");
+        if (StringUtils.isBlank(projectReportRecord.getView()) || !projectReportRecord.getView().equals("view")){
+            if(StringUtils.isBlank(projectReportRecord.getId())){
+                projectReportRecord.setCreateDate(new Date());
+                projectReportRecord.setCreateBy(UserUtils.getUser());
+            }
+        }
+        ProjectReportData projectReportData = new ProjectReportData();
+        ProjectRecords projectRecords = new ProjectRecords();
+        projectReportData.setFileStatus("1");
+        ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(projectReportRecord.getReportId());
+        if(null != reportData){
+            if (StringUtils.isBlank(projectReportRecord.getView()) || !projectReportRecord.getView().equals("view")){
+                synchronized (SYN_BYTE) {
+                    int count = projectReportRecordService.getNumber(reportData.getId());
+                    projectReportRecord.setRecordNum(count>9?reportData.getNumber()+"-"+count+"":reportData.getNumber()+"-"+"0"+count);
+                }
+            }else{
+                ProjectReportRecord projectReportRecordInfo =ruralProjectMessageService.getProjectReportRecord(reportData.getId());
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecordInfo, projectReportRecord);
+            }
+        }
+        //获取项目信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReportId());
+        MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
+        //获取合同信息
+        WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(projectRecords.getWorkContractInfo().getId());
+        projectRecords.setWorkContractInfo(projectContractInfo);
+        reportData.setProject(projectRecords);
+        projectReportRecord.setReport(reportData);
+        projectReportRecord.setUploadMode(uploadMode);
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+
+        ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+        //添加项目类型
+        relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+        relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+        //判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+        String money=ruralProjectRecords.getSubmitMoney();
+        Integer approvalMoney=null;
+        if(StringUtils.isBlank(money)){
+            approvalMoney=1;
+        }else{
+            approvalMoney=Integer.parseInt(money);
+        }
+        switch (approvalMoney){
+            case 0:
+                //金额为0
+                relateInfo.setAttachmentProjectApprovalMoney(null);
+                break;
+            case 1:
+                //500w以下金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("1");
+                break;
+            case 2:
+                //500w以上金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("2");
+                break;
+        }
+
+        //添加报告类型
+        relateInfo.setRequiredStage(2);
+        relateInfo.setId(ruralProjectRecords.getId());
+        //查询项目是否时案例项目
+        ruralProjectRecords = projectRecordsService.getCaseBaseByProjectId(ruralProjectRecords);
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        //文件处理
+        projectTemplateService.disposeProjectTemplateFile(mainDictDetails,relateInfo,engineeringId,ruralProjectRecords,projectReportRecord,"1000");
+
+        if(null != projectContractInfo){
+            if(projectContractInfo.getWorkClientInfoList().size()>0){
+                model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+            }
+        }
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")){
+            ProcessInstance processInstance = actTaskService.getProcIns(projectReportRecord.getProcessInstanceId());
+            if (processInstance!=null) {
+                Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+                Act act = new Act();
+                act.setTaskId(taskInfok.getId());
+                act.setTaskName(taskInfok.getName());
+                act.setProcDefId(taskInfok.getProcessDefinitionId());
+                act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                act.setProcInsId(taskInfok.getProcessInstanceId());
+                act.setTask(taskInfok);
+                projectReportRecord.setAct(act);
+            }
+            return "modules/projectcontentinfo/projectReportRecordModiftApply";
+        }
+        return "modules/projectcontentinfo/projectReportRecordCaseBaseForm";
+    }
+
+    /**
      * 暂存报告归档
      * @param projectReportRecord
      * @param model
@@ -899,6 +1012,70 @@ public class RuralCostProjectMessageNewTwoController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
     }
 
+
+    /**
+     * 保存项目案例文件,并进行处理
+     */
+    @RequestMapping(value = "saveCaseBaseRecord")
+    public String saveCaseBaseRecord(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes,Integer saveAuditFlag) throws Exception{
+        //获取项目信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReport().getProject().getId());
+        addMessage(redirectAttributes, "案例数据保存成功");
+
+
+        //对上传的文件进行同步到dify
+        //查询案例相关的文件
+        //获取案例类型参数
+        List<ProjectTemplateInfo> caseBaseProjectTemplateList = projectTemplateDao.getCaseBaseAccessoryListByParentId("14");
+        List<Workattachment> attachmentAllList = Lists.newArrayList();
+        for (ProjectTemplateInfo projectTemplateInfo : caseBaseProjectTemplateList) {
+            //根据项目id和案例类型信息查询项目案例的所有项目
+            Workattachment workAttachment = new Workattachment();
+            workAttachment.setAttachmentId(projectTemplateInfo.getId());
+            workAttachment.setProjectId(ruralProjectRecords.getId());
+            workAttachment.setAttachmentFlag("100");
+            List<Workattachment> attachmentList = workattachmentService.getAttList(workAttachment);
+            for (Workattachment workattachment : attachmentList) {
+                workattachment.setProjectId("");
+                workattachment.setId("");
+                workattachment.setAttachmentName(ruralProjectRecords.getProjectReportNumber() + "-" + workattachment.getAttachmentName());
+            }
+            attachmentAllList.addAll(attachmentList);
+        }
+        if(attachmentAllList.size()>0){
+            //先根据id查询案例资料的知识库中是否存在数据,如果存在,则将其进行删除。
+            List<KnowledgeSharingInfo> byProjectId = knowledgeSharingDetailsService.getByProjectId(ruralProjectRecords.getId());
+            for (KnowledgeSharingInfo knowledgeSharingInfo : byProjectId) {
+                knowledgeSharingDetailsService.delete(knowledgeSharingInfo);
+            }
+
+            KnowledgeSharingInfo knowledgeSharingInfo = new KnowledgeSharingInfo();
+            knowledgeSharingInfo.setColumnId("10");
+            knowledgeSharingInfo.setSubject(ruralProjectRecords.getProjectName() + "案例资料文件");
+            knowledgeSharingInfo.setWorkAttachments(attachmentAllList);
+            knowledgeSharingInfo.setCreateBy(UserUtils.getUser());
+            knowledgeSharingInfo.setCreateDate(new Date());
+            knowledgeSharingInfo.setUpdateBy(UserUtils.getUser());
+            knowledgeSharingInfo.setUpdateDate(new Date());
+            knowledgeSharingInfo.setProjectId(ruralProjectRecords.getId());
+            knowledgeSharingDetailsService.save(knowledgeSharingInfo);
+            knowledgeSharingDetailsService.saveToDify(knowledgeSharingInfo, "1");
+        }
+
+        if (StringUtils.isNotBlank(projectReportRecord.getHome()) && "home".equals(projectReportRecord.getHome())) {
+            //修改代办状态
+            workProjectNotifyService.updateCaseBaseNotifyStatus(ruralProjectRecords.getId(), "113");
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getHome()) && "notifyList".equals(projectReportRecord.getHome())) {
+            //修改代办状态
+            workProjectNotifyService.updateCaseBaseNotifyStatus(ruralProjectRecords.getId(), "113");
+            return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+        }
+        //跳转到个人案例项目页面
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/RuralProjectRecordsOwnCaseBase/?repage";
+    }
+
+
     public void sendProjectInfoDataToCloud(ProjectReportRecord reportData){
         String pathFlagStr = Global.getConfig("SZ_PATH_flag");
         boolean pathFlag = Boolean.parseBoolean(pathFlagStr);

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

@@ -12,6 +12,9 @@ import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
 import jersey.repackaged.com.google.common.collect.Lists;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -40,6 +44,8 @@ public class RuralProjectRecordsCaseBaseController extends BaseController {
     private RuralProjectRecordsService projectRecordsService;
     @Autowired
     private RuralProjectRecordsCaseBaseService caseBaseService;
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
 
     @ModelAttribute
     public RuralProjectRecords get(@RequestParam(required=false) String id) {
@@ -144,6 +150,7 @@ public class RuralProjectRecordsCaseBaseController extends BaseController {
     @RequestMapping("selectCaseBase")
     @ResponseBody
     public Map selectCaseBase(RuralProjectRecords records){
+        //根据项目id查询项目信息
         Map map = new HashMap();
         records.setId(records.getProjectId());
         List<RuralProjectRecords> list = projectRecordsService.findCaseBaseList(records);
@@ -156,8 +163,34 @@ public class RuralProjectRecordsCaseBaseController extends BaseController {
         }else {
             caseBaseService.insertCaseBase(records);
         }
-        map.put("result",1);
-        map.put("msg","选定为案例项目成功");
+        //获取项目信息
+        records = projectRecordsService.get(records.getProjectId());
+        //查询项目是否时案例项目
+        records = projectRecordsService.getCaseBaseByProjectId(records);
+        if(StringUtils.isNotBlank(records.getCaseStatus()) && records.getCaseStatus().equals("5")){
+            //处理完选定为案例项目之后,需要给项目创建人发送代办
+            String caseBaseContentStr = "待处理,请及时完善报告号为:" +records.getProjectReportNumber()+ " 的案例项目档案信息。";
+            String caseBaseTitleStr = "完善报告号为:" +records.getProjectReportNumber()+ " 的案例项目档案信息,待处理";
+            String caseBaseRemark = "待处理";
+            WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(
+                    records.getId(),
+                    records.getCreateBy(),
+                    UserUtils.getSelectCompany().getId(),
+                    caseBaseTitleStr, caseBaseContentStr, "113", "0", caseBaseRemark, "");
+            List<String> userIds = new ArrayList<>();
+            userIds.add(records.getCreateBy().getId());
+            workProjectNotify.setUser(records.getCreateBy());
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("");
+            workProjectNotifyService.save(workProjectNotify);
+
+            map.put("result",1);
+            map.put("msg","选定为案例项目成功");
+        }else{
+            map.put("result",0);
+            map.put("msg","选定为案例项目失败");
+        }
+
         return map;
     }
 

+ 132 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java

@@ -0,0 +1,132 @@
+package com.jeeplus.modules.ruralprojectrecords.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsCaseBaseService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import jersey.repackaged.com.google.common.collect.Lists;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Controller
+@RequestMapping(value = "${adminPath}/ruralProject/RuralProjectRecordsOwnCaseBase")
+public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
+
+    @Autowired
+    private RuralProjectRecordsCaseBaseService service;
+    @Autowired
+    private RuralProjectRecordsService projectRecordsService;
+    @Autowired
+    private RuralProjectRecordsCaseBaseService caseBaseService;
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectRecordsService.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("ruralProject:RuralProjectRecordsOwnCaseBase:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        String oldSubmitMoney = "";
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(projectRecords.getToflag())){
+            if (projectRecords.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchprojectRecordsList");
+                RuralProjectRecords search=projectRecords;
+                request.getSession().setAttribute("searchprojectRecordsList",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchprojectRecordsList")!=null){
+                projectRecords= (RuralProjectRecords) request.getSession().getAttribute("searchprojectRecordsList");
+                model.addAttribute("ruralProjectRecords", projectRecords);
+            }
+        }
+        //添加查询类型(造价审核)    1是工程咨询
+        //添加查询类型(工程咨询)
+        List<String> typeList = Lists.newArrayList();
+        String oldProjectSort = null;
+        if (StringUtils.isBlank(projectRecords.getAttachmentProjectSort())){
+            typeList.add("1");
+            typeList.add("2");
+        }else {
+            oldProjectSort=projectRecords.getAttachmentProjectSort();
+            String attachmentProjectSort=projectRecords.getAttachmentProjectSort();
+            typeList.add(attachmentProjectSort.split("-")[0]);
+            projectRecords.setAttachmentProjectSort(attachmentProjectSort.split("-")[1]);
+        }
+        projectRecords.setCreateBy(UserUtils.getUser());
+        Page<RuralProjectRecords> page = service.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
+        model.addAttribute("page", page);
+        if(null != projectRecords.getWorkContractInfo()){
+            model.addAttribute("workContractInfoName", projectRecords.getWorkContractInfo().getName());
+            if(null != projectRecords.getWorkContractInfo().getClient()){
+                model.addAttribute("workContractInfoClientName", projectRecords.getWorkContractInfo().getClient().getName());
+            }
+        }
+        //无合同状态下,获取委托方的名称
+        List<RuralProjectRecords> list = page.getList();
+        for (int i = 0; i < list.size(); i++) {
+            RuralProjectRecords records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                projectRecordsService.queryLinkmanInfos(records1);
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                    records1.getWorkContractInfo().setClientName(records1.getWorkContractInfo().getClient().getName());
+                }
+            }
+        }
+        if(StringUtils.isNotBlank(oldSubmitMoney)){
+            projectRecords.setSubmitMoney(oldSubmitMoney);
+        }
+
+        //查询是否是案例项目
+//        projectRecordsService.findCaseBaseList();
+
+        model.addAttribute("beginDate", projectRecords.getBeginDate());
+        model.addAttribute("endDate", projectRecords.getEndDate());
+        model.addAttribute("reportSwitch", BaseController.REPORTSWITCH);
+        return "modules/ruralprojectrecords/cost/ruralProjectRecordsOwnCaseBaseList";
+    }
+
+
+}

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

@@ -482,7 +482,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         ProjectReportRecord projectReportRecord = projectReportRecordService.getprojectReportRecord(record.getPrdId());
         if(null != projectReportRecord){
             //查询其他资料对应附件结构信息
-            ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+            ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料", "13");
             //生成文件目录
             //获取上传阿里云盘文件地址
             String uploadCatalogueFilePath = downloadCatalogue(record.getId());

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

@@ -764,6 +764,8 @@ public class RuralProjectViewController extends BaseController {
     public String getAccessoryView(RuralProjectRecords projectRecords, Model model) {
         if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
             projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
+            //查询项目是否时案例项目
+            projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
             RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
             projectRecordsService.disposeData(ruralProjectcontentinfo);
             //查询项目报告信息

+ 57 - 0
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -595,6 +595,35 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 
 	/**
 	 * 获取附件信息
+	 * @param workAttachment
+	 * @return
+	 */
+	public List<Workattachment> getAttList(Workattachment workAttachment){
+		List<Workattachment> list = workattachmentDao.findList(workAttachment);
+		CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
+		User loginUser = UserUtils.getUser();
+		if(StringUtils.isNotBlank(loginUser.getId())){
+			cAInfo.setOfficeId(loginUser.getOffice().getId());
+			cAInfo.setCompanyId(loginUser.getCompany().getId());
+			cAInfo.setCreateBy(loginUser);
+		}
+		//遍历附件信息,判定改附件信息是否被收藏
+		for (Workattachment info: list) {
+			cAInfo.setUrl(info.getUrl());
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo1(cAInfo);
+			if(null != collectAccessoryInfo){
+				info.setCollectFlag("1");
+			}else{
+				info.setCollectFlag("0");
+			}
+		}
+		//数据处理
+		workAttachmentManage(list);
+		return list;
+	}
+
+	/**
+	 * 获取附件信息
 	 * @param workClientAttachment
 	 * @return
 	 */
@@ -834,6 +863,34 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 			}
 		}
 	}
+	/**
+	 * 数据处理
+	 * @param list
+	 */
+	public static void workAttachmentManage(List<Workattachment> list){
+		ViewFileUtil viewFileUtil = new ViewFileUtil();
+		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
+		for (Workattachment info : list) {
+			switch (uploadMode){
+				case "1":
+					info.setUrl(bosUrl + info.getUrl());
+					break;
+				case "2":
+					info.setUrl(aliyunUrl + info.getUrl());
+					break;
+				default:
+					//获取本地服务器ip和端口号
+					String serverIPAndPort = viewFileUtil.getServerIPAndPort();
+					//创建展示附件访问方法路径
+					//String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
+					String methodAccessPath = "";
+					String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
+					//变更新的文件查看地址
+					info.setUrl(newUrl);
+					break;
+			}
+		}
+	}
 
 	/**
 	 * 数据处理

+ 3 - 0
src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java

@@ -361,6 +361,9 @@ public class WorkattachmentController extends BaseController {
 					case "6":
 						columnName = "案例讨论";
 						break;
+					case "10":
+						columnName = "项目案例资料";
+						break;
 					default:
 						columnName = "学习园地";
 						break;

+ 7 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/dao/WorkProjectNotifyDao.java

@@ -137,4 +137,11 @@ public interface WorkProjectNotifyDao extends CrudDao<WorkProjectNotify> {
     void deleteByNotifyUser(@Param("content") String content,@Param("userId")String userId);
 
     String getRemarksByProcInsId(WorkProjectNotify info);
+
+    /**
+     * 修改项目案例代办状态值
+     * @param notifyId
+     * @param type
+     */
+    void updateCaseBaseNotifyStatus(@Param("notifyId") String notifyId,@Param("type")String type);
 }

+ 4 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/service/WorkProjectNotifyService.java

@@ -310,6 +310,10 @@ public class WorkProjectNotifyService extends CrudService<WorkProjectNotifyDao,
 			workProjectNotify.preUpdate();
 			dao.updateOverDueInfo(workProjectNotify);
 	}
+	@Transactional(readOnly = false)
+	public void updateCaseBaseNotifyStatus(String projectId, String type) {
+			dao.updateCaseBaseNotifyStatus(projectId, type);
+	}
 
 	@Transactional(readOnly = false)
 	public int modifyDelflag(WorkProjectNotify workProjectNotify){

+ 195 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -7703,6 +7703,8 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
 						return "modules/workstaff/workStaffBasicInfoView";
 					}
+				} else if (workProjectNotify.getType().equals("113")) {    //工作内容报告归档
+					return this.getProjectCaseBase(workProjectNotify, model);
 				} else if ("86".equals(workProjectNotify.getType())) {    //日常事务
 					if (workProjectNotify.getRemarks().contains("待处理") && !"1".equals(workProjectNotify.getStatus())) {
 						WorkStaffBasicInfo select = new WorkStaffBasicInfo();
@@ -10994,4 +10996,197 @@ public class WorkProjectNotifyController extends BaseController {
 		return "modules/workinvoice/workInvoiceView";
 	}
 
+	/**
+	 * 业务用章申请
+	 * @param workProjectNotify
+	 * @param model
+	 * @return
+	 */
+	private String getProjectCaseBase(WorkProjectNotify workProjectNotify,Model model) throws Exception {
+		//查询“配农网”工程类型id
+		String engineeringId = engineeringService.getEngineeringId("202");
+		//获取项目信息
+		RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.getQueryProjectUsers(workProjectNotify.getNotifyId());
+		//查询项目是否时案例项目
+		ruralProjectRecords = ruralProjectRecordsService.getCaseBaseByProjectId(ruralProjectRecords);
+		ProjectReportData projectReportData = projectReportDataService.getByNumber(ruralProjectRecords.getProjectReportNumber());
+		ProjectReportRecord projectReportRecord = projectReportRecordService.getProjectReportRecordByProjectId(workProjectNotify.getNotifyId());
+		Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+		projectcontentinfo.setProjectReportData(projectReportData);
+		//获取子项目列表信息
+		List<SubProjectInfo> subProjectInfos = this.queryReportDetails(ruralProjectRecords.getId());
+		//获取合同信息
+		WorkContractInfo workContractInfo = this.queryWorkContract(ruralProjectRecords.getId());
+		if (null != workContractInfo) {
+			WorkClientInfo clientInfo = workClientInfoService.get(workContractInfo.getClient().getId());
+			model.addAttribute("workClientInfo", clientInfo);
+			if (StringUtils.isNotBlank(workContractInfo.getChargeCriterion())) {
+				//收费标准
+				String[] biao = workContractInfo.getChargeCriterion().split(",");
+				List<String> chargeCriterionList = new ArrayList<>();
+				for (int i = 0; i < biao.length; i++) {
+					chargeCriterionList.add(biao[i]);
+				}
+				projectReportRecord.setChargeCriterionList(chargeCriterionList);
+			}
+		}
+
+		Act act = getByAct(projectReportRecord.getProcessInstanceId());
+		projectReportRecord.setAct(act);
+
+		if (StringUtils.isNotBlank(workProjectNotify.getHome())) {
+			projectReportRecord.setHome(workProjectNotify.getHome());
+		} else {
+			projectReportRecord.setHome("home");
+		}
+
+
+		WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+		ruralProjectRecords.setWorkContractInfo(projectContractInfo);
+		MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectReportRecord.getReport().getProject());//将编辑表单中的非NULL值覆盖数据库记录中的值
+		if (null != projectContractInfo) {
+			if (projectContractInfo.getWorkClientInfoList().size() > 0) {
+				model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+			}
+		}
+		ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+		//添加项目类型
+		relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+		relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+		String money = ruralProjectRecords.getSubmitMoney();
+		Integer approvalMoney = null;
+		if (StringUtils.isBlank(money)) {
+			approvalMoney = 1;
+		} else {
+			approvalMoney = Integer.parseInt(money);
+		}
+		switch (approvalMoney) {
+			case 0:
+				//金额为0
+				relateInfo.setAttachmentProjectApprovalMoney(null);
+				break;
+			case 1:
+				//500w以下金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("1");
+				break;
+			case 2:
+				//500w以上金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("2");
+				break;
+		}
+
+		//添加报告类型
+		//relateInfo.setRequiredStage(2);
+		List<Integer> requiredStageList = Lists.newArrayList();
+		requiredStageList.add(1);
+		requiredStageList.add(2);
+		relateInfo.setRequiredStageList(requiredStageList);
+		relateInfo.setId(ruralProjectRecords.getId());
+		//查询报告文件、依据性文件、其他文件必填列表以及数据
+		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+		projectTemplateService.disposeProjectTemplateFile(mainDictDetails, relateInfo, engineeringId, ruralProjectRecords, projectcontentinfo, "1000");
+
+		projectReportRecord.setUploadMode(uploadMode);
+		//获取项目基础信息
+		ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
+		//工程咨询
+		List<MainDictDetail> mainDictList = Lists.newArrayList();
+		if ("1".equals(ruralProjectRecords.getProjectType())) {
+			mainDictList = DictUtils.getMainDictList("attachment_project_sort");
+			//造价审核
+		} else if ("2".equals(ruralProjectRecords.getProjectType())) {
+			mainDictList = DictUtils.getMainDictList("attachment_project_sort_cost");
+		}
+		if (StringUtils.isNotBlank(ruralProjectRecords.getAttachmentProjectSort())) {
+			//处理项目类别
+			for (MainDictDetail info : mainDictList) {
+				if (ruralProjectRecords.getAttachmentProjectSort().equals(info.getValue())) {
+					ruralProjectRecords.setAttachmentProjectSort(info.getLabel());
+					break;
+				}
+			}
+		}
+		model.addAttribute("projectcontentinfo", projectcontentinfo);
+		model.addAttribute("projectRecords", ruralProjectRecords);
+		model.addAttribute("projectReportData", projectReportData);
+		model.addAttribute("workContractInfo", workContractInfo);
+		model.addAttribute("projectReportRecord", projectReportRecord);
+		model.addAttribute("project", projectReportRecord.getReport().getProject());
+		//tap页
+		//查询所有的工程类型
+		List<ProjectEngineeringInfo> projectEngineeringInfo = engineeringService.findList(new ProjectEngineeringInfo());
+		model.addAttribute("projectEngineeringInfo", projectEngineeringInfo);
+		//项目计划
+		RuralProjectRecords projectRecordPlans = this.planView(ruralProjectRecords.getId());
+		model.addAttribute("projectRecordPlans", projectRecordPlans);
+		//获取质量复核项目组成员
+		List<RuralReportConsultant> consultantinfo = this.qualityView(ruralProjectRecords, projectReportData);
+		model.addAttribute("consultantinfo", consultantinfo);
+		//获取总审人员
+		User user = UserUtils.get(projectReportData.getBzshbUserId());
+		model.addAttribute("bzshbUserName", user.getName());
+		//质量复核标准展示
+		String review = "";
+		if ("2".equals(ruralProjectRecords.getSubmitMoney())) {
+			review = "1";
+		}
+		;
+		List<WorkReviewAudit> workReviewAuditList = projectContentDataService.findListReview(review, "质量复核");
+		WorkReviewAudit revAudit = new WorkReviewAudit();
+		String type = "4";
+		revAudit.setCompanyId(UserUtils.getSelectCompany().getId());
+		revAudit.setType(type);
+		revAudit.setReportId(projectReportData.getId());
+		List<WorkReviewAudit> reaudits = workReviewStandardService.findAuditList(revAudit);
+		for (WorkReviewAudit reAudit : workReviewAuditList) {
+			for (WorkReviewAudit audit : reaudits) {
+				if (reAudit.getId().equals(audit.getStandardId())) {
+					reAudit.setDeductOption(audit.getDeductOption());
+					break;
+				}
+			}
+		}
+		model.addAttribute("datalist", workReviewAuditList);
+		//拆线呢报告签发评分展示项
+		List<WorkReviewAudit> reviewAuditList = projectContentDataService.findListIssue(review, "报告签发");
+		//查询报告签发评分评论数据
+		WorkReviewAudit workReviewAuditTwo = new WorkReviewAudit();
+		type = "4";
+		workReviewAuditTwo.setCompanyId(UserUtils.getSelectCompany().getId());
+		workReviewAuditTwo.setType(type);
+		workReviewAuditTwo.setReportId(projectReportData.getId());
+		List<WorkReviewAudit> rreviewAuditList = workReviewStandardService.findAuditList(workReviewAuditTwo);
+		for (WorkReviewAudit reAudit : reviewAuditList) {
+			for (WorkReviewAudit audit : rreviewAuditList) {
+				if (reAudit.getId().equals(audit.getStandardId())) {
+					reAudit.setDeductOption(audit.getDeductOption());
+					break;
+				}
+			}
+		}
+		model.addAttribute("datalistTwo", reviewAuditList);
+		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()));
+			projectReportRecord.setFileCaseBaseList(projectcontentinfo.getFileCaseBaseList());
+			if ("2".equals(ruralProjectRecords.getProjectType())) {
+				model.addAttribute("identification", "projectcontentinfoFile");
+				model.addAttribute("identifications", "referenceRemarks");
+			}
+			if ("1".equals(ruralProjectRecords.getProjectType())) {
+				model.addAttribute("identifications", "consultReferenceRemarks");
+				model.addAttribute("identification", "consultProjectcontentinfoFile");
+			}
+//						model.addAttribute("identification","projectcontentinfoFile");
+			model.addAttribute("identificationName", "归档审核意见");
+			return "modules/projectcontentinfo/projectCaseBaseSupplementForm";
+		}
+		projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+		projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+		projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
+		projectReportRecord.setFileCaseBaseList(projectcontentinfo.getFileCaseBaseList());
+		return "modules/projectcontentinfo/projectCaseBaseSupplementForm";
+    }
+
 }

+ 15 - 2
src/main/resources/mappings/modules/knowledgeSharing/KnowledgeSharingDetailsDao.xml

@@ -93,7 +93,8 @@
 			contents,
 			office_id,
 			company_id,
-		    is_sync
+		    is_sync,
+		    project_id
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -109,7 +110,8 @@
 			#{contents},
 			#{office.id},
 			#{company.id},
-			#{isSync}
+			#{isSync},
+			#{projectId}
 		)
 	</insert>
 
@@ -133,6 +135,9 @@
 		<if test="isSync != null and isSync != ''">
 			,is_sync = #{isSync}
 		</if>
+		<if test="projectId != null and projectId != ''">
+			,project_id = #{projectId}
+		</if>
 		WHERE id = #{id}
 	</update>
 
@@ -291,4 +296,12 @@
 		delete from knowledge_sharing_comment
 		where id = #{id}
 	</delete>
+
+	<select id="getByProjectId" resultType="com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo">
+		SELECT
+		<include refid="businessQuestionsColumns"/>
+		FROM knowledge_sharing_info a
+		where
+			a.project_id = #{projectId} and a.del_flag = 0
+	</select>
 </mapper>

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

@@ -124,6 +124,16 @@
 
 	</select>
 
+	<select id="getCaseBaseAccessoryListByParentId" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT
+			<include refid="workReviewStandardColumns"/>
+		FROM project_template_structure_info a
+		<where>
+			a.parent_id =#{parentId}
+		</where>
+		order by index_num asc
+	</select>
+
 	<select id="getProjectTemplateListById" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
 		SELECT
 			a.id as "id", a.attach_name as "attachName",a.parent_id as "parentId"
@@ -387,6 +397,7 @@
 		<where>
 			a.del_flag = 0
 			and a.attach_name = #{name}
+		and parent_id = #{parentId}
 		</where>
 	</select>
 

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

@@ -501,6 +501,16 @@ END) as projectScale*/
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		<where>
 			a.status = 5
+			<if test="caseStatus !=null and caseStatus != ''">
+				<choose>
+					<when test="caseStatus == 0">
+						and a.id not in (select project_id from case_base)
+					</when>
+					<otherwise>
+						AND cb.case_status = #{caseStatus}
+					</otherwise>
+				</choose>
+			</if>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')
 			</if>
@@ -1410,6 +1420,16 @@ END) as projectScale*/
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		<where>
 			a.status = 5
+			<if test="caseStatus !=null and caseStatus != ''">
+				<choose>
+					<when test="caseStatus == 0">
+						and a.id not in (select project_id from case_base)
+					</when>
+					<otherwise>
+						AND cb.case_status = #{caseStatus}
+					</otherwise>
+				</choose>
+			</if>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')
 			</if>

+ 20 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -497,6 +497,16 @@
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		<where>
 			a.status = 5
+			<if test="caseStatus !=null and caseStatus != ''">
+				<choose>
+					<when test="caseStatus == 0">
+						and a.id not in (select project_id from case_base)
+					</when>
+					<otherwise>
+						AND cb.case_status = #{caseStatus}
+					</otherwise>
+				</choose>
+			</if>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')
 			</if>
@@ -847,6 +857,16 @@
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		<where>
             a.status = 5
+			<if test="caseStatus !=null and caseStatus != ''">
+				<choose>
+					<when test="caseStatus == 0">
+						and a.id not in (select project_id from case_base)
+					</when>
+					<otherwise>
+						AND cb.case_status = #{caseStatus}
+					</otherwise>
+				</choose>
+			</if>
             <if test="projectId != null and projectId != ''">
                 AND a.project_id like concat('%',#{projectId},'%')
             </if>

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

@@ -6871,6 +6871,12 @@ GROUP BY
 		from rural_report_consultant where projectId=#{projectId} and role = '负责人' order by update_date desc
 	</select>
 
+	<select id="getCaseBaseStatusByProjectId"
+		resultType="java.lang.String">
+		select case_status
+		from case_base where project_id=#{projectId}
+	</select>
+
 
 
 </mapper>

+ 9 - 0
src/main/resources/mappings/modules/workprojectnotify/WorkProjectNotifyDao.xml

@@ -1027,4 +1027,13 @@
 			AND TIME(DATE_ADD(#{updateDate}, INTERVAL 2 SECOND))
 		AND remarks IS NOT NULL;
 	</select>
+
+
+	<update id="updateCaseBaseNotifyStatus">
+		update
+			work_project_notify
+		set
+			status = 1
+		where notify_id = #{notifyId} and type = #{type}
+	</update>
 </mapper>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2448 - 0
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementForm.jsp


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1330 - 0
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp


+ 11 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp

@@ -1329,6 +1329,16 @@
 								</form:select>
 							</div>
 						</div>
+
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">案例库筛选:</label>
+							<div class="layui-input-block readOnlyFFF">
+								<form:select path="caseStatus" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('check_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
 						<div style="clear:both;"></div>
 					</div>
 				</form:form>
@@ -1581,7 +1591,7 @@
 				<%--			var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
 				<%--		return xml;--%>
 				<%--	}}--%>
-				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:125,templet:function(d){
+				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:140,templet:function(d){
 						var st = getCaseBaseAuditState(d.caseStatus);
 						if(st.action)
 							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportedProcess?processInstanceId=" + d.caseProcessId + "','95%','95%')\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status+ "</span>";

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1077 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralProjectRecordsOwnCaseBaseList.jsp


+ 11 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp

@@ -1003,6 +1003,16 @@
 						</div>
 
 						<div class="layui-item query athird ">
+							<label class="layui-form-label">案例库筛选:</label>
+							<div class="layui-input-block readOnlyFFF">
+								<form:select path="caseStatus" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('check_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+
+						<div class="layui-item query athird ">
 							<label class="layui-form-label">质量复核时间:</label>
 							<div class="layui-input-block readOnlyFFF">
 								<input id="reportBeginDate" name="reportBeginDate" placeholder="审核开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
@@ -1286,7 +1296,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
 						return xml;
 					}}
-				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:125,templet:function(d){
+				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:140,templet:function(d){
 						var st = getCaseBaseAuditState(d.caseStatus);
 						if(st.action)
 							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportedProcess?processInstanceId=" + d.caseProcessId + "','95%','95%')\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status+ "</span>";

+ 15 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -1008,6 +1008,10 @@
 				{
 					xml+="<a href=\"#\" onclick=\"openDialogre('修改归档案卷号', '${ctx}/ruralProject/ruralProjectMessage/adminRecordModifyForm?id=" + d.prrId + "','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\"  style='height: 32px;margin-top: 5px;margin-bottom: 5px;'> 修改归档</a>";
 				}
+
+				/*if(d.caseStatus == 5) {
+					xml+="<a href=\"#\" onclick=\"openDialogre('案例文件上传', '${ctx}/ruralProject/ruralCostProjectMessageNewTwo/formCaseBase?reportId=" + d.id +"','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 案例文件</a>";
+				}*/
 			}
 			<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
 			if ('0'!=d.projectReportStatus && '6'!=d.projectReportStatus && '1'!=d.projectReportStatus){
@@ -1258,6 +1262,16 @@
 								</form:select>
 							</div>
 						</div>
+
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">案例库筛选:</label>
+							<div class="layui-input-block readOnlyFFF">
+								<form:select path="caseStatus" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('check_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
 						<div style="clear:both;"></div>
 					</div>
 				</form:form>
@@ -1499,7 +1513,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
 						return xml;
 					}}*/
-				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:125,templet:function(d){
+				,{align:'center', title: '案例项目申报'+ helpShowDetail('bz-0006'),  width:140,templet:function(d){
 						var st = getCaseBaseAuditState(d.caseStatus);
 						if(st.action)
 							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportedProcess?processInstanceId=" + d.caseProcessId + "','95%','95%')\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status+ "</span>";

+ 180 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp

@@ -634,6 +634,186 @@
 					</table>
 				</div>
 			</div>
+
+
+			<c:if test="${projectRecords.caseStatus == '5'}">
+				<div class="form-group layui-row">
+					<div class="form-group-label"><h2>案例文件</h2></div>
+					<div id="addFile_caseBase" style="display: none" class="upload-progress">
+						<span id="fileName_caseBase" ></span>
+						<span id="_caseBase" ></span>
+						<b><span id="baifenbi_caseBase" ></span></b>
+						<div class="progress">
+							<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
+							</div>
+						</div>
+					</div>
+					<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+					<span id="caseBase_title"></span>
+					<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+						<table id="upTable_caseBase" class="table table-bordered table-condensed">
+							<thead>
+							<tr>
+								<th width="20%">文件要求</th>
+								<th width="30%">文件描述/文件</th>
+								<th width="20%">文件类型</th>
+								<th width="160px">上传时间</th>
+								<th width="120px">文件大小(M)</th>
+								<th width="180px">操作</th>
+							</tr>
+							</thead>
+							<tbody id="file_caseBase">
+							<c:forEach items="${projectcontentinfo.fileCaseBaseList}" var = "fileCaseBase" varStatus="status">
+								<tr id="${fileCaseBase.id}" pid="${fileCaseBase.parent.id}">
+										<%-- <td>${status.index + 1}</td>--%>
+									<c:choose>
+										<c:when test="${fileCaseBase.mustFlag == 1}">
+											<td class="tabMove"  style="text-align:left;"><span style="color: red">* </span>${fileCaseBase.attachName}<input type="hidden" value="${fileCaseBase.attachName}"/></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fileCaseBase.flag == 0}">
+													<td class="tabMove"  style="text-align:left;">${fileCaseBase.attachName}<input type="hidden" value="${fileCaseBase.attachName}"/></td>
+												</c:when>
+												<c:otherwise>
+													<td></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>
+										<c:choose>
+											<c:when test="${fileCaseBase.flag == 0}">
+												<%--													<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
+												<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileCaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileCaseBase.attachTypes}</div>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${projectcontentinfo.uploadMode == 2}">
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'jpg')
+															   or fn:containsIgnoreCase(fileCaseBase.attachName,'png')
+															   or fn:containsIgnoreCase(fileCaseBase.attachName,'gif')
+															   or fn:containsIgnoreCase(fileCaseBase.attachName,'bmp')
+															   or fn:containsIgnoreCase(fileCaseBase.attachName,'jpeg')}">
+																<img src="${fileCaseBase.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileCaseBase.temporaryUrl}','90%','90%')" alt="${fileCaseBase.attachName}">
+															</c:when>
+															<c:otherwise>
+																<c:choose>
+																	<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'pdf')}">
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',1)">${fileCaseBase.attachName} ; </a>
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'rar')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'zip')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'jar')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'7z')}">
+																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',3)">${fileCaseBase.attachName}</a>
+																			</c:when>
+																			<c:otherwise>
+																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',2)">${fileCaseBase.attachName}</a>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'jpg')
+																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'png')
+																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'gif')
+																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'bmp')
+																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'jpeg')}">
+																<img src="${fileCaseBase.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileCaseBase.url}','90%','90%')" alt="${fileCaseBase.attachName}">
+															</c:when>
+															<c:otherwise>
+																<c:choose>
+																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',1)">${fileCaseBase.attachName} ; </a>
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'rar')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'zip')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'jar')
+																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'7z')}">
+																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',3)">${fileCaseBase.attachName}</a>
+																			</c:when>
+																			<c:otherwise>
+																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',2)">${fileCaseBase.attachName}</a>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+												<%--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>--%>
+											</c:otherwise>
+										</c:choose>
+									</td>
+
+
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<td class="op-td"></td>
+										</c:when>
+										<c:otherwise>
+											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileCaseBase.description}')">${fileCaseBase.description}</td>
+										</c:otherwise>
+									</c:choose>
+									<td class="op-td" style="text-align:center;">
+										<c:choose>
+											<c:when test="${fileCaseBase.flag == 0}">
+												<div></div>
+											</c:when>
+											<c:otherwise>
+												<fmt:formatDate value="${fileCaseBase.createDate}" type="date"/>
+											</c:otherwise>
+										</c:choose>
+									</td>
+									<td>${fileCaseBase.fileSize}</td>
+									<td class="op-td" style="text-align:center;">
+										<div class="op-btn-box" >
+											<c:choose>
+												<c:when test="${fileCaseBase.flag == 0}">
+
+												</c:when>
+												<c:otherwise>
+													<%--附件下载删除--%>
+													<c:choose>
+														<c:when test="${projectcontentinfo.uploadMode == 2}">
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'pdf')}">
+																	<a href="${fileCaseBase.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+																</c:when>
+																<c:otherwise>
+																	<a href="${fileCaseBase.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+																</c:otherwise>
+															</c:choose>
+														</c:when>
+														<c:otherwise>
+															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileCaseBase.temporaryUrl}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+													<c:if test="${fileCaseBase.collectFlag != 1}">
+														<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileCaseBase.url}','${fileCaseBase.createBy.id}','${fileCaseBase.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+													</c:if>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+							</tbody>
+						</table>
+					</div>
+				</div>
+			</c:if>
 		<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>

+ 3 - 0
src/main/webapp/webpage/modules/sys/sysHome.jsp

@@ -1100,6 +1100,9 @@
         <c:when test="${workProjectNotify.type == 69 && workProjectNotify.remarks eq '待处理'}">
         xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','提交,关闭')\">";
         </c:when>
+        <c:when test="${workProjectNotify.type == 113 && workProjectNotify.remarks eq '待处理'}">
+        xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','提交,关闭')\">";
+        </c:when>
         <c:when test="${workProjectNotify.type == 60 && workProjectNotify.remarks eq '待审批'}">
         xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogPass('${fns:getDictLabel(workProjectNotify.type, 'project_notify_type', '')}待审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%','','通过,关闭')\">";
         </c:when>

+ 16 - 0
src/main/webapp/webpage/modules/workprojectnotify/workProjectNotifyList.jsp

@@ -1010,6 +1010,22 @@
 						}
 
                     }
+                    else if(d.type == "113" && d.remarks == '待处理'){
+						if (d.isreply == "1"){
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogPass2('"+ d.type1 +"待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id="+d.id+"&home=notifyList','95%','95%')\">" +
+									"<span title=\""+ d.title +"\" style=\"color: red;\">"+"【驳回】"+ d.title +"</span>" +
+									"</a>";
+						}else if (d.isreply == "2") {
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogPass2('"+ d.type1 +"待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id="+d.id+"&home=notifyList','95%','95%')\">" +
+									"<span title=\""+ d.title +"\">"+"【通过】"+ d.title +"</span>" +
+									"</a>";
+						}else {
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogPass2('"+ d.type1 +"待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id="+d.id+"&home=notifyList','95%','95%')\">" +
+									"<span title=\""+ d.title +"\">"+ d.title +"</span>" +
+									"</a>";
+						}
+
+                    }
                     else if(d.type == "71" && d.step == '各级审批'){
                         return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogPass2('"+ d.type1 +"待处理', '${ctx}/workprojectnotify/workProjectNotify/form?id="+d.id+"&home=notifyList','95%','95%')\">" +
                             "<span title=\""+ d.title +"\">"+ d.title +"</span>" +