Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

user7 4 лет назад
Родитель
Сommit
34e68697fb
20 измененных файлов с 433 добавлено и 51 удалено
  1. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java
  2. 34 4
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java
  3. 47 1
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java
  4. 9 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectImplementEarly.java
  5. 9 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  6. 23 2
      src/main/java/com/jeeplus/modules/projectrecord/web/Early/ProjectEarlyReviewController.java
  7. 4 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementCompletionController.java
  8. 31 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementEarlyController.java
  9. 18 2
      src/main/java/com/jeeplus/modules/projectrecord/web/completion/ProjectCompletionReviewController.java
  10. 3 1
      src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml
  11. 2 2
      src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml
  12. 3 1
      src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml
  13. 1 1
      src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectCompletionReviewList.jsp
  14. 3 3
      src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectImplementCompletionList.jsp
  15. 1 1
      src/main/webapp/webpage/modules/projectrecord/implementEarly/projectEarlyReviewList.jsp
  16. 3 3
      src/main/webapp/webpage/modules/projectrecord/implementEarly/projectImplementEarlyList.jsp
  17. 4 10
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportForm.jsp
  18. 19 0
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportView.jsp
  19. 206 16
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workContentForm.jsp
  20. 4 4
      src/main/webapp/webpage/modules/projectreportnum/projectReportNumStageForm.jsp

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

@@ -39,6 +39,7 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	private String change;
 	private String condition;  //条件
 	private String flag;  //条件
+	private String projectContentId;  //工作内容id
 
 	public RuralProjectRecords getProjectOnRural() {
 		return projectOnRural;
@@ -213,4 +214,12 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	public void setFlag(String flag) {
 		this.flag = flag;
 	}
+
+	public String getProjectContentId() {
+		return projectContentId;
+	}
+
+	public void setProjectContentId(String projectContentId) {
+		this.projectContentId = projectContentId;
+	}
 }

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

@@ -270,7 +270,37 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 			}
 			//保存依据资料信息
 			if(projectContentData.getProjectBasedDataList()!=null&&!projectContentData.getProjectBasedDataList().isEmpty()){
-				projectContentDataService.saveBasedData(projectContentData.getId(),projectContentData.getProjectBasedDataList());
+				for (ProjectBasedData data:projectContentData.getProjectBasedDataList()) {
+					//判定是否为全过程管理中的项目复核模块
+					if("132".equals(data.getFlag())){
+						if("132".equals(data.getFileAttachmentFlag())) {
+							//添加工作内容和依据性资料关系
+							projectImplementEarlyService.saveProjectContrntAndBasedId(projectContentData.getId(),data.getId());
+							//将工作内容信息附件保存
+							Workattachment workattachment = new Workattachment();
+							workattachment.setType(data.getFileType());
+							workattachment.setAttachmentFlag(data.getFileAttachmentFlag());
+							workattachment.setUrl(data.getFileUrl());
+							workattachment.setAttachmentName(data.getFileName());
+							workattachment.setAttachmentId(data.getId());
+							workattachment.preInsert();
+							workattachment.setDivIdType(projectContentData.getId());
+							workattachment.setCreateBy(UserUtils.getUser());
+							workattachmentDao.insert(workattachment);
+							//添加依据性资料和附件信息关系
+							ProjectAttachmentInfo projectAttachmentInfo = new ProjectAttachmentInfo();
+							projectAttachmentInfo.setAttachmentId(workattachment.getId());
+							projectAttachmentInfo.setProjectId(data.getId());
+							projectImplementEarlyService.saveProjectAndAttachmentContact(projectAttachmentInfo);
+						}
+					}else{
+						if (data.getDelFlag().equals("0")){
+							List<ProjectBasedData> projectBasedData = new ArrayList<>();
+							projectBasedData.add(data);
+							projectContentDataService.saveBasedData(projectContentData.getId(),projectBasedData);
+						}
+					}
+				}
 				projectBasedDataList = projectContentData.getProjectBasedDataList();
 			}
 			//保存过程控制信息
@@ -397,7 +427,7 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 				}
 			}
 			//保存相关依据资料信息
-			if(projectReportData.getProjectBasedDataList()!=null&&!projectReportData.getProjectBasedDataList().isEmpty()){
+			/*if(projectReportData.getProjectBasedDataList()!=null&&!projectReportData.getProjectBasedDataList().isEmpty()){
 				projectReportDataService.deleteReportDataBased(projectReportData);
 				for (ProjectBasedData data:projectReportData.getProjectBasedDataList()) {
 					//判定是否为全过程管理中的项目复核模块
@@ -428,7 +458,7 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 						}
 					}
 				}
-			}
+			}*/
 			//添加工作内容和报告关系
 			if("according".equals(projectcontentinfo.getCondition())){
 				Integer contentAndReportCount = projectImplementEarlyService.getProjectContrntAndReport(projectReportData.getProjectContentDataList().get(0).getId(), projectReportData.getId());
@@ -628,7 +658,7 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 				dao.updateByLinkId(projectcontent.getId(),dataName);
 			}
 			this.save(projectcontent);
-			if(projectBasedDataList!=null&&projectBasedDataList.size()!=0){
+			if(projectBasedDataList!=null&&projectBasedDataList.size()!=0 && StringUtils.isBlank(projectcontentinfo.getCondition())){
 				this.createBasedMenu(projectcontent,projectBasedDataList);
 			}
 			if(projectControlTableList!=null&&projectControlTableList.size()!=0){

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

@@ -581,6 +581,9 @@ public class ProjectcontentinfoController extends BaseController {
 
 	@RequestMapping(value = {"form"})
 	public String form(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model,RedirectAttributes attr) {
+		if("modify".equals(projectcontentinfo.getFlag())){
+			model.addAttribute("modify",projectcontentinfo.getFlag());
+		}
 		String dictType = projectcontentinfo.getDictType();
 		ProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo.getProject().getId());
 		projectcontentinfo.setProject(records);
@@ -632,11 +635,47 @@ public class ProjectcontentinfoController extends BaseController {
 				projectContentData.setProjectControlTableList(controlData);
 				projectContentDataService.queryBasedData(projectContentData);
 			}
+
+			if("according".equals(projectcontentinfo.getCondition()) || "completion".equals(projectcontentinfo.getCondition()) || "early".equals(projectcontentinfo.getCondition())){
+				/**
+				 * 查询配置的宜居性资料并添加到展示view中
+				 */
+				List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(projectContentData.getType());
+				for (ProjectBasedData projectBasedData: projectBasedDataList) {
+					ProjectBasedData contentAttachmentData =  projectTypeService.getBasedData(projectContentData.getId(),projectBasedData.getId());
+					if (null != contentAttachmentData) {
+						try {
+							MyBeanUtils.copyBeanNotNull2Bean(contentAttachmentData, projectBasedData);
+						}catch (Exception e) {
+							e.printStackTrace();
+						}
+					}
+					projectBasedData.setFlag("according");
+					if (StringUtils.isNotBlank(projectBasedData.getFileAttachmentId())) {
+						projectBasedData.setUploadUser(UserUtils.get(projectBasedData.getFileAttachmentId()));
+					}
+				}
+				for (ProjectBasedData projectBasedData: projectContentData.getProjectBasedDataList()) {
+					projectBasedData.setType(dictService.dictLabel("project_document_type",projectBasedData.getType()));
+				}
+				projectContentData.getProjectBasedDataList().addAll(projectBasedDataList);
+			}
+
+
 			projectcontentinfo.setProjectContentData(projectContentData);
 			model.addAttribute("projectcontentinfo", projectcontentinfo);
+
+
 			if (projectcontentinfo.getView().equals("contentView")){
+				if ("according".equals(projectcontentinfo.getCondition()) || "completion".equals(projectcontentinfo.getCondition())){
+					return "modules/projectrecord/workContentFromAndView/workContentView";
+				}
 				return "modules/projectcontentinfo/workContentView";
 			}else {
+				if ("according".equals(projectcontentinfo.getCondition()) || "completion".equals(projectcontentinfo.getCondition()) || "early".equals(projectcontentinfo.getCondition())){
+					model.addAttribute("flag",projectcontentinfo.getCondition());
+					return "modules/projectrecord/workContentFromAndView/workContentForm";
+				}
 				if (projectContentData != null && projectContentData.getCreateBy() != null && StringUtils.isNotBlank(projectContentData.getCreateBy().getId()) && projectContentData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
 					return "modules/projectcontentinfo/workContentForm";
 				} else if (projectContentData == null || StringUtils.isBlank(projectContentData.getId())) {
@@ -826,7 +865,7 @@ public class ProjectcontentinfoController extends BaseController {
 	public String save(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model
 			,RedirectAttributes redirectAttributes) throws Exception {
 		/*try{*/
-			String str = projectcontentinfoService.saveData(projectcontentinfo,1);
+			String str =  projectcontentinfoService.saveData(projectcontentinfo,1);
 			if( projectcontentinfo.getProjectContentData() != null && StringUtils.isNotBlank(projectcontentinfo.getProjectContentData().getType())){
 				ProjectContentData projectContentData = projectcontentinfo.getProjectContentData();
 				projectContentData.setId("");
@@ -856,6 +895,13 @@ public class ProjectcontentinfoController extends BaseController {
 					projectContentData.setProject(projectcontentinfo.getProject());
 					List<ProjectContentData> list = projectContentDataService.findList(projectContentData);
 					model.addAttribute("list", list);
+
+					if("according".equals(projectcontentinfo.getCondition())){
+						return "redirect:"+Global.getAdminPath()+"/project/projectEarlyReview/?repage";
+					}
+					if("completion".equals(projectcontentinfo.getCondition())){
+						return "redirect:"+Global.getAdminPath()+"/project/projectCompletionReview/?repage";
+					}
 					if("early".equals(projectcontentinfo.getCondition())){
 						return "redirect:"+Global.getAdminPath()+"/project/projectImplementEarly/?repage";
 					}else if("stage".equals(projectcontentinfo.getCondition())){

+ 9 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectImplementEarly.java

@@ -52,6 +52,7 @@ public class ProjectImplementEarly extends DataEntity<ProjectImplementEarly> {
     private Double installUnitFees;    //安装单位造价
     private Double totalFees;        //总合同额
     private String projectRegistrant;  //项目登记人
+    private String projectContentId;  //工作内容id
 
     //新添代码
     private String projectTypeId; //项目类型
@@ -611,4 +612,12 @@ public class ProjectImplementEarly extends DataEntity<ProjectImplementEarly> {
     public void setWorkDesignLinkmanList(List<WorkClientLinkman> workDesignLinkmanList) {
         this.workDesignLinkmanList = workDesignLinkmanList;
     }
+
+    public String getProjectContentId() {
+        return projectContentId;
+    }
+
+    public void setProjectContentId(String projectContentId) {
+        this.projectContentId = projectContentId;
+    }
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java

@@ -26,6 +26,7 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
 
     private List<String> masterIdList;  //项目负责人集合
     private Integer operationSign;   //操作标识
+    private String projectContentId;  //工作内容id
 
     public String getProjectId() {
         return projectId;
@@ -170,4 +171,12 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     public void setReportName(String reportName) {
         this.reportName = reportName;
     }
+
+    public String getProjectContentId() {
+        return projectContentId;
+    }
+
+    public void setProjectContentId(String projectContentId) {
+        this.projectContentId = projectContentId;
+    }
 }

+ 23 - 2
src/main/java/com/jeeplus/modules/projectrecord/web/Early/ProjectEarlyReviewController.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.projectrecord.web.Early;
 
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
@@ -198,13 +199,33 @@ public class ProjectEarlyReviewController extends BaseController {
         String typeId = projectContentDataList.get(0).getType();
         //获取该工作内容的依据性资料信息
         List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(typeId);
-        if(projectBasedDataList.size()>0){
+        for (ProjectBasedData projectBasedData: projectBasedDataList) {
+            ProjectBasedData contentAttachmentData =  projectTypeService.getBasedData(projectContentDataList.get(0).getId(),projectBasedData.getId());
+
+            if (null != contentAttachmentData) {
+                try {
+                    MyBeanUtils.copyBeanNotNull2Bean(contentAttachmentData, projectBasedData);
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            projectBasedData.setFlag("according");
+            if (StringUtils.isNotBlank(projectBasedData.getFileAttachmentId())) {
+                projectBasedData.setUploadUser(UserUtils.get(projectBasedData.getFileAttachmentId()));
+            }
+        }
+        /*for (ProjectBasedData projectBasedData: projectContentData.getProjectBasedDataList()) {
+            projectBasedData.setType(dictService.dictLabel("project_document_type",projectBasedData.getType()));
+        }*/
+        //projectReportData.getProjectBasedDataList().addAll(projectBasedDataList);
+
+        /*if(projectBasedDataList.size()>0){
             for (ProjectBasedData projectBasedData: projectBasedDataList) {
                 projectBasedData.setFlag("according");
                 projectBasedData.setUploadDate(new Date());
                 projectBasedData.setUploadUser(UserUtils.getUser());
             }
-        }
+        }*/
         projectReportData.setProjectBasedDataList(projectBasedDataList);
         projectReportData.setProjectContentDataList(projectContentDataList);
         projectcontentinfo.setProjectReportData(projectReportData);

+ 4 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementCompletionController.java

@@ -108,6 +108,7 @@ public class ProjectImplementCompletionController {
             projectRecordTreeData.setId(records1.getId());
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectId(records1.getProjectId());
+            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
             if(null!= records1.getWorkContractInfo()){
                 projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
                 projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
@@ -205,6 +206,9 @@ public class ProjectImplementCompletionController {
         projectcontentinfo.setProjectContentData(projectContentData);
         String projectType = projectImplementEarlyService.getProjectType(records.getProjectTypeId(), "竣工阶段");
         projectcontentinfo.setType(projectType);
+        if(StringUtils.isBlank(projectcontentinfo.getId()) && StringUtils.isNotBlank(projectcontentinfo.getProjectContentId())){
+            projectcontentinfo.setId(projectcontentinfo.getProjectContentId());
+        }
         model.addAttribute("projectcontentinfo", projectcontentinfo);
         model.addAttribute("flag", "complement");
         if (projectcontentinfo.getView().equals("contentView")){

+ 31 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementEarlyController.java

@@ -2,6 +2,8 @@ package com.jeeplus.modules.projectrecord.web;
 
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectType.service.ProjectTypeService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
@@ -50,6 +52,8 @@ public class ProjectImplementEarlyController {
     private ProjectContentDataService projectContentDataService;
     @Autowired
     private ProjectControlTableService projectControlTableService;
+    @Autowired
+    private ProjectTypeService projectTypeService;
 
     @ModelAttribute
     public ProjectImplementEarly get(@RequestParam(required=false) String id) {
@@ -108,6 +112,7 @@ public class ProjectImplementEarlyController {
             projectRecordTreeData.setId(records1.getId());
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectId(records1.getProjectId());
+            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
             if(null!= records1.getWorkContractInfo()){
                 projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
                 projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
@@ -204,6 +209,9 @@ public class ProjectImplementEarlyController {
             projectcontentinfo.setProjectContentData(projectContentData);
             String projectType = projectImplementEarlyService.getProjectType(records.getProjectTypeId(), "实施前期");
             projectcontentinfo.setType(projectType);
+            if(StringUtils.isBlank(projectcontentinfo.getId()) && StringUtils.isNotBlank(projectcontentinfo.getProjectContentId())){
+                projectcontentinfo.setId(projectcontentinfo.getProjectContentId());
+            }
             model.addAttribute("projectcontentinfo", projectcontentinfo);
             model.addAttribute("flag", "early");
             if (projectcontentinfo.getView().equals("contentView")){
@@ -222,4 +230,27 @@ public class ProjectImplementEarlyController {
         }else if(projectcontentinfo.getView().contains("completion")){}
         return "";
     }
+
+    /**
+     * 根据type查询对应的宜居性文件内容
+     * @param typeId
+     * @return
+     */
+    @RequestMapping(value = {"projectBasedDataList"})
+    @ResponseBody
+    public Map projectBasedDataList(String typeId){
+        Map<String,List<ProjectBasedData>> map = new HashMap<>();
+        //获取该工作内容的依据性资料信息
+        List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(typeId);
+        if(projectBasedDataList.size()>0){
+            for (ProjectBasedData projectBasedData: projectBasedDataList) {
+                projectBasedData.setFlag("according");
+                projectBasedData.setUploadDate(new Date());
+                projectBasedData.setUploadUser(UserUtils.getUser());
+                projectBasedData.setType(typeId);
+            }
+        }
+        map.put("projectBasedDataList",projectBasedDataList);
+        return map;
+    }
 }

+ 18 - 2
src/main/java/com/jeeplus/modules/projectrecord/web/completion/ProjectCompletionReviewController.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.projectrecord.web.completion;
 
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
@@ -198,13 +199,28 @@ public class ProjectCompletionReviewController extends BaseController {
         String typeId = projectContentDataList.get(0).getType();
         //获取该工作内容的依据性资料信息
         List<ProjectBasedData> projectBasedDataList =  projectTypeService.getAccrdingDataList(typeId);
-        if(projectBasedDataList.size()>0){
+        for (ProjectBasedData projectBasedData: projectBasedDataList) {
+            ProjectBasedData contentAttachmentData =  projectTypeService.getBasedData(projectContentDataList.get(0).getId(),projectBasedData.getId());
+
+            if (null != contentAttachmentData) {
+                try {
+                    MyBeanUtils.copyBeanNotNull2Bean(contentAttachmentData, projectBasedData);
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            projectBasedData.setFlag("according");
+            if (StringUtils.isNotBlank(projectBasedData.getFileAttachmentId())) {
+                projectBasedData.setUploadUser(UserUtils.get(projectBasedData.getFileAttachmentId()));
+            }
+        }
+        /*if(projectBasedDataList.size()>0){
             for (ProjectBasedData projectBasedData: projectBasedDataList) {
                 projectBasedData.setFlag("according");
                 projectBasedData.setUploadDate(new Date());
                 projectBasedData.setUploadUser(UserUtils.getUser());
             }
-        }
+        }*/
         projectReportData.setProjectBasedDataList(projectBasedDataList);
         projectReportData.setProjectContentDataList(projectContentDataList);
         projectcontentinfo.setProjectReportData(projectReportData);

+ 3 - 1
src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml

@@ -174,7 +174,9 @@
 	</select>
 
 	<select id="getAccrdingDataList" resultType="ProjectBasedData">
-		select a.id as id,#{typeId} as number, a.type_name as name,a.choose_condition as chooseCondition,pt.type_name as `type`  from project_type a
+		select a.id as id,#{typeId} as number, a.type_name as name,
+		a.choose_condition as chooseCondition,pt.type_name as `type`,pt.type_name as `typeLabel`
+		from project_type a
 		left join project_type pt on a.parent_id = pt.type_id
 		where a.parent_id =#{typeId}
 	</select>

+ 2 - 2
src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml

@@ -302,7 +302,7 @@
 	</select>
 
 	<select id="getProjectContentReportDataList" resultType="com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData">
-		select distinct(a.id) as "id", a.create_by as "createBy.id", a.create_date as "createDate", a.project_id as "pid",
+		select a.id as "id", a.create_by as "createBy.id", a.create_date as "createDate", a.project_id as "pid",
 		a.name as "projectName", "" as projectId, "0" as projectStatus,su.name as "projectRegistrant" ,
 		pt.type_name as projectLeader, ppt.type_name as clientName,prd.status as status,prd.id as reportId,ifnull(prd.name,'') as reportName
 		from project_content_data a
@@ -311,7 +311,7 @@
 		left join project_type ppt on pt.parent_id = ppt.id
 		left join project_content_report pcr on pcr.content_id = a.id
 		left join project_report_data prd on prd.id = pcr.report_id
-		where a.project_id = #{projectId} and pt.parent_id =#{projectTypeParentId} and a.del_flag = 0 order by prd.update_date desc, a.update_date desc
+		where a.project_id = #{projectId} and pt.parent_id =#{projectTypeParentId} and a.del_flag = 0 order by prd.status, a.update_date desc, prd.update_date desc
 	</select>
 
 	<select id="getProjectContentData" resultType="ProjectContentData">

+ 3 - 1
src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml

@@ -57,12 +57,14 @@
 		wct.id AS "workContractInfo.client.id",
 		wct.name AS "workContractInfo.client.name",
 		o.top_company AS "office.name",
-		dsu.name as "projectRegistrant"
+		dsu.name as "projectRegistrant",
+		pci.id as projectContentId
 		FROM project_records a
 		<include refid="projectRecordsJoins"/>
 
 
 		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN project_content_info pci on pci.project_id = a.id
 		LEFT JOIN sys_user su on w.user_id = su.id
 		LEFT JOIN sys_user dsu on a.create_by = dsu.id
         LEFT JOIN work_project_user w1 on a.id = w1.project_id

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectCompletionReviewList.jsp

@@ -293,7 +293,7 @@
                     	if(0 == d.pid){
 							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}else{
-							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=completion&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
                     {field: 'reportName', align:'center', title: '成果文件名称',templet:function(d){

+ 3 - 3
src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectImplementCompletionList.jsp

@@ -293,7 +293,7 @@
                     	if(0 == d.pid){
 							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}else{
-							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=completion&flag=modify&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
 					/*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
@@ -372,12 +372,12 @@
         function complain(d){//操作中显示的内容
 			if(1 == d.operationSign) {
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementCompletion/form?view=before&dictType=&parentIds=&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementCompletion/form?view=before&dictType=&parentIds=&projectContentId='+d.projectContentId+'&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
 					].join('');
 			} else if (d.pid!="0"){
 					//子级内容
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=completion&flag=modify&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
 						/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
 					].join('');
 				}else{

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/implementEarly/projectEarlyReviewList.jsp

@@ -314,7 +314,7 @@
                     	if(0 == d.pid){
 							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}else{
-							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=according&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
                     {field: 'reportName', align:'center', title: '成果文件名称',templet:function(d){

+ 3 - 3
src/main/webapp/webpage/modules/projectrecord/implementEarly/projectImplementEarlyList.jsp

@@ -314,7 +314,7 @@
                     	if(0 == d.pid){
 							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}else{
-							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=according&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
 					/*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
@@ -393,12 +393,12 @@
         function complain(d){//操作中显示的内容
 			if(1 == d.operationSign) {
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementEarly/form?view=before&dictType=&parentIds=&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementEarly/form?view=before&dictType=&parentIds=&projectContentId='+d.projectContentId+'&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
 					].join('');
 			} else if (d.pid!="0"){
 					//子级内容
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&flag=modify&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
 						/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
 					].join('');
 				}else{

+ 4 - 10
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportForm.jsp

@@ -596,18 +596,12 @@
 				</div>
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>依据性资料明细</h2></div>
-				<div class="layui-item nav-btns">
+				<%--<div class="layui-item nav-btns">
 					<a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
 
 					<sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
 											cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
-				</div>
-
-				<div id="workBaseDataList0_type">
-
-				</div>
-
-
+				</div>--%>
 
 				<div class="layui-item layui-col-xs12 form-table-container">
 					<table id="contentTableBase" class="table table-bordered table-condensed details">
@@ -689,13 +683,13 @@
 													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${projectBasedData.fileUrl}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 												</c:when>
 												<c:otherwise>
-													<a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
+													<%--<a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>--%>
 												</c:otherwise>
 											</c:choose>
 
 										</c:when>
 										<c:otherwise>
-											<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+											<%--<a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>--%>
 										</c:otherwise>
 									</c:choose>
 									</div>

+ 19 - 0
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/reportView.jsp

@@ -158,6 +158,7 @@
 						<th >资料内容</th>
 						<th >上传人</th>
 						<th >上传日期</th>
+						<th >操作</th>
 					</tr>
 					</thead>
 					<tbody id="workBaseDataList">
@@ -204,6 +205,24 @@
 							<td style="text-align:center;">
 								<fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
 							</td>
+							<td style="text-align:center;">
+								<div id="workBaseDataList${idx.index}_operation">
+									<c:choose>
+										<c:when test="${ projectBasedData.flag =='according'}">
+											<c:choose>
+												<c:when test="${not empty projectBasedData.fileUrl}">
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${projectBasedData.fileUrl}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:when>
+												<c:otherwise>
+												</c:otherwise>
+											</c:choose>
+
+										</c:when>
+										<c:otherwise>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</td>
 						</tr>
 					</c:forEach>
 					</tbody>

+ 206 - 16
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workContentForm.jsp

@@ -34,6 +34,21 @@
         var detailFlag =0;
         function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+
+                var length = document.getElementById("workBaseDataList");
+                var rows = length.rows.length;
+                var idList = [];
+                for (var i=0;i<rows;i++){
+                    var chooseCondition = $("#workBaseDataList"+i+"_chooseCondition").val();
+                    if(chooseCondition==1){
+                        var fileUrl = $("#workBaseDataList"+i+"_fileUrl").val();
+                        if(fileUrl == null || fileUrl == ''){
+                            layer.msg('请上传依据性资料必填文件', {icon: 5});
+                            return false;
+                        }
+                    }
+                }
+
                 beforeSubmit();
                 $("#inputForm").submit();
                 return true;
@@ -43,11 +58,14 @@
         }
         function beforeSubmit() {
             var contentDetaStr = '';
-            if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
-                contentDetaStr += encodeURIComponent(genDetailStr());
-            }
-            if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
-                contentDetaStr += encodeURIComponent(genSecondDetailStr());
+            var contentTypeId = $("#projectContentDataSign").val();
+            if(contentTypeId !=24){
+                if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
+                    contentDetaStr += encodeURIComponent(genDetailStr());
+                }
+                if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
+                    contentDetaStr += encodeURIComponent(genSecondDetailStr());
+                }
             }
             if(detailFlag==1){
                 $("#contentDeta").val(contentDetaStr);
@@ -161,10 +179,62 @@
             var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
             return currentdate;
         }
+
+        function accordingBtn(obj, prefix,userId){
+            //var id = $(prefix+"_id").val();
+            $(prefix+"_file").click();
+        }
+
+        function insertAccording(tValue,idx,prefix) {
+            var files = $(prefix+"_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "132";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
+            }
+            $(prefix+"_file").val(123)
+            //var idx1 = $("#workBaseDataList tr").length +1;
+        }
+
         
         function changeContentDetail(obj) {
-            $("#contentDetail").empty();
             var val = $(obj).val();
+            var modify = $("#modify").val();
+            if("modify" != modify){
+                $("#workBaseDataList").empty();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/project/projectImplementEarly/projectBasedDataList',
+                    data:{
+                        "typeId":val
+                    },
+                    success:function(data){
+                        console.log(data);
+                        if(data.projectBasedDataList.length > 0){
+                            var data = data.projectBasedDataList;
+                            for(var i=0;i<data.length;i++){
+                                var idArr = $("#workBaseDataList tr:visible .clientId");
+                                if(data[i].id!=''&&!hasInArr(data[i].id,idArr)){
+                                    addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTplFirst,data[i]);
+                                    workBaseDataRowIdx=workBaseDataRowIdx+1;
+                                }
+                            }
+                        }
+                    }
+                })
+
+            }
+
+
+            $("#contentDetail").empty();
             contentDetailTypeShow(val);
             $("#contentDetailTypeDiv").show();
             $("#projectContentDataSign").val(val);
@@ -475,6 +545,7 @@
             <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
             <input type="hidden" id="dataBodyList" name="dataBodyList" value="">
             <input type="hidden" id="projectContentDataSign" name="projectContentDataSign" value="">
+            <input type="hidden" id="modify"  value="${modify}">
             <sys:message content="${message}"/>
             <div class="form-group layui-row first lw12">
                 <div class="form-group-label"><h2>基本信息</h2></div>
@@ -489,12 +560,27 @@
                                     <form:options items="${fns:getContentTypeByProjectType(projectcontentinfo.type)}" itemLabel="typeName" itemValue="typeId"></form:options>
                                 </c:when>
                                 <c:otherwise>
-                                    <optgroup label="项目实施前期"/>
+                                        <c:choose>
+                                            <c:when test="${projectcontentinfo.projectContentData.type != null and projectcontentinfo.projectContentData.type !=''}">
+                                                <optgroup label=${fns:getProjectTypeName(projectcontentinfo.projectContentData.type,'' )}>
+                                                    <form:options items="${fns:getContentTypeByProjectType(projectcontentinfo.type)}" itemLabel="typeName" itemValue="typeId"></form:options>
+                                                </c:when>
+                                            <c:otherwise>
+
+                                                <optgroup label="项目实施前期"/>
+                                                    <form:options items="${fns:getContentTypeByProjectType('2')}" itemLabel="typeName" itemValue="typeId"></form:options>
+                                                <optgroup label="项目实施阶段"/>
+                                                    <form:options items="${fns:getContentTypeByProjectType('3')}" itemLabel="typeName" itemValue="typeId"></form:options>
+                                                <optgroup label="项目竣工阶段"/>
+                                                    <form:options items="${fns:getContentTypeByProjectType('4')}" itemLabel="typeName" itemValue="typeId"></form:options>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    <%--<optgroup label="项目实施前期"/>
                                     <form:options items="${fns:getContentTypeByProjectType('2')}" itemLabel="typeName" itemValue="typeId"></form:options>
                                     <optgroup label="项目实施阶段"/>
                                     <form:options items="${fns:getContentTypeByProjectType('3')}" itemLabel="typeName" itemValue="typeId"></form:options>
                                     <optgroup label="项目竣工阶段"/>
-                                    <form:options items="${fns:getContentTypeByProjectType('4')}" itemLabel="typeName" itemValue="typeId"></form:options>
+                                    <form:options items="${fns:getContentTypeByProjectType('4')}" itemLabel="typeName" itemValue="typeId"></form:options>--%>
                                 </c:otherwise>
                             </c:choose>
                         </form:select>
@@ -559,9 +645,10 @@
                 <thead>
                 <tr>
                     <th class="hide"></th>
-                    <th >资料编号</th>
+                    <%--<th >资料编号</th>--%>
                     <th >资料名称</th>
                     <th >资料类别</th>
+                    <th >资料内容</th>
                     <th >上传人</th>
                     <th >上传日期</th>
                     <th>操作</th>
@@ -571,16 +658,53 @@
                 <c:forEach items="${projectcontentinfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
                     <tr>
                         <td class="hide">
-                            <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
+                            <input id="workBaseDataList${idx.index}_id"      name="projectReportData.projectBasedDataList[${idx.index}].id"     type="hidden" value="${projectBasedData.id}"  class="clientId">
+                            <input id="workBaseDataList${idx.index}_file" type="file" name="projectReportData.projectBasedDataList[${idx.index}].file" multiple="multiple" style="display: none;" onChange="if(this.value)insertAccording(this.value,${idx.index},'#workBaseDataList${idx.index}');"/>
+                            <input id="workBaseDataList${idx.index}_number"	 name="projectReportData.projectBasedDataList[${idx.index}].number" type="hidden" value="${projectBasedData.number}"/>
+                            <input id="workBaseDataList${idx.index}_name" 	 name="projectReportData.projectBasedDataList[${idx.index}].name"   type="hidden" value="${projectBasedData.name}"/>
+                            <input id="workBaseDataList${idx.index}_type"	 name="projectReportData.projectBasedDataList[${idx.index}].type"   type="hidden" value="${projectBasedData.type}"/>
+                            <input id="workBaseDataList${idx.index}_flag"	 name="projectReportData.projectBasedDataList[${idx.index}].flag"   type="hidden" value="132"/>
+                            <input id="workBaseDataList${idx.index}_chooseCondition"	 name="projectReportData.projectBasedDataList[${idx.index}].chooseCondition"   type="hidden" value="${projectBasedData.chooseCondition}"/>
+
+                            <input id="workBaseDataList${idx.index}_fileType"	 name="projectReportData.projectBasedDataList[${idx.index}].fileType"   type="hidden" value=""/>
+                            <input id="workBaseDataList${idx.index}_fileName"	 name="projectReportData.projectBasedDataList[${idx.index}].fileName"   type="hidden" value=""/>
+                            <input id="workBaseDataList${idx.index}_fileUrl"	 name="projectReportData.projectBasedDataList[${idx.index}].fileUrl"   type="hidden" value=""/>
+                            <input id="workBaseDataList${idx.index}_fileAttachmentFlag"	 name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentFlag"   type="hidden" value=""/>
+                            <input id="workBaseDataList${idx.index}_fileAttachmentId"	 name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentId"   type="hidden" value=""/>
                         </td>
-                        <td style="text-align:center;">
+                        <%--<td style="text-align:center;">
                                 ${projectBasedData.number}
-                        </td>
+                        </td>--%>
                         <td style="text-align:center;">
                                 ${projectBasedData.name}
                         </td>
                         <td style="text-align:center;">
-                                ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
+
+                                ${projectBasedData.type}
+                               <%-- ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}--%>
+                        </td>
+                        <td style="text-align:center;">
+                            <div id="workBaseDataList${idx.index}_fileTypeDiv">
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'jpg')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'png')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'gif')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'bmp')
+															   or fn:containsIgnoreCase(projectBasedData.fileName,'jpeg')}">
+                                        <img src="${projectBasedData.fileUrl}" width="50" height="50" title ="${projectBasedData.fileName}" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${projectBasedData.fileUrl}','90%','90%')" alt="${projectBasedData.fileName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'pdf')}">
+                                                <a class="attention-info" href="javascript:void(0)" title ="${projectBasedData.fileName}" onclick="preview('预览','${projectBasedData.fileUrl}','90%','90%','1')">${projectBasedData.fileName}</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a class="attention-info" href="javascript:void(0)" title ="${projectBasedData.fileName}" onclick="preview('预览','${projectBasedData.fileUrl}','90%','90%')">${projectBasedData.fileName}</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </div>
                         </td>
                         <td style="text-align:center;">
                                 ${projectBasedData.uploadUser.name}
@@ -590,7 +714,24 @@
                         </td>
 
                         <td class="text-center op-td">
-                            <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                            <div id="workBaseDataList${idx.index}_operation">
+                                <c:choose>
+                                    <c:when test="${ projectBasedData.flag =='according'}">
+                                        <c:choose>
+                                            <c:when test="${not empty projectBasedData.fileUrl}">
+                                                <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${projectBasedData.fileUrl}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
+                                            </c:otherwise>
+                                        </c:choose>
+
+                                    </c:when>
+                                    <c:otherwise>
+                                        <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                                    </c:otherwise>
+                                </c:choose>
+                            </div>
                         </td>
                     </tr>
                 </c:forEach>
@@ -598,24 +739,72 @@
             </table>
                 </div>
             </div>
-            <script type="text/template" id="workBaseDataTpl">//<!--
+            <script type="text/template" id="workBaseDataTplFirst">//<!--
                 <tr id="budgetList{{idx}}">
                     <td class="hide">
+                            <input id="workBaseDataList{{idx}}_file" type="file" name="projectContentData.projectBasedDataList[{{idx}}].file" multiple="multiple" style="display: none;" onChange="if(this.value)insertAccording(this.value,{{idx}},'#workBaseDataList{{idx}}');"/>
+                            <input id="workBaseDataList{{idx}}_flag"	 name="projectContentData.projectBasedDataList[{{idx}}].flag"   type="hidden" value="132"/>
+                            <input id="workBaseDataList{{idx}}_chooseCondition"	 name="projectContentData.projectBasedDataList[{{idx}}].chooseCondition"   type="hidden" value="{{row.chooseCondition}}"/>
+
                         <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
                         <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
                         <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
                         <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
+
+                        <input id="workBaseDataList{{idx}}_fileType"	 name="projectContentData.projectBasedDataList[{{idx}}].fileType"   type="hidden" value=""/>
+                        <input id="workBaseDataList{{idx}}_fileName"	 name="projectContentData.projectBasedDataList[{{idx}}].fileName"   type="hidden" value=""/>
+                        <input id="workBaseDataList{{idx}}_fileUrl"	 name="projectContentData.projectBasedDataList[{{idx}}].fileUrl"   type="hidden" value=""/>
+                        <input id="workBaseDataList{{idx}}_fileAttachmentFlag"	 name="projectContentData.projectBasedDataList[{{idx}}].fileAttachmentFlag"   type="hidden" value=""/>
+                        <input id="workBaseDataList{{idx}}}_fileAttachmentId"	 name="projectContentData.projectBasedDataList[{{idx}}].fileAttachmentId"   type="hidden" value=""/>
                     </td>
-                    <td style="text-align:center;">
+                    <%--<td style="text-align:center;">
                         {{row.number}}
+                    </td>--%>
+                    <td style="text-align:center;">
+                        {{row.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.typeLabel}}
+                    </td>
+                    <td style="text-align:center;">
+                        <div id="workBaseDataList{{idx}}_fileTypeDiv">
+                        </div>
                     </td>
                     <td style="text-align:center;">
+                        {{row.uploadUser.name}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.uploadDate}}
+                    </td>
+                    <td class="text-center op-td">
+                        <div id="workBaseDataList{{idx}}_operation">
+                            <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
+                        </div>
+                    </td>
+                </tr>//-->
+            </script>
+            <script type="text/template" id="workBaseDataTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
+                        <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
+                        <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
+                        <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
+                    </td>
+                    <%--<td style="text-align:center;">
+                        {{row.number}}
+                    </td>--%>
+                    <td style="text-align:center;">
                         {{row.name}}
                     </td>
                     <td style="text-align:center;">
                         {{row.typeLabel}}
                     </td>
                     <td style="text-align:center;">
+                        <div id="workBaseDataList{{idx}}_fileTypeDiv">
+                        </div>
+                    </td>
+                    <td style="text-align:center;">
                         {{row.uploadUser.name}}
                     </td>
                     <td style="text-align:center;">
@@ -628,6 +817,7 @@
             </script>
             <script type="text/javascript">
                 var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workBaseDataTplFirst = $("#workBaseDataTplFirst").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                 var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
                 function setValuee(obj){
                     for(var i=0;i<obj.length;i++){

+ 4 - 4
src/main/webapp/webpage/modules/projectreportnum/projectReportNumStageForm.jsp

@@ -73,7 +73,7 @@
 				<div class="layui-item layui-col-sm6" style="width:50%">
 					<label class="layui-form-label double-line"><span class="require-item">*</span>选择阶段信息:</label>
 					<div class="layui-input-block">
-						<%--<form:select id="stageId" path="stageId"  htmlEscape="false" class="form-control simple-select required">
+						<form:select id="stageId" path="stageId"  htmlEscape="false" class="form-control simple-select required">
 							<form:option value=""></form:option>
 							<optgroup label="项目实施前期"/>
 							<form:options items="${fns:getContentTypeByProjectType('2')}" itemLabel="typeName" itemValue="typeId"></form:options>
@@ -81,8 +81,8 @@
 							<form:options items="${fns:getContentTypeByProjectType('3')}" itemLabel="typeName" itemValue="typeId"></form:options>
 							<optgroup label="项目竣工阶段"/>
 							<form:options items="${fns:getContentTypeByProjectType('5')}" itemLabel="typeName" itemValue="typeId"></form:options>
-						</form:select>--%>
-						<form:select id="stageId" path="stageId"  htmlEscape="false" class="form-control simple-select required">
+						</form:select>
+						<%--<form:select id="stageId" path="stageId"  htmlEscape="false" class="form-control simple-select required">
 							<form:option value=""></form:option>
 							<optgroup label="决策阶段"/>
 							<form:options items="${fns:getContentTypeList('1')}" itemLabel="typeName" itemValue="typeId"></form:options>
@@ -96,7 +96,7 @@
 							<form:options items="${fns:getContentTypeList('5')}" itemLabel="typeName" itemValue="typeId"></form:options>
 							<optgroup label="运营阶段"/>
 							<form:options items="${fns:getContentTypeList('6')}" itemLabel="typeName" itemValue="typeId"></form:options>
-						</form:select>
+						</form:select>--%>
 					</div>
 				</div>
 				<%--<div class="layui-item layui-col-sm6" style="width:50%">