|
@@ -1163,21 +1163,21 @@ public class PrescriptionServices {
|
|
|
}
|
|
|
|
|
|
int hospitalId = authService.getCurrentHospitalId();
|
|
|
- if(hospitalId > 0){
|
|
|
+ if (hospitalId > 0) {
|
|
|
whereSql += " and ( hospital_id = ?)";
|
|
|
paramList.add(hospitalId);
|
|
|
}
|
|
|
|
|
|
+ if (hospitalId == ConstantDef.NFBY_HOSPITAL_ID) {
|
|
|
+ whereSql += " and ( source = 5)";
|
|
|
+ } else if (hospitalId == ConstantDef.TAIHE_HOSPITAL_ID) {
|
|
|
+ whereSql += " and ( source = 4)";
|
|
|
+ }
|
|
|
+
|
|
|
String pharmacyId = request.getPharmacyId();
|
|
|
if (!Checker.isNull(pharmacyId)) {
|
|
|
whereSql += " and ( pharmacy_id = ?)";
|
|
|
paramList.add(Integer.parseInt(pharmacyId));
|
|
|
- } else {
|
|
|
- if (hospitalId == ConstantDef.NFBY_HOSPITAL_ID) {
|
|
|
- whereSql += " and ( pharmacy_id = 26 or pharmacy_id = 28)";
|
|
|
- } else if (hospitalId == ConstantDef.TAIHE_HOSPITAL_ID) {
|
|
|
- whereSql += " and ( pharmacy_id = 26 or pharmacy_id = 27)";
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1509,19 +1509,23 @@ public class PrescriptionServices {
|
|
|
paramList.add(Integer.parseInt(source));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
int hospitalId = authService.getCurrentHospitalId();
|
|
|
+ if (hospitalId == ConstantDef.NFBY_HOSPITAL_ID) {
|
|
|
+ whereSql += " and ( source = 5)";
|
|
|
+ } else if (hospitalId == ConstantDef.TAIHE_HOSPITAL_ID) {
|
|
|
+ whereSql += " and ( source = 4)";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
String pharmacyId = request.getPharmacyId();
|
|
|
if (!Checker.isNull(pharmacyId)) {
|
|
|
whereSql += " and ( pharmacy_id = ?)";
|
|
|
paramList.add(Integer.parseInt(pharmacyId));
|
|
|
- } else {
|
|
|
- if (hospitalId == ConstantDef.NFBY_HOSPITAL_ID) {
|
|
|
- whereSql += " and ( pharmacy_id = 26 or pharmacy_id = 28)";
|
|
|
- } else if (hospitalId == ConstantDef.TAIHE_HOSPITAL_ID) {
|
|
|
- whereSql += " and ( pharmacy_id = 26 or pharmacy_id = 27)";
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
String deliveryMethod = request.getDeliveryMethod();
|
|
|
if (!Checker.isNull(deliveryMethod)) {
|
|
|
whereSql += " and ( delivery_method = ?)";
|