Ejemplo n.º 1
0
 /**
  * 返回值
  *
  * @param b 标示
  * @param s_msg 成功信息
  * @param f_msg 错误信息
  * @param url 返回路径
  */
 private void assertResult(boolean b, String s_msg, String f_msg, String url) {
   if (b) {
     super.addMessage(s_msg, url, SysConstant.SUCCESS);
   } else {
     super.addMessage(f_msg, url, SysConstant.ERROR);
   }
 }
Ejemplo n.º 2
0
 /** 审核过程 */
 public String audit() {
   UserInfo userInfo = super.getUser();
   logger.info(contactLetterAudit);
   businessContactletterservice.auditThis(entity, contactLetterAudit, userInfo);
   super.addMessage("提示:审核成功!", WAIT_HANDLED_PAGE_URL, SysConstant.SUCCESS);
   return SUCCESS;
 }
Ejemplo n.º 3
0
 /*
  * 转到添加页
  */
 @Override
 public String input() {
   UserInfo userInfo = super.getUser();
   String id = super.getRequest().getParameter("id");
   if (StringUtils.isNotBlank(id)) {
     entity = businessContactletterservice.loadBusinessContactletter(id);
   }
   entity.setReleaseUserName(userInfo.getUserName());
   entity.setReleaseUserDept(userInfo.getOrgName());
   entity.setReleaseUserId(userInfo.getPersonId());
   setSomething(entity);
   entity.setAuditUserId(entity.getAuditUserId());
   super.getRequest().setAttribute("entity", entity);
   super.getRequest().setAttribute("user", this.getUser());
   return INPUT;
 }
Ejemplo n.º 4
0
 /**
  * 删除
  *
  * @return
  */
 public String delete() {
   String id = super.getRequest().getParameter("id");
   businessContactletterservice.deleteBusinessContactletter(id); // 逻辑删
   // 将status=9
   super.addMessage("删除信息成功!", "/contactletter/contactletter!query.action", SysConstant.SUCCESS);
   return "queryList";
 }
Ejemplo n.º 5
0
 /**
  * 查看详细信息。
  *
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return
  * @throws Exception
  */
 @Override
 public String view() throws Exception {
   String id = super.getRequest().getParameter("id");
   UserInfo user = super.getUser();
   Boolean flag = false;
   entity = businessContactletterservice.loadBusinessContactletter(id);
   if (entity.getStatus().equals(Constant4Bcl.CHECKOFF)) {
     flag = true;
   }
   if (flag) {
     entity = businessContactletterservice.readContactletter(id, user.getPersonId());
   }
   if (StringUtils.isNotBlank(entity.getAuditUserId())) {
     entity.setAuditUserName(
         userinfoService.getUserInfoByPersonId(entity.getAuditUserId()).getUserName());
   }
   if (StringUtils.isNotBlank(entity.getReleaseUserId())) {
     entity.setReleaseUserName(
         userinfoService.getUserInfoByPersonId(entity.getReleaseUserId()).getUserName());
   }
   String str = getReadNameStr(entity);
   if (StringUtils.isNotBlank(str.toString())) {
     entity.setIssuerAreaUserNames(str.toString());
   }
   if (StringUtils.isNotBlank(entity.getDocumentType())) {
     if (entity.getDocumentType().equals("1")) {
       entity.setDocumentType("通告");
     } else {
       entity.setDocumentType("通知");
     }
   }
   Date now = new Date();
   String timeOutstr = "未过期";
   if (entity.getExpirationTime() != null) {
     if (entity.getExpirationTime().before(now)) {
       timeOutstr = "<font color='red'>已过期</font>";
     }
   }
   Map<String, List<CommonWorkflowResult>> checkresultMap =
       businessContactletterservice.getProcessHistoryList(id);
   super.getRequest().setAttribute(PROCESS_HISTORY_MAP, checkresultMap);
   super.getRequest().setAttribute("timeOutstr", timeOutstr);
   super.getRequest().setAttribute("entity", entity);
   return "showcontactletter";
 }
Ejemplo n.º 6
0
  /**
   * 转向审核页面
   *
   * @return auditContactLetter
   */
  public String toCheck() {
    String id = super.getRequest().getParameter("id");
    String taskid = super.getRequest().getParameter("taskId");
    if (id != null) {
      entity = businessContactletterservice.loadBusinessContactletter(id);
    }
    if (entity != null) {
      StringBuffer sb = new StringBuffer();
      UserInfo userinfo = userinfoService.getUserInfoByPersonId(entity.getReleaseUserId());
      entity.setReleaseUserName(userinfo.getUserName());
      entity.setReleaseUserDept(userinfo.getDeptName());
      String[] str = entity.getIssuerAreaUserIds().split(",");
      if (str != null && str.length > 0) {
        for (int i = 0; i < str.length; i++) {
          sb.append(userinfoService.getUserInfoByPersonId(str[i]).getUserName() + ";");
        }
      }
      entity.setIssuerAreaUserNames(sb.toString());
    }

    StringBuffer readNameStr = getReadNameStr4Audit(entity);
    if (readNameStr != null) {
      entity.setIssuerAreaUserNames(readNameStr.toString());
    }
    if (StringUtils.isNotBlank(entity.getDocumentType())) {
      if (entity.getDocumentType().equals("1")) {
        entity.setDocumentType("通告");
      } else {
        entity.setDocumentType("通知");
      }
    }
    contactLetterAudit.setTaskId(taskid);
    Map<String, List<CommonWorkflowResult>> checkresultMap =
        businessContactletterservice.getProcessHistoryList(id); // 获取任务id
    super.getRequest().setAttribute(PROCESS_HISTORY_MAP, checkresultMap);
    this.getRequest().setAttribute("contactLetterAudit", contactLetterAudit);
    this.getRequest().setAttribute("entity", entity);
    return "auditContactLetter";
  }
Ejemplo n.º 7
0
 /**
  * 进入维修作业计划草稿箱列表页面
  *
  * @return String
  */
 public String list() {
   super.getRequest().setAttribute("businessType", businessType);
   return LIST;
 }