From 5c48bc9cf74ed7f539027ae3d1df8d12096300bf Mon Sep 17 00:00:00 2001
From: Hhhhzh <969247577@qq.com>
Date: Mon, 13 Feb 2023 21:15:14 +0800
Subject: [PATCH] FirstSend
---
banksystem/.idea/.gitignore | 3 +
banksystem/.idea/.name | 1 +
banksystem/.idea/bankSystem.iml | 13 ++
.../inspectionProfiles/Project_Default.xml | 22 ++
banksystem/.idea/misc.xml | 4 +
banksystem/.idea/modules.xml | 8 +
banksystem/__pycache__/admin.cpython-38.pyc | Bin 0 -> 3899 bytes
banksystem/__pycache__/atm.cpython-311.pyc | Bin 0 -> 10674 bytes
banksystem/__pycache__/atm.cpython-38.pyc | Bin 0 -> 5193 bytes
banksystem/__pycache__/card.cpython-311.pyc | Bin 0 -> 891 bytes
banksystem/__pycache__/card.cpython-38.pyc | Bin 0 -> 702 bytes
banksystem/__pycache__/check.cpython-311.pyc | Bin 0 -> 6086 bytes
banksystem/__pycache__/check.cpython-38.pyc | Bin 0 -> 3945 bytes
.../readAppendCard.cpython-311.pyc | Bin 0 -> 5135 bytes
.../__pycache__/readAppendCard.cpython-38.pyc | Bin 0 -> 2824 bytes
banksystem/admin.py | 94 +++++++++
banksystem/atm.py | 190 ++++++++++++++++++
banksystem/card.py | 15 ++
banksystem/cardinfo.txt | 0
banksystem/check.py | 147 ++++++++++++++
banksystem/readAppendCard.py | 65 ++++++
banksystem/银行系统.py | 35 ++++
22 files changed, 597 insertions(+)
create mode 100644 banksystem/.idea/.gitignore
create mode 100644 banksystem/.idea/.name
create mode 100644 banksystem/.idea/bankSystem.iml
create mode 100644 banksystem/.idea/inspectionProfiles/Project_Default.xml
create mode 100644 banksystem/.idea/misc.xml
create mode 100644 banksystem/.idea/modules.xml
create mode 100644 banksystem/__pycache__/admin.cpython-38.pyc
create mode 100644 banksystem/__pycache__/atm.cpython-311.pyc
create mode 100644 banksystem/__pycache__/atm.cpython-38.pyc
create mode 100644 banksystem/__pycache__/card.cpython-311.pyc
create mode 100644 banksystem/__pycache__/card.cpython-38.pyc
create mode 100644 banksystem/__pycache__/check.cpython-311.pyc
create mode 100644 banksystem/__pycache__/check.cpython-38.pyc
create mode 100644 banksystem/__pycache__/readAppendCard.cpython-311.pyc
create mode 100644 banksystem/__pycache__/readAppendCard.cpython-38.pyc
create mode 100644 banksystem/admin.py
create mode 100644 banksystem/atm.py
create mode 100644 banksystem/card.py
create mode 100644 banksystem/cardinfo.txt
create mode 100644 banksystem/check.py
create mode 100644 banksystem/readAppendCard.py
create mode 100644 banksystem/银行系统.py
diff --git a/banksystem/.idea/.gitignore b/banksystem/.idea/.gitignore
new file mode 100644
index 0000000..359bb53
--- /dev/null
+++ b/banksystem/.idea/.gitignore
@@ -0,0 +1,3 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
diff --git a/banksystem/.idea/.name b/banksystem/.idea/.name
new file mode 100644
index 0000000..fb6e260
--- /dev/null
+++ b/banksystem/.idea/.name
@@ -0,0 +1 @@
+银行系统.py
\ No newline at end of file
diff --git a/banksystem/.idea/bankSystem.iml b/banksystem/.idea/bankSystem.iml
new file mode 100644
index 0000000..166d1a6
--- /dev/null
+++ b/banksystem/.idea/bankSystem.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banksystem/.idea/inspectionProfiles/Project_Default.xml b/banksystem/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..deb13da
--- /dev/null
+++ b/banksystem/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banksystem/.idea/misc.xml b/banksystem/.idea/misc.xml
new file mode 100644
index 0000000..a6f120b
--- /dev/null
+++ b/banksystem/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/banksystem/.idea/modules.xml b/banksystem/.idea/modules.xml
new file mode 100644
index 0000000..1e852db
--- /dev/null
+++ b/banksystem/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banksystem/__pycache__/admin.cpython-38.pyc b/banksystem/__pycache__/admin.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e7a93a8336d55b76db8e9dd1f1ff26480418e0f1
GIT binary patch
literal 3899
zcmbssU2hasbY^yEb~@c6D*E8lL=w{3#72=)D@ITdd?1@3MUu@XlQJ{t(*3A2J61NU
zDHJO)C18RIMx_OnHUW{;q)NfxVdhn5Kc0B=!6(nT_s+)-OB3O?bI&>VeBF<8_S}19
zXh`9pee{oSOmF76zmSNxG!T2>b9O*yas|%hO`*(Jgo3~$o+_sbDFV|4@c?J0P4Nt8
zik38&DrC&mVNR3WKS5P#|Gd<`Fzu{QcV9&6
zPAZrn;@#O<|Fb(v7uLpUyeIB`-!i8129oh60I>%?vVRs=;9(C1+`}^*>|4rA1B5*@
zC4i!tF=c>~IbbRPGv*-dU)B@fFe|01k&4+x98K><({OHFlW%f5*A$=!7of)HHNg`n
zQPY#BCmm;|W}8~dOFLHixQ)kZi_oobb_T$|2lu{OJmOfkQ{4B~!GpzpHN&k~)w)xh
zu&M?i>i$yMa*E?S$G7ho8yy=fBK?kKd{{g-S)FoDI(4g3B;H1*PkOShm#U?@u0H{`
z9dyR=65rTF7BUhr4IUY+ApeE6M{>hwz%?d4vLkDF)LFiVR8&W*DS;{GwpWOJITQ
z$3VWZJNLrlv|M9%6N3!eR%jF>D8a)af*_yCgrZHDL8ujQDP-a?K;5WlIy3+?h#3gR
zDI0pC4dPUTP!y*UU@5r-$_RUcgdHN32t27OEFszhHpM_H5@&M`4S+r{NqfKmoizv$
ziBOIWGut768FVpHAdtmryHu@v>3XSRd7@LctmzfrmVikjnszdfo-|Xcnzfl{0e7}Q
z$MJIFPvIL`8kKykm--LK=awk&orI!Q}_XA8?
zLHG$@7Z)XSFpTJIzOn1kBRbdE6`UkHn*RZsOgTC(qKqUPN^s(~AEJyRpoL+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Ij7REv
zy#onN>gGj^@fa0dJT=@SS^qOkG%oMt;SF`vCSuamU}6Pb@(by_n@R;vDwQv?a*o>3
zRH{@?=j04uNqeuSfseC7m0~VS|r4sQVluEH;CY6$C6QAU5jg*#*
z)5n;luT2M(NN!p<~)kVk7<3%%RGI&162~ByO2b#|f;=#@}fC}j>uhxXu^PSbTn($Lv>8xA=y4bmJ8QfCm
zyb4a4xSCQ^Mo>gz8ntmont%%VWX@#FlNrldMlp-=0%K2#$!xG=FGA`UVlRQS6$G62
z81VYe8bD?C3^_4$aY+6H!68^5(|9k;m|^LlCt9h;rtSs@pTpBF&vk-ks^PQYXy!X5P$vGw;3JtJO3D@>}7npD7_zbQVPd
zX9+Ys55P&A+#;NEVMw^((5GTs;Nl7~q`m`Ttr+b!wAsP9*cvsOR=~C5;7vLB`0Hm1
zkz(`vbg*?LpNx*v&2sl}I@s2Az1V*~d%F%sK6!Qg?zOJZ#@of$be0Z}4!`8%$?FnsJoi!m&utit}AXNGHJ*hP@?=+`n&;YN4saH>WUPG!mjU@jC3I)qY
literal 0
HcmV?d00001
diff --git a/banksystem/__pycache__/check.cpython-311.pyc b/banksystem/__pycache__/check.cpython-311.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8579a5bc061fde5643902e95347d53b19bb07a5f
GIT binary patch
literal 6086
zcmbtY|4&=j6@Sm~J>##~#wIoeVpBs}Hwh^X5S28UHi%Q!iYA3>Q<}&kJhycMhP`K}
z3kB8b(#`1{)y#vRX|Pq;K{7$>*FDbr(M>i7RKmIRcp(il>fII_faR)8{E(
z7pCVJin<1WN;;x4#5!$gf=Z{mPYF
zP_DE$t^NBC#kc>y`r#*QpIkMKsN<0#m9MfDVd@wSmgvxmV+^kY$KJPUa}&w;Gr
z^&ky=4M-zz0BPclAkDl9q=h$wwDOigDqt;ey|0BwPLI$V#>6}>%r|-vxNw8i$MnF*
zRDdq9VtDiw5fyy*J9~SMza)kQ@%Z7$nef&p%oQQn`S!zVxAo##Mnb&>D%urM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n;!{0`n#~|$V$1$sA(tJ
zuby2rk!4I|8C?w24D@vLj@3*Z$rmmr-EGl8pz5yu~xG5`a~cc+=OD26M6$tOBR?Ny?VDPhlo!lf)nsDPk)
zgbaD0CRLk=BwmDG@?6|N$m%^L4%bo0sz!D)BR?HR`=n!^Yw9-FU76)!;_a00ppq}N
z10{hud?a!(M1`TP}*5+TgHt#n6xwiAcQsbQu8<#HBZ+%*q7xkyzjEZUD
zZ5@u&!6I!5Vj`ZPY6w*>shr-M2jo?RMj(?>T=WwWL8*y;A)!Pl%Ef8d7#EKd2|++r
z@&?q`gp_lpLgqS$Rdo;2>BeKBrnVo&)Z=)={=&d+Lyk4Kw}Fie7#Z!mMk{aMQSZi*&g052a6ei+l|H
zY4XZO6h467?_xG*k=Kt`iZe=4WV%i*AgPg06VVkct6PgqXGxr!+`pC1Lc(mikA4>%
z+#d7!AeqmXE8L%@eosDM^$W9VMNoDTlqr;nC_zbMDzi!hlb9k!6+gjVwTY&sSs@_Ak3Y
no6~mDQ_P7@JVli}S*wzat(TM@UnW6Z3i4*6|99*#j;Q??ozQ-c
literal 0
HcmV?d00001
diff --git a/banksystem/__pycache__/readAppendCard.cpython-311.pyc b/banksystem/__pycache__/readAppendCard.cpython-311.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fbb75be527190c0f953018a39e86136e33f2b61c
GIT binary patch
literal 5135
zcmb_gU2Idy6`r|&zK*YnZ(6v*8zdGhu`N70OLd>9aJS9oa%r%(+*x0U?f3>
zId+Jube8yJQ$C{wRqV(lI<^iu0CLF*0xt0RL4a`*qqzb?F57aP#A%$1^Kl_A#-%A}
zKWq1a8+Vq>Q2z|4V@IYO2!x~ISRmkYn1Z22x=bkqgP%}M1%E#b8pc2`OvZ`1Q@v5`
znpqK6wP-9Hy9SlyzE42s@9!~XtZ=e7)NSBko2>Ney`u*^e_?34(Rn<4MeD)#=ROHW
zyN%8^&FGHx_H|yw+%+Sn^>pg6^22?7T9mDSSKl=qO=GYswsY=({TF7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0G7$g*GRa-Ur#tSHsL-)2e)q!)w^<&f)Lh
z0%I)R`QzfaN;*8Lu4ty%r-!34X0FVb;nswUwJOPYLB#N+H=+(%%B-;HhXprW
zINmOE0Zvf0NMKM#`#=dpnejIO2;9}{M-Pr29Fnu1HRJAk?$OGz${{gZvldCqf}yr-
zW$i@GVA}o+ne&Xq?H31a~kgZ-b(zIB+
zakO)+bEqOKd%uy_K9<)`G)x#Nd2L#5%*c%?xsi=XoiG3ZjHuLoqtriE>L=8+(wI>i
zQ|tq8ouL@BWIqu2HdsNa^B+ZBiQnTbN=HDwfy`0t_ih+eTn4F9tXU%EU^zH;5`wRt
z&?C{NpMMKb>_hBs#sk9t0*YUV*GUZ9ET$@qzwJApk=NHLQ3lKg`QJVCd7qg
zLHN%10ij#U<;r{w*vBXNO=14meBxktgCO=j6BS(c4;4QyX%%ss(yR6hyI_p$V20I*|M<%m4t
zOP-ltGr#kJBkgL>xY`qKPpa0BZW!B;_}OCR>RW@ugNgR6Qgipz?Nhf-51&qa@Wi$1
zR?~1(qAe@PpPl&4i6M2kJ1wls2IakUZU;O
RV>gc_*dH#%#R}Nw{TB;k2UY+8
literal 0
HcmV?d00001
diff --git a/banksystem/__pycache__/readAppendCard.cpython-38.pyc b/banksystem/__pycache__/readAppendCard.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6fa00e3405df197ddc7d59c7d14a2d8c30d93e78
GIT binary patch
literal 2824
zcmaJ@&u<$=6rS0gU9TOdnDhq}DhTDLQ5(_FHf>c^K?y-f#e%dI$TC>&&Zf0%uantz
zOQOvIrHBhw4@ihZ56Jy|~jUfGdZiaDaa`Jg5dP&378qMsqtztGQ8o1qrHL?&kI
zJYfk>ti(=4;w0`y28X@GHhF2&QWlNTUbR{e>v6SO%xDn>%?0iHw7|zw=kfn(EsAcn
zX~8VKPugLytaEi4gmFDyra|7~b-GvTw6uo-7u)`gO{Sis$WO1#oU2@k0u@zeKfHLc
zGTZh$Et(fqE(f7co$N?dJ(qI_{#HrOeXp#@y!!Fr3?K5D#yr4*g9b%`C(YgSld`(tYfTum~FTO
zd8VW=S%Fw;1SStN3bT(4B{*BH`b|QK5VRE0j%h9p0I4b9PFB|acyfjSLbU$Q#|Aqe
zJob^*{sq1cwmwTvOq`V#IMTK699!kr*s7KAb-ux7*_SV_+KIJp(edn9B=#ELpdV*T
zM?Pn#*k^2>eZdki(BI}i&unt-QEJ+<9$qUtTC@pvoka$k
z^)QIETQiAJ`)Mm$1UGBVqDW6{Ehz0E|B<#-u>14^A%I(C^l25i;CVjIS4IZ_U_`0t
zDjYdA0Ak3+gQ5$zhP75ut?FF0+G@*A6a9R(y40yP((g%k_U`^$GMHov$t%=Jcms`7
zBfd3kYJ!?0`CW*_DycVVlren`2(V$-PSP4OIZIkNjQxNTjC))#f%ebJfuWsYz8R`{
z%|{yg*A7)&r@IM3N7Z+N)BzAvbreVq_BxjiG_b9J@U$7__C_6DwPOqCp#sSoRBgL9
zXJ($aa~_IjF@2i)Xptcj{_|lQ9IN^
zc3O+-9Slx|quxe{cQMdfsO^GFy-fFCrIrF^dAz_6k$A?a<_!T=GomaNxiY(O)oX}(
z6y|jpWYVl@;tj1~gkj|H1`Rn#ttSW1_FRQ~KD8Yeis>}92;?2SwRX$FA*@_&&j!tB
z*bfC5S^+kIsvyI3Q;^uu_RP+(dBD@>Zk~efO$=IQ}PU18SQKZwgKnsenk0LnhZaQ!2vP|C*
z9e}mf-PpQw|F7S>TfhFab@!Ji559l&+x^Gib^reH-lK;IllLz0-rF6lGC|~%y
zT+Eotlh!H}2kok$)xH^MXHnI|*d)TFj>;omFQyQbJycAiF$mP~sGLiwu$S_L44T#B
zG}3$+Fz%AIr%P21dvNMYk31?4S^G
zJt!>a$r-%RxD?V^b5~i+33(n{z1-QzT`b5GiCA|?q%JaM self.cards[index].cardMoney:
+ print("余额不足,您当前余额为%d元!" % self.cards[index].cardMoney)
+ time.sleep(1)
+ return
+ self.cards[index].cardMoney -= mon
+ self.writeCard()
+
+ print("取款成功!你卡上的余额为%d元!" % self.cards[index].cardMoney)
+ time.sleep(1)
+ pass
+
+ # 转账
+ def inMoney(self):
+ card = check.isCardExist(self.cards)
+ if check.isCardLock(self.cards, card.cardN):
+ return
+ while True:
+ cardN = input("请输入对方的账号:")
+ cardOther =check.isCardNExist(self.cards, cardN)
+ if not cardOther:
+ print("账号不存在")
+ if check.isSure("继续转账"):
+ continue
+ else:
+ time.sleep(1)
+ return
+ else:
+ break
+ index = self.cards.index(card)
+ while True:
+ mon = int(input("您当前的余额为%d,请输入要转账的钱:" % self.cards[index].cardMoney))
+ if mon > self.cards[index].cardMoney:
+ print("余额不足,您当前余额为%d元!" % self.cards[index].cardMoney)
+ if check.isSure("继续转账"):
+ continue
+ else:
+ time.sleep(1)
+ return
+ else:
+ self.cards[index].cardMoney -= mon
+ break
+ indexOther = self.cards.index(cardOther)
+ self.cards[indexOther].cardMoney += mon
+ self.writeCard()
+ print("转账成功!你卡上的余额为%d元!" % self.cards[index].cardMoney)
+ time.sleep(1)
+ pass
+
+ # 销户
+ def DAccount(self):
+ card = check.isCardInfoSure(self.cards)
+ if card:
+ self.cards.remove(card)
+ self.writeCard()
+
+ print("销户成功!")
+ time.sleep(1)
+ pass
+
+ # 挂失
+ def hangOutAccount(self):
+ card = check.isCardInfoSure(self.cards)
+ if check.isCardLock(self.cards, card.cardN):
+ return
+ if card:
+ index = self.cards.index(card)
+ self.cards[index].cardLock = "True"
+ self.writeCard()
+
+ print("挂失成功!")
+ time.sleep(1)
+ pass
+
+ # 解锁
+ def unlockAccount(self):
+ card = check.isCardInfoSure(self.cards)
+ index = self.cards.index(card)
+ self.cards[index].cardLock = "False"
+ self.writeCard()
+
+ print("解锁成功!")
+ time.sleep(1)
+ pass
+
+ # 改密
+ def changePassword(self):
+ card = check.isCardInfoSure(self.cards)
+ if check.isCardLock(self.cards, card.cardN):
+ return
+ newpassword = input("请输入新密码")
+ index = self.cards.index(card)
+ self.cards[index].cardPassword = newpassword
+ self.writeCard()
+
+ print("改密成功!")
+ time.sleep(1)
+
+ pass
+
+ # 写入文件
+ def writeCard(self):
+ self.appendCard.append('', w='w')
+ for card in self.cards:
+ self.appendCard.append(card)
+
+ # 退出
+ def exit(self):
+ if check.isSure("退出"):
+ return True
+ else:
+ return False
+ pass
+
+
+
diff --git a/banksystem/card.py b/banksystem/card.py
new file mode 100644
index 0000000..87416a5
--- /dev/null
+++ b/banksystem/card.py
@@ -0,0 +1,15 @@
+'''
+卡:
+类名:Card
+属性:卡号【7位随机】 密码 余额 绑定的身份证号 手机号
+'''
+
+
+class Card(object):
+ def __init__(self, cardN, cardPassword, cardMoney, identityId, phoneNum, cardLock=''):
+ self.cardN = cardN
+ self.cardPassword = cardPassword
+ self.cardMoney = cardMoney
+ self.identityId = identityId
+ self.phoneNum = phoneNum
+ self.cardLock = cardLock
diff --git a/banksystem/cardinfo.txt b/banksystem/cardinfo.txt
new file mode 100644
index 0000000..e69de29
diff --git a/banksystem/check.py b/banksystem/check.py
new file mode 100644
index 0000000..18cf3b2
--- /dev/null
+++ b/banksystem/check.py
@@ -0,0 +1,147 @@
+'''
+验证类:
+用户名、密码、卡号、身份证、手机号验证
+输入确认
+'''
+
+
+def isCardNExist(cards, cardN):
+ for card in cards:
+ if cardN == card.cardN:
+ return card
+ else:
+ return False
+
+
+def isSure(operate):
+ while True:
+ res = input("是否确认%s?【yes/no】" % operate)
+ if res not in ['yes', 'no']:
+ print("输入有误,请重新输入!")
+ continue
+ elif res == 'yes':
+ return True
+ else:
+ return False
+
+
+def isPhoneNum(phonenum):
+ if phonenum[0] != '1':
+ print("输入的手机号开头不为1,请重新输入!")
+ return False
+ elif len(phonenum) != 11:
+ print("输入的手机号长度不对【11位】,请重新输入!")
+ return False
+ elif not phonenum.isdigit():
+ print("输入的手机号必须全部是数字,请重新输入!")
+ return False
+ else:
+ return True
+
+
+def phoneNumInput():
+ while True:
+ pnum = input("请输入您的手机号:")
+ if isPhoneNum(pnum):
+ return pnum
+
+
+def identifyInput():
+ iden = input("请输入您的身份证号:")
+ return iden
+
+
+def isCardExist(cards):
+
+ cardN = input("请输入账号:")
+ password = input("请输入密码:")
+
+ while True:
+ for card in cards:
+ if cardN == card.carN:
+ if password == card.cardPassword:
+ return card
+ else:
+ password = input("密码有误,请重新输入密码:")
+ break
+ else:
+ cardN = input("账号不存在,请重新输入账号:")
+ password = input("请输入密码:")
+
+
+def isCardPasswordSure(newassword, oldpassword):
+
+ if newassword == oldpassword:
+ return True
+ else:
+ return False
+
+
+def isCardInfoSure(cards):
+ # 卡号和密码是否正确
+ card = isCardExist(cards)
+ idenId = identifyInput()
+ pnum = phoneNumInput()
+ while True:
+ if card.identityId == idenId:
+ if card.phoneNum != pnum:
+ print("预留手机号输入不对。")
+ if isSure("继续注销或挂失卡号%s" % card.cardN):
+ pnum = phoneNumInput()
+ continue
+ else:
+ return False
+ else:
+ return card
+ else:
+ print("身份证号输入不对。")
+ if isSure("继续注销或挂失卡号%s" % card.cardN):
+ idenId = identifyInput()
+ continue
+ else:
+ return False
+
+
+def isCardLock(cards, cardN):
+ card = isCardNExist(cards, cardN)
+ if card != False:
+ if card.cardLock == "False":
+ return False
+ else:
+ print("此卡已挂失!")
+ return True
+ else:
+ return "卡号不存在"
+
+
+class Check(object):
+
+ def __init__(self):
+ pass
+
+ # 用户验证
+ def userName(self, admin, password):
+ """
+ :param admin: 用户名
+ :param password: 密码
+ :return:
+ """
+ self.admin = admin
+ self.password = password
+ adminFlag = False
+ admin = input("请输入用户名:")
+ while True:
+ # 如果用户名输对,但密码输错,那么重新输入时只需输入密码验证即可
+ if adminFlag:
+ admin = input("请输入用户名:")
+ password = input("请输入密码:")
+ if admin != self.admin:
+ print("输入的用户名不对,请重新输入!")
+ adminFlag = True
+ continue
+ elif password != self.password:
+ print("输入的密码不对,请重新输入!")
+ adminFlag = False
+ continue
+ else:
+ return
diff --git a/banksystem/readAppendCard.py b/banksystem/readAppendCard.py
new file mode 100644
index 0000000..65702da
--- /dev/null
+++ b/banksystem/readAppendCard.py
@@ -0,0 +1,65 @@
+from card import Card
+import json
+
+
+# 读
+class ReadCard(Card):
+ def __init__(self, cardN='', cardPassword='', cardMoney=0, identityId='', phoneNum='', cardLock=''):
+ Card.__init__(self, cardN, cardPassword, cardMoney, identityId, phoneNum, cardLock)
+
+ def dict2Card(self, d):
+ return self.__class__(d["cardN"], d["cardPassword"], d["cardMoney"], d["identityId"], d["phoneNum"],
+ d["cardLock"])
+
+ def read(self):
+ with open("cardinfo.txt", "r", encoding="utf-8") as fr:
+ cards = []
+ for re in fr.readlines():
+ cards.append(self.dict2Card(eval(re)))
+ return cards
+
+
+# 写
+class AppendCard(Card):
+ def __init__(self):
+ Card.__init__(self, cardN='', cardPassword='', cardMoney=0, identityId='', phoneNum='', cardLock='')
+
+ def card2Dict(self, card):
+ return {"cardN": card.cardN, "cardPassword": card.cardPassword,
+ "cardMoney": card.cardMoney, "identityId": card.identityId,
+ "phoneNum": card.phoneNum, "cardLock": card.cardLock
+ }
+
+ def append(self, card, w='a'):
+ # 清除
+ if w == 'w':
+ with open("cardinfo.txt", "w", encoding="utf-8") as fa:
+ fa.write('')
+ else:
+ with open("cardinfo.txt", "a", encoding="utf-8") as fa:
+ json.dump(card, fa, default=self.card2Dict)
+ fa.write('\n')
+
+
+# 删
+class Del(object):
+ def __init__(self):
+ pass
+
+ def del_(self, cardN):
+ readcard = ReadCard()
+ cards = readcard.read()
+ for card in cards:
+ if cardN == card.cardN:
+ cards.remove(card)
+ break
+ else:
+ print("卡号不存在,请重新输入!")
+ return False
+
+ appendcard = AppendCard()
+ appendcard.append('', w='w')
+ for card in cards:
+ appendcard.append(card)
+ return True
+
diff --git a/banksystem/银行系统.py b/banksystem/银行系统.py
new file mode 100644
index 0000000..3633481
--- /dev/null
+++ b/banksystem/银行系统.py
@@ -0,0 +1,35 @@
+from admin import Admin
+from atm import ATM
+
+admin = Admin("admin",'123456')
+admin.window()
+atm = ATM()
+admin.login()
+
+while True:
+ admin.funcWindow()
+ choice = input("请选择您要办理的业务:")
+ if choice == '1':
+ atm.newAccount()
+ elif choice == '2':
+ atm.checkMoney()
+ elif choice == '3':
+ atm.saveMoney()
+ elif choice == '4':
+ atm.getMoney()
+ elif choice == '5':
+ atm.inMoney()
+ elif choice == '6':
+ atm.DAccount()
+ elif choice == '7':
+ atm.hangOutAccount()
+ elif choice == '8':
+ atm.unlockAccount()
+ elif choice == '9':
+ atm.changePassword()
+ elif choice == 'T':
+ if atm.exit():
+ if admin.logout():
+ break
+ else:
+ print("未有此功能!")