|
|
@@ -50,6 +50,7 @@ import java.time.Period;
|
|
|
import java.time.ZoneId;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@@ -241,6 +242,18 @@ public class Hospital580FacadeServiceImpl implements Hospital580FacadeService {
|
|
|
.prescriptionStatus(order.getPrescriptionStatus())
|
|
|
.doctorName(order.getDoctorName())
|
|
|
.serialNo(order.getSerialNo())
|
|
|
+ .prescriptionStatusByOrderStatus(Optional.ofNullable(orderService.selectFsStoreOrderById(order.getStoreOrderId()))
|
|
|
+ .map(FsStoreOrderScrm::getStatus)
|
|
|
+ .map(s -> {
|
|
|
+ if (s.equals(0)) {
|
|
|
+ return 1;
|
|
|
+ } else if (s.equals(-3)) {
|
|
|
+ return 3;
|
|
|
+ } else {
|
|
|
+ return 2;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .orElse(0))
|
|
|
.build();
|
|
|
})
|
|
|
.filter(Objects::nonNull)
|