|
@@ -106,9 +106,16 @@ public class PrescriptionServices {
|
|
|
whereSql += " and ( pharmacy_id = ?)";
|
|
|
paramList.add(Integer.parseInt(pharmacyId));
|
|
|
}
|
|
|
+
|
|
|
String deliveryMethod = request.getDeliveryMethod();
|
|
|
if (!Checker.isNull(deliveryMethod)) {
|
|
|
- whereSql += " and ( delivery_method = ?)";
|
|
|
+ int deliveryInt = Integer.parseInt(deliveryMethod);
|
|
|
+ if (deliveryInt == DeliveryMethodEnum.SelfPickUp.getValue()) {
|
|
|
+ whereSql += " and ( (delivery_method = ? ) or (delivery_method is null and source = 1 or source = 4 or source = 5))";
|
|
|
+ } else {
|
|
|
+ whereSql += " and ( delivery_method = ?)";
|
|
|
+ }
|
|
|
+
|
|
|
paramList.add(Integer.parseInt(deliveryMethod));
|
|
|
}
|
|
|
|
|
@@ -387,8 +394,8 @@ public class PrescriptionServices {
|
|
|
map.getStringListSafely(col0).add(p.getOrderNo());
|
|
|
map.getStringListSafely(col1).add(p.getPaymentNo());
|
|
|
int deliveryMethodInt = Checker.getIntegerValue(p.getDeliveryMethod());
|
|
|
- String deliveryMethodStr = getDeliveryMethodStr(deliveryMethodInt);
|
|
|
-// map.getStringListSafely(col2).add(transactionId);
|
|
|
+ String deliveryMethodStr = getAdverDeliveryMethodStr(deliveryMethodInt);
|
|
|
+ map.getStringListSafely(col2).add(deliveryMethodStr);
|
|
|
map.getStringListSafely(col3).add(p.getDoctorName());
|
|
|
map.getStringListSafely(col4).add(p.getPatientName());
|
|
|
String sourceStr = PrescriptionInfoSourceEnum.getSource(p.getSource()).getDisplayName();
|
|
@@ -504,6 +511,21 @@ public class PrescriptionServices {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /*
|
|
|
+ * v4.7.0 所有历史外转处方为邮寄
|
|
|
+ **
|
|
|
+ */
|
|
|
+ private String getAdverDeliveryMethodStr(int value) {
|
|
|
+ if (value == 1) {
|
|
|
+ return "快递";
|
|
|
+ }
|
|
|
+ if (value == 2 || value == 0) {
|
|
|
+ return "自取";
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 公司后台:得到处方状态
|
|
|
* <p>
|
|
@@ -1040,8 +1062,8 @@ public class PrescriptionServices {
|
|
|
map.getStringListSafely(col0).add(p.getOrderNo());
|
|
|
map.getStringListSafely(col1).add(p.getPaymentNo());
|
|
|
int deliveryMethodInt = Checker.getIntegerValue(p.getDeliveryMethod());
|
|
|
- String deliveryMethodStr = getDeliveryMethodStr(deliveryMethodInt);
|
|
|
-// map.getStringListSafely(col2).add(transactionId);
|
|
|
+ String deliveryMethodStr = getAdverDeliveryMethodStr(deliveryMethodInt);
|
|
|
+ map.getStringListSafely(col2).add(deliveryMethodStr);
|
|
|
map.getStringListSafely(col3).add(p.getDoctorName());
|
|
|
map.getStringListSafely(col4).add(p.getPatientName());
|
|
|
String sourceStr = PrescriptionInfoSourceEnum.getSource(p.getSource()).getDisplayName();
|
|
@@ -1202,7 +1224,13 @@ public class PrescriptionServices {
|
|
|
|
|
|
String deliveryMethod = request.getDeliveryMethod();
|
|
|
if (!Checker.isNull(deliveryMethod)) {
|
|
|
- whereSql += " and ( delivery_method = ?)";
|
|
|
+ int deliveryInt = Integer.parseInt(deliveryMethod);
|
|
|
+ if (deliveryInt == DeliveryMethodEnum.SelfPickUp.getValue()) {
|
|
|
+ whereSql += " and ( (delivery_method = ? ) or (delivery_method is null and source = 1 or source = 4 or source = 5))";
|
|
|
+ } else {
|
|
|
+ whereSql += " and ( delivery_method = ?)";
|
|
|
+ }
|
|
|
+
|
|
|
paramList.add(Integer.parseInt(deliveryMethod));
|
|
|
}
|
|
|
|