⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 order_jsp.java

📁 项目名称eShop
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.text.*;
import java.util.*;
import java.math.*;
import eshop.business.*;
import eshop.common.*;

public final class order_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\r\n");
      out.write("<head>\r\n");
      out.write("\r\n");
      out.write("<title>确认订单</title>\r\n");
      out.write("<link rel=stylesheet href=\"css/style.css\" type=\"text/css\"> \r\n");
      out.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=gb2312\"></meta>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("<center>\r\n");
      out.write("<!--Top Start--> \r\n");
      out.write("<table cellspacing=\"0\" cellpadding=\"0\" width=\"800\">\r\n");
      out.write("   <tr>\r\n");
      out.write("     <td>\r\n");
      out.write("       <iframe src=\"top.jsp\" height=\"171\" width=\"810\" frameBorder=\"\"></iframe>\r\n");
      out.write("     </td>\r\n");
      out.write("   </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<!--Top End--> \r\n");
      out.write("<table cellpadding=0 cellspacing=0 width=\"710\" align=center>\r\n");
      out.write("<tr height=\"47\">\r\n");
      out.write("  <td width=\"143\"><img src=\"image/es_order_detail.gif\"></td>\r\n");
      out.write("  <td background=\"image/es_order_001.gif\" width=\"560\"></td>\r\n");
      out.write("  <td width=\"7\"><img src=\"image/es_order_002.gif\"></td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<p></p>\r\n");
      out.write("<TABLE cellpadding=0 cellspacing=0 class=\"tableBorder3\" width=\"710\">\r\n");
      out.write("<TR>\r\n");
      out.write("<TD>\r\n");

   OrderVO aOrder=(OrderVO)session.getAttribute("ordervo");

      out.write("\r\n");
      out.write("<!--收货人基本信息Start-->\r\n");
      out.write("<table cellpadding=0 cellspacing=0 width=\"680\" align=center  class=\"tableBorder2\">\r\n");
      out.write("<tr height=\"20\" >\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"40%\">\r\n");
      out.write("  订单号:");
      out.print(aOrder.getOrderID());
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  收货人:");
      out.print(aOrder.getRecName());
      out.write("\r\n");
      out.write("  </td> \r\n");
      out.write("    <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  电话:");
      out.print(aOrder.getRecTel());
      out.write(" \r\n");
      out.write("  </td> \r\n");
      out.write("</tr>\r\n");
      out.write("<tr height=\"20\" >\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"40%\">\r\n");
      out.write("  收货地址:");
      out.print(aOrder.getRecAddress());
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  送货方式:");
      out.print(aOrder.getDeliverMethod());
      out.write("\r\n");
      out.write("  </td> \r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  付款方式:");
      out.print(aOrder.getPayMethod());
      out.write(" \r\n");
      out.write("  </td> \r\n");
      out.write("</tr>\r\n");
      out.write("<tr height=\"20\" >\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"40%\">\r\n");
      out.write("  E-Mail:");
      out.print(aOrder.getRecEmail());
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  订单时间:");
      out.print(aOrder.getOrderDate());
      out.write("\r\n");
      out.write("  </td> \r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("   &nbsp; \r\n");
      out.write("  </td> \r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<!--收货人基本信息End-->\r\n");
      out.write("<p></p>\r\n");

    CartBean cartbean=(CartBean)session.getAttribute("s_cart");    
    Iterator   itrCartItems=cartbean.getAllCartBookItems();  
    CartVO cart=cartbean.cartVOTotalPrice;
    //送货费用
    BigDecimal bdDeliverPaid=new BigDecimal("5");   
    String strDeliverPaid=new String("5");
    String strTotalEshopPrice=String.valueOf(cart.getTotalEshopPrice());
    String strTotalPaid=String.valueOf(cart.getTotalEshopPrice().add(bdDeliverPaid));

      out.write("\r\n");
      out.write("<!--商品基本信息Start-->\r\n");
      out.write("<table cellpadding=0 cellspacing=0 width=\"680\" align=center  class=\"tableBorder2\">\r\n");
      out.write("<tr height=\"20\" style=\"font-weight:bold;color:#cc3300\" align=\"center\">\r\n");
      out.write("  <td class=\"tableRow\" width=\"20%\">\r\n");
      out.write("  商品ID \r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRow\" width=\"30%\">\r\n");
      out.write("  商品名称\r\n");
      out.write("  </td> \r\n");
      out.write("    <td class=\"tableRow\" width=\"10%\">\r\n");
      out.write("  原价\r\n");
      out.write("  </td> \r\n");
      out.write("    <td class=\"tableRow\" width=\"10%\">\r\n");
      out.write("  数量\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRow\" width=\"10%\">\r\n");
      out.write("  销售价 \r\n");
      out.write("  </td> \r\n");
      out.write("    <td class=\"tableRow\" width=\"20%\">\r\n");
      out.write("  商品小计 \r\n");
      out.write("  </td>\r\n");
      out.write("</tr>\r\n");

   while(itrCartItems.hasNext())
    {
       CartVO cartItem=(CartVO)itrCartItems.next();
       BookVO book=cartItem.getBookItem();
       int intBookNum=cartItem.getBookNum();
       int intBookID=book.getBookID();

      out.write("\r\n");
      out.write("<tr height=\"20\" align=\"center\" >\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"20%\">\r\n");
      out.write("  ");
      out.print(book.getBookID());
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  <a href=\"bookdetail.jsp?bookid=");
      out.print(book.getBookID());
      out.write("\" target=\"_blank\">");
      out.print(book.getBookName());
      out.write(" </a>\r\n");
      out.write("  </td> \r\n");
      out.write("  <td class=\"tableRowlight\" width=\"10%\">\r\n");
      out.write("  ");
      out.print(book.getBookPrice());
      out.write(" \r\n");
      out.write("  </td> \r\n");
      out.write("  <td class=\"tableRowlight\" width=\"10%\">\r\n");
      out.write("  ");
      out.print(intBookNum);
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"10%\">\r\n");
      out.write("  ");
      out.print(book.getBookEshopPrice());
      out.write(" \r\n");
      out.write("  </td> \r\n");
      out.write("  <td class=\"tableRowlight\" width=\"20%\">\r\n");
      out.write("  ");
      out.print(cartItem.getTotalEshopPrice());
      out.write("\r\n");
      out.write("  </td>\r\n");
      out.write("</tr>\r\n");
}
      out.write("\r\n");
      out.write("</table>\r\n");
      out.write("<!--商品基本信息End-->\r\n");
      out.write("<p></p>\r\n");
      out.write("<!--订单基本信息Start-->\r\n");
      out.write("<table cellpadding=0 cellspacing=0 width=\"680\" align=center  class=\"tableBorder2\">\r\n");
      out.write("<tr height=\"20\" >\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"40%\">\r\n");
      out.write("  订购书款:¥");
      out.print(strTotalEshopPrice);
      out.write("元 \r\n");
      out.write("  </td>\r\n");
      out.write("  <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  配送费:¥");
      out.print(strDeliverPaid);
      out.write("元 \r\n");
      out.write("  </td> \r\n");
      out.write("    <td class=\"tableRowlight\" width=\"30%\">\r\n");
      out.write("  订购总计:<span class=\"font-red\"><b>¥");
      out.print(strTotalPaid);
      out.write("元</b></span> \r\n");
      out.write("  </td> \r\n");
      out.write("</tr>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<tr height=\"40\">\r\n");
      out.write("   <td class=\"tableRow\" align=\"center\" colspan=\"6\">\r\n");
      out.write("      <input type=\"button\" name=\"btnContinueShop\" class=btnContinueShop value=\"确认订单\" onclick=\"window.navigate('AuthorityAction?OrderDoneAction');\">     \r\n");
      out.write("   </td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<!--订单基本信息End-->\r\n");
      out.write("</TD>\r\n");
      out.write("</TR>\r\n");
      out.write("</TABLE>\r\n");
      out.write("<p></p>\r\n");
      out.write("<!--Foot Start-->\r\n");
      out.write("<table cellspacing=\"0\" cellpadding=\"0\" width=\"800\">\r\n");
      out.write("<tr>\r\n");
      out.write("  <td>\r\n");
      out.write("    <iframe src=\"foot.htm\" height=\"80\" width=\"800\" frameBorder=\"\"></iframe>\r\n");
      out.write("  </td>\r\n");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<!--Foot End-->\r\n");
      out.write("</center>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -