【javaweb】库存物资管理系统思路与总结

题目:

1、有一个存放商品的仓库,每天都有商品出库和入库。

2、每种商品都有名称、生产厂家、型号、规格等。

3、出入库时必须填写出入库单据,单据包括商品名称、生产厂家、型号、 规格、数量、日期、时间、入库单位(或出库单位)名称、送货(或提货)人 姓名。

首先建立数据库goodsmanager

table:goods记录商品信息

table:list记录出入库信息

Java部分:

先把页面写好

首页面用<iframe>分为左侧导航栏,和右侧页面

点击左侧超链接即可实现右侧页面的跳转,在left.jsp中使用<a>的target属性来控制

1 <div>
2 <div><a style="color:blue" target="right" href="select.jsp">查询</a></div><br/>
3 <div><a style="color:blue" target="right" href="out.jsp">出库</a></div><br/>
4 <div><a style="color:blue" target="right" href="in.jsp">入库</a></div><br/>
5 <div><a style="color:blue" target="right" href="1.jsp">增加商品</a></div><br/>
6 <div><a style="color:blue" target="right" href="2.jsp">删除商品</a></div><br/>
7 <div><a style="color:blue" target="right" href="3.jsp">修改商品</a></div><br/>
8 <div><a style="color:blue" target="right" href="4.jsp">查询商品</a></div><br/>
9 </div>

left.jsp

验证跳转没有问题后,先写出库和入库。

新建数据库连接工具DB.java,放到com.ccr.jap.util包下

新建GoodsBean和ListBean,包括对应的私有变量和get、set函数

新建GoodsDao、ListDao进行数据库的增删改查操作

入库涉及到两种情况:

1、商品已存在

2、商品未存在

首先调用GoodsDao里的chick()函数,如果商品存在,返回id,否则返回-1;

 1 public int chick(GoodsBean g)
 2     {
 3         int i=-1;//i>0查询有结果
 4         DB db=new DB();
 5         Connection con = db.getCon();
 6         try
 7         {
 8         Statement stm = con.createStatement();
 9         ResultSet rs =stm.executeQuery("select id from goods where name=‘"+g.getName()+"‘ and PM=‘"+g.getPM()+"‘ and type=‘"+g.getType()+"‘ and specification=‘"+g.getSpecification()+"‘");
10         if(rs.next())
11         {
12             i=rs.getInt("id");
13         }
14         }
15         catch (Exception e)
16         {
17         e.printStackTrace();
18         }
19         return i;
20     }

GoodsDao.chick()

如果存在,直接修改商品数量

 1 public boolean update(int number,int i)
 2     {
 3         int num=0;
 4         DB db=new DB();
 5         Connection con = db.getCon();
 6         try
 7         {
 8         Statement stm = con.createStatement();
 9         ResultSet rs =stm.executeQuery("select number from goods where id="+i);
10         System.out.println("update"+i+"num "+number);
11         rs.next();
12         num=rs.getInt("number");
13         System.out.print(num+"+"+number);
14         num=num+number;
15         System.out.println("="+num);
16         stm.execute("update goods set number="+num+" where id="+i);
17         }
18         catch (Exception e)
19         {
20         e.printStackTrace();
21         return false;
22         }
23         return true;
24     }

GoodsDao.update(int number,int i)

不存在,则新建商品信息

 1 public boolean insert(GoodsBean g)
 2     {
 3         DB db=new DB();
 4         Connection con = db.getCon();
 5         try
 6         {
 7         Statement stm = con.createStatement();
 8         stm.execute("insert into goods(name,PM,type,specification,number) values (‘"+g.getName()+"‘,‘"+g.getPM()+"‘,‘"+g.getType()+"‘,‘"+g.getSpecification()+"‘,"+g.getNumber()+")");
 9         }
10         catch (Exception e)
11         {
12         e.printStackTrace();
13         return false;
14         }
15         return true;
16     }

GoodsDao.insert(GoodsBean g)

然后调用ListDao里的insert()函数新建入库信息

 1 public boolean insert(ListBean l)
 2     {
 3         DB db=new DB();
 4         Connection con = db.getCon();
 5         try
 6         {
 7         Statement stm = con.createStatement();
 8         stm.execute("insert into list(name,PM,type,specification,number,units,PName,io,date) "
 9                 + "values (‘"+l.getName()+"‘,‘"+l.getPM()+"‘,‘"+l.getType()+"‘,‘"+l.getSpecification()+"‘,"+l.getNumber()+",‘"+l.getUnits()+"‘,‘"+l.getPName()+"‘,‘"+l.getIo()+"‘,‘"+l.getDate()+"‘)");
10         }
11         catch (Exception e)
12         {
13         e.printStackTrace();
14         return false;
15         }
16         return true;
17     }

ListDao.insert(ListBean l)

出库同理,但是在number赋值前先乘以-1变成负数

然后是servlet和jsp部分

入库:

 1 <h1>入库</h1>
 2 <form method="post" action="GoodsServlet?action=in">
 3 <div>
 4     <div>
 5         <div style="display:inline"><label for="name">&nbsp;&nbsp;名&nbsp;&nbsp;&nbsp;&nbsp;称&nbsp;&nbsp;</label></div>
 6         <div style="display:inline"><input type="text" name="name" id="name"></div>
 7     </div><br/>
 8     <div>
 9         <div style="display:inline"><label for="name">&nbsp;&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;号&nbsp;&nbsp;</label></div>
10         <div style="display:inline"><input type="text" name="type" id="type"></div>
11     </div><br/>
12     <div>
13         <div style="display:inline"><label for="name">出产厂家</label></div>
14         <div style="display:inline"><input type="text" name="PM" id="PM"></div>
15     </div><br/>
16     <div>
17         <div style="display:inline"><label for="name">&nbsp;&nbsp;规&nbsp;&nbsp;&nbsp;&nbsp;格&nbsp;&nbsp;</label></div>
18         <div style="display:inline"><input type="text" name="specification" id="specification"></div>
19     </div><br/>
20     <div>
21         <div style="display:inline"><label for="name">入库单位</label></div>
22         <div style="display:inline"><input type="text" name="units" id="units"></div>
23     </div><br/>
24     <div>
25         <div style="display:inline"><label for="name">送货人名</label></div>
26         <div style="display:inline"><input type="text" name="PName" id="PName"></div>
27     </div><br/>
28     <div>
29         <div style="display:inline"><label for="name">&nbsp;&nbsp;数&nbsp;&nbsp;&nbsp;&nbsp;量&nbsp;&nbsp;</label></div>
30         <div style="display:inline"><input type="text" name="number" id="number"></div>
31     </div><br/>
32     <div>
33         <div><input type="submit" value="提交"></div>
34     </div>
35 </div>
36 </form>

in.jsp

提交form表单到GoodsServlet,并附加信息action=in,出库同理

 1 protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 2     {
 3         request.setCharacterEncoding("UTF-8");
 4         response.setCharacterEncoding("UTF-8");
 5         response.setContentType("text/html;charset=UTF-8");
 6         response.setHeader("content-type", "text/html;charset=UTF-8");
 7         String action=request.getParameter("action");
 8         if(action.equals("select"))
 9         {
10             select(request,response);
11         }
12         if(action.equals("in"))
13         {
14             in(request,response);
15         }
16         if(action.equals("out"))
17         {
18             out(request,response);
19         }
20     }
21 protected void in(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
22     {
23         int id=-2;
24         ListBean b=new ListBean();
25         GoodsBean g=new GoodsBean();
26         GoodsDao gd=new GoodsDao();
27         ListDao ld=new ListDao();
28         b.setName(request.getParameter("name"));
29         b.setPM(request.getParameter("PM"));
30         b.setType(request.getParameter("type"));
31         b.setSpecification(request.getParameter("specification"));
32         b.setNumber(Integer.parseInt(request.getParameter("number")));
33         b.setUnits(request.getParameter("units"));
34         b.setPName(request.getParameter("PName"));
35         b.setIo("in");
36         b.setDate();
37         ld.insert(b);
38
39
40         g.setName(request.getParameter("name"));
41         g.setPM(request.getParameter("PM"));
42         g.setType(request.getParameter("type"));
43         g.setSpecification(request.getParameter("specification"));
44         g.setNumber(Integer.parseInt(request.getParameter("number")));
45         id=gd.chick(g);
46         System.out.println(id);
47         if(id>0)
48         {
49             gd.update(b.getNumber(), id);
50         }
51         else
52         {
53             gd.insert(g);
54         }
55         request.getRequestDispatcher("in.jsp").forward(request,response);
56     }
57     protected void out(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
58     {
59         int id=-2;
60         ListBean b=new ListBean();
61         GoodsBean g=new GoodsBean();
62         GoodsDao gd=new GoodsDao();
63         ListDao ld=new ListDao();
64         b.setName(request.getParameter("name"));
65         b.setPM(request.getParameter("PM"));
66         b.setType(request.getParameter("type"));
67         System.out.println(b.getType());
68         b.setSpecification(request.getParameter("specification"));
69         int number=Integer.parseInt(request.getParameter("number"));
70         number=-1*number;
71         System.out.println("SN"+number);
72         b.setNumber(number);
73         b.setUnits(request.getParameter("units"));
74         b.setPName(request.getParameter("PName"));
75         b.setIo("out");
76         b.setDate();
77         ld.insert(b);
78
79
80         g.setName(request.getParameter("name"));
81         g.setPM(request.getParameter("PM"));
82         g.setType(request.getParameter("type"));
83         g.setSpecification(request.getParameter("specification"));
84         g.setNumber(number);
85         id=gd.chick(g);
86         if(id>0)
87         {
88             gd.update(b.getNumber(), id);
89         }
90         else
91         {
92             System.out.println("错误");
93         }
94         request.getRequestDispatcher("out.jsp").forward(request,response);
95     }

查询:在页面中,输入日期和时间,点击查询按钮,出现查询结构

调用ListDao的Select,使用名称和日期进行查询,将结果存在List中

jsp代码

 1 <h1>信息查询</h1>
 2 <form method="post" action="GoodsServlet?action=select">
 3     <div>
 4         <div>
 5             <div><label>产品名称</label></div>
 6             <div><input type="text" name="name" id="name"></div>
 7         </div>
 8         <div>
 9             <div><label>日期</label></div>
10             <div><input type="text" name="date" id="date"></div>
11         </div>
12         <div>
13             <input type="submit" value="查询">
14         </div>
15     </div>
16 </form>
17 <c:set var="list" value="${sessionScope.l}"></c:set>
18 <c:if test="${l!=null }">
19 <c:forEach var="i" begin="0" end="${l.size()-1}">
20 &nbsp;名称&nbsp;${l[i].getName()}
21 &nbsp;型号&nbsp;${l[i].getType()}
22 &nbsp;出产厂家&nbsp;${l[i].getPM()}
23 &nbsp;规格&nbsp;${l[i].getSpecification()}
24 &nbsp;数量&nbsp;${l[i].getNumber()}
25 &nbsp;单位&nbsp;${l[i].getUnits()}
26 &nbsp;姓名&nbsp;${l[i].getPName()}
27 &nbsp;操作&nbsp;${l[i].getIo()}
28 &nbsp;日期&nbsp;${l[i].getDate()}
29 <br/>
30 </c:forEach>
31 </c:if>

select.jsp

使用了EL语句和JSTL标签进行遍历

Java代码:

 1 public List<ListBean> select(String name,String date)
 2     {
 3         List<ListBean> l=new ArrayList<ListBean>();
 4         ListBean b=null;
 5         DB db=new DB();
 6         Connection con = db.getCon();
 7         try
 8         {
 9         Statement stm = con.createStatement();
10         ResultSet rs = stm.executeQuery("select * from list where name like ‘%"+name+"%‘ and date =‘"+date+"‘");
11         while(rs.next())
12         {
13             b=new ListBean();
14             b.setName(rs.getString("name"));
15             b.setPM(rs.getString("PM"));
16             b.setType(rs.getString("type"));
17             b.setSpecification(rs.getString("specification"));
18             b.setNumber(rs.getInt("number"));
19             b.setUnits(rs.getString("units"));
20             b.setPName(rs.getString("PName"));
21             b.setIo(rs.getString("io"));
22             b.setDate(rs.getString("date"));
23             l.add(b);
24         }
25         } catch (Exception e)
26         {
27         e.printStackTrace();
28
29         }
30         return l;
31     }

ListDao.select(String name,String date)

GoodsServlet:

1 protected void select(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
2     {
3         String name=request.getParameter("name");
4         String date=request.getParameter("date");
5         ListDao d=new ListDao();
6         List<ListBean>l=d.select(name,date);
7         request.getSession().setAttribute("l", l);
8         request.getRequestDispatcher("select.jsp").forward(request,response);
9     }

第二部分:商品的增删改查

首先写好Dao相关的操作函数

  1 public class GoodsDao
  2 {
  3     public boolean delete(String name)
  4     {
  5         DB db=new DB();
  6         Connection con = db.getCon();
  7         try
  8         {
  9         Statement stm = con.createStatement();
 10         stm.execute("delete from goods where name=‘"+name+"‘");
 11         }
 12         catch (Exception e)
 13         {
 14         e.printStackTrace();
 15         return false;
 16         }
 17         return true;
 18     }
 19     public List<GoodsBean> select(String name)
 20     {
 21         List<GoodsBean> l=new ArrayList<GoodsBean>();
 22         GoodsBean b=null;
 23         DB db=new DB();
 24         Connection con = db.getCon();
 25         try
 26         {
 27         Statement stm = con.createStatement();
 28         ResultSet rs = stm.executeQuery("select * from goods where name like ‘%"+name+"%‘");
 29         while(rs.next())
 30         {
 31             b=new GoodsBean();
 32             b.setName(rs.getString("name"));
 33             b.setPM(rs.getString("PM"));
 34             b.setType(rs.getString("type"));
 35             b.setSpecification(rs.getString("specification"));
 36             b.setNumber(rs.getInt("number"));
 37             l.add(b);
 38         }
 39         } catch (Exception e)
 40         {
 41         e.printStackTrace();
 42
 43         }
 44         return l;
 45     }
 46     public boolean insert(GoodsBean g)
 47     {
 48         DB db=new DB();
 49         Connection con = db.getCon();
 50         try
 51         {
 52         Statement stm = con.createStatement();
 53         stm.execute("insert into goods(name,PM,type,specification,number) values (‘"+g.getName()+"‘,‘"+g.getPM()+"‘,‘"+g.getType()+"‘,‘"+g.getSpecification()+"‘,"+g.getNumber()+")");
 54         }
 55         catch (Exception e)
 56         {
 57         e.printStackTrace();
 58         return false;
 59         }
 60         return true;
 61     }
 62     public boolean update(int number,int i)
 63     {
 64         int num=0;
 65         DB db=new DB();
 66         Connection con = db.getCon();
 67         try
 68         {
 69         Statement stm = con.createStatement();
 70         ResultSet rs =stm.executeQuery("select number from goods where id="+i);
 71         System.out.println("update"+i+"num "+number);
 72         rs.next();
 73         num=rs.getInt("number");
 74         System.out.print(num+"+"+number);
 75         num=num+number;
 76         System.out.println("="+num);
 77         stm.execute("update goods set number="+num+" where id="+i);
 78         }
 79         catch (Exception e)
 80         {
 81         e.printStackTrace();
 82         return false;
 83         }
 84         return true;
 85     }
 86     public boolean update(String name,GoodsBean b)
 87     {
 88         System.out.println("Dao"+name+b.getName()+b.getType());
 89         DB db=new DB();
 90         Connection con = db.getCon();
 91         try
 92         {
 93         Statement stm = con.createStatement();
 94         stm.execute("update goods set name=‘"+b.getName()+"‘,type=‘"+b.getType()+"‘,PM=‘"+b.getPM()+"‘,specification=‘"+b.getSpecification()+"‘ where name=‘"+name+"‘");
 95         }
 96         catch (Exception e)
 97         {
 98         e.printStackTrace();
 99         return false;
100         }
101         return true;
102     }
103     public int chick(GoodsBean g)
104     {
105         int i=-1;//i>0查询有结果
106         DB db=new DB();
107         Connection con = db.getCon();
108         try
109         {
110         Statement stm = con.createStatement();
111         ResultSet rs =stm.executeQuery("select id from goods where name=‘"+g.getName()+"‘ and PM=‘"+g.getPM()+"‘ and type=‘"+g.getType()+"‘ and specification=‘"+g.getSpecification()+"‘");
112         if(rs.next())
113         {
114             i=rs.getInt("id");
115         }
116         }
117         catch (Exception e)
118         {
119         e.printStackTrace();
120         }
121         return i;
122     }
123 }

GoodsDao

在修改时,重构一个参数为GoodsBean和name的函数

然后写servlet(由于之前忘了写这一部分,所以直接起名为GoodsServlet2)

  1 package com.ccr.jsp.servlet;
  2
  3 import java.io.IOException;
  4 import java.util.List;
  5
  6 import javax.servlet.ServletException;
  7 import javax.servlet.annotation.WebServlet;
  8 import javax.servlet.http.HttpServlet;
  9 import javax.servlet.http.HttpServletRequest;
 10 import javax.servlet.http.HttpServletResponse;
 11
 12 import com.ccr.jsp.bean.GoodsBean;
 13 import com.ccr.jsp.bean.ListBean;
 14 import com.ccr.jsp.dao.GoodsDao;
 15 import com.ccr.jsp.dao.ListDao;
 16
 17 /**
 18  * Servlet implementation class GoodsServlet2
 19  */
 20 @WebServlet("/GoodsServlet2")
 21 public class GoodsServlet2 extends HttpServlet {
 22     private static final long serialVersionUID = 1L;
 23
 24     /**
 25      * @see HttpServlet#HttpServlet()
 26      */
 27     public GoodsServlet2() {
 28         super();
 29         // TODO Auto-generated constructor stub
 30     }
 31
 32     /**
 33      * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
 34      */
 35     protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
 36         request.setCharacterEncoding("UTF-8");
 37         response.setCharacterEncoding("UTF-8");
 38         response.setContentType("text/html;charset=UTF-8");
 39         response.setHeader("content-type", "text/html;charset=UTF-8");
 40         String action=request.getParameter("action");
 41         if(action.equals("add"))
 42         {
 43             System.out.println("add");
 44             add(request,response);
 45         }
 46         if(action.equals("delete"))
 47         {
 48             delete(request,response);
 49         }
 50         if(action.equals("update"))
 51         {
 52             update(request,response);
 53         }
 54         if(action.equals("select"))
 55         {
 56             select(request,response);
 57         }
 58         if(action.equals("select2"))
 59         {
 60             select2(request,response);
 61         }
 62     }
 63     protected void add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 64     {
 65         int id=-2;
 66         GoodsBean g=new GoodsBean();
 67         GoodsDao gd=new GoodsDao();
 68         g.setName(request.getParameter("name"));
 69         g.setPM(request.getParameter("PM"));
 70         g.setType(request.getParameter("type"));
 71         g.setSpecification(request.getParameter("specification"));
 72         g.setNumber(0);
 73         System.out.println(id);
 74         gd.insert(g);
 75         request.getRequestDispatcher("1.jsp").forward(request,response);
 76     }
 77     protected void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 78     {
 79         String name=request.getParameter("name");
 80         GoodsDao gd=new GoodsDao();
 81         gd.delete(name);
 82         request.getRequestDispatcher("2.jsp").forward(request,response);
 83     }
 84     protected void update(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 85     {
 86         String name=request.getParameter("name0");
 87         System.out.println("SNAME"+name);
 88         GoodsBean g=new GoodsBean();
 89         GoodsDao gd=new GoodsDao();
 90         g.setName(request.getParameter("name"));
 91         g.setPM(request.getParameter("PM"));
 92         g.setType(request.getParameter("type"));
 93         g.setSpecification(request.getParameter("specification"));
 94         System.out.println(g.getName()+g.getType());
 95         gd.update(name,g);
 96         request.getRequestDispatcher("3.jsp").forward(request,response);
 97     }
 98     protected void select(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 99     {
100         String name=request.getParameter("name0");
101         System.out.println("name="+name);
102         GoodsDao gd=new GoodsDao();
103         List<GoodsBean>gl=gd.select(name);
104         System.out.println(gl.size());
105         request.getSession().setAttribute("gl", gl);
106         request.getRequestDispatcher("4.jsp").forward(request,response);
107     }
108     protected void select2(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
109     {
110         String name=request.getParameter("name0");
111         System.out.println("name="+name);
112         GoodsDao gd=new GoodsDao();
113         List<GoodsBean>gl=gd.select(name);
114         System.out.println(gl.size());
115         request.getSession().setAttribute("gl", gl);
116         request.getRequestDispatcher("3.jsp").forward(request,response);
117     }
118 }

GoodsServlet2

在插入时,直接设置数量为0

最后设计一下界面。完工!

总结:

1、新学习了el语句和JSTL标签库的一些使用,很方便

2、复制代码很快,但是很容易出错

原文地址:https://www.cnblogs.com/26never/p/10117188.html

时间: 2024-11-14 11:57:49

【javaweb】库存物资管理系统思路与总结的相关文章

库存物资管理系统代码,详细过程和总结

库存物资管理系统实验要求如下: 1.背景资料 1.有一个存放商品的仓库,每天都有商品出库和入库.2.每种商品都有名称.生产厂家.型号.规格等.3.出入库时必须填写出入库单据,单据包括商品名称.生产厂家.型号.规格.数量.日期.时间.入库单位(或出库单位)名称.送货(或提货)人姓名.2.系统要求与功能设计2.1页面要求(1)能够在Tomcat服务器中正确部署,并通过浏览器查看:(1分)(2)网站页面整体风格统一:2.2设计要求1.设计出入库单据的录入.2.实现按商品名称.出入库日期的查询. 3.评

库存物资管理系统(过关测试)

实验要求: 1..有一个存放商品的仓库,每天都有商品出库和入库. 2.每种商品都有名称.生产厂家.型号.规格等. 3.出入库时必须填写出入库单据,单据包括商品名称.生产厂家.型号.规格.数量.日期.时间.入库单位(或出库单位)名称.送货(或提货)人姓名. 通过这次实验,我发现数据库的增删改查实验可以经由一个基本模板去演变,这样不但减少了工作量,同时使错误减少. 下面是此次测试的截图和代码 1 <%@ page language="java" import="java.u

库存物资管理系统

package com.hjf.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * 数据库连接工具 * @author Hu * */ public class DBUti

库存物资管理系统-测试

实验要求: 1..有一个存放商品的仓库,每天都有商品出库和入库. 2.每种商品都有名称.生产厂家.型号.规格等. 3.出入库时必须填写出入库单据,单据包括商品名称.生产厂家.型号.规格.数量.日期.时间.入库单位(或出库单位)名称.送货(或提货)人姓名. 建两张数据表,一张用来商品的增删改查,一张记录商品的出库与入库信息 所用及代码: public class GoodsBean { private String name; private String type; private String

疫情防控公益免费开源项目推荐-出入人员登记系统-学生健康报备管理系统-员工疫情筛查工具-物资管理系统-消毒检查登记系统

具体项目清单 项目1.出入人员登记系统 项目描述:疫情期间严格执行出入登记.支持出入人员自助扫码填表,支持管理员查看.统计.搜索和导出excel.还可根据车次.航班自动识别是否乘坐过确诊人员乘坐的交通工具.登记人员初次填写后,第二次填表将无需重复填写基本信息. 项目负责人:DCloud_UNI_GSQ(QQ群昵称) 项目体验地址:wlry.m3w.cn 源码地址:https://gitee.com/dcloud/xinguan2020-alien-registration 截图: 案例: 已经在

学习python两个月后,用了一个月用django写的物资管理系统

2017年5月,因为工作需要,单位急需一套物资管理系统来实现无纸化办公,当时也找外部门懂计算机编程的写过一套,用c(#)写的,因为是外单位做的,有很多细节无法满足工作需要,如果再进行改动,可能要重新做.求人不如靠自己,当时自己就有了一个想法,我要自己编写,或许只是一时的冲动,但如果做成了,确实能提升我在单位的自我价值.在此之前,我完全没有编程基础,只是在上中专的时候简单的学习过c语言,但那个时候已经是将近20年的事情了,编程在我脑子里完全没有概念.抱着试试看的态度,我决定开始学习.       

物资管理系统

一:首先连接数据库 package util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class JDBUtil { public static String url="jdbc:mysql://localhost:3306/test?u

JavaWeb学生成绩管理系统

JavaWeb学生成绩管理系统 此设计图提供完整视频讲解,点击这里学习. 主要功能: 不同的用户登录成功之后显示不同的菜单,本次开发使用动态生成菜单. 超级管理员功能: |- 超级管理员可以对老师进行管理,包括老师登录信息生成.查看.更新老师初始化密码: |- 增加考试科目.修改考试科目信息: |- 创建老师账号: 老师功能: |- 可以对学生信息进行维护.增加学生(登录账号).学生信息查看: |- 对学生成绩进行维护.增加学生成绩.查看学生成绩: |- 可以修改自己的登录密码. |- 创建本班

EXTJS和javaweb应用的开发思路

近期.做些几个基于extjs界面的应用.在此.总结一下要点.标题是基于javaweb,可是基本上各种server端语言都适用.使用Extjs做界面,无非就是取消了原来非常多的jsp文件,转而使用Extjs来訪问,但有些地方多少有些不方便,下面是我自己遇到的问题和经验. 1.多少个jsp合适呢?没有特殊要求的话,2个就能够,一个是login,一个是系统主页.登录页一般须要比較花哨.单独做一页.比較easy套用样式:主页则包括基本的布局.功能,而功能靠extjs来实现.对于一些特殊的页面.比方须要特