浏览代码

项目类型附件库

user5 4 年之前
父节点
当前提交
7d6701c2d1

+ 62 - 0
src/main/java/com/jeeplus/modules/projectAccessory/dao/ProjectTemplateDao.java

@@ -0,0 +1,62 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectAccessory.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.TreeDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryInfo;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryTree;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.projectAccessory.entity.TemplateTypeInfo;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientJobTypeInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 复核标准(字典版)DAO接口
+ * @author ssrh
+ * @version 2018-06-01
+ */
+@MyBatisDao
+public interface ProjectTemplateDao extends CrudDao<ProjectTemplateInfo>,TreeDao<ProjectTemplateInfo> {
+
+
+    List<ProjectTemplateInfo> fingIds(@Param("parentIdSet") Set<String> parentIdSet, @Param("companyId") String companyId);
+    List<ProjectTemplateInfo> fingByIds(@Param("parentIdSet") Set<String> parentIdSet, @Param("companyId") String companyId, @Param("parentIds") String parentIds);
+
+    String selectOrderNum(String parentId);
+
+    List<ProjectTemplateInfo> getByDetail();
+
+    /**
+     * 获取所有父节点信息
+     * @return
+     */
+    List<ProjectTemplateInfo> projectAccessoryParentList();
+
+    /**
+     * 根据父id获取子信息
+     * @param parentId
+     * @return
+     */
+    List<ProjectTemplateInfo> projectAccessoryListByParentId(String parentId);
+
+
+    /**
+     * 附件和附件类型关系
+     * @param wlist
+     */
+    void templatTypeInsert(List<TemplateTypeInfo> wlist);
+
+    /**
+     * 查询附件类型
+     * @param id
+     * @return
+     */
+    List<MainDictDetail> getPostfixTypeById(String id);
+}

+ 125 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java

@@ -0,0 +1,125 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectAccessory.entity;
+
+
+import com.jeeplus.common.persistence.TreeEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+
+import java.util.List;
+
+/**
+ * 复核标准Entity
+ * @author ssrh
+ * @version 2018-06-01
+ */
+public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
+
+	private static final long serialVersionUID = 1L;
+	private String attachName;		// 名称
+	private String indexNum;		// 排序
+	private String attachTypes;		// 附件类型
+	private Byte attachLength;		// 附件大小(单位:M)
+	private String parentIds;		// 所有父ID
+	private String parentId;		// 父ID
+	private String companyId;   //公司id
+	private String parentName;
+
+	public ProjectTemplateInfo() {
+		super();
+	}
+
+	public ProjectTemplateInfo(String id){
+		super(id);
+	}
+
+	public String getParentIds() {
+		return parentIds;
+	}
+
+	public void setParentIds(String parentIds) {
+		this.parentIds = parentIds;
+	}
+
+
+    public ProjectTemplateInfo getParent() {
+        return parent;
+    }
+
+    public void setParent(ProjectTemplateInfo parent) {
+        this.parent = parent;
+    }
+
+    public int getGrade(){
+        String[] split = this.getParentIds().split(",");
+        return split.length-1;
+    }
+
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+
+	@Override
+	public String getName() {
+		return name;
+	}
+
+	@Override
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@Override
+	public String getParentId() {
+		return parentId;
+	}
+
+	public void setParentId(String parentId) {
+		this.parentId = parentId;
+	}
+
+	public String getAttachName() {
+		return attachName;
+	}
+
+	public void setAttachName(String attachName) {
+		this.attachName = attachName;
+	}
+
+	public String getIndexNum() {
+		return indexNum;
+	}
+
+	public void setIndexNum(String indexNum) {
+		this.indexNum = indexNum;
+	}
+
+	public String getAttachTypes() {
+		return attachTypes;
+	}
+
+	public void setAttachTypes(String attachTypes) {
+		this.attachTypes = attachTypes;
+	}
+
+	public Byte getAttachLength() {
+		return attachLength;
+	}
+
+	public void setAttachLength(Byte attachLength) {
+		this.attachLength = attachLength;
+	}
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+}

+ 26 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/TemplateTypeInfo.java

@@ -0,0 +1,26 @@
+package com.jeeplus.modules.projectAccessory.entity;
+
+/**
+ * @author: 大猫
+ * @create: 2020-11-18 14:11
+ **/
+public class TemplateTypeInfo {
+    private String templateId;   //模板id
+    private String templateTypeId;   //模板类型id
+
+    public String getTemplateId() {
+        return templateId;
+    }
+
+    public void setTemplateId(String templateId) {
+        this.templateId = templateId;
+    }
+
+    public String getTemplateTypeId() {
+        return templateTypeId;
+    }
+
+    public void setTemplateTypeId(String templateTypeId) {
+        this.templateTypeId = templateTypeId;
+    }
+}

+ 178 - 0
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -0,0 +1,178 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectAccessory.service;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.TreeService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectAccessory.dao.ProjectTemplateDao;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+/**
+ * 复核标准(字典版)Service
+ * @author ssrh
+ * @version 2018-06-01
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectTemplateService extends TreeService<ProjectTemplateDao, ProjectTemplateInfo> {
+
+
+	public ProjectTemplateInfo get(String id) {
+		return super.get(id);
+	}
+
+	public static List<MainDictDetail> mainDictList(){
+	    return  DictUtils.getMainDictList("attachment_template_type");
+    }
+
+    /**
+     * 查询所有数据
+     * @param projectTemplateInfo
+     * @return
+     */
+	public List<ProjectTemplateInfo> findList(ProjectTemplateInfo projectTemplateInfo) {
+        List<ProjectTemplateInfo> projectTemplateList = new ArrayList<>();
+        List<ProjectTemplateInfo> listReturn = Lists.newArrayList();
+        //根据条件查询数据集合
+        List<ProjectTemplateInfo> listAll = new ArrayList<>();
+        if(mainDictList().size()>0){
+            for (MainDictDetail mainDict: mainDictList()) {
+                ProjectTemplateInfo info = new ProjectTemplateInfo();
+                ProjectTemplateInfo parent = new ProjectTemplateInfo();
+                parent.setId("0");
+                info.setAttachName(mainDict.getLabel());
+                info.setParentIds("0,");
+                info.setIndexNum(mainDict.getValue());
+                info.setCompanyId("0");
+                info.setId(mainDict.getValue());
+                info.setParent(parent);
+                listAll.add(info);
+            }
+        }
+        Office company = UserUtils.getSelectCompany();
+        projectTemplateInfo.setCompanyId(company.getId());
+        //根据条件查询数据集合
+        List<ProjectTemplateInfo> list = super.findList(projectTemplateInfo);
+        //判断,数据不为空则添加到返回集合中
+        if (listAll!=null && listAll.size()!=0){
+            projectTemplateList.addAll(listAll);
+        }
+        //判断,数据不为空则添加到返回集合中
+        if (list!=null && list.size()!=0){
+            projectTemplateList.addAll(list);
+        }
+
+        if(projectTemplateList!=null&&projectTemplateList.size()>0&&projectTemplateInfo!=null&& (StringUtils.isNotBlank(projectTemplateInfo.getAttachName())||StringUtils.isNotBlank(projectTemplateInfo.getIndexNum()))){
+            //标准内容模糊查询,查询所有父节点
+            Set<String> parentIdSet = new HashSet<>();
+            for (ProjectTemplateInfo projectTemplate : projectTemplateList) {
+                String parentIds = projectTemplate.getParentIds();
+                if (StringUtils.isNotBlank(parentIds)){
+                    parentIdSet.addAll(Arrays.asList(parentIds.split(",")));
+                }
+            }
+            for (ProjectTemplateInfo reviewStandard : projectTemplateList) {
+                parentIdSet.remove(reviewStandard.getId());
+            }
+            projectTemplateList.addAll(0,this.fingIds(parentIdSet,"0"));
+            projectTemplateList.addAll(0,this.fingIds(parentIdSet,UserUtils.getSelectCompany().getId()));
+        }
+        sortList(listReturn,projectTemplateList,"0",true);
+        return listReturn;
+    }
+
+    public ProjectTemplateInfo getFromParentInfo(ProjectTemplateInfo projectTemplateInfo){
+        if(mainDictList().size()>0){
+            for (MainDictDetail mainDict: mainDictList()) {
+                if(projectTemplateInfo.getParent().getId().equals(mainDict.getValue())){
+                    ProjectTemplateInfo parent = new ProjectTemplateInfo();
+                    parent.setId(projectTemplateInfo.getParent().getId());
+                    parent.setParentName(mainDict.getLabel());
+                    return parent;
+                }
+            }
+        }
+        return null;
+    }
+
+    public static void sortList(List<ProjectTemplateInfo> list, List<ProjectTemplateInfo> sourcelist, String parentId, boolean cascade){
+        for (int i=0; i<sourcelist.size(); i++){
+            ProjectTemplateInfo e = sourcelist.get(i);
+            if (e.getParent()!=null && StringUtils.isNotBlank(e.getParent().getId()) && e.getParent().getId().equals(parentId)){
+                list.add(e);
+                if (cascade){
+                    // 判断是否还有子节点, 有则继续获取子节点
+                    for (int j=0; j<sourcelist.size(); j++){
+                        ProjectTemplateInfo child = sourcelist.get(j);
+                        if (child.getParent()!=null && StringUtils.isNotBlank(child.getParent().getId()) && child.getParent().getId().equals(e.getId())){
+                            sortList(list, sourcelist, e.getId(), true);
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private List<ProjectTemplateInfo> fingIds(Set<String> parentIdSet, String companyId) {
+        return dao.fingIds(parentIdSet,companyId);
+    }
+
+    public Page<ProjectTemplateInfo> findPage(Page<ProjectTemplateInfo> page, ProjectTemplateInfo projectTemplateInfo) {
+		return super.findPage(page, projectTemplateInfo);
+	}
+
+    /**
+     * 新增
+     * @param projectTemplateInfo
+     */
+	@Transactional(readOnly = false)
+	public void save(ProjectTemplateInfo projectTemplateInfo) {
+        //设置序号
+        if(projectTemplateInfo.getIsNewRecord()) {
+            //添加数据
+            projectTemplateInfo.setCompanyId(UserUtils.getSelectCompany().getId());
+            projectTemplateInfo.setParentIds("0,"+projectTemplateInfo.getParent().getId()+",");
+            projectTemplateInfo.setParentId(projectTemplateInfo.getParent().getId());
+        }
+        //根据条件进行新增或修改处理
+        if (StringUtils.isNotBlank(projectTemplateInfo.getId())){
+            projectTemplateInfo.preUpdate();
+            dao.update(projectTemplateInfo);
+        }else{
+            projectTemplateInfo.preInsert();
+            dao.insert(projectTemplateInfo);
+        }
+	}
+
+
+
+
+    public List<MainDictDetail> getPostfixTypeById(String id){
+        List<MainDictDetail> dictList=new ArrayList<>();
+        try {
+            dictList = dao.getPostfixTypeById(id);
+            return dictList;
+        } catch (Exception e) {
+            e.getMessage();
+        }
+        return dictList;
+    }
+
+	@Transactional(readOnly = false)
+	public void delete(ProjectTemplateInfo projectTemplateInfo) {
+        dao.deleteByLogic(projectTemplateInfo);
+	}
+
+}

+ 305 - 0
src/main/java/com/jeeplus/modules/projectAccessory/web/ProjectTemplateController.java

@@ -0,0 +1,305 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectAccessory.web;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryInfo;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryTree;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.projectAccessory.service.ProjectAccessoryService;
+import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.util.*;
+
+/**
+ * 附件结构(字典版)Controller
+ * @author 徐滕
+ * @version 2020-11-18
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectTemplate/projectTemplate")
+public class ProjectTemplateController extends BaseController {
+
+	@Autowired
+	private ProjectTemplateService projectTemplateService;
+	
+	@ModelAttribute
+	public ProjectTemplateInfo get(@RequestParam(required=false) String id) {
+		ProjectTemplateInfo entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = projectTemplateService.get(id);
+		}
+		if (entity == null){
+			entity = new ProjectTemplateInfo();
+		}
+		return entity;
+	}
+
+	/**
+	 * 附件结构列表页面
+	 * @param projectTemplateInfo
+	 * @param model
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(ProjectTemplateInfo projectTemplateInfo, Model model) {
+		List<ProjectTemplateInfo> list = projectTemplateService.findList(projectTemplateInfo);
+		model.addAttribute("list", list);
+		return "modules/projectAccessory/projectTemplate/projectTemplateList";
+	}
+
+	/**
+	 * 查看,增加,编辑附件结构表单页面
+	 * @param projectAccessoryInfo
+	 * @param model
+	 * @return
+	 */
+	@RequiresPermissions(value={"projectTemplate:projectTemplate:add","projectTemplate:projectTemplate:edit"},logical=Logical.OR)
+	@RequestMapping(value = "form")
+	public String form(ProjectTemplateInfo projectAccessoryInfo, Model model) {
+	    if(projectAccessoryInfo!=null&&projectAccessoryInfo.getParent()!=null&&StringUtils.isNotBlank(projectAccessoryInfo.getParent().getId())){
+			ProjectTemplateInfo parent = projectTemplateService.getFromParentInfo(projectAccessoryInfo);
+			projectAccessoryInfo.setParent(parent);
+        }
+		model.addAttribute("projectAccessoryInfo", projectAccessoryInfo);
+		return "modules/projectAccessory/projectTemplate/projectTemplateForm";
+	}
+
+	/**
+	 * 查询附件类型
+	 * @return
+	 */
+	@RequestMapping("getPostfixType")
+	@ResponseBody
+	public AjaxJson getPostfixType(){
+		AjaxJson ajaxJson = new AjaxJson();
+		try {
+			List<MainDictDetail> typeList = DictUtils.getMainDictList("attachment_template_postfix_type");
+			List<Map<String, Object>> mapList = new ArrayList<>();
+			for (int i = 0; i < typeList.size(); i++) {
+				Map<String, Object> map = new HashMap<>();
+				map.put("name", typeList.get(i).getLabel());
+				map.put("value", typeList.get(i).getValue());
+				mapList.add(map);
+			}
+			ajaxJson.getBody().put("list", mapList);
+			ajaxJson.setMsg("获取数据成功");
+		} catch (Exception e) {
+			logger.error("获取数据异常!", e);
+			ajaxJson.setSuccess(false);
+			ajaxJson.setMsg("获取数据异常");
+		}
+		return ajaxJson;
+	}
+
+
+	/**
+	 * 根据id查询相关的附件类型
+	 * @return
+	 */
+	@RequestMapping("getPostfixTypeById")
+	@ResponseBody
+	public AjaxJson getPostfixTypeById(String id){
+		AjaxJson ajaxJson = new AjaxJson();
+		try {
+			ProjectTemplateInfo info= projectTemplateService.get(id);
+			if(StringUtils.isNotBlank(id) && StringUtils.isNotBlank(info.getAttachTypes())){
+				String types[] = info.getAttachTypes().split(",");
+				List<String> typeList = Arrays.asList(types);
+				List<Map<String, Object>> mapList = new ArrayList<>();
+				for (int i = 0; i < typeList.size(); i++) {
+					Map<String, Object> map = new HashMap<>();
+					map.put("value", typeList.get(i));
+					mapList.add(map);
+				}
+				ajaxJson.getBody().put("list", mapList);
+			}
+			ajaxJson.setMsg("获取数据成功");
+		} catch (Exception e) {
+			logger.error("获取数据异常!", e);
+			ajaxJson.setSuccess(false);
+			ajaxJson.setMsg("获取数据异常");
+		}
+		return ajaxJson;
+	}
+
+
+	/**
+	 * 查看
+	 * @param projectAccessoryInfo
+	 * @param model
+	 * @return
+	 */
+    @RequiresPermissions(value={"projectTemplate:projectTemplate:view"},logical=Logical.OR)
+    @RequestMapping(value = "view")
+    public String view(ProjectTemplateInfo projectAccessoryInfo, Model model) {
+        if(projectAccessoryInfo!=null&&projectAccessoryInfo.getParent()!=null&&StringUtils.isNotBlank(projectAccessoryInfo.getParent().getId())){
+			ProjectTemplateInfo parent = projectTemplateService.get(projectAccessoryInfo.getParent().getId());
+			projectAccessoryInfo.setParent(parent);
+            List<ProjectTemplateInfo> list = new ArrayList<>();
+            list.add(projectAccessoryInfo);
+        }
+        model.addAttribute("projectAccessoryInfo", projectAccessoryInfo);
+        return "modules/projectAccessory/projectTemplate/projectTemplateView";
+    }
+
+	/**
+	 * 保存附件结构
+	 * @param projectAccessoryInfo
+	 * @param model
+	 * @param redirectAttributes
+	 * @return
+	 * @throws Exception
+	 */
+	@RequiresPermissions(value={"projectTemplate:projectTemplate:add","projectTemplate:projectTemplate:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public String save(ProjectTemplateInfo projectAccessoryInfo, Model model, RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, projectAccessoryInfo)){
+			return form(projectAccessoryInfo, model);
+		}
+		if(!projectAccessoryInfo.getIsNewRecord()){//编辑表单保存
+			ProjectTemplateInfo t = projectTemplateService.get(projectAccessoryInfo.getId());//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(projectAccessoryInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			projectTemplateService.save(t);//保存
+		}else{//新增表单保存
+			projectTemplateService.save(projectAccessoryInfo);//保存
+		}
+		addMessage(redirectAttributes, "保存附件结构成功");
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+	}
+
+	/**
+	 * 删除附件结构
+	 * @param projectAccessoryInfo
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:del")
+	@RequestMapping(value = "delete")
+	public String delete(ProjectTemplateInfo projectAccessoryInfo, RedirectAttributes redirectAttributes) {
+		projectTemplateService.delete(projectAccessoryInfo);
+		addMessage(redirectAttributes, "删除附件结构成功");
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+	}
+
+	/**
+	 * 批量删除附件结构
+	 * @param ids
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:del")
+	@RequestMapping(value = "deleteAll")
+	public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			projectTemplateService.delete(projectTemplateService.get(id));
+		}
+		addMessage(redirectAttributes, "删除附件结构成功");
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+	}
+
+	/**
+	 * 导出excel文件
+	 * @param projectAccessoryInfo
+	 * @param request
+	 * @param response
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:export")
+    @RequestMapping(value = "export", method=RequestMethod.POST)
+    public String exportFile(ProjectTemplateInfo projectAccessoryInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+            String fileName = "附件结构"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<ProjectTemplateInfo> page = projectTemplateService.findPage(new Page<ProjectTemplateInfo>(request, response, -1), projectAccessoryInfo);
+    		new ExportExcel("附件结构", ProjectTemplateInfo.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导出附件结构记录失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+    }
+
+	/**
+	 * 导入Excel数据
+	 * @param file
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:import")
+    @RequestMapping(value = "import", method=RequestMethod.POST)
+    public String importFile(MultipartFile file, RedirectAttributes redirectAttributes) {
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<ProjectTemplateInfo> list = ei.getDataList(ProjectTemplateInfo.class);
+			for (ProjectTemplateInfo projectAccessoryInfo : list){
+				try{
+					projectTemplateService.save(projectAccessoryInfo);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条附件结构记录。");
+			}
+			addMessage(redirectAttributes, "已成功导入 "+successNum+" 条附件结构记录"+failureMsg);
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入附件结构失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+    }
+
+	/**
+	 * 下载导入附件结构数据模板
+	 * @param response
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequiresPermissions("projectTemplate:projectTemplate:import")
+    @RequestMapping(value = "import/template")
+    public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+            String fileName = "附件结构数据导入模板.xlsx";
+    		List<ProjectTemplateInfo> list = Lists.newArrayList();
+    		new ExportExcel("附件结构数据", ProjectTemplateInfo.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/projectTemplate/projectTemplate/?repage";
+    }
+
+}

+ 1 - 1
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -598,7 +598,7 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 		}
 	}
 	@Transactional(readOnly = false)
-	public String save(WorkContractInfo workContractInfo,Map<String, Object> variables, String contextPath,String urls) {
+	public synchronized String save(WorkContractInfo workContractInfo,Map<String, Object> variables, String contextPath,String urls) {
 		long begin = System.currentTimeMillis();
 		String processInstanceId = workContractInfo.getProcessInstanceId();
 		String contractTypeCode = workContractInfo.getContractTypeDoc();

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

@@ -0,0 +1,242 @@
+<?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.projectAccessory.dao.ProjectTemplateDao">
+    
+	<sql id="workReviewStandardColumns">
+		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.parent_id AS "parent.id",
+		a.attach_name AS "attachName",
+		a.attach_types AS "attachTypes",
+		a.attach_length AS "attachLength",
+		a.parent_ids AS "parentIds",
+		a.company_id AS "companyId",
+		a.index_num AS "indexNum"
+	</sql>
+	
+    
+	<select id="get" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT 
+			<include refid="workReviewStandardColumns"/>
+		FROM project_template_structure_info a
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT 
+			<include refid="workReviewStandardColumns"/>
+		FROM project_template_structure_info a
+		<where>
+            <if test="attachName!=null and attachName != ''">
+                and a.attach_name like concat('%',#{attachName},'%')
+            </if>
+            <if test="parentIds!=null and parentIds != ''">
+                and a.parent_ids like concat('%',#{parentIds},'%')
+            </if>
+            <choose>
+				<when test="companyId!=null and companyId != ''">
+					and a.company_id = #{companyId}
+				</when>
+				<otherwise>
+					and a.company_id = '0'
+				</otherwise>
+			</choose>
+            <if test="indexNum != null and indexNum!=0">
+                and a.index_num = #{indexNum}
+            </if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.index_num
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="projectAccessoryParentList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT
+			a.id as "id", a.attach_name as "type",a.parent_id as "pid"
+		FROM project_template_structure_info a
+		where a.parent_id ="0"
+	</select>
+
+	<select id="projectAccessoryListByParentId" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT
+			a.id as "id", a.attach_name as "type",a.parent_id as "pid"
+		FROM project_template_structure_info a
+		where a.parent_id =#{parentId}
+	</select>
+	
+	<select id="findAllList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
+		SELECT 
+			<include refid="workReviewStandardColumns"/>
+		FROM project_template_structure_info a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO project_template_structure_info(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			parent_id,
+			attach_name,
+			attach_types,
+			attach_length,
+			parent_ids,
+			company_id,
+			index_num
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{parentId},
+			#{attachName},
+			#{attachTypes},
+			#{attachLength},
+			#{parentIds},
+			#{companyId},
+			#{indexNum}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE project_template_structure_info SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			parent_id = #{parent.id},
+			attach_name = #{attachName},
+			attach_types = #{attachTypes},
+			attach_length = #{attachLength},
+			parent_ids = #{parentIds},
+			company_id = #{companyId},
+			index_num = #{indexNum}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM project_template_structure_info
+		WHERE id = #{id} OR find_in_set(#{id},parent_ids)
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE project_template_structure_info SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id} OR find_in_set(#{id},parent_ids)
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" statementType="STATEMENT">
+		select * FROM project_template_structure_info  where ${propertyName} = '${value}'
+	</select>
+
+    <select id="fingIds" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
+        SELECT <include refid="workReviewStandardColumns"/>
+        FROM project_template_structure_info a
+        <where>
+            <if test="parentIdSet!=null and parentIdSet.size!=0">
+                a.id in
+                <foreach collection="parentIdSet" item="parentId" separator="," open="(" close=")">
+                      #{parentId}
+                </foreach>
+            </if>
+            AND del_flag ='0'
+			AND company_id = #{companyId}
+        </where>
+        ORDER BY a.order_num
+    </select>
+    <select id="fingByIds" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
+        SELECT <include refid="workReviewStandardColumns"/>
+        FROM project_template_structure_info a
+        <where>
+            <if test="parentIdSet!=null and parentIdSet.size!=0">
+                a.id in
+                <foreach collection="parentIdSet" item="parentId" separator="," open="(" close=")">
+                      #{parentId}
+                </foreach>
+            </if>
+            AND del_flag ='0'
+			AND company_id = #{companyId}
+			AND parent_ids like concat('%',#{parentIds},'%')
+        </where>
+        ORDER BY a.order_num
+    </select>
+
+    <select id="findByParentIdsLike" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
+        SELECT
+        <include refid="workReviewStandardColumns"/>
+        FROM project_template_structure_info a
+        WHERE a.del_flag = #{DEL_FLAG_NORMAL} AND (a.parent_ids LIKE
+        <if test="dbName == 'mysql'">concat('%,',#{parentIds},',%')</if>
+        OR a.id = #{id})
+        ORDER BY a.order_num
+    </select>
+
+    <update id="updateParentIds">
+        UPDATE project_template_structure_info SET
+			parent_id = #{parent.id},
+			parent_ids = #{parentIds}
+		WHERE id = #{id}
+    </update>
+
+    <select id="selectOrderNum" resultType="java.lang.String">
+        SELECT MAX(order_num) FROM project_template_structure_info WHERE parent_id = #{parentId}
+    </select>
+
+    <select id="getByDetail" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
+        SELECT * FROM project_template_structure_info WHERE standard_detail = '标准部校核'
+    </select>
+
+	<insert id="templatTypeInsert" parameterType="java.util.List">
+		INSERT INTO template_type_info(
+		template_id,
+		template_type_id
+		) VALUES
+		<foreach collection="list" item="item" separator=",">
+			( #{item.templateId},
+			#{item.templateTypeId}
+			)
+		</foreach>
+	</insert>
+
+	<select id="getPostfixTypeById" resultType="MainDictDetail">
+		select template_id as "id",template_type_id as typeId
+		from template_type_info
+		where template_id = #{id}
+	</select>
+
+	<delete id="deleteTemplatType">
+		delete from template_type_info
+		where template_id = #{id}
+	</delete>
+</mapper>

+ 184 - 0
src/main/webapp/webpage/modules/projectAccessory/projectTemplate/projectTemplateForm.jsp

@@ -0,0 +1,184 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>复核标准管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+		#standardDetail-error{
+			top:82px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+		  	$("#inputForm").submit();
+		  	return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			contentDetailTypeShow();
+			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);
+					}
+				}
+			});
+            var edit = "${workReviewStandard.id}";
+            if(edit!=null && edit!=''){
+                $("#reviewParentButton").attr("disabled","disabled");
+            }
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectAccessoryInfo" action="${ctx}/projectTemplate/projectTemplate/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="companyId"/>
+		<input type="hidden" id="attachTypes" name="attachTypes" value="">
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>附件结构信息</h2></div>
+				<%--<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>附件类型:</label>
+					<div class="layui-input-block">
+						<input type="text" value="${projectAccessoryInfo.parent.parentName}" readonly="readonly" class="form-control layui-input">
+					</div>
+				</div>--%>
+
+				<div class="layui-item layui-col-sm6 ">
+					<label class="layui-form-label"><span class="require-item">*</span>附件类型:</label>
+					<div class="layui-input-block">
+						<form:select path="parent.id" cssClass="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('attachment_template_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>附件结构名称:</label>
+					<div class="layui-input-block">
+						<form:input path="attachName" htmlEscape="false" maxlength="100" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>序号:</label>
+					<div class="layui-input-block">
+						<form:input path="indexNum" htmlEscape="false" maxlength="10"  class="form-control required number layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">文件类型:</label>
+					<div class="layui-input-block">
+						<div id="tType" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line">文件大小(M):</label>
+					<div class="layui-input-block">
+						<form:input path="attachLength" htmlEscape="false" maxlength="10" class="form-control number layui-input"/>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+	function contentDetailTypeShow() {
+		$.ajax({
+			type:'post',
+			url:'${ctx}/projectTemplate/projectTemplate/getPostfixType',
+			success:function(data){
+				if(data.success) {
+					var data = data.body.list;
+					var newDataList = data;
+					var showList = [];
+					$.ajax({
+						type:'post',
+						url:'${ctx}/projectTemplate/projectTemplate/getPostfixTypeById',
+						data:{
+							"id":$("#id").val()
+						},
+						success:function(dataListById){
+							if(dataListById.success) {
+								var showDataList = dataListById.body.list;
+								var lists = [];
+								for (i in newDataList) {
+									for (j in showDataList) {
+										if (newDataList[i].value == showDataList[j].value) {
+											var newData = {
+												"name": newDataList[i].name,
+												"value": newDataList[i].value,
+												"selected": true
+											}
+											lists.push(newDataList[i].value);
+											showList.push(newData);
+											data.splice(i,1,newData);
+										}
+									}
+								}
+								/*if(0 == showDataList.length){
+									var newData = {
+										"name": newDataList[0].name,
+										"value": newDataList[0].value,
+										"selected": true
+									}
+									lists.push(newDataList[0].value);
+									showList.push(newData);
+									data.splice(0,1,newData);
+								}*/
+								$("#attachTypes").val(lists);
+								xmSelect.render({
+									el: '#tType',
+									language: 'zn',
+									data:data
+								})
+							}
+						}
+					})
+				}
+			}
+		})
+	}
+
+	var tType = xmSelect.render({
+		el: '#tType',
+		language: 'zn',
+		data: [
+		]
+	})
+
+
+	document.getElementById('tType').onblur=function(){
+		var list = [];
+		//获取当前多选选中的值
+		var selectArr = tType.getValue();
+		for (var i in selectArr){
+			list.push(selectArr[i].value);
+		}
+		$("#attachTypes").val(list);
+		console.log(list);
+	}
+</script>
+</body>
+</html>

+ 129 - 0
src/main/webapp/webpage/modules/projectAccessory/projectTemplate/projectTemplateList.jsp

@@ -0,0 +1,129 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>复核标准管理</title>
+    <meta name="decorator" content="default"/>
+    <%@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="projectTemplateInfo" action="${ctx}/projectTemplate/projectTemplate/" method="post" class="form-inline">
+
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label double-line">附件结构名:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="attachName" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">序号:</label>
+							<div class="layui-input-block">
+								<form:input path="indexNum" 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: 10px;" 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">
+						<%--<shiro:hasPermission name="projectAccessory:projectAccessory:add">
+							<table:addRow url="${ctx}/projectTemplate/projectTemplate/form" title="项目"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>--%>
+						<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="treeTable" class="table table-bordered table-hover list-table">
+						<thead>
+							<tr>
+								<th  width="30%">附件结构名称</th>
+								<th >类型</th>
+								<th width="80px">最大容量(M)</th>
+								<th >序号</th>
+								<th width="240px">操作</th>
+							</tr>
+						</thead>
+						<tbody>
+						<c:forEach items="${list}" var="projectAccessory">
+							<tr id="${projectAccessory.id}" pid="${projectAccessory.parent.id}">
+								<td><a  href="#" onclick="openDialogView('查看附件结构', '${ctx}/projectTemplate/projectTemplate/view?id=${projectAccessory.id}','80%', '60%')">
+										${projectAccessory.attachName}
+								</a></td>
+								<td style="text-align: center">
+										${projectAccessory.attachTypes}
+								</td>
+								<td style="text-align: center">
+										${projectAccessory.attachLength}
+								</td>
+								<td style="text-align: center">
+									${projectAccessory.indexNum}
+								</td>
+								<td class="op-td text-center">
+									<div class="op-btn-box">
+										<c:if test="${projectAccessory.grade == 0}">
+											<shiro:hasPermission name="projectAccessory:projectAccessory:add">
+												<a href="javascript:void(0);" onclick="openDialog('添加附件结构', '${ctx}/projectTemplate/projectTemplate/form?parent.id=${projectAccessory.id}','80%','80%')" class="op-btn op-btn-add"><i class="fa fa-plus"></i> 添加下级结构</a>
+											</shiro:hasPermission>
+										</c:if>
+										<c:if test="${projectAccessory.grade ==1}">
+										<shiro:hasPermission name="projectAccessory:projectAccessory:edit">
+											<a href="javascript:void(0);" onclick="openDialog('修改附件结构', '${ctx}/projectTemplate/projectTemplate/form?id=${projectAccessory.id}','80%','80%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
+										</shiro:hasPermission>
+										<shiro:hasPermission name="projectAccessory:projectAccessory:del">
+											<a href="${ctx}/projectTemplate/projectTemplate/delete?id=${projectAccessory.id}" onclick="return confirmx('确认要删除该复附件结构及其子附件结构吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+										</shiro:hasPermission>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+	
+		<!-- 分页代码 -->
+	<%--<table:page page="${page}"></table:page>--%>
+
+				</div>
+			</div>
+		</div>
+</div>
+	<script>
+        resizeListWindow1();
+        $(window).resize(function(){
+            resizeListWindow1();
+        });
+	</script>
+</body>
+</html>

+ 76 - 0
src/main/webapp/webpage/modules/projectAccessory/projectTemplate/projectTemplateView.jsp

@@ -0,0 +1,76 @@
+<%@ 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="workReviewStandard" action="#" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>标准信息</h2></div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>上级节点:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workReviewStandard.parent.standardDetail}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12 with-textarea">
+					<label class="layui-form-label"><span class="require-item">*</span>标准内容:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" readonly="true" rows="4" style="resize:none;" class="form-control required">${workReviewStandard.standardDetail}</textarea>
+					</div>
+				</div>
+				<c:if test="${workReviewStandard.proofread == 1}">
+					<div class="layui-item layui-col-sm12">
+						<label class="layui-form-label"><span class="require-item">*</span>最多扣分:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workReviewStandard.maxDeduct}"/>
+						</div>
+					</div>
+				</c:if>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">序号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input" value=" ${workReviewStandard.orderNum}"/>
+					</div>
+				</div>
+
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>