• 大小: 1.45MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-21
  • 语言: Java
  • 标签:

资源简介

基于java的智能化停车场管理系统

资源截图

代码片段和文件信息

        package DAL;

        import java.util.*;
        
        import DBUtil.SQLUtil;
        
        public class Card {

//获取IC卡表信息列表
public Listject> getEntity()
{
String sqlCmd=“select *from Card“;
return DBUtil.SQLUtil.executeQuery(sqlCmd null);//执行查询操作executeQuery
}
            
        //获取分页后IC卡表信息列表
public Listject> getEntity(int page)
{
int size=(page-1)*15;
String sqlCmd=“select *from V_Card limit “+size+“15“;
return DBUtil.SQLUtil.executeQuery(sqlCmd null);//执行查询操作executeQuery
}
                
               //根据查询条件sqlWhere获取分页后IC卡表信息列表
public Listject> getEntityByWhere(String sqlWhereint page)
{
int size=(page-1)*15;
String sqlCmd=“select *from V_Card where “+sqlWhere+“ limit “+ size+“15“;
return DBUtil.SQLUtil.executeQuery(sqlCmd null);//执行查询操作executeQuery
        }
        
        //删除IC卡表信息
        public int deleteEntity(String card_id)
        {
            String sqlCmd=“delete from Card where card_id=‘“+card_id+“‘“;
            return DBUtil.SQLUtil.executeNonQuery(sqlCmd null);//执行非查询操作executeNonQuery
        }
        
        //根据IC卡表编号获取IC卡表信息
        public Listject> getEntityById(String card_id)
        {
            String sqlCmd=“select *From V_Card where card_id=‘“+card_id+“‘“;
            return DBUtil.SQLUtil.executeQuery(sqlCmd null);//执行查询操作executeQuery
        }
        
        //更新IC卡表信息
        public int updateEntity(String card_idString seat_idString user_nameString user_genderString user_addrString car_num)
        {
            String sqlCmd=“Update Card set seat_id=‘“ + seat_id + “‘user_name=‘“ + user_name + “‘user_gender=‘“ + user_gender + “‘user_addr=‘“ + user_addr + “‘car_num=‘“ + car_num + “‘ where card_id=‘“+card_id+“‘“;
            return SQLUtil.executeNonQuery(sqlCmd null);
        }
        
        //插入IC卡表信息
        public int insertEntity(String card_idString seat_idString user_nameString user_genderString user_addrString car_num)
        {
            String sqlCmd=“Insert into Card values(‘“ + card_id + “‘‘“ + seat_id + “‘‘“ + user_name + “‘‘“ + user_gender + “‘‘“ + user_addr + “‘‘“+car_num+“‘)“;
            return SQLUtil.executeNonQuery(sqlCmd null);
        }
        
        //检查插入主键是否重复
        public boolean checkExist(String card_id)
        {
            String sqlCmd=“select count(*) from V_Card where card_id=‘“+card_id+“‘“;
            if(1==Integer.parseInt(SQLUtil.excuteScalar(sqlCmd null).toString()) )
            {
                return true;
            }
            return false;
        }

//获取分页总数
public object getPageCount()
{
String sqlCmd=“SELECT CEIL( COUNT(*)/15.0) FROM V_Card “;
return SQLUtil.excuteScalar(sqlCmd null);
}

//根据查询条件获取分页总数
public object getPageCountByWhere(String sqlWhere)
{
String sqlCmd=“SELECT CEIL( COUNT(*)/15.0) FROM V_Card where “+sqlWhere;
return S

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-12-23 11:50  Parking\
     文件        1053  2017-05-16 03:25  Parking\.classpath
     文件        1332  2017-05-16 03:25  Parking\.project
     目录           0  2018-08-07 18:40  Parking\.settings\
     文件         522  2017-05-16 03:34  Parking\.settings\.jsdtscope
     文件          57  2018-05-09 15:28  Parking\.settings\org.eclipse.core.resources.prefs
     文件         364  2017-05-16 03:34  Parking\.settings\org.eclipse.jdt.core.prefs
     文件         482  2017-05-16 03:34  Parking\.settings\org.eclipse.wst.common.component
     文件         358  2017-05-16 03:34  Parking\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件         414  2017-05-16 03:34  Parking\.settings\org.eclipse.wst.common.project.facet.core.xml.bak
     文件          49  2017-05-16 03:34  Parking\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-05-16 03:34  Parking\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件        8963  2018-08-15 02:56  Parking\parking.sql
     目录           0  2018-08-07 18:40  Parking\src\
     目录           0  2018-08-07 18:40  Parking\src\DAL\
     文件        3316  2017-05-16 03:46  Parking\src\DAL\Card.java
     文件        4059  2017-05-16 03:46  Parking\src\DAL\Fixed.java
     文件        1110  2017-05-16 03:46  Parking\src\DAL\Login.java
     文件        3818  2017-05-16 03:46  Parking\src\DAL\Role.java
     文件        3541  2017-05-16 03:46  Parking\src\DAL\Seat.java
     文件        3940  2017-05-16 03:46  Parking\src\DAL\Temp.java
     文件        4116  2017-05-16 03:46  Parking\src\DAL\User.java
     目录           0  2018-08-07 18:40  Parking\src\DBUtil\
     文件        1041  2017-05-16 03:46  Parking\src\DBUtil\CloseFactory.java
     文件        1181  2017-05-16 03:46  Parking\src\DBUtil\ConnectionFactory.java
     文件         199  2019-12-23 11:47  Parking\src\DBUtil\db.properties
     文件        4544  2017-05-16 03:46  Parking\src\DBUtil\SQLUtil.java
     目录           0  2018-08-07 18:40  Parking\src\ServletHandle\
     文件        6614  2017-05-16 03:46  Parking\src\ServletHandle\CardHandle.java
     文件        8114  2017-05-16 03:46  Parking\src\ServletHandle\FixedHandle.java
     文件        1594  2017-05-16 03:46  Parking\src\ServletHandle\LoginHandle.java
............此处省略83个文件信息

评论

共有 条评论

相关资源