cgp 1 тиждень тому
батько
коміт
de34c6a303

+ 14 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeServiceImpl.java

@@ -1456,7 +1456,7 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
         FsStoreOrder fsStoreOrder =new FsStoreOrder();
         fsStoreOrder.setPrescribeId(rejectDTO.getPrescribeId());
         List<FsStoreOrder> fsStoreOrders = storeOrderMapper.selectFsStoreOrderList(fsStoreOrder);
-        if (CollectionUtils.isEmpty(fsStoreOrders)&& fsStoreOrders.isEmpty()){
+        if (CollectionUtils.isEmpty(fsStoreOrders)){
             log.error("处方订单不存在,处方id:{}",rejectDTO.getPrescribeId());
             throw new CustomException("订单不存在");
         }else {
@@ -1464,11 +1464,21 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
             FsUserInformationCollection fsUserInformationCollection = new FsUserInformationCollection();
             fsUserInformationCollection.setPackageOrderCode(orderCode);
             List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionList(fsUserInformationCollection);
+            Long collectionId;
             if (CollectionUtils.isEmpty(fsUserInformationCollections)){
-                log.error("用户采集信息不存在,处方id:{}",rejectDTO.getPrescribeId());
-                throw new CustomException("用户采集信息不存在");
+                //如果用户信息采集表根据订单号查询没有数据就查询采集进度表
+                FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = new FsUserInformationCollectionSchedule();
+                fsUserInformationCollectionSchedule.setOrderCode(orderCode);
+                List<FsUserInformationCollectionSchedule> fsUserInformationCollectionSchedules = scheduleMapper.selectFsUserInformationCollectionScheduleList(fsUserInformationCollectionSchedule);
+                if (CollectionUtils.isEmpty(fsUserInformationCollectionSchedules)){
+                    log.error("用户信息采集进度不存在,处方id:{}",rejectDTO.getPrescribeId());
+                    throw new CustomException("用户信息采集进度不存在");
+                }else {
+                    collectionId=fsUserInformationCollectionSchedules.get(0).getCollectionId();
+                }
+            }else {
+                collectionId=fsUserInformationCollections.get(0).getId();
             }
-            Long collectionId=fsUserInformationCollections.get(0).getId();
             // 1. 停止采集(状态变更)
             FsUserInformationCollectionSchedule paramCondition=new FsUserInformationCollectionSchedule();
             paramCondition.setRemark("医生拒访:"+rejectDTO.getRemark());