药品信息管理系统-课程设计.docx

上传人:牧羊曲112 文档编号:2791770 上传时间:2023-02-25 格式:DOCX 页数:37 大小:4.32MB
返回 下载 相关 举报
药品信息管理系统-课程设计.docx_第1页
第1页 / 共37页
药品信息管理系统-课程设计.docx_第2页
第2页 / 共37页
药品信息管理系统-课程设计.docx_第3页
第3页 / 共37页
药品信息管理系统-课程设计.docx_第4页
第4页 / 共37页
药品信息管理系统-课程设计.docx_第5页
第5页 / 共37页
点击查看更多>>
资源描述

《药品信息管理系统-课程设计.docx》由会员分享,可在线阅读,更多相关《药品信息管理系统-课程设计.docx(37页珍藏版)》请在三一办公上搜索。

1、精选优质文档-倾情为你奉上辽 宁 科 技 大 学课程设计报告设计题目: 药品信息管理系统 学院、系: 电信 专业班级: 计算机141班 学生姓名: 梁君玮 指导教师: 刘扬 王莉 成 绩: 2017年 12月 1日目录1. 概述1.1实验目标为了检验自己从大一到现在为止的学习收获,运用所学软件工程课程及数据库课程所学习的理论知识同实践相结合,建立工程化思想,使用面向对象语言(java)开发一个小型MIS系统,锻炼自己解决实际问题的能力,为毕业设计打下良好的基础。本次实验从前端到后台、从设计分析到实现并完成都是通过自己的慢慢积累并查阅相关框架资料(包括使用建模工具)完成,也算是一个微型的web全

2、栈设计了。1.2运行环境、工具及框架本次设计的是基于jdk1.8的web项目,使用工具及运行环境如下:编程语言:java、HTML、css、js等后端框架:Spring+SpringMVC+Hibernate前端脚本:jQuery、jstl、el、jsp等日志记录:log4j、logging设计工具:Rational Rose、Microsoft Visio数据库:MySQL5.7数据库工具:PowerDesigner、navicatformysql编译工具:eclipse、WebStorm服务器:tomcat测试系统环境:wind7、wind10、Linux(centOS7)2需求分析使用v

3、isio工具建立数据流图(使用三层数据流图):2.1顶层流程2.2中层流程2.3底层流程2.3.1登录系统2.3.2进药操作2.3.3售药操作2.3.4库存管理 2.3.5单据管理2.3.6外键:供应商管理(扩展功能)2.3.7外键:客户管理(扩展功能)3概要设计3.1 E-R图4总体设计4.1数据库设计4.1.1使用PowerDesigner设计数据库模型4.1.2生成建表语句/*=*/* DBMS name: MySQL 5.0 */* Created on: 2017/12/7 20:19:35 */*=*/drop table if exists t_customer;drop tab

4、le if exists t_enter;drop table if exists t_inventory;drop table if exists t_manufacturers;drop table if exists t_sell;drop table if exists t_supplier;drop table if exists t_user;/*=*/* Table: t_customer */*=*/create table t_customer( c_id varchar(255) not null, c_name varchar(255), c_address varcha

5、r(255), c_postal varchar(255), c_phone varchar(255), c_poxy varchar(255), primary key (c_id);/*=*/* Table: t_enter */*=*/create table t_enter( document_number varchar(255) not null, medicine_id varchar(255), procurement_price double(10,2), procurement_number int(10), procurement_date varchar(255), s

6、pecification varchar(255), m_id varchar(255), s_id varchar(255), primary key (document_number);/*=*/* Table: t_inventory */*=*/create table t_inventory( medicine_id varchar(255) not null, medicine_name varchar(255), inventory_number int(10), specification varchar(255), retail_price double(10,2), m_i

7、d varchar(255), primary key (medicine_id);/*=*/* Table: t_manufacturers */*=*/create table t_manufacturers( m_id varchar(255) not null, m_name varchar(255) not null, m_address varchar(255), m_postal varchar(255), m_phone varchar(255), m_fax varchar(255), primary key (m_id);/*=*/* Table: t_sell */*=*

8、/create table t_sell( document_number int(10) not null, medicine_id varchar(255), c_id varchar(255), sell_number int(10), sell_date date, unit_price double(10,2), primary key (document_number);/*=*/* Table: t_supplier */*=*/create table t_supplier( s_id varchar(255) not null, s_name varchar(255) not

9、 null, s_address varchar(255), s_postal varchar(255), s_fax varchar(255), s_phone varchar(255), primary key (s_id);/*=*/* Table: t_user */*=*/create table t_user( login_id varchar(255) not null, password varchar(255) not null, username varchar(255), primary key (login_id);alter table t_enter add con

10、straint FK_Reference_1 foreign key (medicine_id) references t_inventory (medicine_id) on delete restrict on update restrict;alter table t_enter add constraint FK_Reference_3 foreign key (m_id) references t_manufacturers (m_id) on delete restrict on update restrict;alter table t_enter add constraint

11、FK_Reference_4 foreign key (s_id) references t_supplier (s_id) on delete restrict on update restrict;alter table t_inventory add constraint FK_Reference_5 foreign key (m_id) references t_manufacturers (m_id) on delete restrict on update restrict;alter table t_sell add constraint FK_Reference_2 forei

12、gn key (medicine_id) references t_inventory (medicine_id) on delete restrict on update restrict;alter table t_sell add constraint FK_Reference_7 foreign key (c_id) references t_customer (c_id) on delete restrict on update restrict;4.2系统功能设计4.2.1使用Rational Rose设计系统用例图4.2.2系统功能描述实现基本功能:药品数据库进药表(单据号,药品

13、编码,采购价,采购数量,采购日期,供应商)售药表(顾客号,药品编码,销售数量,销售日期,单价)库存表(药品编码,药品名称,库存量,生产厂家,规格,零售价)单据号:编程自动生成(从1开始,每次加1)。顾客号:编程自动生成(从1开始,每次加1)。进药:当进新药(第一次进此药)时,用户需要输入(药品编码,药品名称,采购价,采购数量,采购日期,供应商,生产厂家,规格,零售价)当进的药品是已经进过的药品时,用户输入完药品代码时,窗体的文本框中将自动显示药品名称,生产厂家,规格,零售价,用户只需要输入采购价,采购数量,采购日期,供应商。售药:只需要用户输入药品编码,销售数量;单价,药品名称将自动显示,日期

14、调用系统当前日期。一次售药可以销售多种药品,最后一起结帐。显示应收药款,实收金额,找零。库存查询:按药品代码,药品名称查询。进药查询:按药品代码,药品名称,采购日期查询。售药查询:按药品代码,药品名称、销售日期查询。5应用程序的编程实现5.1建库在navicatformysql中运行sql脚本:生成数据库如下:库存表:售药表(其他表不一一列举出来了):5.2设计网页编码采用utf-8、使用css文件保持页面风格统一。5.2.1前端目录结构5.2.2举例(进药页):主菜单和顶部代码:base href=药品信息管理系统body margin-top: 0;margin-left: 0;ul li

15、 list-style: none;acolor:black;$(function() window.open(main/enter/index.jsp, workFrame););function show(where) window.open(main/+where + /index.jsp, workFrame);药品信息管理系统一一梁君玮用户:$username未登录 注销进药售药库存查询进药查询售药查询供应商客户进药页面代码:base href=进药function selectMedicine(index) window.open(main/enter/choose_me

16、dicine.jsp, 请选择药品,width=800, height=410, scrollbars=no);var rowIndex = 0;function addOneLineOnClick() var row = tblFlowCardDetail.insertRow(tblFlowCardDetail.rows.length);var col = row.insertCell(0);col.innerHTML = ;col = row.insertCell(1);col.innerHTML = ;col = row.insertCell(2);col.innerHTML = ;co

17、l = row.insertCell(3);col.innerHTML = ;col = row.insertCell(4);col.innerHTML = ;col = row.insertCell(5);col.innerHTML = ;col = row.insertCell(6);col.innerHTML = ;col = row.insertCell(7);col.innerHTML = ;col = row.insertCell(8);col.innerHTML = ;row.setAttribute(id, row + rowIndex);row.setAttribute(na

18、me, row + rowIndex);rowIndex+;function DeleteRow(rowTag) var i = tblFlowCardDetail.rowsrowTag.rowIndex;var j;for (j = i; j = rowIndex; j+) tblFlowCardDetail.rowsj.cells0.childNodes1.index-; tblFlowCardDetail.deleteRow(i);rowIndex-;   分销商库存管理>>盘点结果维护>>添加*供应商代码:  供应商名称: 

19、;*药品编码药品名称采购价采购数量采购日期生产厂家规格零售价删除    页面如下:5.3添加配置5.3.1逻辑架构分层MVC(view-controller-service-dao-VO-db)框架使用的是SSH(Spring+SpringMVC+Hibernate)使用Spring集成SpringMVC和Hibernate,使用配置文件的方式:5.3.2Hibernate配置事务及实体类数据源连接池使用c3p0:5.4代码目录结构(MVC)5.5编写后台代码(java)5.5.1实体类使用hibernate和jdk自带的注解建立实体类例(进药实体类):packa

20、ge com.ljw.medicine.beans;import javax.persistence.CascadeType;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.Id;import javax.persistence.ManyToOne;import javax.persistence.Table;import org.hibernate.annotations.GenericGenerator;/* * ClassName:Enter

21、* company: * Description:进药实体类 * date 2017年11月30日 下午7:12:28 * author 梁君玮 */EntityTablepublic class Enter IdGeneratedValue(generator=xxx)GenericGenerator(name=xxx,strategy=native)private Integer document_id;/单据号ManyToOne(targetEntity=Inventory.class,cascade=CascadeType.ALL)private Inventory inventory

22、;/药品private double procurement_price;/采购价private int procurement_number;/采购数量private String procurement_date;/采购日期ManyToOne(targetEntity=Supplier.class,cascade=CascadeType.ALL)private Supplier supplier;/供应商public Integer getDocument_number() return document_id;public void setDocument_number(Integer document_id) this.document_id = document_id;public Inventory getInventory() return inventory;public void setInventory(Inventory inventory) this.inventory = inventory;public double getProcurement_price() return procurement_price;pub

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号