企业进销存管理系统课程设计软件工程Word格式文档下载.docx
- 文档编号:19897185
- 上传时间:2023-01-12
- 格式:DOCX
- 页数:24
- 大小:288.35KB
企业进销存管理系统课程设计软件工程Word格式文档下载.docx
《企业进销存管理系统课程设计软件工程Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《企业进销存管理系统课程设计软件工程Word格式文档下载.docx(24页珍藏版)》请在冰豆网上搜索。
商品进货信息管理:
商品进货信息包括商品进货数量、单价、供货商、进货日期、等。
商品进货管理功能完成进货信息登记、修改和删除等。
更新库存:
进货信息的变动直接关系到库存的变化
(2)库存管理
库存商品信息管理:
:
商品库存信息包括商品进货数量、单价、供货商、进货日期、等。
商品库存管理功能完成库存信息登记、修改和删除、查询等。
(3)销售管理
信息管理:
商品销售信息包括商品销售数量、单价、统计日等商品销售。
管理功能
完成销售信息登记、修改和删除,以及销售总汇查询。
本系统应该对基础数据(用户数据字典)进行维护。
系统应该提供强大的数据统计、查询、报表生成及打印等功能。
系统客户端运行在Windows各版的平台下,系统还应该有一个较好飞图形用户界面。
系统还应该有很好的可扩展性。
系统应该容易上手,方便使用。
2、需求分析任务
第一项任务:
画出“进销存管理系统”的组合结构图,即组织结构模型。
第二项任务:
画出“进销存管理系统”的业务操作图,即业务操作模型。
第三项任务:
画出“进销存管理系统”的数据流程图。
第四项任务:
列出“进销存管理系统”的功能点列表,即功能模型。
第五项任务:
列出“进销存管理系统”的性能点表,即性能模型。
第六项任务:
确定“进销存管理系统”的环境模型,即运行环境。
3.数据库
数据库设计是进销存信息系统的核心,采用规范化设计,使数据库结构尽可能简化,减少冗余,保持系统数据结构的一致性。
根据不同的需求,一个商品流通企业进销存管理系统可包括几个到上百个不等的数据表、数据视图、存储过程以及函数等,但最基本的数据表应该包括:
操作用户数据表、公司信息数据表、采购明细数据表、采购客户数据表、采购信息数据表、供应客户数据表、商品信息数据表、销售明细数据表和销售信息数据表;
数据视图包括:
采购入库明细视图、累计采购商品视图、累计销售商品视图和销售出库明细视图
角色定义
组织结构图中各单位职责说明与相关业务,如表:
销售人员信息单据
进货信息单据
商品销售信息单据
用户信息单据
经手人信息表(jsr)
客户实体E-R图
企业进销存管理系统将记录所有的客户信息,在销售、退货等操作时,将直接引用该客户的实体属性。
客户实体包括客户编号、客户名称、简称、地址、电话、邮政编码、联系人、联系人电话、传真、开户行和账号等属性,客户实体E-R图如图所示。
商品实体E-R图
供应商实体E-R图
进销存管理系统数据流图
三、系统设计
1.目的
从该阶段开始正式进入软件的实际开发阶段,本阶段完成系统的大致设计并明确司徒的数据结构与软件结构。
在软件设计阶段主要是把一个软件需求转化为软件表示的过程,
2.术语定义
总体结构
软件系统的总体逻辑结构。
本系统采用面向对象的设计方法,所以逻辑
结构为部件组装图
概念模型
CDM
关系数据库的逻辑设计模型,包括一张逻辑E-R图及相应的数据字典
物理模型
PDM
关系数据库物理设计模型,包括一张物理表关系图及其相应的数据字典
角色
数据库中享有某些特权操作的用户
子系统
具有相对独立功能的小系统,一个大的软件系统可以划分为多个子系
统,每个子系统可由多个模块或多个部件组成
模块
具有功能独立、能被调用的信息单元
3.系统构架
1.Item类设计
Item类是系统的公共类之一,主要用于封装和传递参数信息,这是典型命令模式的实现。
在Dao类中经常使用该类作为方法参数;
另外,在各个窗体界面中也经常使用该类作组件数据,其toString()方法将返回name属性值,所以显示到各个组件上的内容就是Item类的对象所代表的商品、供应商或者客户等信息中的名称。
关键代码如下
packagecom.lzw;
publicclassItem{
privateStringid;
//定义id属性
privateStringname;
//定义name属性
publicItem(){
}
publicItem(Stringid,Stringname){
this.id=id;
this.name=name;
publicStringgetId(){//定义得到id属性的方法
returnid;
publicvoidsetId(Stringid){
this.id=id;
publicStringgetName(){//定义得到那么属性的方法
returnname;
publicvoidsetName(Stringname){
this.name=name;
publicStringtoString(){//定义该类字符串的表现形式
returngetName();
}
2.数据模型公共类
在com.lzw.dao.model包中存放的是数据模型公共类,它们对应着数据库中不同的数据表,这些模型将被访问数据库的Dao类和程序中各个模块甚至各个组件所使用。
和Item公共类的使用方法类似,数据模型也是对数据表中所有字段(属性)的封装,但是数据模型是纯粹的模型类,它不但需要重写父类的toString()方法,还要重写hashCode()方法和equals()方法模型类主要用于存储数据,并通过相应的getXXX()方法和setXXX()方法实现不同属性的访问原则。
以商品数据表为例其代码:
publicclassTbSpinfoimplementsjava.io.Serializable{
privateStringspname;
privateStringjc;
privateStringcd;
privateStringdw;
privateStringgg;
privateStringbz;
privateStringph;
privateStringpzwh;
privateStringmemo;
privateStringgysname;
publicTbSpinfo(){
publicTbSpinfo(Stringid){
publicStringgetId(){
returnthis.id;
publicStringgetSpname(){
returnthis.spname;
publicvoidsetSpname(Stringspname){
this.spname=spname;
publicStringgetJc(){
returnthis.jc;
publicvoidsetJc(Stringjc){
this.jc=jc;
publicStringgetCd(){
returnthis.cd;
publicvoidsetCd(Stringcd){
this.cd=cd;
publicStringgetDw(){
returnthis.dw;
publicvoidsetDw(Stringdw){
this.dw=dw;
publicStringgetGg(){
returnthis.gg;
publicvoidsetGg(Stringgg){
this.gg=gg;
publicStringgetBz(){
returnthis.bz;
publicvoidsetBz(Stringbz){
this.bz=bz;
publicStringgetPh(){
returnthis.ph;
publicvoidsetPh(Stringph){
this.ph=ph;
publicStringgetPzwh(){
returnthis.pzwh;
publicvoidsetPzwh(Stringpzwh){
this.pzwh=pzwh;
publicStringgetMemo(){
returnthis.memo;
publicvoidsetMemo(Stringmemo){
this.memo=memo;
publicStringgetGysname(){
returnthis.gysname;
publicvoidsetGysname(Stringgysname){
this.gysname=gysname;
publicStringtoString(){
returngetSpname();
@Override
publicinthashCode(){
finalintPRIME=31;
intresult=1;
result=PRIME*result+((bz==null)?
0:
bz.hashCode());
result=PRIME*result+((cd==null)?
cd.hashCode());
result=PRIME*result+((dw==null)?
dw.hashCode());
result=PRIME*result+((gg==null)?
gg.hashCode());
result=PRIME*result+((gysname==null)?
gysname.hashCode());
result=PRIME*result+((id==null)?
id.hashCode());
result=PRIME*result+((jc==null)?
jc.hashCode());
result=PRIME*result+((memo==null)?
memo.hashCode());
result=PRIME*result+((ph==null)?
ph.hashCode());
result=PRIME*result+((pzwh==null)?
pzwh.hashCode());
result=PRIME*result+((spname==null)?
spname.hashCode());
returnresult;
publicbooleanequals(Objectobj){
if(this==obj)
returntrue;
if(obj==null)
returnfalse;
if(getClass()!
=obj.getClass())
finalTbSpinfoother=(TbSpinfo)obj;
if(bz==null){
if(other.bz!
=null)
returnfalse;
}elseif(!
bz.equals(other.bz))
if(cd==null){
if(other.cd!
cd.equals(other.cd))
if(dw==null){
if(other.dw!
dw.equals(other.dw))
if(gg==null){
if(other.gg!
gg.equals(other.gg))
if(gysname==null){
if(other.gysname!
gysname.equals(other.gysname))
if(id==null){
if(other.id!
id.equals(other.id))
if(jc==null){
if(other.jc!
jc.equals(other.jc))
if(memo==null){
if(other.memo!
memo.equals(other.memo))
if(ph==null){
if(other.ph!
ph.equals(other.ph))
if(pzwh==null){
if(other.pzwh!
pzwh.equals(other.pzwh))
if(spname==null){
if(other.spname!
spname.equals(other.spname))
returntrue;
3.Dao公共类
Dao的全称是DataAccessObject,即数据访问对象。
本项目中应用该名称作为数据库访问类的名称,在该类中实现了数据库的驱动、连接、关闭和多个操作数据库的方法,这些方法包括不同数据表的操作方法。
在介绍具体的数据库访问方法之前,先来看一下Dao类的定义,也就是数据库驱动和连接的代码。
代码如下
publicclassDao{
staticStatementsql;
staticResultSetres;
protectedstaticStringdbClassName="
com.mysql.jdbc.Driver"
;
protectedstaticStringdbUrl="
jdbc:
mysql:
//localhost:
3306/db_database28"
protectedstaticStringdbUser="
root"
protectedstaticStringdbPwd="
1003037761"
protectedstaticStringsecond=null;
publicstaticConnectionconn=null;
static{
try{
if(conn==null){
Class.forName(dbClassName).newInstance();
conn=(Connection)DriverManager.getConnection(dbUrl,dbUser,dbPwd);
}
}catch(Exceptionee){
ee.printStackTrace();
3.4系统登录模块设计
1.设计登录窗体
登录模块的窗体设计由两部分组成,一部分是登录窗体,另一部分是窗体中带背景图片的内容面板。
1.创建内容面板
publicclassLoginPanelextendsJPanel{
publicintwidth,height;
privateImageimg;
publicLoginPanel(){
super();
URLurl=getClass().getResource("
/res/login.jpg"
);
img=newImageIcon(url).getImage();
protectedvoidpaintComponent(Graphicsg){
super.paintComponent(g);
g.drawImage(img,0,0,this);
2.创建登录窗体
privateLoginPanelgetLoginPanel(){
if(loginPanel==null){
jLabel1=newJLabel();
jLabel1.setBounds(newRectangle(86,71,55,18));
jLabel1.setText("
密 码:
"
jLabel=newJLabel();
jLabel.setText("
用户名:
jLabel.setBounds(newRectangle(85,41,56,18));
loginPanel=newLoginPanel();
loginPanel.setLayout(null);
loginPanel.setBackground(newColor(0xD8DDC7));
loginPanel.add(jLabel,null);
loginPanel.add(getUserField(),null);
loginPanel.add(jLabel1,null);
loginPanel.add(getPasswordField(),null);
loginPanel.add(getLoginButton(),null);
loginPanel.add(getExitButton(),null);
returnloginPanel;
2.密码文本框
在系统登录窗体的“密码”文本框中添加了按键事件监听器,它在获取到“密码”文本框输入的回车字符时将执行登录事件,也就是说在“密码”文本框输入密码后,按Enter键将执行与单击“登录”按钮相同的业务逻辑。
代码如下:
privateJPasswordFieldgetPasswordField(){
if(passwordField==null){
passwordField=newJPasswordField();
passwordField.setBounds(newRectangle(143,69,125,22));
passwo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 企业 进销存 管理 系统 课程设计 软件工程