|
@@ -332,6 +332,54 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
|
|
return projectTemplateList;
|
|
return projectTemplateList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 归档审核页面各附件保存信息查看展示数据(归档中将报告的必填项也展示出来)
|
|
|
|
+ * @param projectTemplateInfo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<ProjectTemplateInfo> getProjectTemplateListByArchive(ProjectAccessoryRelationInfo projectTemplateInfo){
|
|
|
|
+ //查询所有被选择为必填项展示列,并查询附件信息
|
|
|
|
+ List<ProjectTemplateInfo> projectTemplateList = dao.getProjectTemplateList(projectTemplateInfo);
|
|
|
|
+ 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);
|
|
|
|
+ //判断是否为必填项,若为必填项则添加必填判定字段
|
|
|
|
+ if(projectTemplateInfo.getRequiredStageList().indexOf(info.getRequiredStage()) != -1){
|
|
|
|
+ info.setMustFlag(1);
|
|
|
|
+ //判定必填项的下的是否有附件信息
|
|
|
|
+ if (attachments.size()!=0){
|
|
|
|
+ info.setFileFlag(1);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ info.setMustFlag(0);
|
|
|
|
+ info.setFileFlag(0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询没有被选择必填项的数据并查询是否已经上传附件,若有则添加到展示列中
|
|
|
|
+ List<ProjectTemplateInfo> otherProjectTemplateList = dao.projectAccessoryListByParentId(projectTemplateInfo);
|
|
|
|
+ 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.setFileFlag(0);
|
|
|
|
+ otherInfo.setMustFlag(0);
|
|
|
|
+ projectTemplateList.add(otherInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return projectTemplateList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
public Integer getAttachmentCount(String attachmentId,String projectId){
|
|
public Integer getAttachmentCount(String attachmentId,String projectId){
|
|
WorkClientAttachment attchment = new WorkClientAttachment();
|
|
WorkClientAttachment attchment = new WorkClientAttachment();
|
|
@@ -381,4 +429,4 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
-}
|
|
|
|
|
|
+}
|