// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: OperatorManagerDaoImpl.java
package com.bluedot.persist.impl;
import com.bluedot.common.JdbcUtil;
import com.bluedot.common.Tools;
import com.bluedot.domain.Car;
import com.bluedot.domain.CheckTable;
import com.bluedot.domain.Customers;
import com.bluedot.domain.Page;
import com.bluedot.domain.Renttable;
import com.bluedot.domain.User;
import com.bluedot.exception.ApplicationException;
import com.bluedot.exception.DataAccessException;
import com.bluedot.persist.OperatorManagerDao;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
public class OperatorManagerDaoImpl
implements OperatorManagerDao
{
public OperatorManagerDaoImpl()
{
}
public Customers finCustomersByIdentity(String identity)
{
Connection conn;
Customers cust;
conn = null;
cust = null;
try
{
conn = JdbcUtil.getConnection();
PreparedStatement ps = conn.prepareStatement("select c.identity from customers c where c.identity = ?");
ps.setString(1, identity);
for (ResultSet rs = ps.executeQuery(); rs.next(); cust.setIdentity(rs.getString("identity")))
cust = new Customers();
}
catch (SQLException e)
{
e.printStackTrace();
throw new DataAccessException("操作失败,请重试!");
}
catch (Exception e)
{
e.printStackTrace();
throw new ApplicationException();
}
break MISSING_BLOCK_LABEL_114;
Exception exception;
exception;
JdbcUtil.closeConn(conn);
throw exception;
JdbcUtil.closeConn(conn);
return cust;
}
public List findAllCarByIsRenting()
{
Connection conn;
List list;
conn = null;
list = new ArrayList();
try
{
conn = JdbcUtil.getConnection();
PreparedStatement ps = conn.prepareStatement("select c.carnumber,c.price from cars c where c.isrenting = '0'");
Car car;
for (ResultSet rs = ps.executeQuery(); rs.next(); list.add(car))
{
car = new Car();
car.setCarNumber(rs.getString("carnumber"));
car.setPrice(rs.getDouble("price"));
}
}
catch (SQLException e)
{
e.printStackTrace();
throw new DataAccessException("操作失败,请重试!");
}
catch (Exception e)
{
e.printStackTrace();
throw new ApplicationException();
}
break MISSING_BLOCK_LABEL_130;
Exception exception;
exception;
JdbcUtil.closeConn(conn);
throw exception;
JdbcUtil.closeConn(conn);
return list;
}
public void createRenttable(Renttable rent)
{
Connection conn = null;
try
{
conn = JdbcUtil.getConnection();
conn.setAutoCommit(false);
PreparedStatement ps = conn.prepareStatement("insert into renttable(tableid,imprest, shouldpayprice,price,begindate,shouldreturndate,rentflag,custid,carid,userid) values(?,?,?,?,?,?,?,?,?,?)");
ps.setLong(1, rent.getTableId());
ps.setDouble(2, rent.getImprest());
ps.setDouble(3, rent.getShouldPayPrice());
ps.setDouble(4, rent.getPrice());
ps.setDate(5, new Date(rent.getBeginDate().getTime()));
ps.setDate(6, new Date(rent.getShouldReturnDate().getTime()));
ps.setInt(7, rent.getRentFlag());
ps.setString(8, rent.getCust().getIdentity());
ps.setString(9, rent.getCar().getCarNumber());
ps.setString(10, rent.getUser().getUserName());
ps.execute();
PreparedStatement ps2 = conn.prepareStatement("update cars c set c.isrenting = 1 where c.carnumber = ?");
ps2.setString(1, rent.getCar().getCarNumber());
ps2.execute();
conn.commit();
}
catch (SQLException e)
{
e.printStackTrace();
throw new DataAccessException("操作失败,请重试!");
}
catch (Exception e)
{
e.printStackTrace();
throw new ApplicationException();
}
break MISSING_BLOCK_LABEL_252;
Exception exception;
exception;
JdbcUtil.closeConn(conn);
throw exception;
JdbcUtil.closeConn(conn);
return;
}
public Renttable findRenttableByTableId(long tableId)
{
Connection conn;
Renttable rent;
conn = null;
rent = null;
try
{
conn = JdbcUtil.getConnection();
PreparedStatement ps = conn.prepareStatement("select u.username,r.tableid,r.imprest,r.shouldpayprice,r.price,r.begindate,r.shouldreturndate,r.returndate,r.rentflag ,c.carnumber,c.cartype,c.color,c.price as carprice,c.rentprice,c.deposit,c.isrenting,c.cardesc,cust.identity,cust.custname,cust.sex,cust.address,cust.phone,cust.career,cust.custpwd from users u,renttable r,cars c,customers cust where u.username = r.userid and r.carid = c.carnumber and r.custid = cust.identity and r.tableid = ? ");
ps.setLong(1, tableId);
Car car;
for (ResultSet rs = ps.executeQuery(); rs.next(); rent.setCar(car))
{
rent = new Renttable();
User user = new User();
user.setUserName(rs.getString("username"));
rent.setUser(user);
rent.setTableId(rs.getLong("tableid"));
rent.setImprest(rs.getDouble("imprest"));
rent.setShouldPayPrice(rs.getDouble("shouldpayprice"));
rent.setPrice(rs.getDouble("price"));
rent.setBeginDate(new java.util.Date(rs.getDate("begindate").getTime()));
rent.setShouldReturnDate(new java.util.Date(rs.getDate("shouldreturndate").getTime()));
rent.setRentFlag(rs.getInt("rentflag"));
if (rs.getDate("returndate") != null)
rent.setReturnDate(new java.util.Date(rs.getDate("returndate").getTime()));
Customers cust = new Customers();
cust.setIdentity(rs.getString("identity"));
cust.setCustName(rs.getString("custname"));
cust.setSex(rs.getString("sex"));
cust.setAddress(rs.getString("address"));
cust.setPhone(rs.getString("phone"));
cust.setCareer(rs.getString("career"));
rent.setCust(cust);
car = new Car();
car.setCarNumber(rs.getString("carnumber"));
car.setCarType(rs.getString("cartype"));
car.setColor(rs.getString("color"));
car.setPrice(rs.getDouble("carprice"));
car.setRentPrice(rs.getDouble("rentprice"));
car.setDeposit(rs.getDouble("deposit"));
car.setIsRenting(rs.getString("isrenting"));
car.setCardesc(rs.getString("cardesc"));
}
}
catch (SQLException e)
{
e.printStackTrace();
throw new DataAccessException("操作失败,请重试!");
}
catch (Exception e)
{
e.printStackTrace();
throw new ApplicationException();
}
break MISSING_BLOCK_LABEL_534;
Exception exception;
exception;
JdbcUtil.closeConn(conn);
throw exception;
JdbcUtil.closeConn(conn);
return rent;
}
public void createCheckTable(CheckTable ct)
{
Connection conn = null;
try
{
conn = JdbcUtil.getConnection();
conn.setAutoCommit(false);
PreparedStatement ps = conn.prepareStatement("insert into checktable values(?,?,?,?,?,?,?)");
ps.setLong(1, ct.getCheckId());
ps.setDate(2, new Date(ct.getCheckDate().getTime()));
ps.setString(3, ct.getField());
ps.setString(4, ct.getProblem());
ps.setDouble(5, ct.getPaying());
ps.setString(6, ct.getUser().getUserName());
ps.setLong(7, ct.getRentTable().getTableId());
ps.execute();
PreparedStatement ps2 = conn.prepareStatement("update cars c set c.isrenting = 0 where c.carnumber = ?");
ps2.setString(1, ct.getRentTable().getCar().getCarNumber());
ps2.execute();
PreparedStatement ps3 = conn.prepareStatement("update renttable r set r.rentflag = 1 ,r.returndate = ? where r.tableid = ?");
ps3.setDate(1, new Date(ct.getCheckDate().getTime()));
ps3.setLong(2, ct.getRentTable().getTableId());
ps3.execute();
conn.commit();
}
catch (SQLException e)
{
e.printStackTrace();
throw new DataAccessException("操作失败,请重试!")
没有合适的资源?快使用搜索试试~ 我知道了~
JAVA汽车租赁管理系统源码含设计书
共1249个文件
gif:351个
js:163个
java:162个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 20 下载量 36 浏览量
2022-03-20
13:24:45
上传
评论 13
收藏 14.18MB ZIP 举报
温馨提示
一、源码介绍 JAVA汽车租赁管理系统源码使用servlet,oracle数据库实现。 二、主要功能 本系统的整体设计可分为:用户管理模块、客户管理模块、汽车管理模块、业务管理模块、业务统计模块。 详见文档。 三、注意事项 开发环境为eclipse,数据库为oracle.
资源推荐
资源详情
资源评论
收起资源包目录
JAVA汽车租赁管理系统源码含设计书 (1249个子文件)
OperatorManagerDaoImpl.class 18KB
OperatorManagerDaoImpl.class 18KB
UserManagerDaoImpl.class 9KB
UserManagerDaoImpl.class 9KB
CustomerManagerDaoImpl.class 7KB
CustomerManagerDaoImpl.class 7KB
CarManagerDaoImpl.class 7KB
CarManagerDaoImpl.class 7KB
OperatorStateManagerDaoImpl.class 6KB
OperatorStateManagerDaoImpl.class 6KB
AddCar.class 6KB
AddCar.class 6KB
RentManagerSearch.class 6KB
RentManagerSearch.class 6KB
FindCheckTable.class 5KB
FindCheckTable.class 5KB
FindCar.class 5KB
FindCar.class 5KB
CreateRentCarTable.class 5KB
CreateRentCarTable.class 5KB
FindUser.class 4KB
FindUser.class 4KB
UpdateRenttable.class 4KB
UpdateRenttable.class 4KB
SystemOperatorDaoImpl.class 4KB
SystemOperatorDaoImpl.class 4KB
CreateCheckTable.class 4KB
CreateCheckTable.class 4KB
FindCustomers.class 4KB
FindCustomers.class 4KB
OperatorManagerImpl.class 4KB
OperatorManagerImpl.class 4KB
UpdateCar.class 4KB
UpdateCar.class 4KB
User.class 4KB
User.class 4KB
PreReturnCarSearch.class 3KB
PreReturnCarSearch.class 3KB
PreUdateCheckTable.class 3KB
PreUdateCheckTable.class 3KB
AddUser.class 3KB
AddUser.class 3KB
UpdateCheckTable.class 3KB
UpdateCheckTable.class 3KB
UpdateUser.class 3KB
UpdateUser.class 3KB
MonthReturnCar.class 3KB
MonthReturnCar.class 3KB
PreCreateRentCarTable.class 3KB
PreCreateRentCarTable.class 3KB
Renttable.class 3KB
Renttable.class 3KB
AddCustomers.class 3KB
AddCustomers.class 3KB
UpdateCustomers.class 3KB
UpdateCustomers.class 3KB
SafeFilter.class 3KB
SafeFilter.class 3KB
PreUpdateRenttable.class 3KB
PreUpdateRenttable.class 3KB
ChangeCustomersPwd.class 3KB
ChangeCustomersPwd.class 3KB
ChangeUserPwd.class 3KB
ChangeUserPwd.class 3KB
Login.class 3KB
Login.class 3KB
PreUpdateUser.class 2KB
PreUpdateUser.class 2KB
FindMonthReturnCarByInfo.class 2KB
FindMonthReturnCarByInfo.class 2KB
DeleteCheckTables.class 2KB
DeleteCheckTables.class 2KB
DeleteRenttable.class 2KB
DeleteRenttable.class 2KB
DeleteCustomers.class 2KB
DeleteCustomers.class 2KB
Car.class 2KB
Car.class 2KB
PreChangeCustomerPwd.class 2KB
PreChangeCustomerPwd.class 2KB
PreUpdateCustomers.class 2KB
PreUpdateCustomers.class 2KB
DeleteCar.class 2KB
DeleteCar.class 2KB
UserManagerImpl.class 2KB
UserManagerImpl.class 2KB
DeleteUser.class 2KB
DeleteUser.class 2KB
PreChangeUserPwd.class 2KB
PreChangeUserPwd.class 2KB
PreUpdateCar.class 2KB
PreUpdateCar.class 2KB
LoginFilter.class 2KB
LoginFilter.class 2KB
CustomerManagerImpl.class 2KB
CustomerManagerImpl.class 2KB
Customers.class 2KB
Customers.class 2KB
JdbcUtil.class 2KB
JdbcUtil.class 2KB
共 1249 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
办公模板库素材蛙
- 粉丝: 1552
- 资源: 2289
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 原生微信小程序源码 - -滴滴公交-查公交
- 人工智能实验四 感知器算法的设计实现
- java小项目多线程多线程 复制文件 冒泡排序 群聊
- 四数之和(java代码).docx
- 701837906919458TapScanner v3.0.10 (Pro).apk
- 青岛大学人工智能实验二 利用α-β搜索的博弈树算法编写一字棋游戏
- ### 1、项目介绍 本项目Scrapy进行数据爬取,并使用Django框架+PyEcharts实现可视化大屏 效果如下:
- # 微信小程序-健康菜谱 基于微信小程序的一个查找检索菜谱的应用 ### 效果 !动态图(./res/gif/demo
- zabbix-get命令包资源
- 289ssm-mysql-jsp 计算机课程实验管理系统.zip(可运行源码+数据库文件+文档)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页