Ejemplo n.º 1
0
  // to fix bug 2495
  private String getTable(TSendInfoBO tSendInfoBO) {
    StringBuilder s1 = new StringBuilder(100);
    try { // bug 0003895 0003898 0003046
      List<TInstanceInfoBO> list =
          orderDao.findService2InstanceByOrderId(tSendInfoBO.getOrderId(), tSendInfoBO.getType());

      s1.append("<table  id=\"mytable\"  cellspacing=\"0\"><caption> </caption>");
      if (list.size() != 0) { // bug 0003884
        s1.append("<tr>");
        s1.append("<th scope=\"col\">服  务</th>");
        s1.append("<th scope=\"col\">资  源</th>");
        s1.append("<th scope=\"col\">类  型</th>");
        s1.append("</tr>");
      } // fix bug 0002495
      for (TInstanceInfoBO info : list) {
        s1.append("<tr>");
        s1.append("<td  class=\"row\">" + info.getServiceName() + "</td>");
        s1.append("<td  class=\"row\">" + info.getInstanceName() + "</td>");
        s1.append("<td  class=\"row\">" + info.getTemplateName() + "</td>");
        s1.append("</tr>");
      }
      s1.append("</table>");
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return s1.toString();
  }
Ejemplo n.º 2
0
  // to fix bug 2495
  private String setMailMessage(TSendInfoBO tSendInfoBO) throws SQLException {
    StringBuilder sb = new StringBuilder(500);
    try {
      TUserBO auditor = orderDao.getAuditorByOrderId(tSendInfoBO.getOrderId());
      TOrderBO order = orderDao.searchOrderById(tSendInfoBO.getOrderId());
      // fix bug 2495
      sb.append(
          "<br />"
              + order.getCreateUserName()
              + " 您好,您的订单"
              + getAuditStr(tSendInfoBO)
              + ",具体订单信息如下:");
      // fix bug 2495
      sb.append("<br />订单号为:" + tSendInfoBO.getOrderId() + "");
      sb.append("<br />包含以下服务内容:<br />" + getTable(tSendInfoBO));
      sb.append("<br />订单类型:" + getOrderType(tSendInfoBO) + "");
      sb.append("<br />当前审批人为:" + auditor.getName() + "");
      sb.append("<br />操作时间:" + auditor.getCreateDt().toString().replace(".0", "") + "");
      if (tSendInfoBO.getState() == 1) { // 审核拒绝
        sb.append("<br />审批不通过原因:" + tSendInfoBO.getApproveReason() + "");
        sb.append("<br />您可以重新选择其他服务进行申请,如有问题请登录自服务门户查询,谢谢您选择我们的云平台");
      }
      if (tSendInfoBO.getState() == 2) { // 审核通过
        // to fix bug:2853
        String desc = "";
        if (tSendInfoBO.getType() == 1) { // 新申请
          desc = "已经审核通过,敬请耐心等待服务开通使用,如有问题请登录自服务门户查询,谢谢您选择我们的云平台。";
        } else if (tSendInfoBO.getType() == 2) { // 修改
          desc = "修改审核已通过,请等待开通使用,谢谢。";
        } else if (tSendInfoBO.getType() == 3) { // 退订
          desc = "退订审核已通过,服务即将关闭,谢谢。";
        }
        sb.append("<br />" + desc);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    return sb.toString();
  }