user5 4 лет назад
Родитель
Сommit
8baf1440eb

+ 76 - 0
src/main/java/com/jeeplus/modules/projectType/dao/ProjectResultsFileTemplateDao.java

@@ -0,0 +1,76 @@
+package com.jeeplus.modules.projectType.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
+import com.jeeplus.modules.projectType.entity.ProjectType;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 成果文件模板DAO接口
+ * @author 徐滕
+ * @version 2020-07-22
+ */
+@MyBatisDao
+public interface ProjectResultsFileTemplateDao  extends CrudDao<ProjectTemplateType> {
+    List<ProjectType> findProjectList(ProjectTemplateType projectType);
+
+    /**
+     * 获取最新的一个父节点id
+     * @return
+     */
+    String getNewParentId();
+
+    /**
+     * 获取最新的一个id
+     * @return
+     */
+    String getNewId();
+
+    /**
+     * 获取最新的一个type_id
+     * @return
+     */
+    String getNewTypeId(String parentId);
+
+    int updateTypeId(ProjectTemplateType projectType);
+
+    List<ProjectReportTreeData> getProjectTypeList(ProjectTemplateType projectType);
+
+    Integer deleteProjectTypeById(String id);
+
+    /**
+     * 初始化加载获取项目类型到下拉框
+     */
+    List<ProjectTemplateType> getProjectType();
+
+    /**
+     * 根据项目所属区域类型获取对应得二级级别信息
+     * @param parentId
+     * @return
+     */
+    String getProjectTypeByParentId(@Param("parentId") String parentId, @Param("typeName") String typeName);
+
+
+
+    /**
+     * 根据父级type获取自己的宜居性资料基本信息
+     * @param typeId
+     * @return
+     */
+    List<ProjectBasedData> getAccrdingDataList(String typeId);
+
+    /**
+     * 根据attachmentId 获取附件信息
+     * @param attachmentId
+     * @return
+     */
+    List<WorkClientAttachment> getAttachmentByProjectTypeId(String attachmentId);
+
+
+}

+ 131 - 0
src/main/java/com/jeeplus/modules/projectType/entity/ProjectTemplateType.java

@@ -0,0 +1,131 @@
+package com.jeeplus.modules.projectType.entity;
+
+import com.fasterxml.jackson.annotation.JsonBackReference;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * 项目类型entity
+ * @author 徐滕
+ * @version 2020-07-03
+ */
+public class ProjectTemplateType extends DataEntity<ProjectTemplateType> {
+    private static final long serialVersionUID = 1L;
+
+    private String parentId;	// 父级ID
+    private String parentIds; // 所有父级编号
+    private String typeName; 	// 类型名称
+    private String parentName;  //父级名称
+    private String typeId;   //类型id
+    private Integer tier;    //层级标识
+    private String chooseCondition;  //是否必填标识
+
+
+    private String createId;//创建者id
+    private String view;
+    //添加附件信息
+    private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+
+    @JsonIgnore
+    public static String getRootId(){
+        return "1";
+    }
+
+    public ProjectTemplateType(){
+        super();
+    }
+
+    public ProjectTemplateType(String id){
+        super(id);
+    }
+
+    @JsonBackReference
+    @NotNull
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    @Length(min=1, max=2000)
+    public String getParentIds() {
+        return parentIds;
+    }
+
+    public void setParentIds(String parentIds) {
+        this.parentIds = parentIds;
+    }
+
+    @Length(min=1, max=100)
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+
+    public String getParentName() {
+        return parentName;
+    }
+
+    public void setParentName(String parentName) {
+        this.parentName = parentName;
+    }
+
+    public String getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(String createId) {
+        this.createId = createId;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getView() {
+        return view;
+    }
+
+    public void setView(String view) {
+        this.view = view;
+    }
+
+    public Integer getTier() {
+        return tier;
+    }
+
+    public void setTier(Integer tier) {
+        this.tier = tier;
+    }
+
+    public String getChooseCondition() {
+        return chooseCondition;
+    }
+
+    public void setChooseCondition(String chooseCondition) {
+        this.chooseCondition = chooseCondition;
+    }
+
+    public List<WorkClientAttachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+}

+ 138 - 0
src/main/java/com/jeeplus/modules/projectType/service/ProjectResultsFileTemplateService.java

@@ -0,0 +1,138 @@
+package com.jeeplus.modules.projectType.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectType.dao.ProjectResultsFileTemplateDao;
+import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 成果文件模板service
+ * @author 徐滕
+ * @version 2020-07-22
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectResultsFileTemplateService  extends CrudService<ProjectResultsFileTemplateDao, ProjectTemplateType> {
+
+    @Autowired
+    private ProjectResultsFileTemplateDao dao;
+    @Autowired
+    private WorkClientAttachmentDao workClientAttachmentDao;
+
+    public ProjectTemplateType getProjectType(String id) {
+        ProjectTemplateType projectType = dao.get(id);
+        projectType.setWorkAttachments(dao.getAttachmentByProjectTypeId(projectType.getId()));
+        return projectType;
+    }
+
+    @Transactional(readOnly = false)
+    public List<ProjectTemplateType> findList(ProjectTemplateType projectType) {
+        List<ProjectTemplateType> list = super.findList(projectType);
+        return list;
+    }
+
+    @Transactional(readOnly = false)
+    public List<ProjectReportTreeData> getProjectTypeList(String typeName) {
+        ProjectTemplateType projectType = new ProjectTemplateType();
+        projectType.setTypeName(typeName);
+        List<ProjectReportTreeData> list = dao.getProjectTypeList(projectType);
+        return list;
+    }
+
+    public Page<ProjectTemplateType> findPage(Page<ProjectTemplateType> page, ProjectTemplateType projectType) {
+        return super.findPage(page, projectType);
+    }
+
+    @Transactional(readOnly = false)
+    public void save(ProjectTemplateType projectType) {
+        if(StringUtils.isBlank(projectType.getParentId())){
+            String newIdStr = dao.getNewParentId();
+            Integer newIdInt = null;
+            if(StringUtils.isNotBlank(newIdStr)){
+                newIdInt = Integer.valueOf(newIdStr)+1;
+            }
+            projectType.preInsert();
+            projectType.setId(newIdInt.toString());
+            projectType.setParentId("0");
+            projectType.setParentIds("0");
+            dao.insert(projectType);
+            dao.updateTypeId(projectType);
+        }else{
+            projectType.setParentIds("0,"+projectType.getParentId());
+            if(StringUtils.isNotBlank(projectType.getId())){
+                projectType.preUpdate();
+                dao.update(projectType);
+            }else{
+                projectType.preInsert();
+                //查询已知该父节点下的数据的最大值的typeId并递增1
+                String typeId = dao.getNewTypeId(projectType.getParentId());
+                projectType.setTypeId(typeId);
+                dao.insert(projectType);
+            }
+            //对附件进行保存修改
+            this.saveAttachments(projectType);
+        }
+    }
+
+    private void saveAttachments(ProjectTemplateType projectType) {
+        if (projectType.getWorkAttachments()!=null && !projectType.getWorkAttachments().isEmpty()) {
+            //保存附件信息
+            for (WorkClientAttachment workClientAttachment : projectType.getWorkAttachments()) {
+                if (StringUtils.isBlank(workClientAttachment.getId())&& org.apache.commons.lang3.StringUtils.isNotBlank(workClientAttachment.getAttachmentId())) {
+                    continue;
+                }
+                if (StringUtils.isBlank(workClientAttachment.getId())&& org.apache.commons.lang3.StringUtils.isBlank(workClientAttachment.getUrl())) {
+                    continue;
+                }
+                if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+                    workClientAttachment.setAttachmentId(projectType.getId());
+                    workClientAttachment.setAttachmentFlag("133");
+                    workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (org.apache.commons.lang3.StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+                        workClientAttachment.preInsert();
+                        workClientAttachmentDao.insert(workClientAttachment);
+                    } else {
+                        workClientAttachment.preUpdate();
+                        workClientAttachmentDao.update(workClientAttachment);
+                    }
+                } else {
+                    workClientAttachmentDao.delete(workClientAttachment);
+                }
+            }
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public Integer deleteProjectTypeById(ProjectTemplateType projectType) {
+        Integer result = dao.deleteProjectTypeById(projectType.getId());
+        return result;
+    }
+
+    @Transactional(readOnly = false)
+    public void deleteByLogic(ProjectTemplateType projectType) {
+        dao.deleteByLogic(projectType);
+    }
+
+    /**
+     * 初始化加载获取项目类型到下拉框
+     */
+    public List<ProjectTemplateType> getProjectType() {
+        return dao.getProjectType();
+    }
+
+    public List<ProjectBasedData> getAccrdingDataList(String typeId){
+        return dao.getAccrdingDataList(typeId);
+    }
+}

+ 166 - 0
src/main/java/com/jeeplus/modules/projectType/web/ProjectResultsFileTemplateController.java

@@ -0,0 +1,166 @@
+package com.jeeplus.modules.projectType.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
+import com.jeeplus.modules.projectType.service.ProjectResultsFileTemplateService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 成果文件模板Controller
+ * @author 徐滕
+ * @version 2020-07-22
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectResultsFileTemplate")
+public class ProjectResultsFileTemplateController extends BaseController {
+    @Autowired
+    private ProjectResultsFileTemplateService projectResultsFileTemplateService;
+
+    @ModelAttribute
+    public ProjectTemplateType get(@RequestParam(required=false) String id) {
+        ProjectTemplateType entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectResultsFileTemplateService.getProjectType(id);
+        }
+        if (entity == null){
+            entity = new ProjectTemplateType();
+        }
+        return entity;
+    }
+
+    /**
+     * 工作内容类型列表页面
+     */
+    @RequiresPermissions("project:projectAccordingType:list")
+    @RequestMapping(value = {"list", ""})
+    public String list() {
+        return "modules/project/type/template/projectResultsFileTemplateList";
+    }
+
+    /**
+     * 根据项目id查询工作内容信息Tree
+     * @param typeName
+     * @return
+     */
+    @RequestMapping("getProjectTypeTreeList")
+    @ResponseBody
+    public Map<String, List> getProjectTypeTreeList(String typeName){
+        Map<String,List> map = new HashMap<>();
+        //获取成果列表父节点
+        List<ProjectReportTreeData> parentReportDataList = projectResultsFileTemplateService.getProjectTypeList(typeName);
+        for (ProjectReportTreeData reportData : parentReportDataList) {
+            //添加登陆者id
+            reportData.setLoginUserId(UserUtils.getUser().getId());
+        }
+        map.put("data",parentReportDataList);
+        return map;
+    }
+
+    /**
+     * 查看,增加,编辑工作内容类型表单页面
+     */
+    @RequestMapping(value = "form")
+    public String form(ProjectTemplateType projectType, Model model) {
+        if(StringUtils.isNotBlank(projectType.getView())){
+            if("view".equals(projectType.getView())){
+                return "modules/project/type/template/projectTemplateTypeView";
+            }else if("saveSubordinateInfo".equals(projectType.getView())){
+                projectType.setParentName(projectType.getTypeName());
+                projectType.setParentId(projectType.getId());
+                projectType.setTypeName("");
+                projectType.setRemarks("");
+                projectType.setId("");
+            }else if("updateSubordinateInfo".equals(projectType.getView())){
+
+            }
+        }
+        model.addAttribute("projectType", projectType);
+        if("updateSubordinateInfo".equals(projectType.getView()) || "saveSubordinateInfo".equals(projectType.getView())){
+            return "modules/project/type/template/projectResultsFileTemplateForm";
+        }
+        return "modules/project/type/accrding/projectAccrdingTypeForm";
+    }
+
+    /**
+     * 保存工作内容类型
+     */
+    @RequiresPermissions(value={"project:projectType:add","project:projectType:edit"},logical= Logical.OR)
+    @RequestMapping(value = "save")
+    public String saveParentInfo(ProjectTemplateType projectType, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, projectType)){
+            return form(projectType, model);
+        }
+        if(!projectType.getIsNewRecord()){//编辑表单保存
+            ProjectTemplateType t = projectResultsFileTemplateService.get(projectType.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(projectType, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            projectResultsFileTemplateService.save(t);//保存
+        }else{//新增表单保存
+            projectResultsFileTemplateService.save(projectType);//保存
+        }
+        addMessage(redirectAttributes, "保存工作内容类型成功");
+        return "redirect:"+ Global.getAdminPath()+"/project/projectAccordingType/?repage";
+    }
+
+    /**
+     * 保存工作内容类型
+     */
+    @RequestMapping(value = "saveTemplateInfo")
+    @ResponseBody
+    public Map<String,Object> saveTemplateInfo(ProjectTemplateType projectType, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        Map<String,Object> map = new HashMap<>();
+        if (!beanValidator(model, projectType)){
+            map.put("code",0);
+            map.put("msg","数据错误");
+            return map;
+        }
+        projectType.setTier(4);
+        if(!projectType.getIsNewRecord()){//编辑表单保存
+            ProjectTemplateType t = projectResultsFileTemplateService.get(projectType.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(projectType, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            projectResultsFileTemplateService.save(t);//保存
+        }else{//新增表单保存
+            projectResultsFileTemplateService.save(projectType);//保存
+        }
+        addMessage(redirectAttributes, "保存工作内容类型成功");
+        map.put("code",1);
+        map.put("msg","操作成功");
+        return map;
+    }
+
+    /**
+     * 删除工作内容类型
+     */
+    @RequiresPermissions("project:projectType:remove")
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Map<String,Object> delete(ProjectTemplateType projectType, RedirectAttributes redirectAttributes) {
+        Map<String,Object> map = new HashMap<>();
+        Integer result = projectResultsFileTemplateService.deleteProjectTypeById(projectType);
+        if (result ==1){
+            addMessage(redirectAttributes, "删除工作内容类型成功");
+            map.put("code",1);
+        }else{
+            addMessage(redirectAttributes, "删除工作内容类型失败");
+            map.put("code",0);
+        }
+        return map;
+    }
+}

+ 208 - 0
src/main/resources/mappings/modules/projectType/ProjectResultsFileTemplateDao.xml

@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.projectType.dao.ProjectResultsFileTemplateDao">
+
+	<sql id="projectTypeColumns">
+		a.id,
+		a.parent_id AS "parentId",
+		a.parent_ids as parentIds,
+		a.type_name as "typeName",
+		a.type_id as "typeId",
+		a.remarks,
+		a.create_by AS "createBy.id",
+		a.create_date,
+		a.update_by AS "updateBy.id",
+		a.update_date,
+		a.del_flag,
+		a.tier,
+		a.choose_condition as "chooseCondition"
+	</sql>
+
+
+	<select id="get" resultType="com.jeeplus.modules.projectType.entity.ProjectTemplateType" >
+		SELECT
+		<include refid="projectTypeColumns"/>
+		,p.type_name as "parentName"
+		FROM project_template_type a
+		left join project_template_type p on p.id = a.parent_id
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.projectType.entity.ProjectTemplateType" >
+		SELECT DISTINCT
+		<include refid="projectTypeColumns"/>
+		,p.type_name as "parentName"
+		FROM project_template_type a
+		left join project_template_type p on p.id = a.parent_id
+		<where>
+			a.del_flag = '0'
+			<if test="typeName != null and typeName != ''">
+				AND (a.type_name LIKE concat('%',#{typeName},'%') OR a.parent_id ='0')
+			</if>
+			<if test="parentId !=null and parentId !=''">
+				AND a.parent_id = #{parentId}
+			</if>
+		</where>
+		<choose>
+			<otherwise>
+				ORDER BY a.parent_id, a.type_id
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="getProjectTypeList" resultType="com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData" >
+		select a.id as "id",
+		a.create_date as "createDate",a.create_by as "createId",
+		 a.type_name as "name",a.parent_id as "pid",a.tier,a.choose_condition as chooseCondition
+		from project_template_type a
+		<where>
+			a.del_flag = 0
+			<if test="typeName != null and typeName != ''">
+				AND (a.type_name LIKE concat('%',#{typeName},'%') OR a.parent_id ='0')
+			</if>
+		</where>
+		order by a.update_date desc
+	</select>
+
+	<select id="findProjectList" resultType="com.jeeplus.modules.projectType.entity.ProjectTemplateType" >
+		SELECT DISTINCT
+		<include refid="projectTypeColumns"/>
+		FROM project_template_type a
+		<where>
+			AND a.parent_id = #{parentId}
+		</where>
+		<choose>
+			<otherwise>
+				ORDER BY a.parent_id, a.type_id
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="getNewParentId" resultType="java.lang.String" >
+		select id from project_template_type where parent_id = '0' order by create_date desc limit 0,1
+	</select>
+
+	<select id="getNewId" resultType="java.lang.String" >
+		select id from project_template_type order by id desc limit 0,1
+	</select>
+
+	<select id="getNewTypeId" resultType="java.lang.String" >
+		select max(cast(type_id as unsigned integer))+1 as typeId
+		from project_template_type
+		where parent_id = #{parentId}
+	</select>
+
+	<update id="updateTypeId">
+		update project_template_type set type_id = #{id} where id = #{id}
+	</update>
+
+	<insert id="insert">
+		INSERT INTO project_template_type(
+			id,
+			parent_id,
+			parent_ids,
+			type_name,
+			type_id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			tier,
+			choose_condition
+		) VALUES (
+			#{id},
+			#{parentId},
+			#{parentIds},
+			#{typeName},
+			#{typeId},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{tier},
+			#{chooseCondition}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE project_template_type SET
+			parent_id = #{parentId},
+			parent_ids = #{parentIds},
+			type_name = #{typeName},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			choose_condition = #{chooseCondition},
+			remarks = #{remarks}
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM project_template_type
+		WHERE id = #{id}
+	</update>
+
+	<delete id="deleteProjectTypeById">
+		DELETE FROM project_template_type
+		WHERE id = #{id}
+	</delete>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE project_template_type SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="com.jeeplus.modules.projectType.entity.ProjectTemplateType" statementType="STATEMENT">
+		select * FROM project_template_type  where ${propertyName} = '${value}'
+	</select>
+
+	<select id="getProjectType" resultType="com.jeeplus.modules.projectType.entity.ProjectTemplateType">
+		select type_id as "typeId",type_name as "typeName" from project_template_type where parent_id="0"
+	</select>
+
+	<select id="getProjectTypeByParentId" resultType="java.lang.String">
+		select type_id typeId from project_template_type
+		where parent_id = #{parentId}
+			and del_flag=0
+			and type_name LIKE concat('%',#{typeName},'%')
+	</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`,pt.type_name as `typeLabel`
+		from project_template_type a
+		left join project_template_type pt on a.parent_id = pt.type_id
+		where a.parent_id =#{typeId}
+	</select>
+
+	<select id="getAttachmentByProjectTypeId" resultType="WorkClientAttachment">
+		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.attachment_flag AS "attachmentFlag",
+        a.company_id AS "companyId",
+        createBy.name AS "createBy.name"
+        from work_attachment a
+        left join sys_user createBy on createBy.id = a.create_by
+        where attachment_id = #{attachmentId}
+	</select>
+
+</mapper>

+ 1 - 1
src/main/webapp/webpage/modules/project/type/accrding/projectAccrdingTypeList.jsp

@@ -27,7 +27,7 @@
 	<div class="layui-row">
 		<div class="full-width fl">
 			<div class="contentShadow layui-row" id="queryDiv">
-				<form:form id="searchForm" modelAttribute="projectType" action="${ctx}/projectType/projectType/" method="post" class="form-inline">
+				<form:form id="searchForm" modelAttribute="projectType" action="${ctx}/project/projectAccordingType/" method="post" class="form-inline">
 					<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();"/><!-- 支持排序 -->

+ 1 - 1
src/main/webapp/webpage/modules/project/type/accrding/projectAccrdingTypeView.jsp

@@ -57,7 +57,7 @@
 
 
 				<div class="layui-item layui-col-sm12">
-					<label class="layui-form-label">项目类型名称:</label>
+					<label class="layui-form-label">是否必填:</label>
 					<div class="layui-input-block">
 						<form:input path="chooseCondition" htmlEscape="false" readonly="true" class="form-control layui-input"/>
 					</div>

+ 151 - 0
src/main/webapp/webpage/modules/project/type/template/projectResultsFileTemplateForm.jsp

@@ -0,0 +1,151 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工作内容类型管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+
+			return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+
+		function insertTitle(tValue){
+			var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+				var attachmentId = $("#id").val();
+				var attachmentFlag = "82";
+				/*console.log(file);*/
+				var timestamp=new Date().getTime();
+
+				var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+				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);}
+		}
+
+
+		function addFile() {
+			var length = $("#file_attachment").find("tr").length ;
+			if(length>=1){
+				parent.layer.msg("只能够添加一个模板!",{icon:5});
+			}else{
+				$("#attachment_file").click();
+			}
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="projectTemplateType" action="${ctx}/project/projectResultsFileTemplate/saveTemplateInfo" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<input type="hidden" name="parentId" value="${projectType.parentId}">
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw9">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">父级节点:</label>
+					<div class="layui-input-block">
+						<form:input path="parentName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">项目类型名称:</label>
+					<div class="layui-input-block">
+						<form:input path="typeName" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+
+				<div class="form-group layui-row">
+					<div class="form-group-label"><h2><span class="require-item">*</span>成果文件模板</h2></div>
+					<div class="layui-item nav-btns">
+						<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加模板"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加模板</a>
+					</div>
+					<div id="addFile_attachment" style="display: none" class="upload-progress">
+						<span id="fileName_attachment" ></span>
+						<b><span id="baifenbi_attachment" ></span></b>
+						<div class="progress">
+							<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+							</div>
+						</div>
+					</div>
+					<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+					<span id="attachment_title"></span>
+					<div class="layui-item layui-col-xs12 form-table-container">
+						<table id="listAttachment" class="table table-bordered table-condensed details">
+							<thead>
+							<tr>
+									<%-- <th>序号</th>--%>
+								<th width="25%">文件</th>
+								<th width="25%">上传人</th>
+								<th width="25%">上传时间</th>
+								<th width="150px">操作</th>
+							</tr>
+							</thead>
+							<tbody id="file_attachment">
+							<c:forEach items="${projectTemplateType.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="trIdAdds">
+										<%-- <td>${status.index + 1}</td>--%>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${workClientAttachment.createBy.name}</td>
+									<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></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>
+											<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>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+							</tbody>
+						</table>
+					</div>
+				</div>
+
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 291 - 0
src/main/webapp/webpage/modules/project/type/template/projectResultsFileTemplateList.jsp

@@ -0,0 +1,291 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工作内容类型管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#treeTable").treeTable({expandLevel : 5},{ expandable: true });
+		});
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectTemplateType" action="${ctx}/project/projectResultsFileTemplate/" method="post" class="form-inline">
+					<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 lw9">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目类型名称:</label>
+							<div class="layui-input-block">
+								<form:input path="typeName" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<button id="searchReset" style="margin-right: 0px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+
+					<table id="achievementTable" class="layui-table" lay-filter="achievementTable"></table>
+				<!-- 分页代码 -->
+			</div>
+		</div>
+	</div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+
+<script>
+	/*使用模块加载的方式 加载文件*/
+	layui.config({
+		base: '${ctx}/resoueces/css/layui/module/'
+	}).extend({
+		treetable: 'treetable-lay/treetable'
+	}).use(['layer', 'table', 'treetable'], function () {
+		var $ = layui.jquery;
+		var table = layui.table;
+		var layer = layui.layer;
+		var treetable = layui.treetable;
+
+		// 渲染表格
+		var renderTable = function () {
+			layer.load(2);
+			treetable.render({
+				treeColIndex: 1,//树形图标显示在第几列
+				treeSpid: 0,//最上级的父级id
+				treeIdName: 'permissionId',//id字段的名称
+				treePidName: 'pid',//pid字段的名称
+				treeDefaultClose: false,//是否默认折叠
+				treeLinkage: true,//父级展开时是否自动展开所有子级
+				elem: '#achievementTable',
+				url: '${ctx}/project/projectResultsFileTemplate/getProjectTypeTreeList?typeName=',
+				page: false,
+				cols: [[
+					{type: 'numbers', title: '序号' ,width:80},
+					{field: 'name', title: '类型',templet:function(d){
+							if(null != d.name){
+								return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看项目类型信息', '${ctx}/project/projectResultsFileTemplate/form?view=view&id="+d.id+"','95%', '95%')\">" + d.name + "</a>";
+							}else{
+								return "";
+							}
+						}},
+					{field: 'name', title: '项目类型名称',templet:function(d){
+							if(null != d.name){
+								return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看项目类型信息', '${ctx}/project/projectResultsFileTemplate/form?view=view&id="+d.id+"','95%', '95%')\">" + d.name + "</a>";
+							}else{
+								return "";
+							}
+						}},
+					{field: 'createDate', title: '创建时间',width:80},
+					{templet: complain, title: '操作',width:160}
+				]],
+				done: function () {
+					layer.closeAll('loading');
+				}
+			});
+		};
+
+		renderTable();
+
+		//触发三个button按钮
+		$('#btn-expand').click(function () {
+			treetable.expandAll('#permissionTable');
+		});
+
+		$('#btn-fold').click(function () {
+			treetable.foldAll('#permissionTable');
+		});
+
+		$('#btn-refresh').click(function () {
+			renderTable();
+		});
+
+
+		function complain(d){//操作中显示的内容
+			if(d.tier == 3){
+				return [
+					"<a href=\"javascript:void(0)\" onclick=\"openProjectType('新增模板文件信息','${ctx}/project/projectResultsFileTemplate/form?view=saveSubordinateInfo&id="+d.id+"','80%', '95%');\" class=\"op-btn nav-btn-add layui-bg-green\"><i class=\"fa fa-plus layui-bg-green\"></i> 新增模板文件</a>",
+				].join('');
+			}else if(d.tier == 4){
+				return [
+					"<a href=\"javascript:void(0)\" onclick=\"openProjectType('修改模板文件信息','${ctx}/project/projectResultsFileTemplate/form?view=updateSubordinateInfo&id="+d.id+"','95%', '95%');\" class=\"btn btn-success btn-xs\"><i class=\"fa fa-edit\"></i> 修改</a>",
+					'<a href="${ctx}/project/projectResultsFileTemplate/delete?id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该模板文件信息吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
+				].join('');
+			}
+			else{
+				return [
+					''
+				].join('');
+			}
+		}
+		//监听工具条
+		table.on('tool(permissionTable)', function (obj) {
+			var data = obj.data;
+			var layEvent = obj.event;
+			if(data.permissionName!=null){
+				if (layEvent === 'del') {
+					layer.msg('删除' + data.id);
+				} else if (layEvent === 'edit') {
+					layer.msg('修改' + data.id);
+				}
+			}
+		});
+	});
+</script>
+<script>
+	function openProjectTypeView(title,url,width,height,target){
+		var company=$("#company").val();
+		url=url+"&company="+company;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			skin:"two-btns",
+			btn: ['关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				top.layer.close(index);
+				//formSubmit($document,"inputForm",index);
+			},
+			cancel: function(index){
+			}
+		});
+
+	}
+
+	function openProjectType(title,url,width,height,target){
+		var company=$("#company").val();
+		url=url+"&company="+company;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			skin:"two-btns",
+			btn: ['提交','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				formSubmit($document,"inputForm",index);
+			},
+			cancel: function(index){
+			}
+		});
+
+	}
+	function formSubmit($document,inputForm,index){
+		$($document.getElementById(inputForm)).ajaxSubmit({
+			success:function(data) {
+				top.layer.close(index);
+				if(data.code == 0){
+					layer.msg(data.msg, {icon: 1,time: 1000}, function(){
+						return false;
+					});
+				}else{
+					layer.msg(data.msg, {icon: 1,time: 1000}, function(){
+						window.location.reload();
+					});
+				}
+			},error:function(){
+				layer.msg("操作失败",{icon:2});
+				window.location.reload();
+			}
+		});
+	}
+	// 确认对话框
+	function confirmxRefresh(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				resetTip(); //loading();
+				$.ajax({
+					url:href,
+					data:$('#loginForm').serialize(),
+					type:"post",
+					success:function(data){
+						if(data.code == 1){
+							parent.layer.msg('删除成功',{icon:1});
+							window.location.reload();
+						}else {
+							parent.layer.msg('删除失败',{icon:2});
+						}
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

+ 123 - 0
src/main/webapp/webpage/modules/project/type/template/projectTemplateTypeView.jsp

@@ -0,0 +1,123 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工作内容类型管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+
+			return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="projectTemplateType" action="" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<input type="hidden" name="parentId" value="${projectType.parentId}">
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw9">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">父级节点:</label>
+					<div class="layui-input-block">
+						<form:input path="parentName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">项目类型名称:</label>
+					<div class="layui-input-block">
+						<form:input path="typeName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+
+
+				<div class="form-group layui-row">
+					<div class="form-group-label"><h2><span class="require-item">*</span>成果文件模板</h2></div>
+					<div id="addFile_attachment" style="display: none" class="upload-progress">
+						<span id="fileName_attachment" ></span>
+						<b><span id="baifenbi_attachment" ></span></b>
+						<div class="progress">
+							<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+							</div>
+						</div>
+					</div>
+					<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+					<span id="attachment_title"></span>
+					<div class="layui-item layui-col-xs12 form-table-container">
+						<table id="listAttachment" class="table table-bordered table-condensed details">
+							<thead>
+							<tr>
+									<%-- <th>序号</th>--%>
+								<th width="25%">文件</th>
+								<th width="25%">上传人</th>
+								<th width="25%">上传时间</th>
+								<th width="150px">操作</th>
+							</tr>
+							</thead>
+							<tbody id="file_attachment">
+							<c:forEach items="${projectTemplateType.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="trIdAdds">
+										<%-- <td>${status.index + 1}</td>--%>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${workClientAttachment.createBy.name}</td>
+									<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></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>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+							</tbody>
+						</table>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>