📄 yjtj.jsp
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/syxt.jsp" %>
<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_syxt_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_syxt_STRING,MM_syxt_USERNAME,MM_syxt_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT djh,dbo.xsd.khbh, khmc, jhrq, kdrq, zdr FROM dbo.xsd,dbo.khzl WHERE dbo.khzl.khbh=dbo.xsd.khbh and dbo.xsd.khbh in (select khbh from dbo.khzl) ");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>统计</title>
</head>
<body background="3.jpg">
<% if (!Recordset1_isEmpty ) { %>
<br />
<table width="700" border="1">
<tr>
<th scope="col">单据号</th>
<th scope="col">客户名称</th>
<th scope="col">交货日期</th>
<th scope="col">开单日期</th>
<th scope="col">制单人</th>
<th scope="col">金额</th>
</tr>
<%
float zje=0;
while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { %>
<tr align="center">
<%
String djhs=Recordset1.getObject("djh").toString();
String Recordset2__MMColParam = "1";
if (djhs !=null) {Recordset2__MMColParam = (String)djhs;}
Driver DriverRecordset2 = (Driver)Class.forName(MM_syxt_DRIVER).newInstance();
Connection ConnRecordset2 = DriverManager.getConnection(MM_syxt_STRING,MM_syxt_USERNAME,MM_syxt_PASSWORD);
PreparedStatement StatementRecordset2 = ConnRecordset2.prepareStatement("SELECT sum(je) jjee FROM dbo.xsdxz WHERE djh = ?");
StatementRecordset2.setObject(1, Recordset2__MMColParam);
ResultSet Recordset2 = StatementRecordset2.executeQuery();
boolean Recordset2_isEmpty = !Recordset2.next();
boolean Recordset2_hasData = !Recordset2_isEmpty;
Object Recordset2_data;
int Recordset2_numRows = 0;
%>
<td><a href="index3.jsp?a0=<%=djhs%>"> <%=djhs%> </a></td>
<td><a href="khxsd.jsp?khbh=<%=Recordset1.getObject("khbh")%>"> <%=Recordset1.getObject("khmc")%> </a></td>
<td><%=(((Recordset1_data = Recordset1.getObject("jhrq"))==null || Recordset1.wasNull())?"":Recordset1_data)%> </td>
<td><%=(((Recordset1_data = Recordset1.getObject("kdrq"))==null || Recordset1.wasNull())?"":Recordset1_data)%> </td>
<td><%=(((Recordset1_data = Recordset1.getObject("zdr"))==null || Recordset1.wasNull())?"":Recordset1_data)%> </td><%
zje+=Float.parseFloat(((Recordset2_data=Recordset2.getObject("jjee"))==null)?"0":Recordset2_data.toString()); %>
<td>¥ <%=((Recordset2_data==null)?"0":Recordset2_data)%></td>
</tr>
<%
Repeat1__index++;
Recordset1_hasData = Recordset1.next();
Recordset2.close();
StatementRecordset2.close();
ConnRecordset2.close();
}
%>
<tr align="center">
<td colspan="4"> </td>
<td colspan="2">总金额:¥ <%=zje%></td>
</tr>
</table>
<br />
<br />
<% } /* end !Recordset1_isEmpty */ %>
<% if (Recordset1_isEmpty ) { %>
没有该用户的销售单信息
<% } /* end Recordset1_isEmpty */ %>
</body>
</html>
<%
Recordset1.close();
StatementRecordset1.close();
ConnRecordset1.close();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -