Пример #1
0
 // 下载
 public String downLoadOne() throws Exception {
   String id = ((String[]) formMap.get("id"))[0] + ""; // 获取id
   String ifBackFlag = ((String[]) formMap.get("ifBackFlag"))[0] + ""; // 下载模版还是下载附件 -TECH附件 PATT模版
   ReptTechDtl rt = techReptDtlService.get(Long.parseLong(id)); // dtl
   String path = ""; // path
   String tempName = "";
   List dirList = paraDtlService.get(Dir.class); // 获取事故性质的list
   for (int i = 0; i < dirList.size(); i++) {
     Dir d = (Dir) dirList.get(i);
     if ((d.getParaCode().equalsIgnoreCase("PATT")) && (ifBackFlag.equals("PATT"))) {
       path = d.getCodeDesc() + rt.getReptPattern().getPatternName(); // 路径
       tempName = rt.getAttachName(); // 名
     }
     if ((d.getParaCode().equalsIgnoreCase("TECH")) && (ifBackFlag.equals("TECH"))) {
       path =
           d.getCodeDesc()
               + rt.getTechReptDef().getId()
               + rt.getTechReptDef().getName()
               + "\\"
               + rt.getSaveName(); // 附件路径
       tempName = rt.getUploadName(); // 名
     }
   }
   File file = new File(path);
   if (!file.exists()) {
     return null;
   }
   list = new ArrayList();
   list.add(tempName);
   list.add(file);
   return FILE;
 }
Пример #2
0
 // 获取路径
 private String getTechPath() {
   List dirList = paraDtlService.get(Dir.class); // 获取事故性质的list
   String path = "";
   for (int i = 0; i < dirList.size(); i++) {
     Dir d = (Dir) dirList.get(i);
     if (d.getParaCode().equalsIgnoreCase("TECH")) {
       path = d.getCodeDesc();
     }
   }
   return path;
 }
Пример #3
0
 // 初始填报界面
 public String toSubmitTechReport() {
   String id = reptTime;
   TechReptDef tech = techReptDefService.get(Long.parseLong(id));
   List dirList = paraDtlService.get(Dir.class);
   for (int i = 0; i < dirList.size(); i++) {
     Dir d = (Dir) dirList.get(i);
     if (d.getParaCode().equalsIgnoreCase("TECH")) {
       formMap.put("TECHPara", d.getCodeDesc());
     }
     if (d.getParaCode().equalsIgnoreCase("PATT")) {
       formMap.put("PATTPara", d.getCodeDesc());
     }
   }
   formMap.put("dirList", dirList);
   formMap.put("tech", tech);
   return "toSubmitTechReport";
 }
Пример #4
0
 // 初始详细信息界面
 public String toPreviewTechReport() {
   if (formMap.get("id") != null) {
     id = Long.parseLong(((String[]) formMap.get("id"))[0] + ""); // 获取id	
   }
   TechReptDef tech = techReptDefService.get(id);
   List dirList = paraDtlService.get(Dir.class);
   for (int i = 0; i < dirList.size(); i++) {
     Dir d = (Dir) dirList.get(i);
     if (d.getParaCode().equalsIgnoreCase("TECH")) {
       formMap.put("TECHPara", d.getCodeDesc());
     }
     if (d.getParaCode().equalsIgnoreCase("PATT")) {
       formMap.put("PATTPara", d.getCodeDesc());
     }
   }
   formMap.put("dirList", dirList);
   formMap.put("tech", tech);
   return "toPreviewTechReport";
 }
Пример #5
0
 // 初始审核界面
 public String toAuditTechReport() {
   TechReptDef tech = techReptDefService.get(id);
   List dirList = paraDtlService.get(Dir.class);
   for (int i = 0; i < dirList.size(); i++) {
     Dir d = (Dir) dirList.get(i);
     if (d.getParaCode().equalsIgnoreCase("TECH")) {
       formMap.put("TECHPara", d.getCodeDesc());
     }
     if (d.getParaCode().equalsIgnoreCase("PATT")) {
       formMap.put("PATTPara", d.getCodeDesc());
     }
   }
   String workflowId = taskId + "";
   formMap.put("workflowId", workflowId);
   List<String> comments = workFlowService.getComments(taskId + "");
   formMap.put("comments", comments);
   formMap.put("dirList", dirList);
   formMap.put("tech", tech);
   return "toAuditTechReport";
 }