📄 registjf_jsp.java~1~
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import pxzx.sql.*;
import java.sql.*;
import java.lang.*;
import java.util.*;
import java.io.*;
import pxzx.sql.*;
import java.sql.*;
public final class RegistJF_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/querenCX.jsp");
}
public java.util.List 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=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, 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("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("querenCX\r\n");
out.write("</title>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write(".STYLE1 {font-size: 18px}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<body>\r\n");
out.write("<p class=\"STYLE1 STYLE7 STYLE1\"><strong>财务管理->学费管理->缴费</strong></p>\r\n");
out.write("<hr />\r\n");
out.write("<form action=\"JiaoFei.jsp\" method=\"post\" name=\"form1\" class=\"STYLE6 STYLE4 STYLE1\" id=\"form1\">\r\n");
out.write("\r\n");
out.write("<p align=\"center\" class=\"STYLE9 STYLE2\"><strong>您的基本信息如下,请确认</strong>:</p>\r\n");
String SSt_id=request.getParameter("St_id");
String St_id=SSt_id;
String St_name=null;
float Tu_pay_mon=0;
float Tu_mon=0;
float Tu_re_mon=0;
float Tu_ny_mon=0;
try{
String cxsql="select *from 学费汇总表 where St_id='"+SSt_id+"'";
Connection con=ConnectDB.connect();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(cxsql);
while(rs.next())
{
out.print("<p>学 号:"+ rs.getString("St_id")+"</p>");
out.print("<p>姓 名:"+rs.getString("St_name")+"</P>");
out.print("<p>应缴学费:"+rs.getFloat("Tu_mon"));
out.print("<p>现已缴费:"+rs.getFloat("Tu_pay_mon")+"</p>");
out.print("<p>减免学费:"+rs.getFloat("Tu_re_mon")+"</p>");
out.print("<p>目前欠费"+rs.getFloat("Tu_ny_mon")+"</p>");
St_name= rs.getString("St_id");
Tu_pay_mon= rs.getFloat("Tu_pay_mon");
Tu_mon= rs.getFloat("Tu_mon");
Tu_re_mon=rs.getFloat("Tu_re_mon");
Tu_ny_mon=rs.getFloat("Tu_ny_mon");
}
}catch(Exception e){e.printStackTrace();}
out.write("\r\n");
out.write("</form>\r\n");
out.write(" <p align=\"center\">\r\n");
out.write(" <span class=\"STYLE2 STYLE1\">\r\n");
out.write(" <input type=\"submit\" name=\"Submit\" value=\"信息正确无误\" /><input type=\"button\" value=\"信息错误,返回上一页\" onClick=\"javascript:history.go(-1);\">\r\n");
out.write(" </span> </p>\r\n");
out.write("\r\n");
out.write(" <br>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
out.write("\r\n");
out.write("\r\n");
pxzx.sql.xfjf xfjf = null;
synchronized (_jspx_page_context) {
xfjf = (pxzx.sql.xfjf) _jspx_page_context.getAttribute("xfjf", PageContext.PAGE_SCOPE);
if (xfjf == null){
xfjf = new pxzx.sql.xfjf();
_jspx_page_context.setAttribute("xfjf", xfjf, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
pxzx.sql.xfbzpz xfbzpz = null;
synchronized (_jspx_page_context) {
xfbzpz = (pxzx.sql.xfbzpz) _jspx_page_context.getAttribute("xfbzpz", PageContext.PAGE_SCOPE);
if (xfbzpz == null){
xfbzpz = new pxzx.sql.xfbzpz();
_jspx_page_context.setAttribute("xfbzpz", xfbzpz, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
pxzx.sql.xfhzb xfhzb = null;
synchronized (_jspx_page_context) {
xfhzb = (pxzx.sql.xfhzb) _jspx_page_context.getAttribute("xfhzb", PageContext.PAGE_SCOPE);
if (xfhzb == null){
xfhzb = new pxzx.sql.xfhzb();
_jspx_page_context.setAttribute("xfhzb", xfhzb, PageContext.PAGE_SCOPE);
}
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>学费缴费</title>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
int newC_id = 0;
String date = request.getParameter("d_s");
java.sql.Date T_date = java.sql.Date.valueOf(date);
/*String St_id = request.getParameter("St_id");
St_id = new String(St_id.getBytes("ISO8859_1"), "gb2312");
String St_name = request.getParameter("St_name");
St_name = new String(St_name.getBytes("ISO8859_1"), "gb2312");
String STu_pay_mon = request.getParameter("Tu_pay_mon");
float Tu_pay_mon = Float.parseFloat(STu_pay_mon);
String STu_ny_mon = request.getParameter("Tu_ny_mon");
float Tu_ny_mon = Float.parseFloat(STu_ny_mon);*/
String STu_themon = request.getParameter("Tu_themon");
float Tu_themon = Float.parseFloat(STu_themon);
String select = request.getParameter("select");
select = new String(select.getBytes("ISO8859_1"), "gb2312");
String Tu_check = null;
String Tu_check_id = null;
if (select == "现金") {
Tu_check = "N";
Tu_check_id=null;
}
else {
Tu_check = "Y";
Tu_check_id = request.getParameter("Tu_check_id");
Tu_check_id = new String(Tu_check_id.getBytes("ISO8859_1"), "gb2312");
}
/*插入凭证库表的信息*/
xfbzpz pz = new xfbzpz();
pz.setC_date(T_date);
pz.setC_kind("收款");
pz.setC_abst("缴学费");
pz.setB_sub("现金");
pz.setB_mon(Tu_themon);
pz.setL_sub("人力");
pz.setL_mon(Tu_themon);
pz.setC_Ma_name("路");
pz.setC_Au_name("万");
try {
PZInsert pzi = new PZInsert(pz);
}
catch (Exception e) {
e.printStackTrace();
}
String sql = "select max(C_id) as C_id from 凭证库表";
try {
Connection con = ConnectDB.connect();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(sql);
if (rs.next()) {
newC_id = rs.getInt("C_id");
}
else {
out.print("<p>无法生成凭证</p>");
}
}
catch (Exception e) {
e.printStackTrace();
}
//System.out.println(newC_id);
/*插入学费收入表的信息*/
xfjf x = new xfjf();
x.setT_date(T_date);
x.setSt_id(St_id);
x.setSt_name(St_name);
x.setC_id(newC_id);
x.setTu_themon(Tu_themon);
x.setTu_check(Tu_check);
x.setTu_check_id(Tu_check_id);
try {
JiaoFei jiaofei = new JiaoFei(x);
}
catch (Exception e) {
e.printStackTrace();
}
/*插入学费汇总表的信息*/
Tu_pay_mon=Tu_pay_mon+Tu_themon;
Tu_ny_mon=Tu_ny_mon-Tu_themon;
xfhzb xf = new xfhzb();
xf.setSt_id(St_id);
xf.setSt_name(St_name);
xf.setTu_pay_mon(Tu_pay_mon);
xf.setTu_mon(10000);
xf.setTu_re_mon(0);
xf.setTu_ny_mon(Tu_ny_mon);
XFHZInsert xfhz = new XFHZInsert(xf);
System.out.println("插入成功");
out.write("\r\n");
out.write("</body>\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 + -