系统模块开发卷宗.docx

上传人:b****7 文档编号:9355310 上传时间:2023-02-04 格式:DOCX 页数:47 大小:175.93KB
下载 相关 举报
系统模块开发卷宗.docx_第1页
第1页 / 共47页
系统模块开发卷宗.docx_第2页
第2页 / 共47页
系统模块开发卷宗.docx_第3页
第3页 / 共47页
系统模块开发卷宗.docx_第4页
第4页 / 共47页
系统模块开发卷宗.docx_第5页
第5页 / 共47页
点击查看更多>>
下载资源
资源描述

系统模块开发卷宗.docx

《系统模块开发卷宗.docx》由会员分享,可在线阅读,更多相关《系统模块开发卷宗.docx(47页珍藏版)》请在冰豆网上搜索。

系统模块开发卷宗.docx

系统模块开发卷宗

超市管理系统模块开发卷宗

(一)销售管理模块

1标题

软件系统名称和标识符:

超市管理系统

模块名称和标示符:

销售管理模块

程序员编制签名:

郭琦

卷宗的修改文本序号:

修改完成日期:

2012-12-17

卷宗序号:

1

编排日期:

2012-12-17

2模块开发情况表

模块标识符

模块的描述性名称

销售管理

代码设计

计划开始日期

2012-10-25

实际开始日期

2012-10-25

计划完成日期

2012-11-9

实际完成日期

2012-11-10

模块测试

计划开始日期

2012-10-26

实际开始日期

2012-10-26

计划完成日期

2012-11-9

实际完成日期

2012-11-10

组装测试

计划开始日期

2012-11-9

实际开始日期

2012-11-10

计划完成日期

2012-11-23

实际完成日期

2012-11-23

代码复查日期/签字

2012-12-8

郭琦

源代码行数

预计

1300

实际

1353

模块标识符

项目负责人批准日期/签字

201-12-9

郭琦

3功能说明

3.1程序描述

超市管理系统下的一个子系统,记录售货员今日处理的商品信息和会员的购买情况,处理销售过程中的商品信息并作记录。

3.2功能

包括售货员登陆和会员登陆,以及售货员的售货处理、结账处理。

3.3性能

时间特殊性:

系统的速度要在用户可接受的范围内。

可靠性:

系统要有较高的可靠性,可恢复性。

灵活性:

系统要有良好的接口。

3.4输入项

售货员账号密码:

售货员登陆

会员账号:

会员登陆

条形码:

验证商品信息

数量:

计算金额

3.5输出项

售货员信息:

确保售货员符合资格

会员信息:

确保会员符合资格

金额:

结账时的商品总额

4设计说明

4.1算法

start

input售货员信息

examine售货员信息

input会员信息

examine会员信息

if(结账)

inputi=0

dowhile(i<商品数量)

input条形码

if(条形码无效)

i=i

break

endif

print商品信息

i=i+1

enddo

print金额

endif

end

4.2流程逻辑

4.3接口

商品条形码输入界面,会员信息输入界面。

调用数据库查询接口。

4.4存储分配

顺序存储

5原代码清单

销售管理系统:

(1)收银台

<%@pagelanguage="java"import="java.util.*,com.supermarket.entity.*,com.supermarket.dao.*,java.text.*"pageEncoding="GBK"%>

</p><p>销售收银系统</p><p>

functionshowtime(){

vartimerID=null;

varnow=newDate();

varyear=now.getFullYear();//当前的年

varmonth=now.getMonth()+1;//当前的月

vardate=now.getDate();//当前的号

varhours=now.getHours();

varminutes=now.getMinutes();

varseconds=now.getSeconds();

varday=now.getDay();//得到的是星期

vardays=newArray(7);

days[0]="星期日";

days[1]="星期一";

days[2]="星期二";

days[3]="星期三";

days[4]="星期四";

days[5]="星期五";

days[6]="星期六";

vartimeValue="";

timeValue+=year+"年";

timeValue+=((month<10)?

"0":

"")+month+"月";

timeValue+=date+"日";

timeValue+=(days[day])+"";

timeValue+=hours+":

";//这样的话是24小时((hours<=12)?

hours:

hours-12);

timeValue+=((minutes<10)?

":

0":

":

")+minutes;

timeValue+=((seconds<10)?

":

0":

":

")+seconds;

document.jsfrm.face.value=timeValue;

timerID=setTimeout("showtime()",1000);

varp=document.getElementByIdx_x_x("p");

p.innerHTML=timeValue;

}

functioncancel(){

alert("确定取消此次交易?

");

location="sale_initial.jsp"

}

<%

Empemp=(Emp)session.getAttribute("emp");

StringSaleID;

if(session.getAttribute("SaleID")==null){

Calendarca=Calendar.getInstance();

intyear=ca.get(Calendar.YEAR);//获取年份

intmonth=ca.get(Calendar.MONTH)+1;//获取月份

intday=ca.get(Calendar.DATE);//获取日

intminute=ca.get(Calendar.MINUTE);//分

inthour=ca.get(Calendar.HOUR_OF_DAY);//小时

intsecond=ca.get(Calendar.SECOND);//秒

SaleID=year+""+month+""+day+""+hour+""+minute+""+second+""+emp.getEmpID();

}else{

SaleID=session.getAttribute("SaleID").toString();

}

//获取应收价款

floatpay=0;

if(session.getAttribute("slist")==null){

pay=0;

}else{

Listslist=newArrayList();

slist=(List)session.getAttribute("slist");

for(inti=0;i

pay+=slist.get(i).getSum();

}

}

DecimalFormatdf=newDecimalFormat("#0.00");//保留两位小数

Stringstr_pay=df.format(pay);

//找零功能

floatzl=0;

Stringstr_zl="";//找零

Stringerr="";

floatsh;

Stringstr_sh="";

if(session.getAttribute("sh")==null){

sh=0;

str_sh=df.format(sh);

}else{

sh=Float.parseFloat(session.getAttribute("sh").toString());

str_sh=df.format(sh);

}

//System.out.println(sh);

if(session.getAttribute("err")==null&&session.getAttribute("zl")!

=null){

//System.out.println("ssssssss");

zl=Float.parseFloat(session.getAttribute("zl").toString());

str_zl=df.format(zl);

}elseif(session.getAttribute("err")==null&&session.getAttribute("zl")==null){

zl=0;

str_zl=df.format(zl);

}else{

err=session.getAttribute("err").toString();

zl=0;

str_zl=df.format(zl);

}

//删除异常

Stringdelerr="";

if(session.getAttribute("delerr")==null){

delerr="";

}else{

delerr=session.getAttribute("delerr").toString();

}

%>

35px"colspan="3"align="center">收银台

条形码:

销售单号:

0"type="text"name="SaleID"value="<%=SaleID%>"readonlysize="25">

10px">

时间:

0"readonly>


red;font-size:

80px">

0;font-size:

30px;"type="text"value="应收:

"size="5"readonly><%=str_pay%>

实收:

"style="color:

red;font-size:

50px"size="8">

<%=err%>

">

--将应收款隐藏传递过去-->

找零:

red;font-size:

50px;border:

0"type="text"value="<%=str_zl%>"readonly>

收银员:

<%=emp.getEmpID()+""+emp.getEmpName()%>

<%if(session.getAttribute("vip")==null||session.getAttribute("vip").equals(0)){

//0为非会员事件

%>

非会员顾客光临,提醒成为会员!

<%}else{

VIPvip=newVIP();

vip=(VIP)session.getAttribute("vip");%>

有效会员:

<%=vip.getVIPID()+""+vip.getVIPName()%>

 积分:

<%=vip.getScore()%>

<%}%>

5px"action="sale_delete.jsp"method="post">

    

30px">

30px">

<%=delerr%>

                   

30px">

                   

30px">

<%//会员登录

if(session.getAttribute("vip")==null){%>

window.showModalDialog('sale_VIPlogin.jsp',,'dialogWidth=500px;dialogHeight=400px;toolbar=no;center=yes;resizable=no')

<%}%>

(2)验证

<%@pagelanguage="java"import="java.util.*"pageEncoding="GBK"%>

<%

Stringviperr="";

if(session.getAttribute("viperr")==null){

viperr="";

}else{

viperr=session.getAttribute("viperr").toString();

}

if(session.getAttribute("vip")==null){%>

会员登录


100px">

会员编号:



密   码:


30px;">

<%=viperr%>


还没加入会员?

速速行动吧!

优惠多多!

100px;height:

30px">

<%}else{

%>

window.opener.location.reload();

self.close();

<%

}

%>

(3)查询商品

<%@pagelanguage="java"import="java.util.*,com.supermarket.entity.*,com.supermarket.dao.*"pageEncoding="GBK"%>

useBeanid="daoGoods"class="com.supermarket.dao.GoodsDao">

useBean>

useBeanid="daoPrice"class="com.supermarket.dao.PriceDao">

useBean>

<%

session.setAttribute("sh",null);

session.setAttribute("zl",null);

Stringbarcode=request.getParameter("barcode");

StringSaleID=request.getParameter("SaleID");

intcount=Integer.parseInt(session.getAttribute("count").toString());

session.setAttribute("SaleID",SaleID);

if(session.getAttribute("vip")==null){

session.setAttribute("vip",0);

}

Listslist=newArrayList();

if(session.getAttribute("slist")==null){

session.setAttribute("slist",slist);

}else{

slist=(List)session.getAttribute("slist");

}

Goodsg=newGoods();

g=daoGoods.getByBarCode(barcode);

if(g.getBarCode()==null){

//System.out.println("########");

%>

alert("不存在该商品!

");

location="sale.jsp";

<%

}else{

count++;

session.setAttribute("count",count);

//glist.add(g);

//System.out.println(g.getBarCode());

Pricep=newPrice();

p=daoPrice.getByBarCode(barcode);

Sales=newSale();

s.setSaleID(SaleID);

s.setBarCode(barcode);

s.setGoodsName(g.getGoodsName());

s.setPrice(p.getPrice());

if(session.getAttribute("vip").equals(0)){

s.setDiscount(0);

}else{

s.setDiscount(p.getDiscount());

}

s.setSaleNum

(1);

floatsum=(s.getPrice()-s.getDiscount())*s.getSaleNum();//计算本件商品总价(单价-折扣)*数量

s.setSum(sum);

Empemp=newEmp();

emp=(Emp)session.getAttribute("emp");

s.setEmpID(emp.getEmpID());

if(slist.size()==0){

slist.add(s);

}else{

for(intj=0;j

if(slist.get(j).getBarCode().equals(barcode)){

sl

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

当前位置:首页 > 工程科技 > 兵器核科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1