Просмотр исходного кода

推送卫健委,必须满足两个条件:带icd编码;已生成电子处方签;

yh 5 дней назад
Родитель
Сommit
8c6bf6f89b

+ 3 - 0
fs-service/src/main/java/com/fs/his/mapper/FsPrescribeMapper.java

@@ -289,4 +289,7 @@ public interface FsPrescribeMapper
 
     @Select("select count(1) from fs_prescribe where inquiry_order_id = #{orderId}")
     int selectByOrderId(Long orderId);
+
+    @Select("select * from fs_prescribe where store_order_id = #{orderId}")
+    FsPrescribe getBYOrderId(Long orderId);
 }

+ 14 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsStoreSubOrderServiceImpl.java

@@ -38,6 +38,7 @@ import com.fs.wjw.dto.UploadFurtherConsultNewDto;
 import com.fs.wjw.dto.UploadRecipeNewDto;
 import com.qcloud.cos.transfer.Copy;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.util.EntityUtils;
@@ -635,7 +636,6 @@ public class FsStoreSubOrderServiceImpl implements IFsStoreSubOrderService
     private FsSubOrderResultVO tuiFsStoreSubOrderByStoreOrderAndJN(Long orderId){
         FsStoreSubOrder fsStoreSubOrder = fsStoreSubOrderMapper.selectFsStoreSubOrderBySubOrderId(orderId);
         FsSubOrderResultVO fsSubOrderResultVO = new FsSubOrderResultVO();
-
         Integer isPush = fsStoreSubOrder.getIsPush();
         if (isPush==1){
             fsSubOrderResultVO.setCode(0);
@@ -650,6 +650,19 @@ public class FsStoreSubOrderServiceImpl implements IFsStoreSubOrderService
             return fsSubOrderResultVO;
         }
 
+        if (StringUtils.isEmpty(fsStoreSubOrder.getIcdCode())) {
+            fsSubOrderResultVO.setCode(0);
+            fsSubOrderResultVO.setMsg("订单无icd编码");
+            return fsSubOrderResultVO;
+        }
+
+        FsPrescribe fsPrescribe = fsPrescribeMapper.getBYOrderId(fsStoreSubOrder.getOrderId());
+        if (StringUtils.isEmpty(fsPrescribe.getPrescribeImgUrl())){
+            fsSubOrderResultVO.setCode(0);
+            fsSubOrderResultVO.setMsg("订单无电子处方签");
+            return fsSubOrderResultVO;
+        }
+
         try {
             //1.网络咨询服务数据上传-外部
             FsDoctor fsDoctor = fsDoctorMapper.selectFsDoctorByDoctorId(fsStoreSubOrder.getDoctorId());