From 89e4be51725e2043fbccf1c882a96d0ff14bac81 Mon Sep 17 00:00:00 2001 From: arminribic Date: Fri, 17 May 2024 08:04:04 +0200 Subject: [PATCH] #7: (WIP) LockedTreatmentView.fxml angefangen & TreatmentDao angepasst. --- db/nursingHome.db | Bin 28672 -> 28672 bytes .../treatment/database/TreatmentDao.java | 6 ++++-- .../nhplus/treatment/database/Treatment.sql | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/db/nursingHome.db b/db/nursingHome.db index df596e05e2ebebaf5fb16a358f7204e2cf400f90..adcfa93e10fe3076d88d4433914e4fa0ddffa308 100644 GIT binary patch delta 540 zcmYL`L1+{)7=@E&%p{q~WCxT{XSd_p(o)f-x=`>YYP~2ZR_)2+YG>_&JJ#(K5kVVU z@FXbzsZa$yNec@)M-L)`px{NtdTS3NA_x|5qRGS;hB5e+?mI zo4ax5AMCB}SVNW8W69?cwKejVUN{KzauE2MaQL}% zL<(*kY@B{Q%-}?L+pRFsVfq<-4twP_yMqj9p8+k_-7#vAJQUt!aJ_g|@+}VHd2f$C z&frV&mOEw%#B-!)nnA5}MoyB>=uk%tUX|*y(Pct863t2m)$SG9#GRUGHek>lef3@< zOSPr?p;lB|z0dqzpvIA`kO-%(xR%NT8>$&6sYp`uGamlGBd|PUgbx4! delta 492 zcmX|;Pe>GT6vuzRooUA3zj-?lO*X4P7efiu#=?tG>q4D^3M_-jXweZDbXT_VQc#Y2 z=+L3^orF3R9wMR3kMIy=*YF@jr!E;thc0!Nf@Wat!Gp*5eZJp!cq@B!Wsg1${VhU> zoAqHmc{X&mdy9;;UMlY|ao9TXHq~qJ#Yf&`>t?iAW_CJRb@2uJY^`3Nz?-rU*Z422 zs|s(&6*thDKI%4)-5V4mu28dk)+#w?Hq|_(=kX}~J}&qN0=_q(-l-|MBNxPh*bx=} z-IR*&`LXe6Y;HjAa7Ngu(P8UI-tG;V#x825~n$DVN+1 za4PlJN^@e`$@aM+ypOHYb=h@<6P73Tr4BKG8DTllzl^tguF0m=IT@xJw|nN~ zd?9n>fNm>1)B8;>&`yMI2iU9kJwt5R5bzUrVFR{}--j?u)QF{N(u!-zV%$gsd?k`D z#9y%7=5k*>Kpf70||V>uzjkPw?1(msb!&R!Em>Nj=MO9qtq|h&w97T(FHB h9e{#2!~!Jn13m#7Z{j)RDH`8inKJgBKk({m@gGx$b&dc4 diff --git a/src/main/java/de/hitec/nhplus/treatment/database/TreatmentDao.java b/src/main/java/de/hitec/nhplus/treatment/database/TreatmentDao.java index 7867bae..24161a8 100644 --- a/src/main/java/de/hitec/nhplus/treatment/database/TreatmentDao.java +++ b/src/main/java/de/hitec/nhplus/treatment/database/TreatmentDao.java @@ -122,7 +122,8 @@ public class TreatmentDao extends DaoImp { begin = ?, end = ?, description = ?, - remark = ? + remark = ?, + isLocked = ? WHERE id = ? """; PreparedStatement statement = this.connection.prepareStatement(SQL); @@ -131,7 +132,8 @@ public class TreatmentDao extends DaoImp { statement.setString(3, treatment.getEnd()); statement.setString(4, treatment.getDescription()); statement.setString(5, treatment.getRemarks()); - statement.setInt(6, treatment.getId()); + statement.setBoolean(6,treatment.isLocked()); + statement.setInt(7, treatment.getId()); return statement; } diff --git a/src/main/resources/de/hitec/nhplus/treatment/database/Treatment.sql b/src/main/resources/de/hitec/nhplus/treatment/database/Treatment.sql index c5f7bc9..d05436c 100644 --- a/src/main/resources/de/hitec/nhplus/treatment/database/Treatment.sql +++ b/src/main/resources/de/hitec/nhplus/treatment/database/Treatment.sql @@ -8,7 +8,7 @@ CREATE TABLE treatment end TEXT NOT NULL, description TEXT NOT NULL, remark TEXT NOT NULL, - isLocked BOOLEAN NOT NULL DEFAULT FALSE, + isLocked BOOLEAN NOT NULL DEFAULT false, FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE, FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE SET NULL ) \ No newline at end of file