Explorar el Código

客户信息表制单增加后端校验

cgp hace 1 día
padre
commit
bd29cfbd33

+ 10 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -62,6 +62,7 @@ import com.fs.his.mapper.*;
 import com.fs.his.param.FsStoreOrderSalesParam;
 import com.fs.his.param.FsStoreOrderScheduleStatisticsParam;
 import com.fs.his.service.IFsOrderSopLogService;
+import com.fs.his.service.IFsPrescribeDataScrmService;
 import com.fs.his.service.IFsPrescribeService;
 import com.fs.his.service.IFsUserWatchService;
 import com.fs.his.utils.ConfigUtil;
@@ -351,7 +352,8 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
     @Autowired
     private FsStoreProductAttrValueScrmMapper fsStoreProductAttrValueScrmMapper;
 
-
+    @Autowired
+    private IFsPrescribeDataScrmService prescribeDataScrmService;
 
     @Autowired
     private IFsOrderSopLogService fsOrderSopLogService;
@@ -1665,6 +1667,13 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                 return R.error("处方信息为空,制单失败");
             }
             prescribeId = fsCompanyCustomer.getPrescribeId();
+            FsPrescribeDataScrm prescribeDataScrm = prescribeDataScrmService.selectFsPrescribeDataScrmByPrescribeId(prescribeId);
+            if (prescribeDataScrm == null){
+                return R.error("处方信息为空,制单失败");
+            }
+            if (prescribeDataScrm.getStatus()!=1||prescribeDataScrm.getDoctorConfirm()!=1){
+                return R.error("关联处方还在开方中,制单失败");
+            }
             param.setUserId(1L);
             //保存收货地址
             FsUserAddressScrm address = new FsUserAddressScrm();