当前位置:文档之家› 电器售后服务管理系统

电器售后服务管理系统

电器售后服务管理系统
电器售后服务管理系统

摘要

电器售后服务管理是电器销售管理环节中重要的一环,许多从事电器产品的企业都有

自己生产和销售的产品,而这些产品都需要储存在仓库中。如何有效的管理仓库中的产品和

对产品进行售后服务,对商家来说是非常重要的的。

本系统的功能包括有基本信息管理功能模块、产品信息管理功能模块、库存操作管理功

能模块、入库操作管理功能模块、出库操作管理功能模块、仓库盘点管理功能模块、库存警

示管理功能模块、统计查询管理功能模块、以及出售的电器的售后服务。为商家的售后服务

管理提供了很大的便利,也在很大程度上避免了手动操作的失误。

使用了SQL Server 2005。

关键字:电器售后服务管理系统;出库;入库;信息管理;SQL Server 2005。

ABSTRACT

The management of electric appliances after-sale service is an important part of electric appliances sale management .There are many companies of producing electrical appliances have their own products to produce and sale which need to store in the depot. And how to manage

the products in the depot and how to proceed the aftersale service are very important to the dealers.

This system of the function includes the basic information the management function mold,

an information management function mold, an operation management function mold, store-in-warehouse operation management function mold, out operation management function mold, warehouse stocktaking management function mold, stock caution management function mold, statistics search management function mold. It Provides convenience for the warehouse stock management of the business enterprise, and also avoids the lapse of manually operation in

a large extent.

Keywords : The management of electric appliances after-sale service ; Delivery of cargo from storage ; Warehouse entry; SQL Server 2005.

目录

1.系统功能需求分析................................................................... 错误!未定义书签。

2.数据库设计分析....................................................................... 错误!未定义书签。

3.数据库整体逻辑结构设计....................................................... 错误!未定义书签。

4.数据库实现............................................................................... 错误!未定义书签。

4.1建立数据库和表................................................................ 错误!未定义书签。

4.2建立视图............................................................................ 错误!未定义书签。

4.3建立存储过程.................................................................... 错误!未定义书签。

4.4建立触发器........................................................................ 错误!未定义书签。

5.课程设计总结........................................................................... 错误!未定义书签。参考文献.............................................................................................. 错误!未定义书签。谢辞.................................................................................................. 错误!未定义书签。

电器售后服务管理系统的设计与实现

The management of electric appliances after-sale service system and Implementation of the Database

1.系统功能需求分析

电器售后服务管理系统对售后产品进行分类和管理,提高工作效率,便于操作,能有效

地对数据进行更新、查询、并能在一定程度上实现办公自动化。

主要功能包括:

1.基本信息管理功能

基本信息包括客户信息,仓库信息和用户权限信息。客户信息可以分为供应商和购货商两

种类型。在产品入库时,需要提供供应商的信息;在出库和退货时,需要提供购货商的信息。

仓库信息包括仓库编号,仓库名称和仓库说明等信息。

用户权限信息包括用户名、密码、员工姓名及其权限授予等操作的信息。

基本信息管理模块可以实现以下的功能:

a.客户信息的录入、修改、删除和导出。

b.仓库信息的录入、修改、删除和导出。

c.用户权限的录入、修改、删除和导出、及其。

2.产品信息管理功能

产品信息管理模块可以实现以下功能:

a.产品类目的录入,包括类目编号,类目名称和类目级别等信息;

b.产品类目的修改;

c.产品类目的删除;

d.产品类目的导出;

e.产品信息的录入,包括产品编号、所属类目、产品名称、产品规格等;

f.产品信息的修改;

g.产品信息的删除;

h.产品信息的导出。

3.库存操作功能

库存操作有仓库管理员执行,就是把产品放入仓库或把产品中取出的操作,用专业术语来描述就是入库和出库。

库存操作管理模块可以实现以下功能:

a.入库操作

入库可以分为采购入库、生产入库、退货入库等情况。采购入库指将从供应商处的产品入库;生产入库指将企业自己生产的产品入库;退货入库指售出的产品退货后,将退货产品入库。

b.出库操作

c. 库存盘点

4.库存警示管理功能

库存警示是指对库存中接近或超过临界值的产品进行报警。在产品信息中,包含产品的合理数量范围和有效期限。产品数量小于数量的下限称为短线;产品数量大于合理数量的上限称为超储。产品出现短线、超储、接近或超过有限期时都需要报警。

a.库存产品数据报警;

b.库存产品失效报警;

5.统计查询管理功能

统计查询管理模块可以对库存产品进行各种类型的统计和查询,从而使用户能够全面地了解库存状况。

a.产品出入库统计报表;

b.库存产品流水线统计报表。

6.售后服务安排

a.服务网点查询

b.服务维修的安排

2.数据库设计分析

通过以上功能的分析,按照一般售后服务管理信息系统的要求,通过售后服务管理工程的内

容,设计如下面的数据项和数据结构:

客户信息管理包括的数据项有:客户编号,客户名称,客户类型,联系人,通信地址,邮政编码,联系电话,传真电话,客户描述。

仓库信息管理包括的数据项有:仓库编号,仓库名称,仓库说明。

操作员信息管理包括的数据项有:操作员代码,操作员名称,操作员权限,操作员密码,操作员职务,操作员生效日期,操作员失效日期,操作员组别。

产品类目管理包括的数据项有:产品类目编号,产品类目名称,上级类目名称。

产品信息管理包括的数据项有:产品编号,产品名称,产品类型编码,产品规格,计量单位,参考价格,产品数量上限,产品数量下限,有效期,在到达有效期前几天发出警告。

仓库入库管理包括的数据项有:出库编号,出库操作类型,出库产品编号,生产日期,出库产品单价,出库产品数量,客户编号,仓库编号,经办人,出库日期。

仓库出库管理包括的数据项有:出库编号,出库操作类型,出库产品编号,生产日期,出库产品单价,出库产品数量,客户编号,仓库编号,经办人,出库日期。

库存产品信息管理包括的数据项有:产品存储编号,产品编号们产品入库单价,产品数量,客户编号,生产日期,仓库编号。

表间对应的局部和整体E-R图如下:

图2-1 客户信息实体E-R图

图2-3 出库信息实体E-R图

图2-4 入库信息实体E-R图

图2-5 库存产品实体E-R图

图2-6产品之间实体E-R图Array

图2-7 管理员权限实体E-R图

3.数据库整体逻辑结构设计

(1)下面是将各个实体和联系转化为相应的二维表即关系模式,指定各个关系的主关键字和外部关键字,并对各个关系的约束加以限定:

1

2)仓库信息表(storehouse):

3)产品信息表(product):

4)出库操作信息表(takeout):

5)仓库产品信息表(proinstore)

6)操作员信息表(CZYB)

7)权限表(JKJLB):

8)入库操作信息表(storein)

9)类目信息表(protype)

(2)以下为表的关系图,如图1所示。

图1 表的关系图4.数据库的实现

4.1建立数据库和表

建立客户信息表client

create tabl e client

( clientid int primary key,

clientname varchar(50) not null,

contact varchar(30),

addres varchar(50),

postcode varchar(10),

phone varchar(30),

fax varchar(30),

describe varchar(100),

)

建立仓库信息表storehouse

Create table storehouse

(storied int primary key,

storename varchar(50) not null,

sescribe varchar(100)

)

建立产品信息表product

Create table product

(proid int primary key,

proname varchar(50) not null,

typeid int not null,

prostyle varchar(50),

prounit varchar(10),

proprice decimal(15,2),

prolow int,

prohigh int,

valid int,

alarmdays int,

foreign key(typeid) references protype (typeid))

建立出库操作信息表takeout

create table takeout

(takeoutid int primary key,

takeouttype varchar(20),

proid int not null,

proprice decimal(15,2),

pronum int,

clientid int not null,

storeid int not null,

empname varchar(50),

optdate char(20),

foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立仓库产品信息表proinstore

Create table proinstore

(storeproid int primary key,

proid int not null,

proprice decimal(15,2),

pronum int,

clientid int not null,

createdata varchar(20),

storeid int not null,

foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立操作员信息表CZYB

Create table CZYB

(CZYDM char (2) primary key,

CZYMC varchar(10) not null,

CZYRIGHT varchar(120),

CZYPWD char(6) not null,

CZYZW char(10),

ZTBZ char(1),

STARTYXQ char(12),

ENDYXQ char(12),

CZYZB char(2))

建立权限表JKJLB

Create table JKJLB

(JH char(10) primary key,

SJ char(14),

XTH char(2),

SPYDM char(2),

RUN char(1),

BZ char(1))

建立入库操作信息表storein

Create table storein

(storeinid int primary key,

storeintype varchar(20),

proid int not null,

createdate char(10),

proprice decimal(15,2),

clientid int not null,

storeid int not null,

empname varchar(50),

optdate char(10),

foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立类目信息表protype

Create table protype

(typeid int primary key,

Typename varchar(50) not null

Upperid int not null),

4.2建立视图

新建视图

添加表

保存建立dbo.View_1

同样建立dbo.View_2

4.3建立存储过程:

create procedure m

AS

select*

from client

create procedure m1

@khbh int,

@khmc varchar(50)output, @khlx tinyint output,

@lxr varchar(30)output, @txdz varchar(50)output, @yzbm varchar(10)output, @lxdh varchar(30)output, @czdh varchar(30)output, @khms varchar(100)output AS

select*

from client

where clientid=@khbh select @khmc=clientname from client

where clientid=@khbh select @khlx=clientyype from client

where clientid=@khbh select @lxr=contact

from client

where clientid=@khbh select @txdz=addres

from client

where clientid=@khbh select @yzbm=postcode from client

where clientid=@khbh select @lxdh=phone

from client

where clientid=@khbh select @czdh=fax

from client

where clientid=@khbh select @khms=describe from client

where clientid=@khbh

create procedure m_1

AS

select*

from CZYB

create procedure m_2

AS

select*

from JKJLB

create procedure m_3

AS

select*

from product

create procedure m_31

@minjg int,

@maxjg int

AS

select*

from product

where proprice between @minjg and @maxjg

create procedure m_32

@cpbh int,

@cpmc varchar(50)output,

@cpgg varchar(50)output,

@jldw varchar(10)output,

@ckjg decimal(15,2)output

AS

select*

from product

where @cpbh=proid

select @cpmc=proname

from product

where @cpbh=proid

select @cpgg=prostyle

from product

where @cpbh=proid

select @jldw=prounit

from product

where @cpbh=proid

select @ckjg=proprice

from product

where @cpbh=proid

create procedure m_4

AS

select*

from proinstore

create procedure m_5

AS

select*

from protype

create procedure m_6

AS

select*

from storehouse

create procedure m_7

AS

select*

from storien

create procedure m_8

AS

select*

from takeout

4.4建立触发器

1)在客户信息表client上创建触发器,触发器被UPDATE操作触发。当用户在客户信息表client修改一条客户记录的编号时,同时自动更新出库takeout、入库storein、仓库产品信息表proinstore中相应的客户编号。

create trigger cfq_1

on client

after update

as

begin

update takeout

set clientid=(select clientid from inserted)

where clientid in(select clientid from deleted)

end

go

create trigger cfq_2

on client

after update

as

begin

update storeproid

set clientid=(select clientid from inserted)

where clientid in(select clientid from deleted)

end

go

create trigger cfq_3

on client

after update

as

begin

update storein

set clientid=(select clientid from inserted)

where clientid in(select clientid from deleted)

end

go

2)创建触发器,删除客户信息表client中的记录时,同时删除takeout,storein,proinstore中的相应记录

if exists(select name from sysobjects

where name='cfq_n2'and type='tr')

drop trigger cfq_n2

go

create trigger cfq_n2

on client

for delete

as

begin

delete from takeout

where takeout.clientid =(select clientid from deleted)

end

if exists(select name from sysobjects

where name='cfq_n1'and type='tr')

drop trigger cfq_n1

go

create trigger cfq_n1

on client

for delete

as

begin

delete from storein

where storein.clientid =(select clientid from deleted)

end

if exists(select name from sysobjects

where name='cfq_n'and type='tr')

drop trigger cfq_n

go

create trigger cfq_n

on client

for delete

as

begin

delete from proinstore

where proinstore.clientid =(select clientid from deleted)

end

5.课程设计总结

课程设计是培养学生综合运用所学知识,发现,提出,分析和解决实际问题,锻炼实践能力的重要环节,是对学生实际工作能力的具体训练和考察过程。通过这次课程设计增加很多认识,在拿到课程设计题目时,没有像以前一样马上开始动手写代码,我先做了整体的分析,把要设计的表,表的属性,表间的关系全部弄清楚,并画了相应的关系图和E-R图,从而也就基本形成了这次设计的整体构架。在写代码的过程中明显感觉到很轻松,就是照着所设计的思路一步一步地进行。并得到以下总结:首先,流程是一切的根源,进度控制是项目顺利进行的基础。没有大局观,面对问题和变更就会不知所措了。

其次,构架是很重要的,整体框架搭好,具体细节实现起来就是顺理成章的事了。最后,实践比一切空谈和理论更能学到东西。平时学的那些理论都不过是皮毛罢了,一旦不用很快就忘记,始终要在实践中才会发现问题才会努力去解决才能成长。

看到题目后就一直在思考怎么设计好这个数据库,从理论到实践,在这些日子里,可以说得是苦多于甜,但是可以学到很多很多的东西,同时不仅可以巩固了以前所学过的知识,而且学到了很多在书本上所没有学到过的知识。通过这次课程设计使我懂得了理论与实际相结合是很重要的,只有理论知识是远远不够的,只有把所学的理论知识与实践相结合起来,从理论中得出结论,才能真正为社会服务,从而提高自己的实际动手能力和独立思考的能力。在设计的过程中遇到问题,可以说得是困难重重,毕竟是第一次做这样的设计,难免会遇到过各种各样的问题,同时在设计的过程中发现了自己的不足之处,对以前所学过的知识理解得不够深刻,掌握得不够牢固,例如在设计整体架构设计各表之间的关系时,总是考虑不够周到,数据的完整性和一致性把握不准。理论不够规

范化,关系模式不够优越。为了实现这些,我也参阅了很多关于数据库设计方面的书,从中受益匪浅。特别是在实现为所有考生生成随机试题和给所有考生评卷的功能过程中,出现了很多难题,首先是怎么生成随机数的问题,另外还要考虑每位考生的试卷中不应该有一样的题目。并且控制好可为所有考生都产生试卷。评卷过程中的考生答案和正确答案的一一对照,怎么控制好游标来实现每循环一次正好为此考生评卷结束并且在考生成绩表中插入一条考生成绩的记录。这些内容都是通过参考资料才得以实现的。在这次课程设计过程中,也有很多没有想到的地方,通过和张老师的交流,完善了不少的功能。在此表示感谢。

最后,在这次课程设计过程中,深刻感觉到自己知识的缺乏,还需要课外继续学习,不断完善和增加自身的知识和经验。

参考文献:

[1]陈伟.SQL Server 2005 数据库应用与开发教程.北京:清华大学出版社,2007.

[2]詹英.数据库设计与应用——SQL Server 2005教程.北京:清华大学出版社,2008.

[3]黄德才,许芸,王文娟.数据库原理及其应用教程.北京:科学出版社,2002.

[4]周峰.SQL Server 2005中文版关系数据库基础与实践教程.北京:电子工业出版社,2006.

谢词:

感谢指导老师的指点与同学的帮助。

相关主题
文本预览
相关文档 最新文档