|
|
@@ -920,6 +920,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
|
|
|
@Override
|
|
|
public R createOrderByPackageOrder(FsPackageOrder packageOrder,HuifuOrderConfirmResult result) {
|
|
|
+ //默认生成处方单
|
|
|
+ boolean isPre = true;
|
|
|
FsPackage fsPackage = fsPackageMapper.selectFsPackageByPackageId(packageOrder.getPackageId());
|
|
|
JSONArray objects = JSONUtil.parseArray(fsPackage.getProductJson());
|
|
|
List<FsPackagePruductDTO> products = JSONUtil.toList(objects, FsPackagePruductDTO.class);
|
|
|
@@ -941,8 +943,13 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
order.setDivAmount(result.getOtherAmount());
|
|
|
}
|
|
|
}
|
|
|
+ FsUserInformationCollection collection = userInformationCollectionMapper.selectByOrderCode(packageOrder.getOrderSn());
|
|
|
+ logger.info("用户采集信息{}:=================>",collection);
|
|
|
+ if (collection != null && collection.getQwTag() == 1) {
|
|
|
+ isPre = false;
|
|
|
+ }
|
|
|
Long prescribeId =null;
|
|
|
- if (productType==1 || productType==2 || productType == 3){
|
|
|
+ if ((productType==1 || productType==2 || productType == 3) && isPre){
|
|
|
if (packageOrder.getDoctorId() == null) {
|
|
|
Long doctorID = iFsDoctorService.selectFsDoctorDoctorByPackage();
|
|
|
packageOrder.setDoctorId(doctorID);
|
|
|
@@ -960,9 +967,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
order.setOrderCode(packageOrder.getOrderSn());
|
|
|
order.setUserId(packageOrder.getUserId());
|
|
|
order.setStoreId(fsPackage.getStoreId());
|
|
|
- FsUserInformationCollection collection = userInformationCollectionMapper.selectByOrderCode(packageOrder.getOrderSn());
|
|
|
- logger.info("用户采集信息{}:=================>",collection);
|
|
|
- if (collection != null) {
|
|
|
+
|
|
|
+ if (collection != null && collection.getQwTag() != 1) {
|
|
|
//是否确认(用户信息采集 为0的不推送到ERP)1推送
|
|
|
order.setIsConfirm(0);
|
|
|
//存入用户信息采集信息 用于第一次医生确认处方修改医生确认状态
|