From 3b68c7ff00fce9929f171e28cb68968388feade2 Mon Sep 17 00:00:00 2001 From: cwfeng Date: Wed, 11 Dec 2024 21:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=BF=9B=E8=B4=A7?= =?UTF-8?q?=E5=91=98=E8=A7=92=E8=89=B2=E5=B9=B6=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../5b23e521-053a-47c0-ae28-a98b513bc6ec.xml | 1448 ++++++++++------- .../dao/impl/inOrderServiceImpl.class | Bin 7456 -> 7456 bytes .../dialog/UserDialog$MyItemListener.class | Bin 1136 -> 1177 bytes .../supermarket/dialog/UserDialog.class | Bin 4744 -> 4764 bytes .../dialog/UserInfDialog$MyItemListener.class | Bin 1533 -> 1578 bytes .../supermarket/dialog/UserInfDialog.class | Bin 5223 -> 5243 bytes .../com/lingnan/supermarket/view/InView.class | Bin 14282 -> 14274 bytes .../lingnan/supermarket/view/MainView.class | Bin 14702 -> 14903 bytes Supermarket/bin/config/jdbc.properties | 2 +- .../dao/impl/inOrderServiceImpl.java | 3 +- .../supermarket/dialog/UserDialog.java | 11 +- .../supermarket/dialog/UserInfDialog.java | 22 +- .../com/lingnan/supermarket/view/InView.java | 2 +- .../lingnan/supermarket/view/MainView.java | 405 +++-- 14 files changed, 1132 insertions(+), 761 deletions(-) diff --git a/Supermarket/bin/.idea/dataSources/5b23e521-053a-47c0-ae28-a98b513bc6ec.xml b/Supermarket/bin/.idea/dataSources/5b23e521-053a-47c0-ae28-a98b513bc6ec.xml index fcbfa38..72b6bc8 100644 --- a/Supermarket/bin/.idea/dataSources/5b23e521-053a-47c0-ae28-a98b513bc6ec.xml +++ b/Supermarket/bin/.idea/dataSources/5b23e521-053a-47c0-ae28-a98b513bc6ec.xml @@ -5,9 +5,27 @@ lower/lower InnoDB InnoDB - |root||root|localhost|ALTER|G + |root||root|localhost|ALLOW_NONEXISTENT_DEFINER|G +|root||root|localhost|ALTER|G |root||root|localhost|ALTER ROUTINE|G +|root||root|localhost|APPLICATION_PASSWORD_ADMIN|G +|root||mysql.infoschema|localhost|AUDIT_ABORT_EXEMPT|G +|root||mysql.session|localhost|AUDIT_ABORT_EXEMPT|G +|root||mysql.sys|localhost|AUDIT_ABORT_EXEMPT|G +|root||root|localhost|AUDIT_ABORT_EXEMPT|G +|root||root|localhost|AUDIT_ADMIN|G +|root||mysql.session|localhost|AUTHENTICATION_POLICY_ADMIN|G +|root||root|localhost|AUTHENTICATION_POLICY_ADMIN|G +|root||mysql.session|localhost|BACKUP_ADMIN|G +|root||root|localhost|BACKUP_ADMIN|G +|root||root|localhost|BINLOG_ADMIN|G +|root||root|localhost|BINLOG_ENCRYPTION_ADMIN|G +|root||mysql.session|localhost|CLONE_ADMIN|G +|root||root|localhost|CLONE_ADMIN|G +|root||mysql.session|localhost|CONNECTION_ADMIN|G +|root||root|localhost|CONNECTION_ADMIN|G |root||root|localhost|CREATE|G +|root||root|localhost|CREATE ROLE|G |root||root|localhost|CREATE ROUTINE|G |root||root|localhost|CREATE TABLESPACE|G |root||root|localhost|CREATE TEMPORARY TABLES|G @@ -15,1380 +33,1660 @@ |root||root|localhost|CREATE VIEW|G |root||root|localhost|DELETE|G |root||root|localhost|DROP|G +|root||root|localhost|DROP ROLE|G +|root||root|localhost|ENCRYPTION_KEY_ADMIN|G |root||root|localhost|EVENT|G |root||root|localhost|EXECUTE|G |root||root|localhost|FILE|G +|root||mysql.infoschema|localhost|FIREWALL_EXEMPT|G +|root||mysql.session|localhost|FIREWALL_EXEMPT|G +|root||mysql.sys|localhost|FIREWALL_EXEMPT|G +|root||root|localhost|FIREWALL_EXEMPT|G +|root||root|localhost|FLUSH_OPTIMIZER_COSTS|G +|root||root|localhost|FLUSH_PRIVILEGES|G +|root||root|localhost|FLUSH_STATUS|G +|root||root|localhost|FLUSH_TABLES|G +|root||root|localhost|FLUSH_USER_RESOURCES|G +|root||root|localhost|GROUP_REPLICATION_ADMIN|G +|root||root|localhost|GROUP_REPLICATION_STREAM|G |root||root|localhost|INDEX|G +|root||root|localhost|INNODB_REDO_LOG_ARCHIVE|G +|root||root|localhost|INNODB_REDO_LOG_ENABLE|G |root||root|localhost|INSERT|G |root||root|localhost|LOCK TABLES|G +|root||root|localhost|OPTIMIZE_LOCAL_TABLE|G +|root||root|localhost|PASSWORDLESS_USER_ADMIN|G +|root||mysql.session|localhost|PERSIST_RO_VARIABLES_ADMIN|G +|root||root|localhost|PERSIST_RO_VARIABLES_ADMIN|G |root||root|localhost|PROCESS|G |root||root|localhost|REFERENCES|G |root||root|localhost|RELOAD|G |root||root|localhost|REPLICATION CLIENT|G |root||root|localhost|REPLICATION SLAVE|G +|root||root|localhost|REPLICATION_APPLIER|G +|root||root|localhost|REPLICATION_SLAVE_ADMIN|G +|root||root|localhost|RESOURCE_GROUP_ADMIN|G +|root||root|localhost|RESOURCE_GROUP_USER|G +|root||root|localhost|ROLE_ADMIN|G +|root||mysql.infoschema|localhost|SELECT|G |root||root|localhost|SELECT|G +|root||root|localhost|SENSITIVE_VARIABLES_OBSERVER|G +|root||root|localhost|SERVICE_CONNECTION_ADMIN|G +|root||mysql.session|localhost|SESSION_VARIABLES_ADMIN|G +|root||root|localhost|SESSION_VARIABLES_ADMIN|G +|root||root|localhost|SET_ANY_DEFINER|G |root||root|localhost|SHOW DATABASES|G |root||root|localhost|SHOW VIEW|G +|root||root|localhost|SHOW_ROUTINE|G +|root||mysql.session|localhost|SHUTDOWN|G |root||root|localhost|SHUTDOWN|G |root||mysql.session|localhost|SUPER|G |root||root|localhost|SUPER|G +|root||mysql.infoschema|localhost|SYSTEM_USER|G +|root||mysql.session|localhost|SYSTEM_USER|G +|root||mysql.sys|localhost|SYSTEM_USER|G +|root||root|localhost|SYSTEM_USER|G +|root||mysql.session|localhost|SYSTEM_VARIABLES_ADMIN|G +|root||root|localhost|SYSTEM_VARIABLES_ADMIN|G +|root||root|localhost|TABLE_ENCRYPTION_ADMIN|G +|root||root|localhost|TELEMETRY_LOG_ADMIN|G +|root||root|localhost|TRANSACTION_GTID_TAG|G |root||root|localhost|TRIGGER|G |root||root|localhost|UPDATE|G +|root||root|localhost|XA_RECOVER_ADMIN|G |root||root|localhost|grant option|G performance_schema|schema||mysql.session|localhost|SELECT|G sys|schema||mysql.sys|localhost|TRIGGER|G 8.4.0 - - big5 - 1 - - - big5 + + armscii8 - - dec8 + + armscii8 1 - - dec8 + + ascii - - cp850 + + ascii 1 - - cp850 + + big5 - - hp8 + + big5 1 - - hp8 - - - koi8r + + binary 1 - - koi8r + + cp1250 - - latin1 + + cp1250 - - latin1 + + cp1250 + + + cp1250 1 - - latin1 + + cp1250 - - latin1 + + cp1251 - - latin1 + + cp1251 - - latin1 + + cp1251 + 1 - - latin1 + + cp1251 - - latin1 + + cp1251 - - latin2 + + cp1256 - - latin2 + + cp1256 1 - - latin2 + + cp1257 - - latin2 + + cp1257 + 1 - - latin2 + + cp1257 - - swe7 + + cp850 + + + cp850 1 - - swe7 + + cp852 - - ascii + + cp852 1 - - ascii + + cp866 - - ujis + + cp866 1 - - ujis + + cp932 - - sjis + + cp932 1 - - sjis + + dec8 - - hebrew + + dec8 1 - - hebrew + + eucjpms - - tis620 + + eucjpms 1 - - tis620 + + euckr euckr 1 - - euckr + + gb18030 - - koi8u + + gb18030 1 - - koi8u + + gb18030 - + gb2312 - 1 - + gb2312 + 1 - - greek + + gbk + + + gbk 1 - - greek + + geostd8 - - cp1250 + + geostd8 1 - - cp1250 + + greek - - cp1250 + + greek + 1 - - cp1250 + + hebrew - - cp1250 + + hebrew + 1 - - gbk + + hp8 + + + hp8 1 - - gbk + + keybcs2 - - latin5 + + keybcs2 1 - - latin5 + + koi8r - - armscii8 + + koi8r 1 - - armscii8 + + koi8u - - utf8 + + koi8u 1 - - utf8 + + latin1 + + + latin1 + + + latin1 + + + latin1 - - utf8 + + latin1 - - utf8 + + latin1 - - utf8 + + latin1 - - utf8 + + latin1 + 1 - - utf8 + + latin2 - - utf8 + + latin2 - - utf8 + + latin2 - - utf8 + + latin2 + 1 - - utf8 + + latin2 - - utf8 + + latin5 - - utf8 + + latin5 + 1 - - utf8 + + latin7 - - utf8 + + latin7 - - utf8 + + latin7 + 1 - - utf8 + + latin7 - - utf8 + + macce - - utf8 + + macce + 1 - - utf8 + + macroman - - utf8 + + macroman + 1 - - utf8 + + sjis - - utf8 + + sjis + 1 - - utf8 + + swe7 - - utf8 + + swe7 + 1 - - utf8 + + tis620 - - utf8 + + tis620 + 1 - + ucs2 - 1 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 + 1 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - + ucs2 - - cp866 + + ujis + + + ujis 1 - - cp866 + + utf16 - - keybcs2 - 1 + + utf16 - - keybcs2 + + utf16 - - macce + + utf16 + + + utf16 + + + utf16 + + + utf16 1 - - macce + + utf16 - - macroman + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16le + + + utf16le 1 - - macroman + + utf32 - - cp852 + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 1 - - cp852 + + utf32 - - latin7 + + utf32 - - latin7 + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 1 - - latin7 + + utf8mb3 - - latin7 + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 - + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + + utf8mb3 + + utf8mb4 1 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - + utf8mb4 - - cp1251 - - - cp1251 - - - cp1251 - - - cp1251 - 1 - - - cp1251 - - - utf16 - 1 - - - utf16 - - - utf16 - - - utf16 - - - utf16 - - - utf16 - - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16 + + utf8mb4 - - utf16le - 1 + + utf8mb4 - - utf16le + + utf8mb4 - - cp1256 - 1 + + utf8mb4 - - cp1256 + + utf8mb4 - - cp1257 + + utf8mb4 - - cp1257 + + utf8mb4 - - cp1257 - 1 + + utf8mb4 - - utf32 - 1 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - utf32 + + utf8mb4 - - binary - 1 + + utf8mb4 - - geostd8 - 1 + + utf8mb4 - - geostd8 + + utf8mb4 - - cp932 - 1 + + utf8mb4 - - cp932 + + utf8mb4 - - eucjpms - 1 + + utf8mb4 - - eucjpms + + utf8mb4 - - gb18030 - 1 + + utf8mb4 - - gb18030 + + utf8mb4 - - gb18030 + + utf8mb4 - - utf8_general_ci + + utf8mb4_0900_ai_ci - - latin1_swedish_ci + + utf8mb4_0900_ai_ci - - utf8_general_ci + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb3_general_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci - - latin1_swedish_ci + + utf8mb4_0900_ai_ci - - utf8_general_ci + + utf8mb4_0900_ai_ci - - utf8mb4_general_ci + + utf8mb4_0900_ai_ci - - utf8mb4_unicode_ci + + utf8mb4_0900_ai_ci - + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + utf8mb4_0900_ai_ci + + + 0 + localhost + caching_sha2_password + + + 0 localhost + caching_sha2_password - + + 0 localhost + caching_sha2_password - + localhost + caching_sha2_password - + root@localhost procedure 320 - + root@localhost procedure 196 - + root@localhost procedure 199 - + root@localhost procedure 184 - +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- +
InnoDButf8mb4_0900_ai_ci
- + varchar(30)|0s 1 - + timestamp|0s 2 - + varchar(20)|0s 3 - + int|0s 4 - + float|0s 5 - + varchar(10)|0s 1 - + int|0s 2 - + varchar(10)|0s 1 - + int|0s 2 - + varchar(30)|0s 1 - + timestamp|0s 2 - + varchar(20)|0s 3 - + int|0s 4 - + float|0s 5 - + varchar(20)|0s 1 1 - + varchar(20)|0s 2 - + float|0s 3 - + float|0s 4 - + int|0s 5 - + int|0s 6 - + int|0s 7 - + varchar(20)|0s 8 - + varchar(20)|0s 9 - + float|0s 10 - + int|0s 0 11 - + supplyId id supplierinf - + id2 id prodcatalog - + id btree 1 - + name btree 1 - + supplyId btree - + id2 btree - + 1 1 PRIMARY - + name - + varchar(30)|0s 1 1 - + float|0s 2 - + timestamp|0s 3 - + varchar(15)|0s 4 - + int|0s 2 5 - + int|0s 1 6 - + iNumber btree 1 - + 1 1 PRIMARY - + varchar(30)|0s 1 - + varchar(20)|0s 2 - + int|0s 3 - + float|0s 4 - + iNumber iNumber inorder - + iNumber btree - + varchar(20)|0s 1 1 - + varchar(20)|0s 2 - + float|0s 3 - + float|0s 4 - + int|0s 5 - + int|0s 6 - + int|0s 7 - + varchar(20)|0s 8 - + varchar(20)|0s 9 - + float|0s 10 - + int|0s 0 11 - + supplyId id supplierinf - + id2 id prodcatalog - + id btree 1 - + name btree 1 - + supplyId btree - + id2 btree - + 1 1 PRIMARY - + name - + varchar(30)|0s 1 1 - + float|0s 2 - + timestamp|0s 3 - + varchar(15)|0s 4 - + int|0s 1 5 - + oNumber btree 1 - + 1 1 PRIMARY - + varchar(30)|0s 1 - + varchar(20)|0s 2 - + int|0s 3 - + float|0s 4 - + oNumber oNumber outorder - + oNumber btree - + varchar(20)|0s 1 1 - + varchar(20)|0s 2 - + id btree 1 - + 1 1 PRIMARY - + varchar(20)|0s 1 1 - + varchar(20)|0s 2 - + float|0s 3 - + float|0s 4 - + int|0s 5 - + int|0s 6 - + int|0s 7 - + varchar(20)|0s 8 - + varchar(20)|0s 9 - + float|0s 10 - + int|0s 1 11 - + id2 id prodcatalog - + id btree 1 - + name btree 1 - + id2 btree - + 1 1 PRIMARY - + name - + varchar(30)|0s 1 - + timestamp|0s 2 - + varchar(20)|0s 3 - + enum('+', '-')|0e 4 - + int|0s 5 - + 8 int|0s 1 1 - + varchar(30)|0s 2 - + varchar(50)|0s 3 - + varchar(11)|0s 4 - + varchar(50)|0s 5 - + int|0s 1 6 - + id btree 1 - + name btree 1 - + 1 1 PRIMARY - + name - + 5 int|0s 1 1 - + varchar(15)|0s 2 - + varchar(15)|0s 3 - + varchar(20)|0s 1 4 - + varchar(11)|0s 5 - + int|0s 1 6 - + varchar(50)|0s 7 - + int|0s 1 8 - + id btree 1 - + name btree 1 - + 1 1 PRIMARY - + name diff --git a/Supermarket/bin/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.class b/Supermarket/bin/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.class index faf169f7c6c382dc4334b56805955f25419171ef..438114652503985897f3603407bd077e01eaadcf 100644 GIT binary patch delta 701 zcmWNPdrZx77{)(ewJzAvWu3{Ijk#^g7wr;K&^y53gx5(YvihyJ;EyCF}$`FlWtsRix@>Lh9E)iA; zEBRnojPe?5K$IUvIVj3cqWq#wePuk~6!CYxvmcuOr#A9SRKMB6AN~GU;s3*Hpw1Y4 eCWIyvN{b2NvI(Y5b%*Mk!d_v(gnP>3{Qm)w0;&c8 delta 701 zcmWNPSxA&&6o#Kq$!x*QVTKF|iWVr6sGu6soWd5#rirZ7vXZ7KE7KOz46UHeHX24H zGHqH$CdKNX2+A_cB5~-V^`e!cy2-q-h4x zg)CCZXBvg1QO1 zl*No@2@}XxgB)g&i<_l7u~M0Qy)7e8&kB~~Rc?cFo5WIaC#$R-2@d00tFi^eu%15p zXrqWEiW$ykMzWo;lrWAhjAtto*~S#*(v+Ja&K2F1S`TfhCaZ#Ib`h(w`mskU_mapy zhOwVy4lqfhx~L?BLoDQ|G#!%;KkKNHs^c=nrzU=>s-i-y6pv7CdF`3Tby5mz>CGwn zavD1UhH!>aoRg~aQWcWJ7vyYEEgIxth7+qt)XmGTuv4cbWcJQWs{RjJ0!3 zrLJqx77ckr!?nu8TXM9G)!de%JDR6mTJKWLJ*}rx0wSE{z8ZI^c&92xxFX&Z+j!vX zjtlq-65BH$soP_9d%^&olE59SQCz6F zSS%CE`Dm35t})(ED%quypH;G3C401~FO1-;EdHi@_FeP;&_;f$)Gs#jTfhI2@qcx< h{!wQjV0sZUF*KPdnoTre#Vv|k#SSrIVtpk^!T;J9s$Kv9 diff --git a/Supermarket/bin/com/lingnan/supermarket/dialog/UserDialog$MyItemListener.class b/Supermarket/bin/com/lingnan/supermarket/dialog/UserDialog$MyItemListener.class index 17d8f8826a9ebf817fb764a6cfc2fac0a29fc4d1..c9dc4bdd1e282c52e7ae541491143184940c8b1a 100644 GIT binary patch delta 416 zcmXYtIZgvX5Jg{m#&mmTz=JWH*=!8h7>0c}kU@Zm5E6ob6L1V}Fe0!xfCCaN5Sv(X zBu+tsh`0btjR&c_e%0@)`d|HJYN^fFpND5)flY^2Mjgf|Y03^3eDT;jhZ+)W^&D z$94TGn<%PdPh=Hs;vpedR!G$@*|eY%Ojd4DjplPkVoQ^}phI#mZXipyREi#YB}T*V zvdk7d3eT+kb~VVPZqPN{kt9c-*f8wT&wv>5*CZ)Bp3(@9Z2v5Ovy1|D3KUQBqAxP z#GH|rK+L=Vu}*8S*T2@k*82aIeG&Y&r(S;x&%g-NhAGNlN9oaMjV{QK#-$WzhFDe3)ti83)7#m#1xCYr@B!UQd}ib9(xRABv( a(8M)~NW_wUyRbfz)CwBe49RcTVE+MJayqa8 diff --git a/Supermarket/bin/com/lingnan/supermarket/dialog/UserDialog.class b/Supermarket/bin/com/lingnan/supermarket/dialog/UserDialog.class index 1c4ec24e5e83c7aab3110cfab3bbf9c70b65d6b6..c9f09d60bb39ddb321b0315b9f1547a495de92e3 100644 GIT binary patch delta 2166 zcmY*a30PEB6#nmQ_wjg$j0;R^f{MzxK&Ys=6qqT7OIa$VmX;Y7QYvmOlbPm{sl8In zCEB3P9cENY+ZS7G-}eMDTP#~_)Bf`YP`_{H{Qo)cp8L-I@45FaN!^ed+J9otUI0Cn zKL(?)!N5in7h#je113Buli-6I4;gsaz#|48HBfG#Lc))kG>?mULd=t5p3>NC!jCd> zwusrPvCTxw=uF!+b{N=cB7jPnqDqGlHqizV@pj3$-NN=5s1|%$%rj#48rUcJteEG- zJa6Cy!5786B<5uUuL!=X@tTPY>=);CjW9yPUEn~_X>dZIUGrWVF7h$@B zuQpO$v#iWQ34T<_u#dU}_CasJC_%`=b-3R4`Z~wd?OR`0Sy8jP)DHT(CeFkx3qRp! z3rF#bgfqTM@EX_!8ZhVvJqkOXggES{RQB_5ok3PzjD(n2f6| z{Dr?QjKvrhQCC@Bvoc~~A|_b4S{{yb;O>xM*^5ZgG>jvebVp6ypYkK3s2_ zU8WO^fAOD%0v5bmr*yv-g)FLO<(k^?5)0E%XyF7-S_(>O<)V<5ax0IeyvnDLY;TKA z?r15^RVqVFj2Kf)ERJhsSt?F7u~a-|8DaEvH&qEc7a3dJp;0^q3Kz2@U7%JxA}-Ox zL9X9HmgFGU?I73bAmwzBiaAJy9Hb%+QUM34w1X7YL5k=gMVs!Bsr3P_+3~qr2f6n| z6YLVlr(P`fMu*Q}q3i;3FJmQ`O*@BPC4Cohe6Wk(6@fcg4NpM?-Y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3l1x#bK~eP(de!^I*Uqn zh)z}n-Kx=@ta}Z5us`QG=t->$pRCwvig#~(SPtWRh5WrE=u?f{sFJ6Zd^+b&W+Ht_ z@?)5zjIq-c&)3{RzhNr#<_^v+R3!B@$vjOuoF<&3s85a}v6->ACvFWlOoFJ5PJ*z} z8(}Qs00=C`&Cx*+>o^E;oRW3y%X!09O}Q0VOyCb(FoMXRsvyrp!nPOWc}eJ5kmsvG zfA(cSo(#yY4$cqA07v-(g4e;oz$h8;Ik+$&cY|X-h*7?P+>47`=w+lBo^lSkgTX=n z5dTom9t_{Y#qf{t4|QvvsM5%%U1+SR;T_JjvbQz;9W6l7V}$HriFD;35NjEkl(M+sIr{yX@1}fZkIp m>VbRpH^*RFdO7VPf3x)eebX7aUdP{uF+`J5Jy_Og82* z4iWO27d9^)VvISwV%*_16Ja!IGiCF}=B;L0GozVpl)tISs4#+SmGx6RG-wzE|$*7glW3cOnl}Z&du0ImJG}&7Gj4XCyX{nDA4r_h6(6_W7v?_h76Envm5J#tmuN zLMUhq6V#)bPk*U$&JGvs@$Xh%t~vNlUY#dA6-72R`sf#7Nw&$5l}-cF$t8M)oO)0* Xp9T5Eeod$TbZ-124c67;y$9qAQ){zyE*!qw~&AGu>~$zkCI5@bEZUE*f$~hD$7I zVuQU+zO3y?U!W+lluX>(N?EWO>0rVsiDhAcp+Ze^TBSNA?+ml4O0b{8aU~Cu ziWi5iIB!4UACQa2DDN|w-M7@^{D~vbO(U-x>yDDn5V%pLYa`oou)TFuURM-efeJ$)ZqeE$wrh}IrVAOA8~m%d;kCd diff --git a/Supermarket/bin/com/lingnan/supermarket/dialog/UserInfDialog.class b/Supermarket/bin/com/lingnan/supermarket/dialog/UserInfDialog.class index e6049c6a58f0dc4dd41697767acaebbb5449a582..dcbfc2513cd866915d965ef5b44f0f75087922d7 100644 GIT binary patch delta 2281 zcmY*a30PEB6#nmQ_wjfNJY*9WTo8O9qlt!-hG~)-E{TSdX5x}*2Bj$4;-saSS!!cs z*+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aa>dq zE3(*A=CW$SD?IL^--uF<@?9J@R!Gr4Qnrtj>?1ve{C_7Fq9c#*1mvW~=gm#ZA-D1m z%|B!{5oK6_t9Yae3vso7v}!9th%$B)tJ8mEH%V#*9w6|js*WMD+*Oq!5|*s0GEBmK zS5-#pF@QH=V5N?0&hg+6cQGig88tYr<4IoRBZy%aM-n0~hU|+w%EeHR2V4x}QVOic z@Bn&SEv?WpUK#bSqY{>9|A+ z5%ij4B0oH-?Xd}74Nm6nTH-cbgKOz-hZ}GmSqNQOiA7{#bZ1L1CX1kgpMdLm`88Xl zjFHn}No5+FWD`m?E mkYiG*suqzxbsX)lVtjvAC4hUqciqR21YpxQmY<9hq5cC94cw;y diff --git a/Supermarket/bin/com/lingnan/supermarket/view/InView.class b/Supermarket/bin/com/lingnan/supermarket/view/InView.class index c6d8d2280514e980bbebd96d6b71129a6b188284..0cd829743ea0390a798b3e1672f4538e8894ded7 100644 GIT binary patch delta 60 zcmX?=e<**$6mfmN%)H{9{EVXXf|Sg}WJU%-LrX&= QGh+)wQ{&C2#sA9#0HY@q%K!iX delta 68 zcmV-K0K5OfZ_015lovM*b7gL1WpY4qaV}$TZ2sh>*#YF98sS|ZltETn@cuUW({I4hzl;bM)xOkY^MG*_dn;Jd%k<_IdkuKJ+CZ( zQ)`Fs#~6+27>7bkz%0Y*DD<5RE9SuuMTo$BPldx}ajk?8RwD#!&>C)}q6C@PfGljp zD3oG6HeoV0;}dwW5Zh6Pa`oS#WEZ~0ZXCxR{D}RiMFlN5z{WVprZ~hlILde&V{aVi zGc{ty|s zBnIQE$V0W5gll3tYD6)vixs#bN>D5I;n^as{1oJrm_NCd-3Nk*C=~ zo@c7O!jAF|(_}q6>E28qrrX$AZ^175OYEwrvzy+N-Steqq7Pv&J%_#ZeD={@d{r-E zhW-Wn>T8*)Z)SgeCkN<9_?mu(uj|zusMj&eB00#?go7=14zYyu4NEkKdcvb(*m5{@ zj)0vb5ynwy!yLqNG*UPQX&j48<{IOpdwFYiNF`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VMM`AEc=)A|)M e(fQruej!Y8qCQC>9PC788oljAyEV$tDEB{t;%1rv diff --git a/Supermarket/bin/config/jdbc.properties b/Supermarket/bin/config/jdbc.properties index b8fa72c..4e23731 100644 --- a/Supermarket/bin/config/jdbc.properties +++ b/Supermarket/bin/config/jdbc.properties @@ -1,4 +1,4 @@ driver=com.mysql.cj.jdbc.Driver -url=jdbc:mysql://localhost:3306/supermarket +url=jdbc:mysql://localhost:3306/supermarket?serverTimezone=UTC user=root password=040820 \ No newline at end of file diff --git a/Supermarket/src/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.java b/Supermarket/src/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.java index 620a3f3..79185f0 100644 --- a/Supermarket/src/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.java +++ b/Supermarket/src/com/lingnan/supermarket/dao/impl/inOrderServiceImpl.java @@ -52,9 +52,10 @@ public class inOrderServiceImpl implements inOrderService{ try { // 准备SQL语句,根据订单号查找特定的订单 - preparedStatement = conn.prepareStatement("select * from inOrder where iNumber = ?"); + preparedStatement = conn.prepareStatement("select * from inOrder where iNumber = ?"); //根据订单号查询订单 preparedStatement.setString(1, iNumber); // 设置订单号参数 resultSet = preparedStatement.executeQuery(); // 执行查询 + // 设置查询到的订单的属性到InOrder对象中 if (resultSet.next()) { // 如果找到对应记录 // 从结果集中获取属性并设置到inOrder对象 inOrder.setiNumber(resultSet.getString("iNumber")); diff --git a/Supermarket/src/com/lingnan/supermarket/dialog/UserDialog.java b/Supermarket/src/com/lingnan/supermarket/dialog/UserDialog.java index 406dcfc..9d747e8 100644 --- a/Supermarket/src/com/lingnan/supermarket/dialog/UserDialog.java +++ b/Supermarket/src/com/lingnan/supermarket/dialog/UserDialog.java @@ -39,7 +39,7 @@ public class UserDialog extends JDialog implements ActionListener { // 下拉框组件,用于选择用户权限 private JComboBox combo; // 下拉框中的选项内容,包括请选择身份以及不同的权限角色 - private String[] identity = { "请选择身份", "收银员", "管理员", "超级管理员" }; + private String[] identity = { "请选择身份", "进货员","收银员", "管理员", "超级管理员" }; // 构造函数,用于创建添加用户信息的对话框 public UserDialog(JFrame parent) { @@ -168,6 +168,13 @@ public class UserDialog extends JDialog implements ActionListener { } // 内部类,实现了ItemListener接口,用于监听下拉框选项变化事件 + /**、 + * 进行权限的修改 + * 添加进货员权限 + * cwf + * 2024/12/11 + */ + static class MyItemListener implements ItemListener { @Override @@ -182,6 +189,8 @@ public class UserDialog extends JDialog implements ActionListener { sSuper = 2; else if (sSuper1.equals("管理员")) sSuper = 1; + else if (sSuper1.equals("进货员")) // 2024/12/11 添加进货员权限 + sSuper = 3; // 2024/12/11 添加进货员权限 else sSuper = 0; } diff --git a/Supermarket/src/com/lingnan/supermarket/dialog/UserInfDialog.java b/Supermarket/src/com/lingnan/supermarket/dialog/UserInfDialog.java index 2dd01fc..3590fe4 100644 --- a/Supermarket/src/com/lingnan/supermarket/dialog/UserInfDialog.java +++ b/Supermarket/src/com/lingnan/supermarket/dialog/UserInfDialog.java @@ -44,7 +44,7 @@ public class UserInfDialog extends JDialog implements ActionListener { // 下拉框组件,用于选择用户权限(这里部分代码被注释掉,可能原本有完整的权限选择功能,后简化了) private JComboBox combo; // 下拉框中的选项内容,包括当前权限以及不同的权限角色 - private String[] identity = { "当前权限", "收银员", "管理员", "超级管理员" }; + private String[] identity = { "当前权限", "进货员","收银员", "管理员", "超级管理员" }; // 父窗口JFrame的引用,可能用于在某些操作后对父窗口进行处理 private JFrame JFrame; @@ -189,6 +189,14 @@ public class UserInfDialog extends JDialog implements ActionListener { } // 内部类,实现了ItemListener接口,用于监听下拉框选项变化事件(这里部分代码被注释掉,可能原本有完整的权限选择功能,后简化了) + + /** + * cwf 2024/12/11 + * 添加了进货员的信息 + * sSuper1.equals("进货员") + * sSuper = 3; + */ + public class MyItemListener implements ItemListener { @Override @@ -198,13 +206,15 @@ public class UserInfDialog extends JDialog implements ActionListener { // 获取当前选中的下拉框选项内容 String sSuper1 = (String) cb.getSelectedItem(); if (sSuper1.equals("当前权限")) - sSuper = user.getUsuper(); + sSuper = user.getUsuper(); // 保持原权限 else if (sSuper1.equals("收银员")) - sSuper = 2; - else if (sSuper1.equals("管理员")) + sSuper = 2; // 收银员权限 + else if (sSuper1.equals("管理员")) // 新增权限角色 sSuper = 1; - else - sSuper = 0; + else if (sSuper1.equals("进货员")) // 新增权限角色 + sSuper = 3; + else + sSuper = 0; // 超级管理员 } } } \ No newline at end of file diff --git a/Supermarket/src/com/lingnan/supermarket/view/InView.java b/Supermarket/src/com/lingnan/supermarket/view/InView.java index 6738cf3..3a2e30d 100644 --- a/Supermarket/src/com/lingnan/supermarket/view/InView.java +++ b/Supermarket/src/com/lingnan/supermarket/view/InView.java @@ -486,7 +486,7 @@ public class InView extends JPanel implements ActionListener{ CreateOrder createOrder = new CreateOrder(); String OrderText = createOrder.CreateOrder(v, s[0], s[1], allPrice,uname); try {/*发送邮件*/ - SendQQMailUtil QQEmail = new SendQQMailUtil("sender@qq.com","自行获取 SMTP 授权码","receiver@qq.com","@新民超市进货需求申请",OrderText); + SendQQMailUtil QQEmail = new SendQQMailUtil("cwfeng5@qq.com","wlcinslohrgpdiac","1912638153@qq.com","@新民超市进货需求申请",OrderText); } catch (MessagingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); diff --git a/Supermarket/src/com/lingnan/supermarket/view/MainView.java b/Supermarket/src/com/lingnan/supermarket/view/MainView.java index 2d25fde..6aff0af 100644 --- a/Supermarket/src/com/lingnan/supermarket/view/MainView.java +++ b/Supermarket/src/com/lingnan/supermarket/view/MainView.java @@ -41,77 +41,77 @@ import com.lingnan.supermarket.view.base.BaseView; import java.awt.*; public class MainView extends BaseView implements ActionListener, MouseListener,WindowListener{ - - + + JMenuBar menuBar; JMenu settingMenu,helpMenu; - + JMenuItem skinMenuItem,configMenuItem; - - + + JSplitPane containerPanel; - + CardLayout rightPanelLayout; JPanel leftPanel,rightPanel; - + /*菜单栏*/ JLabel logoLabel,userMenuLabel1,homeMenuLabel,userMenuLabel,inMenuLabel, - outMenuLabel,storageMenuLabel,supplierMenuLabel,catalogMenuLabel; - + outMenuLabel,storageMenuLabel,supplierMenuLabel,catalogMenuLabel; + static JLabel remindMenuLabel;/*全局调用刷新*/ - + JPanel bottomPanel; - + JLabel timeLabel; - + JPanel purposePanel,timePanel; JLabel purposeLabel; - - + + JButton saveBtn,unSaveBtn,cancleBtn;/*退出时按钮*/ - + // Timer timer; - + private User user ;/*从登录界面传过来的用户信息*/ - + private BufferImpl bufferImpl; - + private Image bgImage ; private String iconSkin; private int skin; - + private Vector vP=new Vector() ;/*用于进货缓存*/ - + private int location; private int sSuper=-1;//界面权限 - + private static inOrderServiceImpl inOrderImpl = new inOrderServiceImpl(); private static int unConfirmmark;/*未确认订单*/ - + public MainView(User user,int skin,String iconSkin) { super(1300,850,"新民超市管理系统欢迎您",user,skin); timer = new Timer(1000,this); timer.start(); this.user = user; - + this.sSuper=user.getUsuper();//界面权限 System.out.println("userid="+user.getId()); this.addWindowListener(this); - + this.skin = skin; this.iconSkin = iconSkin; ImageIcon icon=new ImageIcon(iconSkin); //xxx代表图片存放路径,2.png图片名称及格式 this.setIconImage(icon.getImage()); - + //获得未进货的信息 Vector vInOrder; vInOrder = inOrderImpl.findUnconfirmInOrder(); unConfirmmark=vInOrder.size(); - + initView(user,skin); } @@ -120,50 +120,49 @@ public class MainView extends BaseView implements ActionListener, MouseListener, timer = new Timer(1000,this); timer.start(); this.user = user; - + this.sSuper=user.getUsuper();//界面权限 System.out.println("userid="+user.getId()); this.addWindowListener(this); - - + //获得未进货的信息 Vector vInOrder; vInOrder = inOrderImpl.findUnconfirmInOrder(); unConfirmmark=vInOrder.size(); - + initView(user,skin); } - + public static void refreshRemind() { Vector vInOrder; vInOrder = inOrderImpl.findUnconfirmInOrder(); unConfirmmark=vInOrder.size(); remindMenuLabel.setText("待确认进货:"+unConfirmmark); } - - - - + + + + /* public static User getUserInf() { return user; }*/ @Override protected void initView(User user,int skin) { - - - - + + + + /*菜单栏*/ menuBar = new JMenuBar(); - + settingMenu = new JMenu("设置"); - + helpMenu = new JMenu("帮助"); - + skinMenuItem = new JMenuItem("随机切换皮肤",new ImageIcon("static\\icon\\skin.png")); /* for(int i = 3;i<9;i++) { @@ -171,36 +170,36 @@ public class MainView extends BaseView implements ActionListener, MouseListener, }*/ configMenuItem = new JMenuItem("参数设置",new ImageIcon("static\\icon\\setting.png")); skinMenuItem.addActionListener(this); - + settingMenu.add(configMenuItem); settingMenu.add(skinMenuItem); menuBar.add(settingMenu); menuBar.add(helpMenu); - + setJMenuBar(menuBar); - + /*左边菜单栏设置*/ - - + + try { bgImage = ImageIO.read(new File("static\\bg\\bg"+skin+".jpg")); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } - + leftPanel = new BGPanel(bgImage);/*皮肤*/ leftPanel.setLayout(null); - + /*菜单栏:用户登录信息*/ System.out.println("用户头像地址=="+user.getImg()); JLabel logoLabel = new JLabel(new ImageIcon(user.getImg()),JLabel.LEFT); System.out.println(user.getImg()); leftPanel.add(logoLabel); logoLabel.setBounds(25, 30,150,150); - + /*账号名字*/ String x = UsuperIcon(user.getUsuper());/*判断权限返回icon地址*/ System.out.println("身份地址:"+x); @@ -210,9 +209,9 @@ public class MainView extends BaseView implements ActionListener, MouseListener, userMenuLabel1.setBounds(20, 170,180,32); userMenuLabel1.setForeground(Color.white); leftPanel.add(userMenuLabel1);/*添加用户选项到菜单栏*/ - - - + + + /*菜单栏:首页*/ homeMenuLabel = new JLabel("新民首页",new ImageIcon("static\\icon\\home1.png"),JLabel.LEFT); homeMenuLabel.setFont(FontUtil.menuFont); @@ -220,9 +219,9 @@ public class MainView extends BaseView implements ActionListener, MouseListener, homeMenuLabel.setBounds(20, 250,150,32); homeMenuLabel.setForeground(Color.white); leftPanel.add(homeMenuLabel);/*添加用户选项到菜单栏*/ - - - + + + /*菜单栏:人员管理*/ userMenuLabel = new JLabel("人员管理",new ImageIcon("static\\icon\\user1.png"),JLabel.LEFT); userMenuLabel.setFont(FontUtil.menuFont); @@ -230,7 +229,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, userMenuLabel.setBounds(20, 300,150,32); userMenuLabel.setForeground(Color.white); leftPanel.add(userMenuLabel);/*添加用户选项到菜单栏*/ - + /*菜单栏:进货系统*/ inMenuLabel = new JLabel("进货系统",new ImageIcon("static\\icon\\in1.png") ,JLabel.LEFT); inMenuLabel.setFont(FontUtil.menuFont); @@ -238,7 +237,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, inMenuLabel.setBounds(20, 350,150,32); inMenuLabel.setForeground(Color.white); leftPanel.add(inMenuLabel); - + /*菜单栏:收银系统*/ outMenuLabel = new JLabel("收银系统",new ImageIcon("static\\icon\\out1.png") ,JLabel.LEFT); outMenuLabel.setFont(FontUtil.menuFont); @@ -246,7 +245,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, outMenuLabel.setBounds(20, 400,150,32); outMenuLabel.setForeground(Color.white); leftPanel.add(outMenuLabel); - + /*菜单栏:库存*/ storageMenuLabel = new JLabel("商品库存",new ImageIcon("static\\icon\\storage1.png") ,JLabel.LEFT); storageMenuLabel.setFont(FontUtil.menuFont); @@ -254,7 +253,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, storageMenuLabel.setBounds(20, 450,150,32); storageMenuLabel.setForeground(Color.white); leftPanel.add(storageMenuLabel); - + /*菜单栏:供应商*/ supplierMenuLabel = new JLabel("供应商",new ImageIcon("static\\icon\\supplier1.png") ,JLabel.LEFT); supplierMenuLabel.setFont(FontUtil.menuFont); @@ -262,7 +261,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, supplierMenuLabel.setBounds(20, 500,150,32); supplierMenuLabel.setForeground(Color.white); leftPanel.add(supplierMenuLabel); - + /*菜单栏:商品目录*/ catalogMenuLabel = new JLabel("商品目录",new ImageIcon("static\\icon\\catalog1.png") ,JLabel.LEFT); catalogMenuLabel.setFont(FontUtil.menuFont); @@ -270,7 +269,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, catalogMenuLabel.setBounds(20,550,150,32); catalogMenuLabel.setForeground(Color.white); leftPanel.add(catalogMenuLabel); - + /*提醒进货确认模块*/ remindMenuLabel = new JLabel("待确认进货:"+unConfirmmark,new ImageIcon("static\\icon\\remind1.png") ,JLabel.LEFT); remindMenuLabel.setFont(FontUtil.remindFont); @@ -278,37 +277,37 @@ public class MainView extends BaseView implements ActionListener, MouseListener, remindMenuLabel.setBounds(0,650,200,32); remindMenuLabel.setForeground(Color.white); leftPanel.add(remindMenuLabel); - - + + rightPanelLayout = new CardLayout(); - + //0.超市首页展示 JPanel homePanel = new HomeView(this); - + //1.用户管理界面:用户的列表 JPanel userPanel = new UserView(this); - + //2.进货系统界面 JPanel inPanel = new InView(this,user,vP,1); - + //3收银系统界面 JPanel outPanel = new OutView(this,user); - + //4.库存系统界面 JPanel storagePanel = new StorageView(this); - + //5.供应商界面 JPanel supplierPanel = new SupplierView(this); - + //6商品目录界面 JPanel ProdCatalogPanel = new ProdCatalogView(this); //7商品目录界面 JPanel superPanel = new SuperView(this); - + //8进货信息提示 JPanel inPanel2 = new InView(this,user,vP,0); - + /*添加界面并给索引*/ rightPanel = new JPanel(rightPanelLayout); rightPanel.add(homePanel, "0"); @@ -320,29 +319,29 @@ public class MainView extends BaseView implements ActionListener, MouseListener, rightPanel.add(ProdCatalogPanel, "6"); rightPanel.add(superPanel, "7"); rightPanel.add(inPanel2, "8"); - - + + containerPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,leftPanel,rightPanel); containerPanel.setDividerLocation(180); containerPanel.setDividerSize(0); - + bottomPanel = new JPanel();//默认的布局是流式布局 - + bottomPanel.setBackground(Color.WHITE); bottomPanel.setLayout(new BorderLayout()); - + purposePanel = new JPanel(); purposePanel.setLayout(new FlowLayout(FlowLayout.LEFT)); purposePanel.setBackground(Color.WHITE); purposeLabel = new JLabel("当前位置是:超市首页"); purposePanel.add(purposeLabel); - + timePanel=new JPanel(); timePanel.setLayout(new FlowLayout(FlowLayout.TRAILING)); timePanel.setBackground(Color.WHITE); timeLabel = new JLabel(DateUtil.dateToString(new Date(),null)); timePanel.add(timeLabel); - + bottomPanel.add(purposePanel,"West"); bottomPanel.add(timePanel,"East"); Container container = getContentPane(); @@ -361,96 +360,153 @@ public class MainView extends BaseView implements ActionListener, MouseListener, this.dispose(); new MainView(user,skin,iconSkin); } - + } - @Override/*左侧菜单栏点击事件*/ + + /** + * cwf 2024/12/11 + * 修改不同权限用户的功能代码 + */ + + @Override + /* 左侧菜单栏点击事件 */ public void mouseClicked(MouseEvent e) { - Object source = e.getSource(); - if(source==homeMenuLabel) { - rightPanelLayout.show(rightPanel,"0"); - location=0; - }else if(source==userMenuLabel) { - if(sSuper==0) - rightPanelLayout.show(rightPanel,"1"); - else{ - rightPanelLayout.show(rightPanel,"7"); + Object source = e.getSource(); // 获取点击事件的来源 + + // 如果点击的是首页菜单 + if (source == homeMenuLabel) { + rightPanelLayout.show(rightPanel, "0"); // 显示首页界面 + location = 0; // 设置当前位置为首页 + } + // 如果点击的是人员管理菜单 + else if (source == userMenuLabel) { + // 如果用户是管理员 (sSuper == 0) 或进货员 (sSuper == 1) + if (sSuper == 0 || sSuper == 1) { + rightPanelLayout.show(rightPanel, "1"); // 显示人员管理界面 + } + // 如果用户是普通用户 (sSuper == 3) + else if (sSuper == 3) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如普通用户权限) + else { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + location = 1; // 设置当前位置为人员管理 + } + // 如果点击的是进货系统菜单 + else if (source == inMenuLabel) { + // 如果用户是普通用户 (sSuper == 2) 或进货员 (sSuper == 1) + if (sSuper == 2 || sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "2"); // 显示进货系统界面 } - location=1; + location = 2; // 设置当前位置为进货系统 } - else if(source==inMenuLabel) { - if(sSuper==2) - rightPanelLayout.show(rightPanel,"7"); - else{ - rightPanelLayout.show(rightPanel,"2"); - + // 如果点击的是收银系统菜单 + else if (source == outMenuLabel) { + // 如果用户是普通用户 (sSuper == 3) 或进货员 (sSuper == 1) + if (sSuper == 3 || sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "3"); // 显示收银系统界面 + location = 3; // 设置当前位置为收银系统 } - location=2; } - else if(source==outMenuLabel) { - rightPanelLayout.show(rightPanel,"3"); - location=3; + // 如果点击的是库存系统菜单 + else if (source == storageMenuLabel) { + // 如果用户是进货员 (sSuper == 1) + if (sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "4"); // 显示库存系统界面 + location = 4; // 设置当前位置为库存系统 + } } - else if(source==storageMenuLabel) { - rightPanelLayout.show(rightPanel,"4"); - location=4; + // 如果点击的是供应商菜单 + else if (source == supplierMenuLabel) { + // 如果用户是进货员 (sSuper == 1) + if (sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "5"); // 显示供应商界面 + location = 5; // 设置当前位置为供应商 + } } - else if(source==supplierMenuLabel) { - rightPanelLayout.show(rightPanel,"5"); - - location=5; - + // 如果点击的是商品目录菜单 + else if (source == catalogMenuLabel) { + // 如果用户是进货员 (sSuper == 1) + if (sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 + } + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "6"); // 显示商品目录界面 + location = 6; // 设置当前位置为商品目录 + } } - else if(source==catalogMenuLabel) { - rightPanelLayout.show(rightPanel,"6"); - location=6; - - }else if(source==remindMenuLabel) { - if(sSuper==2) - rightPanelLayout.show(rightPanel,"7"); - else{ - rightPanelLayout.show(rightPanel,"8"); + // 如果点击的是提醒菜单 + else if (source == remindMenuLabel) { + // 如果用户是普通用户 (sSuper == 2) 或进货员 (sSuper == 1) + if (sSuper == 2 || sSuper == 1) { + rightPanelLayout.show(rightPanel, "7"); // 显示普通用户界面 } - location=7; - }else if(source==userMenuLabel1){ - - UserInfDialog userInfDialog = new UserInfDialog(this,user); - userInfDialog.setVisible(true); - location=8; + // 其他情况(例如管理员权限) + else { + rightPanelLayout.show(rightPanel, "8"); // 显示进货信息提示界面 + } + location = 7; // 设置当前位置为提醒 + } + // 如果点击的是用户信息菜单 + else if (source == userMenuLabel1) { + UserInfDialog userInfDialog = new UserInfDialog(this, user); // 创建用户信息对话框 + userInfDialog.setVisible(true); // 显示用户信息对话框 + location = 8; // 设置当前位置为用户信息 } - - refreshRemove(); + + refreshRemove(); // 刷新当前界面的位置信息 } + //获取当前位置 - public void refreshRemove(){ + public void refreshRemove(){ - purposePanel.removeAll(); - if(location==0){ - purposeLabel = new JLabel("当前位置是:"+homeMenuLabel.getText()); - - }else if(location==1){ - purposeLabel = new JLabel("当前位置是:"+userMenuLabel.getText()); - - }else if(location==2){ - purposeLabel = new JLabel("当前位置是:"+inMenuLabel.getText()); - - }else if(location==3){ - purposeLabel = new JLabel("当前位置是:"+outMenuLabel.getText()); - - }else if(location==4){ - purposeLabel = new JLabel("当前位置是:"+storageMenuLabel.getText()); - - }else if(location==5){ - purposeLabel = new JLabel("当前位置是:"+supplierMenuLabel.getText()); - - }else{ - purposeLabel = new JLabel("当前位置是:"+catalogMenuLabel.getText()); - } - - purposePanel.add(purposeLabel); - + purposePanel.removeAll(); + if(location==0){ + purposeLabel = new JLabel("当前位置是:"+homeMenuLabel.getText()); + + }else if(location==1){ + purposeLabel = new JLabel("当前位置是:"+userMenuLabel.getText()); + + }else if(location==2){ + purposeLabel = new JLabel("当前位置是:"+inMenuLabel.getText()); + + }else if(location==3){ + purposeLabel = new JLabel("当前位置是:"+outMenuLabel.getText()); + + }else if(location==4){ + purposeLabel = new JLabel("当前位置是:"+storageMenuLabel.getText()); + + }else if(location==5){ + purposeLabel = new JLabel("当前位置是:"+supplierMenuLabel.getText()); + + }else{ + purposeLabel = new JLabel("当前位置是:"+catalogMenuLabel.getText()); } + purposePanel.add(purposeLabel); + + } + @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub @@ -460,9 +516,9 @@ public class MainView extends BaseView implements ActionListener, MouseListener, @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub - + } - + @Override/*鼠标焦点时*/ public void mouseEntered(MouseEvent e) { Object source = e.getSource(); @@ -488,21 +544,19 @@ public class MainView extends BaseView implements ActionListener, MouseListener, }else if(source==catalogMenuLabel) { catalogMenuLabel.setForeground(new Color(18, 150, 219)); catalogMenuLabel.setIcon(new ImageIcon("static\\icon\\catalog2.png")); - } - else if(source==userMenuLabel1) { + } else if(source==userMenuLabel1) { userMenuLabel1.setForeground(new Color(18, 150, 219)); - - } + + } } @Override public void mouseExited(MouseEvent e) { - Object source = e.getSource(); + Object source = e.getSource(); if(source==homeMenuLabel) { homeMenuLabel.setForeground(Color.white); homeMenuLabel.setIcon(new ImageIcon("static\\icon\\home1.png")); - } - else if(source==userMenuLabel) { + } else if(source==userMenuLabel) { userMenuLabel.setForeground(Color.white); userMenuLabel.setIcon(new ImageIcon("static\\icon\\user1.png")); }else if(source==inMenuLabel) { @@ -520,31 +574,30 @@ public class MainView extends BaseView implements ActionListener, MouseListener, }else if(source==catalogMenuLabel) { catalogMenuLabel.setForeground(Color.white); catalogMenuLabel.setIcon(new ImageIcon("static\\icon\\catalog1.png")); - } - else { + } else { userMenuLabel1.setForeground(Color.white); - - } - + + } + } @Override protected void initView() { // TODO Auto-generated method stub - + } @Override public void windowOpened(WindowEvent e) { // TODO Auto-generated method stub - + } @Override public void windowClosing(WindowEvent e) { // TODO Auto-generated method stub - Object source = e.getSource(); + Object source = e.getSource(); if(source==this) {/*关闭窗口时检查进货系统和出货系统是否还有记录*/ this.vP =InView.getVector(); System.out.println("v的size="+vP.size()); @@ -554,7 +607,7 @@ public class MainView extends BaseView implements ActionListener, MouseListener, closeDialog.setVisible(true); }else System.exit(0); - + } } @@ -562,31 +615,31 @@ public class MainView extends BaseView implements ActionListener, MouseListener, @Override public void windowClosed(WindowEvent e) { // TODO Auto-generated method stub - + } @Override public void windowIconified(WindowEvent e) { // TODO Auto-generated method stub - + } @Override public void windowDeiconified(WindowEvent e) { // TODO Auto-generated method stub - + } @Override public void windowActivated(WindowEvent e) { // TODO Auto-generated method stub - + } @Override public void windowDeactivated(WindowEvent e) { // TODO Auto-generated method stub - + }