mirror of
https://github.com/tiennm99/BSK-All-in-One-Clinic-Management-System.git
synced 2026-10-12 14:14:47 +00:00
[update] Refactor CheckUpPage to separate regular medications and supplements in invoice generation. Update Medicine entity to include supplement flag and adjust database queries accordingly. Enhance error handling for medicine data validation.
This commit is contained in:
1 parent
c4fe96929e
commit
7acda1f4ab
3 files changed
+27
-16
No files matched your search
@@ -374,7 +374,7 @@ public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFram
|
||||
log.debug("Received GetMedInfoRequest");
|
||||
try {
|
||||
ResultSet rs = statement.executeQuery(
|
||||
"select med_id, med_name, med_company, med_description, quantity, med_unit, med_selling_price, preference_note\n" +
|
||||
"select med_id, med_name, med_company, med_description, quantity, med_unit, med_selling_price, preference_note, supplement\n" +
|
||||
" from Medicine"
|
||||
);
|
||||
|
||||
@@ -391,10 +391,11 @@ public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFram
|
||||
String medUnit = rs.getString("med_unit");
|
||||
String medSellingPrice = rs.getString("med_selling_price");
|
||||
String preferenceNote = rs.getString("preference_note");
|
||||
String supplement = rs.getString("supplement");
|
||||
|
||||
|
||||
String result = String.join("|",medId, medName, medCompany, medDescription, quantity, medUnit,
|
||||
medSellingPrice, preferenceNote != null ? preferenceNote : "");
|
||||
medSellingPrice, preferenceNote != null ? preferenceNote : "", supplement != null ? supplement : "0");
|
||||
resultList.add(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user