ソースを参照

feature: 外转列表,药品下载

wuyongyi 2 年 前
コミット
0d46750779
1 ファイル変更17 行追加13 行削除
  1. 17 13
      src/main/java/com/ywt/mg/services/PrescriptionServices.java

+ 17 - 13
src/main/java/com/ywt/mg/services/PrescriptionServices.java

@@ -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 = ?)";