銀行常規業務 用例4

2021-07-27 05:24:22 字數 1595 閱讀 2367

--用例4

--1.修改密碼

update cardinfo set pass='123456 '--張三123456

where cardid='1010 3576 1234 5678'

update cardinfo set pass='222222'--李四123123

where cardid='1010 3576 1212 1130'

----2.辦理銀行卡掛失-----------------

--描述:李四(卡號為1010357612121134)因銀行卡丟失,申請掛失

update cardinfo set isreportloss=1

where cardid='1010 3576 1212 1130'

--3.統計銀行流通餘額,盈利結算

declare @inmoney money --宣告乙個總存入的變數

declare @outmoney money --宣告乙個總支取的變數

select @inmoney=sum(trademoney) from tradeinfo where tradetype='存入'

select @outmoney=sum(trademoney) from tradeinfo where tradetype='支取'

print '銀行流通餘額總計為:'+convert(varchar(20),@inmoney-@outmoney)+'rmb'

print '盈利結算為:'+convert(varchar(20),@outmoney*0.008-@inmoney*0.003)+'rmb'

go--4.查詢本週開戶資訊

select * from cardinfo where

datediff(weekday,opendate,getdate())--5.查詢本月交易金額最多的卡號

--存入最多

select * from tradeinfo where

trademoney=(select max(trademoney) from tradeinfo where

tradetype='存入' and datediff(month,tradedate,getdate())<=1)

--支取最多

select * from tradeinfo where

trademoney=(select max(trademoney) from tradeinfo where

tradetype='支取' and datediff(month,tradedate,getdate())<=1)

--6.查詢掛失的卡號

select * from userinfo where

customerid in(select customerid from cardinfo where isreportloss=1)

--7.催款提醒業務

select customername from userinfo inner join cardinfo

on cardinfo.customerid=userinfo.customerid where balance<200

業務用例和系統用例

拋開前一篇文章談的總體思路,我們今天來談一下需求分析工作實質性的做些什麼。在這裡,我們,將主要關注於分析層面,也即 uml中的用例模型和邏輯模型。在這裡要申明的是邏輯模型並不能完全算需求分析階段的工作,因為它包含了設計模型的概念,但是我又把它歸納了一塊到需求分析階段,原因在於邏輯模型中存在了業務物件...

業務用例和系統用例

業務用例與系統用例具有同樣的特徵,因此編寫和評審用例的方法對兩者都適用。在業務用例中說明的東西,也會在系統用例中說明。這形成了系統用例和使用者用例之間的合作。但這樣帶來了兩個壞訊息。第乙個壞訊息 編寫者和讀者經常把二者弄混,可能把系統行為放入業務用例中,也可能把業務操作歸於系統用例。如果能夠商量著去...

關於業務用例

本來想把這專案的過程全部記錄下來的,可惜.實言了 這次來講一下用例吧.我這公司是 公司.和公司打交道的就是客戶和 商 其實 商也是客戶 客戶買.公司向 商買.所以呢.其實我就只有二個業務用例.好了,最外圍的邊界已經確定了.這二個用例就是 買產品 和 賣產品 圖我就不畫了,大家發揮想像力吧.要記住這個...