package com.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.dbhelp.DBHelp;
import com.data.OrderformInfo;
public class OrderformDaoImpl implements OrderformDao {
public List<OrderformInfo> findAllOrderforms(String userId,String orderState) {
String sql="select * from orderforminfo where USER_ID=? and ORDER_STATE=?";
ResultSet rs = new DBHelp().queryMsg(sql,userId,orderState);
List<OrderformInfo> orderforms = new ArrayList<OrderformInfo>();
try {
while(rs.next()){
OrderformInfo orderform = new OrderformInfo();
orderform.setOrderNo(rs.getString("ORDER_NO"));
orderform.setUserId(rs.getString("USER_ID"));
orderform.setConsigneeName(rs.getString("CONSIGNEE_NAME"));
orderform.setConsigneeTel(rs.getString("CONSIGNEE_TEL"));
orderform.setConsigneeAddress(rs.getString("CONSIGNEE_ADDRESS"));
orderform.setMedNo(rs.getString("MED_NO"));
orderform.setMedName(rs.getString("MED_NAME"));
orderform.setIhealthPrice(rs.getString("IHEALTH_PRICE"));
orderform.setBuyNum(rs.getString("BUY_NUM"));
orderform.setTotalPrice(rs.getString("TOTAL_PRICE"));
orderform.setDelivery(rs.getString("DELIVERY"));
orderform.setOrderState(rs.getString("ORDER_STATE"));
orderforms.add(orderform);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return orderforms;
}
@Override
public OrderformInfo findOrderform(String userId, String medNo, String orderState) {
// TODO Auto-generated method stub
String sql="select * from orderforminfo where USER_ID=? and MED_NO=? and ORDER_STATE=?";
ResultSet rs = new DBHelp().queryMsg(sql,userId,medNo,orderState);
OrderformInfo orderform = new OrderformInfo();
try {
while(rs.next()){
orderform.setOrderNo(rs.getString("ORDER_NO"));
orderform.setUserId(rs.getString("USER_ID"));
orderform.setConsigneeName(rs.getString("CONSIGNEE_NAME"));
orderform.setConsigneeTel(rs.getString("CONSIGNEE_TEL"));
orderform.setConsigneeAddress(rs.getString("CONSIGNEE_ADDRESS"));
orderform.setMedNo(rs.getString("MED_NO"));
orderform.setMedName(rs.getString("MED_NAME"));
orderform.setIhealthPrice(rs.getString("IHEALTH_PRICE"));
orderform.setBuyNum(rs.getString("BUY_NUM"));
orderform.setTotalPrice(rs.getString("TOTAL_PRICE"));
orderform.setDelivery(rs.getString("DELIVERY"));
orderform.setOrderState(rs.getString("ORDER_STATE"));
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return orderform;
}
@Override
public boolean deleteOrderform(String orderNo) {
// TODO Auto-generated method stub
String sql = "delete from orderforminfo where ORDER_NO = ?";
boolean boo = new DBHelp().exeSQL(sql,orderNo);
return boo;
}
@Override
public boolean updateOrderformMedicineNum(String orderNo, String buyNum) {
// TODO Auto-generated method stub
String sql = "update orderforminfo set BUY_NUM = ?,TOTAL_PRICE = IHEALTH_PRICE*? where ORDER_NO = ?";
boolean boo = new DBHelp().exeSQL(sql,buyNum,buyNum,orderNo);
return boo;
}
@Override
public boolean updateOrderformConsignee(String userId,String consigneeName, String consigneeTel,String consigneeAddress,String delivery) {
String sql = "update orderforminfo set CONSIGNEE_NAME = ?,CONSIGNEE_TEL = ?,CONSIGNEE_ADDRESS = ?,DELIVERY = ? where USER_ID = ?";
boolean boo = new DBHelp().exeSQL(sql,consigneeName,consigneeTel,consigneeAddress,delivery,userId);
return boo;
}
@Override
public boolean updateOrderformState(String userId, String orderState) {
// TODO Auto-generated method stub
String sql = "update orderforminfo set ORDER_STATE = ? where USER_ID = ?";
boolean boo = new DBHelp().exeSQL(sql,orderState,userId);
return boo;
}
@Override
public boolean AddOrderform(String orderNo, String userId,
String consigneeName, String consigneeTel, String consigneeAddress,
String medNo, String medName, String ihealthPrice, String buyNum,
String totalPrice, String delivery, String orderState) {
// TODO Auto-generated method stub
String sql = "insert into orderforminfo values(?,?,?,?,?,?,?,?,?,?,?,?)";
boolean boo = new DBHelp().exeSQL(sql,orderNo,userId,consigneeName,consigneeTel,
consigneeAddress,medNo,medName,ihealthPrice,buyNum,totalPrice,delivery,orderState);
return boo;
}
public static void main(String[] args) {
System.out.println(new OrderformDaoImpl().findAllOrderforms("1","0").size());
System.out.println(new OrderformDaoImpl().deleteOrderform("4"));
System.out.println(new OrderformDaoImpl().updateOrderformMedicineNum("6", "7"));
System.out.println(new OrderformDaoImpl().updateOrderformConsignee("1", "liang", "15110401917", "shanxi", "shunfeng"));
System.out.println(new OrderformDaoImpl().updateOrderformState("sd", "0"));
String orderno = String.valueOf(System.currentTimeMillis());
System.out.println(new OrderformDaoImpl().AddOrderform(orderno, "1", "250", "123456", "shanxi", "001","asdfasdf", "30", "10", "300", "shengtong", "0"));
System.out.println("num:"+new OrderformDaoImpl().findOrderform("250", "001", "0").getOrderNo());
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
毕业设计:基于jsp的药品进销存管理系统
共483个文件
css:156个
png:119个
jpg:50个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 145 浏览量
2022-07-01
17:52:30
上传
评论 1
收藏 69.13MB ZIP 举报
温馨提示
本系统主要基于Java语言、Mysql数据库,基于用户。可以实现登陆、注册、查看产品详情、购买等基本操作;其次,基于管理员。可以实现登陆、对进出库药品增删改查、对类别的操作等基本操作;还有,基于超级管理员。可以实现登陆、对供应商的管理等基本操作。 内含项目完整代码,数据库及配套报告。
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计:基于jsp的药品进销存管理系统 (483个子文件)
OrderformDaoImpl.class 6KB
OrderformQuery.class 5KB
MedicineQuery.class 5KB
StockQuery.class 4KB
UserinfoQuery.class 4KB
FactoryQuery.class 4KB
orderformAddServlet.class 4KB
UserAddServlet.class 4KB
OrderformUpdateNumServlet.class 4KB
OrderformQueryServlet.class 3KB
UserQueryServlet.class 3KB
UserJudgementServlet.class 3KB
LoginServlet.class 3KB
OrderformInfo.class 3KB
OrderformUpdateStateServlet.class 3KB
MedicineDaoImpl.class 3KB
OrderformUpdateConsignee.class 3KB
MedicineServlet.class 2KB
OrderformDeleteServlet.class 2KB
StockUpd.class 2KB
OrderformUpd.class 2KB
MedicineQueryServlet.class 2KB
User.class 2KB
DBHelp.class 2KB
OrderformAdd.class 2KB
MedicineUpd.class 2KB
MedicineInfo.class 2KB
Userinfoupd.class 2KB
MedicineAdd.class 2KB
StockAdd.class 2KB
UserinfoAdd.class 2KB
FactoryUpd.class 2KB
TestDriver.class 2KB
FactoryAdd.class 2KB
OrderformDel.class 2KB
MedicineDel.class 2KB
Userinfodel.class 2KB
FactoryDel.class 2KB
StockDel.class 2KB
Test.class 1KB
OrderformDao.class 944B
UserDao.class 448B
MedicineDao.class 213B
.classpath 1KB
org.eclipse.wst.common.component 580B
org.eclipse.wst.jsdt.ui.superType.container 49B
easyui.css 51KB
easyui.css 50KB
easyui.css 50KB
easyui.css 50KB
easyui.css 47KB
index.css 9KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 6KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
style.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
color.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
login.css 3KB
order.css 3KB
panel.css 3KB
panel.css 3KB
panel.css 3KB
panel.css 3KB
orderinfo.css 3KB
icon.css 2KB
panel.css 2KB
menu.css 2KB
menu.css 2KB
menu.css 2KB
menu.css 2KB
menu.css 2KB
window.css 2KB
window.css 2KB
window.css 2KB
window.css 2KB
tooltip.css 2KB
tooltip.css 2KB
tooltip.css 2KB
共 483 条
- 1
- 2
- 3
- 4
- 5
资源评论
- 一帆风顺7122022-11-07资源内容详实,描述详尽,解决了我的问题,受益匪浅,学到了。
- liuwenhui04162023-04-02资源很实用,内容详细,值得借鉴的内容很多,感谢分享。
- 2301_790229622023-07-13非常有用的资源,有一定的参考价值,受益匪浅,值得下载。
胥华引
- 粉丝: 96
- 资源: 439
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 施工安全检测21-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord、VOC数据集合集.rar
- 低价几何画板Sketchpad 5.06
- 2017&2015年国家级风景名胜区分布数据
- 2016年全国自然保护区分布
- Jenkins 2024/12 最新版本: 2.479.2 LTS
- IMG_6962.PNG
- Firebird BBS源代码
- Python爬虫-城市数据分析与市场潜能计算所需文件-283地级市数据.xlsx
- 施工场地车检测16-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、VOC数据集合集.rar
- Python爬虫-城市数据分析与市场潜能计算所需文件-283地级市的欧氏距离.xlsx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功