ソースを参照

依据性资料附件信息关联已归档的成果文件

user5 4 年 前
コミット
6453067107
19 ファイル変更669 行追加64 行削除
  1. BIN
      out/artifacts/unnamed/unnamed.war
  2. 8 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectBasedDataDao.java
  3. 2 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java
  4. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java
  5. 26 12
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectBasedDataService.java
  6. 14 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  7. 9 1
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java
  8. 36 20
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectBasedDataController.java
  9. 40 25
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDataController.java
  10. 2 2
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java
  11. 3 0
      src/main/java/com/jeeplus/modules/sys/dao/WorkattachmentDao.java
  12. 29 1
      src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java
  13. 13 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectBasedDataDao.xml
  14. 18 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  15. 17 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml
  16. 55 0
      src/main/resources/mappings/modules/sys/WorkattachmentDao.xml
  17. 219 0
      src/main/webapp/static/bos/reportDataBOSUpload.js
  18. 25 3
      src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp
  19. 150 0
      src/main/webapp/webpage/modules/sys/containReportData.jsp

BIN
out/artifacts/unnamed/unnamed.war


+ 8 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectBasedDataDao.java

@@ -26,4 +26,12 @@ public interface ProjectBasedDataDao extends CrudDao<ProjectBasedData> {
     List<ProjectBasedData> queryListByContentId(String contentId);
 
     List<RuralProjectBasedData> findListOnRural(RuralProjectBasedData projectBasedData);
+
+    /**
+     * 删除依据性资料关联成果文件的文件
+     * @param basedDataId
+     * @param workAttachmentId
+     * @return
+     */
+    int deleteBasedDataAndWorkAttachment(@Param("basedDataId") String basedDataId,@Param("workAttachmentId") String workAttachmentId);
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java

@@ -7,6 +7,7 @@ import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
+import com.jeeplus.modules.sys.entity.Workattachment;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -31,6 +32,7 @@ public interface ProjectReportDataDao extends CrudDao<ProjectReportData> {
 
     List<ProjectReportData> findInfoList(ProjectReportData projectReportData);
     List<ProjectReportData> findInfoListByStatus(ProjectReportData projectReportData);
+    List<Workattachment> getContainReportData(ProjectReportData projectReportData);
     /**
      * 更新流程实例ID
      * @return

+ 3 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java

@@ -8,6 +8,7 @@ import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentTreeData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
+import com.jeeplus.modules.sys.entity.Workattachment;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -59,4 +60,6 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
 	List<ProjectContentTreeData> getProjectContentData(String projectId);
 
 	List<ProjectContentTreeData> getProjectContentTreeData(@Param("projectId") String projectId,@Param("type") String type);
+
+	int saveBasedDataWorkAttachment(Workattachment workattachment);
 }

+ 26 - 12
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectBasedDataService.java

@@ -3,28 +3,21 @@
  */
 package com.jeeplus.modules.projectcontentinfo.service;
 
-import java.util.List;
-
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.modules.project.entity.Project;
+import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectBasedData;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
-import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
-import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
-import com.jeeplus.modules.workreimbursement.utils.VarStr;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import com.jeeplus.common.persistence.Page;
-import com.jeeplus.common.service.CrudService;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
-import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
+import java.util.List;
 
 /**
  * 依据性资料Service
@@ -48,6 +41,17 @@ public class ProjectBasedDataService extends CrudService<ProjectBasedDataDao, Pr
 		return projectBasedData;
 	}
 
+	public ProjectBasedData getBasedDataAndWorkAttachmentInfo(String id) {
+		ProjectBasedData projectBasedData = super.get(id);
+		if(projectBasedData!=null) {
+			Workattachment workattachment = new Workattachment();
+			workattachment.setAttachmentId(id);
+			workattachment.setAttachmentFlag("84");
+			projectBasedData.setWorkAttachments(workattachmentDao.getBasedDataAndWorkAttachmentInfo(workattachment));
+		}
+		return projectBasedData;
+	}
+
 	public String getNumber(ProjectRecords projectRecords) {
 		if (projectRecords!=null && StringUtils.isNotBlank(projectRecords.getId())){
 			ProjectBasedData projectBasedData = new ProjectBasedData();
@@ -83,4 +87,14 @@ public class ProjectBasedDataService extends CrudService<ProjectBasedDataDao, Pr
 	}
 
 
+	/**
+	 * 删除依据性资料关联成果文件的文件
+	 * @param basedDataId
+	 * @param workAttachmentId
+	 * @return
+	 */
+	@Transactional(readOnly = false)
+	public int deleteBasedDataAndWorkAttachment(String basedDataId,String workAttachmentId){
+		return dao.deleteBasedDataAndWorkAttachment(basedDataId,workAttachmentId);
+	}
 }

+ 14 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -244,6 +244,20 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 		return page;
 	}
 
+	public Page<Workattachment> getContainReportData(Page<Workattachment> page, ProjectReportData projectReportData) {
+		Workattachment workattachment = new Workattachment();
+		workattachment.setPage(page);
+		List<Workattachment> workattachmentList = dao.getContainReportData(projectReportData);
+		for (Workattachment attachment : workattachmentList){
+            User user = UserUtils.get(attachment.getAttachmentUser());
+			if (null != user){
+                attachment.setAttachmentUser(user.getName());
+			}
+		}
+		page.setList(workattachmentList);
+		return page;
+	}
+
 	public Page<ProjectReportData> findInvalidPage(Page<ProjectReportData> page, ProjectReportData entity) {
 		entity.setPage(page);
 		page.setList(dao.findInvalidList(entity));

+ 9 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java

@@ -10,6 +10,7 @@ import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.SpringContextHolder;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.isignature.service.ISignatureDocumentService;
+import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectContentChangeDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 import com.jeeplus.modules.projectcontentinfo.entity.*;
@@ -82,6 +83,8 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	private ProjectReportNumService projectReportNumService;
 	@Autowired
 	private ProjectcontentinfoDao projectcontentinfoDao;
+	@Autowired
+	private ProjectBasedDataDao projectBasedDataDao;
 
 	private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
 
@@ -440,7 +443,11 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 					workattachment.setAttachmentUser(UserUtils.getUser().getId());
 					if (StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
 						workattachment.preInsert();
-						workattachmentDao.insert(workattachment);
+						if(StringUtils.isNotBlank(workattachment.getQuoteId())){
+							dao.saveBasedDataWorkAttachment(workattachment);
+						}else{
+							workattachmentDao.insert(workattachment);
+						}
 						if (projectcontentinfo.getProjectReportData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getId())) {
 							try {
 								signatureDocumentService.createIsignature(workattachment.getUrl(), workattachment.getAttachmentName(), workattachment.getId(), projectcontentinfo.getProjectReportData().getName());
@@ -1251,6 +1258,7 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 					workattachmentDao.delete(workattachment);
 				}
 			}
+			projectBasedDataDao.deleteBasedDataAndWorkAttachment(infoId,"");
 			projectBasedDataService.delete(projectBasedData);
 		}else if (type.equals("8")){
 			ProjectReportData projectReportData = projectReportDataService.get(infoId);

+ 36 - 20
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectBasedDataController.java

@@ -3,15 +3,18 @@
  */
 package com.jeeplus.modules.projectcontentinfo.web;
 
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.ConstraintViolationException;
-
-import com.jeeplus.common.json.AjaxJson;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectBasedDataService;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,17 +24,13 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.google.common.collect.Lists;
-import com.jeeplus.common.utils.DateUtils;
-import com.jeeplus.common.utils.MyBeanUtils;
-import com.jeeplus.common.config.Global;
-import com.jeeplus.common.persistence.Page;
-import com.jeeplus.common.web.BaseController;
-import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.common.utils.excel.ExportExcel;
-import com.jeeplus.common.utils.excel.ImportExcel;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectBasedDataService;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.List;
 
 /**
  * 依据性资料Controller
@@ -201,4 +200,21 @@ public class ProjectBasedDataController extends BaseController {
         return "modules/sys/gridselectProjbasedata";
     }
 
+	/**
+	 * 删除关联信息
+	 * @param basedDataId
+	 * @param workAttachmentId
+	 * @return
+	 */
+	@RequestMapping("/deleteBasedDataAndWorkAttachment")
+	@ResponseBody
+	public HashMap<Object, Object> deleteBasedDataAndWorkAttachment(String basedDataId,String workAttachmentId){
+		if(StringUtils.isNotBlank(basedDataId) && StringUtils.isNotBlank(workAttachmentId)) {
+			projectBasedDataService.deleteBasedDataAndWorkAttachment(basedDataId,workAttachmentId);
+		}
+		HashMap<Object, Object> map = Maps.newHashMap();
+		map.put("str","success");
+		return map;
+	}
+
 }

+ 40 - 25
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDataController.java

@@ -3,21 +3,21 @@
  */
 package com.jeeplus.modules.projectcontentinfo.web;
 
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.ConstraintViolationException;
-
-import com.jeeplus.modules.act.entity.Act;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportChangeService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
-import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
+import com.jeeplus.modules.sys.entity.Workattachment;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,17 +30,12 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.google.common.collect.Lists;
-import com.jeeplus.common.utils.DateUtils;
-import com.jeeplus.common.utils.MyBeanUtils;
-import com.jeeplus.common.config.Global;
-import com.jeeplus.common.persistence.Page;
-import com.jeeplus.common.web.BaseController;
-import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.common.utils.excel.ExportExcel;
-import com.jeeplus.common.utils.excel.ImportExcel;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.List;
 
 /**
  * 报告详情Controller
@@ -229,8 +224,28 @@ public class ProjectReportDataController extends BaseController {
 		}
 		return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectReportData/?repage";
     }
-	
-	
+
+
+	/**
+	 * 获取审核完成的有上传文件的成果文件
+	 * @param projectReportData
+	 * @param searchLabel
+	 * @param request
+	 * @param response
+	 * @param model
+	 * @return
+	 * @throws UnsupportedEncodingException
+	 */
+	@RequestMapping("getContainReportData")
+	public String getContainReportData(ProjectReportData projectReportData, String searchLabel , HttpServletRequest request, HttpServletResponse response, Model model) throws UnsupportedEncodingException {
+		searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+		//查询已归档审核完的该项目所有的成果文件
+		Page<Workattachment> page = projectReportDataService.getContainReportData(new Page<Workattachment>(request, response), projectReportData);
+		model.addAttribute("obj", projectReportData);
+		model.addAttribute("page", page);
+		model.addAttribute("searchLabel",searchLabel);
+		return "modules/sys/containReportData";
+	}
 	
 
 }

+ 2 - 2
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java

@@ -559,9 +559,9 @@ public class ProjectcontentinfoController extends BaseController {
 		if (projectcontentinfo.getView().contains("basedData")){
 			ProjectBasedData basedData = null;
 			if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
-				basedData = projectBasedDataService.get(projectcontentinfo.getInfoId());
+				basedData = projectBasedDataService.getBasedDataAndWorkAttachmentInfo(projectcontentinfo.getInfoId());
 			}else if (projectcontentinfo.getProjectBasedData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectBasedData().getId())) {
-				basedData = projectBasedDataService.get(projectcontentinfo.getProjectBasedData().getId());
+				basedData = projectBasedDataService.getBasedDataAndWorkAttachmentInfo(projectcontentinfo.getProjectBasedData().getId());
 			}
 			if(basedData==null){
 				basedData = new ProjectBasedData();

+ 3 - 0
src/main/java/com/jeeplus/modules/sys/dao/WorkattachmentDao.java

@@ -31,6 +31,9 @@ public interface WorkattachmentDao extends CrudDao<Workattachment> {
 
     List<Workattachment> getListOfAttachment(@Param("attachmentId") String attachmentId,@Param("type") String type);
 
+    //获取依据性资料对应的附件信息
+    List<Workattachment> getBasedDataAndWorkAttachmentInfo(Workattachment workattachment);
+
     //查找附件
     Workattachment getByAttachmentIdAndFlag(Map<String, String> map);
 

+ 29 - 1
src/main/java/com/jeeplus/modules/sys/entity/Workattachment.java

@@ -13,7 +13,7 @@ import com.jeeplus.common.utils.excel.annotation.ExcelField;
  * @version 2017-10-11
  */
 public class Workattachment extends DataEntity<Workattachment> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String url;		// 附件地址
 	private String type;		// 附件类型
@@ -24,6 +24,10 @@ public class Workattachment extends DataEntity<Workattachment> {
 	private String attachmentFlag;     //附件类别(0:评价汇总表、1:标书方案编制表)
 	private String divIdType;//判定条件
 
+	private String reportDataName;//成果文件名称
+	private Integer quoteResult;//是否为引用文件判定
+	private String quoteId;//被引用文件id
+
 	public String getDivIdType() {
 		return divIdType;
 	}
@@ -100,4 +104,28 @@ public class Workattachment extends DataEntity<Workattachment> {
 	public void setCompanyId(String companyId) {
 		this.companyId = companyId;
 	}
+
+	public String getReportDataName() {
+		return reportDataName;
+	}
+
+	public void setReportDataName(String reportDataName) {
+		this.reportDataName = reportDataName;
+	}
+
+	public Integer getQuoteResult() {
+		return quoteResult;
+	}
+
+	public void setQuoteResult(Integer quoteResult) {
+		this.quoteResult = quoteResult;
+	}
+
+	public String getQuoteId() {
+		return quoteId;
+	}
+
+	public void setQuoteId(String quoteId) {
+		this.quoteId = quoteId;
+	}
 }

+ 13 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectBasedDataDao.xml

@@ -263,4 +263,17 @@
           pb.content_id = #{contentId}
         ORDER BY a.update_date DESC
     </select>
+
+	<!-- 删除依据性资料关联成果文件的文件 -->
+	<delete id="deleteBasedDataAndWorkAttachment">
+		delete from based_data_and_work_attachment_info
+		<where>
+			<if test="basedDataId != null and basedDataId != ''">
+				AND based_data_id =#{basedDataId}
+			</if>
+			<if test="workAttachmentId != null and workAttachmentId != ''">
+				AND work_attachment_id =#{workAttachmentId}
+			</if>
+		</where>
+	</delete>
 </mapper>

+ 18 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -415,6 +415,24 @@
 			</otherwise>
 		</choose>
 	</select>
+
+
+	<select id="getContainReportData" resultType="com.jeeplus.modules.sys.entity.Workattachment">
+		select a.id,a.attachment_name as "attachmentName",a.attachment_user as attachmentUser,a.type as "type",
+		a.create_date as "createDate",a.url,prd.name as "reportDataName"
+		from work_attachment a
+		left join project_report_data prd on a.attachment_id = prd.id
+		left join project_report_record prr on prr.report_id = prd.id
+		where prr.status='5' and prd.del_flag = '0'
+		 and prd.project_id = #{project.id}
+		 and prd.status in ('5','7')
+		<if test="name != null and name != ''">
+			AND a.attachment_name like CONCAT('%', #{name}, '%')
+		</if>
+	</select>
+
+
+
 	<select id="findInvalidList" resultType="ProjectReportData" >
 		SELECT
 			<include refid="projectReportDataColumns"/>

+ 17 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -498,4 +498,21 @@
 			and name = #{type} and info_id is null
 		</where>
 	</select>
+
+	<insert id="saveBasedDataWorkAttachment">
+		insert into based_data_and_work_attachment_info
+		(
+			based_data_id,
+			work_attachment_id,
+			create_date,
+			create_by
+		)
+		values
+		(
+			#{attachmentId},
+			#{quoteId},
+			#{updateDate},
+			#{updateBy.id}
+		)
+	</insert>
 </mapper>

+ 55 - 0
src/main/resources/mappings/modules/sys/WorkattachmentDao.xml

@@ -32,6 +32,61 @@
 		<include refid="workattachmentJoins"/>
 		WHERE a.id = #{id}
 	</select>
+
+
+
+	<select id="getBasedDataAndWorkAttachmentInfo" resultType="com.jeeplus.modules.sys.entity.Workattachment" >
+		select
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.url AS "url",
+		a.type AS "type",
+		a.attachment_id AS "attachmentId",
+		a.attachment_user AS "attachmentUser",
+		a.attachment_name AS "attachmentName",
+		a.company_id AS "companyId",
+		a.attachment_flag AS "attachmentFlag",
+		a.div_id_type AS "divIdType",
+		createByName AS "createBy.name",
+		quoteResult
+		from(
+		select
+		p.id ,p.create_by ,p.create_date ,p.update_by ,p.update_date ,p.remarks ,p.del_flag ,
+		p.url,p.type,p.attachment_id,p.attachment_user,p.attachment_name,p.company_id,p.attachment_flag,p.div_id_type,
+		createBy.name AS "createByName",0 as "quoteResult"
+		from work_attachment p
+		LEFT JOIN sys_user createBy on createBy.id = p.create_by
+		where p.attachment_id = #{attachmentId} and p.del_flag = #{DEL_FLAG_NORMAL}
+		<if test="attachmentFlag != null and attachmentFlag != ''">
+			AND p.attachment_flag = #{attachmentFlag}
+		</if>
+		union all
+		select
+		i.id ,i.create_by ,i.create_date ,i.update_by ,i.update_date ,i.remarks ,i.del_flag ,
+		i.url,i.type,i.attachment_id,i.attachment_user,i.attachment_name,i.company_id,i.attachment_flag,i.div_id_type,
+		createBy.name AS "createByName",1 as "quoteResult"
+		from work_attachment i
+		LEFT JOIN sys_user createBy on createBy.id = i.create_by
+		where i.id =(select work_attachment_id from based_data_and_work_attachment_info where based_data_id = #{attachmentId})
+		and i.del_flag = #{DEL_FLAG_NORMAL}
+		) as a
+		ORDER BY a.update_date DESC
+	</select>
+
+
+
+
+
+
+
+
+
+
 	<select id="getByUrl" resultType="Workattachment" >
 		SELECT
 			<include refid="workattachmentColumns"/>

+ 219 - 0
src/main/webapp/static/bos/reportDataBOSUpload.js

@@ -0,0 +1,219 @@
+
+stsAccessKeyId = ""
+stsAccessKeySecret = ""
+stsToken = ""
+var checkpoint_temp;
+var requestUrl;
+var returnUrl;
+var str;
+var buckName='newxgccpm'
+
+function reportDataMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
+    console.log("-----------------------start");
+        multitest(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt);
+};
+
+function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
+    var formdata = new FormData();
+    formdata.append("storeAs",storeAs);
+    formdata.append("file",file);
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    $.ajax({
+        type:'post',
+        url:realPath+"/bos/upload",
+        data:formdata,
+        contentType: false,
+        processData: false,
+        success:function (data1) {
+            if(data1.code==='1'){
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
+                var p = Math.floor(1*100);
+                $("#jindutiao"+divId).attr("style","width: "+p+"%");
+                $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
+                $("#baifenbi"+divId).html(p+"%");
+                $("#fileName"+divId).html(name);
+                $.ajax({
+                    type:'post',
+                    url:returnUrl,
+                    data:{
+                        "attachmentName":file['name'],
+                        "attachmentId":attachmentId,
+                        "attachmentFlag":attachmentFlag,
+                        "url":data1.url,
+                        "divIdType":divId
+                    },
+                    success:function(data){
+                        console.log('url : ' + data.url);
+                        if(data.status=="Success"){
+                            parent.layer.msg("上传成功!",{icon:1});
+                            var lenght =$(".trIdAdds").length;
+                            if (size != 0){
+                                lenght += size;
+                            }
+                            var addFile = "addFile"+divId;
+                            var str = '<tr class="trIdAdds">'+
+                                '<td class="text-center">' ;
+                            if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                str = str +'<img src="'+data1.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data1.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                            }else if(isContains("pdf",data.type)){
+                                str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data1.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                            }else {
+                                str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data1.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                            }
+                            str = str +'</td>'+
+                                '<td >'+data.createByName+'</td>'+
+                                '<td >'+data.createDate+
+                                '<input name="workAttachments['+lenght+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentId+'"/>'+
+                                '<input name="workAttachments['+lenght+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data1.url+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentName+'"/>'+
+                                '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
+                                '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                                '<input name="workAttachments['+lenght+'].quoteResult" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="0"/>'+
+                                '</td>'+
+                                '<td >否</td>'+
+                                '<td class="op-td">'+
+                                '<div class="op-btn-box">' +
+                                // '<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+                                '<a href="'+data1.url+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+                                '<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                                '</div>' +
+                                '</td>'+
+                                '</tr>';
+                            console.log("file:"+divId);
+                            console.log("str="+str);
+                            $("#file"+divId).append(str);
+                        }else {
+                            parent.layer.msg("上传失败!",{icon:2});
+                        }
+                    }
+                })
+            }else {
+                parent.layer.msg("上传失败!",{icon:2});
+            }
+        }
+    })
+};
+
+function quoteFile (data,divId) {
+    parent.layer.msg("引用成果文件成功!",{icon:1});
+    var lenght =$(".trIdAdds").length;
+    var addFile = "addFile"+divId;
+    var str = '<tr class="trIdAdds">'+
+        '<td class="text-center">' ;
+    if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+        str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+    }else if(isContains("pdf",data.type)){
+        str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+    }else {
+        str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+    }
+    str = str +'</td>'+
+        '<td >'+data.attachmentUser+'</td>'+
+        '<td >'+data.createDate+
+        '<input name="workAttachments['+lenght+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+        '<input name="workAttachments['+lenght+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+        '<input name="workAttachments['+lenght+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.url+'"/>'+
+        '<input name="workAttachments['+lenght+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentName+'"/>'+
+        '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
+        '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="84"/>'+
+        '<input name="workAttachments['+lenght+'].quoteResult" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="1"/>'+
+        '<input name="workAttachments['+lenght+'].quoteId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.id+'"/>'+
+        '</td>'+
+        '<td >是</td>'+
+        '<td class="op-td">'+
+        '<div class="op-btn-box">' +
+        '<a href="'+data.url+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+        '<a href="javascript:void(0)" onclick="quoteDeleteAddFileFromAliyun(this,\''+addFile+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+        '</div>' +
+        '</td>'+
+        '</tr>';
+    console.log("file:"+divId);
+    console.log("str="+str);
+    $("#file"+divId).append(str);
+
+}
+
+
+function quoteDeleteAddFileFromAliyun(obj,addFile){
+    parent.layer.msg('删除成功',{icon:1});
+    $(obj).parent().parent().parent().remove();
+    $("#"+addFile).hide();
+};
+
+
+function quoteDeleteFileFromAliyun(obj,deleteUrl,addFile){
+    $.ajax({
+        type:"post",
+        url:deleteUrl,
+        success:function(data){
+            if(data.str){
+                parent.layer.msg('删除成功',{icon:1});
+                $(obj).parent().parent().parent().remove();
+                $("#"+addFile).hide();
+            }else {
+                parent.layer.msg('删除失败',{icon:2});
+            }
+        }
+    });
+}
+
+function isContains(str, substr) {
+    return str.indexOf(substr) >= 0;
+}
+
+function deleteFileFromAliyun(obj,deleteUrl,addFile,divId){
+    console.log("---------------------------------:");
+    console.log(divId);
+    console.log("---------------------------------");
+    if (divId==null || divId== undefined || divId == ''){
+        divId = "_attachment";
+    }
+    var fileDiv = divId.substr(1,divId.length)+"_file";
+    console.log("---------------------------------:");
+    console.log(fileDiv);
+    console.log("---------------------------------");
+    $("#"+fileDiv).val("");
+    $.ajax({
+        type:"post",
+        url:deleteUrl,
+        success:function(data){
+            if(data.str){
+                parent.layer.msg('删除成功',{icon:1});
+                $(obj).parent().parent().parent().remove();
+                $("#"+addFile).hide();
+            }else {
+                parent.layer.msg('删除失败',{icon:2});
+            }
+        }
+    });
+}
+
+function deleteFileFrom(obj,deleteUrl,addFile,divId,trId){
+    console.log("---------------------------------:");
+    console.log(divId);
+    console.log("---------------------------------");
+    if (divId==null || divId== undefined || divId == ''){
+        divId = "_attachment";
+    }
+    var fileDiv = divId.substr(1,divId.length)+"_file";
+    console.log("---------------------------------:");
+    console.log(fileDiv);
+    console.log("---------------------------------");
+    $("#"+fileDiv).val("");
+    $.ajax({
+        type:"post",
+        url:deleteUrl,
+        success:function(data){
+            if(data.str){
+                parent.layer.msg('删除成功',{icon:1});
+                //$(obj).parent().parent().parent().remove();
+                $("#"+trId).hide();
+            }else {
+                parent.layer.msg('删除失败',{icon:2});
+            }
+        }
+    });
+}

+ 25 - 3
src/main/webapp/webpage/modules/projectcontentinfo/basedDataForm.jsp

@@ -6,6 +6,7 @@
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
 	<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
+	<script src="${ctxStatic}/bos/reportDataBOSUpload.js"></script>
 	<style>
 		label.error{
 			top:40px;
@@ -63,7 +64,12 @@
             var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
             var divId = "_attachment";
             $("#addFile"+divId).show();
-            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,"0");}
+            reportDataMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,"0");}
+        }
+
+        function setValuee(obj){
+            var divId = "_attachment";
+            quoteFile(obj,divId);
         }
 
 	</script>
@@ -143,6 +149,9 @@
 				<div class="form-group-label"><h2>附件信息</h2></div>
 				<div class="layui-item nav-btns">
 					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+
+					<sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectReportData/getContainReportData" id="baseData" title="选择成果文件"
+											cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('成果文件名')}" searchKey="name"></sys:gridselectBaseData>
 				</div>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
@@ -162,6 +171,7 @@
 							<th>文件预览</th>
 							<th>上传人</th>
 							<th>上传时间</th>
+							<th>是否引用成果文件</th>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
@@ -188,14 +198,26 @@
 										</c:choose>
 									</c:otherwise>
 								</c:choose>
-								<td>${workClientAttachment.createBy.name}</td>
+								<td>
+									<input type="hidden" name="workClientAttachment.quoteResult" value="${workClientAttachment.quoteResult}">
+									${workClientAttachment.createBy.name}
+								</td>
 								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td>
+									<c:if test="${workClientAttachment.quoteResult==0}">否</c:if>
+									<c:if test="${workClientAttachment.quoteResult==1}">是</c:if>
+								</td>
 								<td class="op-td">
 									<div class="op-btn-box" >
 										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 
 										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
-											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile','')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											<c:if test="${workClientAttachment.quoteResult==1}">
+												<a href="javascript:void(0)" onclick="quoteDeleteFileFromAliyun(this,'${ctx}/projectcontentinfo/projectBasedData/deleteBasedDataAndWorkAttachment?basedDataId=${projectcontentinfo.projectBasedData.id}&workAttachmentId=${workClientAttachment.id}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:if>
+											<c:if test="${workClientAttachment.quoteResult==0}">
+												<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile','')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+											</c:if>
 										</c:if>
 									</div>
 								</td>

+ 150 - 0
src/main/webapp/webpage/modules/sys/containReportData.jsp

@@ -0,0 +1,150 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		
+
+			    $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
+			    	});
+
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+			    	});
+			    
+			
+		});
+
+		function getSelectedItem(){
+
+			var size = $("#contentTable tbody tr td input.i-checks:checked").size();
+			  if(size == 0 ){
+					top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
+					return "-1";
+				  }
+
+			  if(size > 1 ){
+					top.layer.alert('只能选择一条数据!', {icon: 0, title:'警告'});
+					return "-1";
+				  }
+			 var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
+            var attachmentName = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel1").html();
+            var reportDataName = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel2").html();
+            var attachmentUser = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel3").html();
+            var createDate = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel4").html();
+            var url = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel5").html();
+            var type = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel6").html();
+            return {'id':id,'attachmentName':attachmentName,'reportDataName':reportDataName,'createDate':createDate,'attachmentUser':attachmentUser,'url':url,'type':type};
+		}
+		function page(n,s){
+			if(n) $("#pageNo").val(n);
+			if(s) $("#pageSize").val(s);
+			$("#searchForm").attr("action","${url}");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+	</script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row" id="queryDiv">
+	<form:form id="searchForm" modelAttribute="obj" action="${url}" method="post" class="form-inline">
+		<input type="hidden" name="url" value="${url}"/>
+		<input type="hidden" name="fieldLabels" value="${fieldLabels}"/>
+		<input type="hidden" name="fieldKeys" value="${fieldKeys}"/>
+		<input type="hidden" name="searchKey" value="${searchKey}"/>
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="commonQuery">
+			<div class="layui-item query athird">
+				<span class="layui-form-label">${searchLabel}:</span>
+				<%--<span class="layui-form-label">${fns:urlDecode(searchLabel)}:</span>--%>
+				<div class="layui-input-block">
+					<form:input path="name" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+				</div>
+			</div>
+			<div class="layui-item athird fr">
+				<div class="input-group">
+					<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+					<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+				</div>
+			</div>
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+		<div class="full-width fl">
+			<div class="layui-item layui-col-xs12 form-table-container">
+
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th><input type="checkbox" class="i-checks"></th>
+					<th>成果文件名称</th>
+					<th>成果文件报告名称</th>
+					<th>创建人</th>
+					<th>上传日期</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:choose>
+		<c:when test="${not empty page.list}">
+		<c:forEach items="${page.list}" var="obj2">
+				<tr>
+					<td style="text-align:center;"> <input type="checkbox" id="${fns:getValue(obj2, 'id')}" class="i-checks"></td>
+					<c:choose>
+						<c:when test="${fn:containsIgnoreCase(obj2.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(obj2.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(obj2.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(obj2.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(obj2.attachmentName,'jpeg')}">
+							<td style="text-align:center;"><img src="${obj2.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${obj2.url}','90%','90%')" alt="${obj2.attachmentName}">
+						</c:when>
+						<c:otherwise>
+							<c:choose>
+								<c:when test="${fn:containsIgnoreCase(obj2.attachmentName,'pdf')}">
+									<td style="text-align:center;"><a class="codelabel1" href="javascript:void(0)" onclick="preview('预览','${obj2.url}','90%','90%','1')">${obj2.attachmentName}</a></td>
+								</c:when>
+								<c:otherwise>
+									<td style="text-align:center;"><a class="codelabel1" href="javascript:void(0)" onclick="preview('预览','${obj2.url}','90%','90%')">${obj2.attachmentName}</a></td>
+								</c:otherwise>
+							</c:choose>
+						</c:otherwise>
+					</c:choose>
+
+					<%--<td style="text-align:center;" class="codelabel1"><a href="${obj2.url}">${obj2.attachmentName}</a></td>--%>
+                    <td style="text-align:center;" class="codelabel2">${obj2.reportDataName}</td>
+					<td style="text-align:center;" class="codelabel3">${obj2.attachmentUser}</td>
+					<td style="text-align:center;" class="codelabel4"><fmt:formatDate value="${obj2.createDate}" pattern="yyyy-MM-dd"/></td>
+					<td style="text-align:center; display:none;" class="codelabel5">${obj2.url}</td>
+					<td style="text-align:center; display:none;" class="codelabel6">${obj2.type}</td>
+				</tr>
+		</c:forEach>
+		</c:when>
+			<c:otherwise>
+				<tr>
+					<td colspan="15" align="center">
+						暂无数据
+					</td>
+				</tr>
+			</c:otherwise>
+		</c:choose>
+
+		</tbody>
+	</table>
+			<table:page page="${page}"></table:page>
+			</div>
+		</div>
+		<div class="form-group layui-row page-end"></div>
+	</div>
+</div>
+</body>
+</html>