DYH2020 1 anno fa
parent
commit
fadc9c0fab

+ 9 - 0
src/main/java/com/ywt/mg/services/PharmacyService.java

@@ -169,6 +169,15 @@ public class PharmacyService {
                         paramList.add(statusInt);
                         break;
                 }
+            } else{
+                if (statusInt == 10) {
+                    whereSql += " and ( refund_status = ?  ) ";
+                    paramList.add(RefundStatusEnum.PENDING.getValue());
+                } else {
+                    whereSql += " and ( status = ? and (refund_status != ? or refund_status is null) ) ";
+                    paramList.add(statusInt);
+                    paramList.add(RefundStatusEnum.PENDING.getValue());
+                }
             }
         }
 

+ 2 - 5
src/main/java/com/ywt/mg/services/PrescriptionServices.java

@@ -242,15 +242,12 @@ public class PrescriptionServices {
             int extStatusInt = Integer.parseInt(extStatus);
             switch (extStatusInt) {
                 case 0:
-                    whereSql += " and ( ext_status < ? or ext_status > ? ) and ( ext_status & ? != ? ) ";
-                    paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
-                    paramList.add(2 * PrescriptionInfoExtStatusEnum.Delivered.getValue());
+                    whereSql += " and ( ext_status & ? != ? ) ";
                     paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
                     paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
                     break;
                 case 1:
-                    whereSql += " and ext_status > ? and ( ext_status & ? = ? )";
-                    paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
+                    whereSql += " and ( ext_status & ? = ? ) ";
                     paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
                     paramList.add(PrescriptionInfoExtStatusEnum.Delivered.getValue());
                     break;