Преглед изворни кода

店铺药品订单售后订单查询优化、申请退款接口逻辑优化,处理支付出现退款申请失败问题

yjwang пре 1 дан
родитељ
комит
d045c5f29b

+ 77 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreAfterSalesItemScrm.java

@@ -3,6 +3,8 @@ package com.fs.hisStore.domain;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 
+import java.util.List;
+
 /**
  * 售后子对象 fs_store_after_sales_item
  * 
@@ -35,6 +37,33 @@ public class FsStoreAfterSalesItemScrm extends BaseEntity
     @Excel(name = "逻辑删除")
     private Integer isDel;
 
+    /**
+     * 上市许可持有人
+     */
+    private String mah;
+    /**
+     * 药品注册证书编号
+     */
+    private String drugRegCertNo;
+
+    /**
+     * 批次号
+     */
+    private String batchNumber;
+
+    /**
+     * 剂型
+     */
+    private String dosageForm;
+
+    /**
+     * 通用名称
+     */
+    private String commonName;
+
+    //子表信息数据集合
+    List<FsStoreAfterSalesItemScrm> fsStoreAfterSalesItemScrms;
+
     public static long getSerialVersionUID() {
         return serialVersionUID;
     }
@@ -47,6 +76,46 @@ public class FsStoreAfterSalesItemScrm extends BaseEntity
         this.id = id;
     }
 
+    public String getMah() {
+        return mah;
+    }
+
+    public void setMah(String mah) {
+        this.mah = mah;
+    }
+
+    public String getDrugRegCertNo() {
+        return drugRegCertNo;
+    }
+
+    public void setDrugRegCertNo(String drugRegCertNo) {
+        this.drugRegCertNo = drugRegCertNo;
+    }
+
+    public String getBatchNumber() {
+        return batchNumber;
+    }
+
+    public void setBatchNumber(String batchNumber) {
+        this.batchNumber = batchNumber;
+    }
+
+    public String getDosageForm() {
+        return dosageForm;
+    }
+
+    public void setDosageForm(String dosageForm) {
+        this.dosageForm = dosageForm;
+    }
+
+    public String getCommonName() {
+        return commonName;
+    }
+
+    public void setCommonName(String commonName) {
+        this.commonName = commonName;
+    }
+
     public Long getStoreAfterSalesId() {
         return storeAfterSalesId;
     }
@@ -86,4 +155,12 @@ public class FsStoreAfterSalesItemScrm extends BaseEntity
     public void setNum(Integer num) {
         this.num = num;
     }
+
+    public List<FsStoreAfterSalesItemScrm> getFsStoreAfterSalesItemScrms() {
+        return fsStoreAfterSalesItemScrms;
+    }
+
+    public void setFsStoreAfterSalesItemScrms(List<FsStoreAfterSalesItemScrm> fsStoreAfterSalesItemScrms) {
+        this.fsStoreAfterSalesItemScrms = fsStoreAfterSalesItemScrms;
+    }
 }

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderScrmMapper.java

@@ -466,7 +466,7 @@ public interface FsStoreOrderScrmMapper
     List<FsPromotionOrderVO> selectFsPromotionOrderListVO(@Param("maps")FsStoreOrderParam param);
 
     @Select({"<script> " +
-            "select o.id,o.order_code,o.item_json,o.pay_price,o.status,o.is_package,o.package_json,o.delivery_id,o.finish_time  from fs_store_order_scrm o  " +
+            "select o.id,o.order_code,o.item_json,o.pay_price,o.status,o.is_package,o.package_json,o.delivery_id,o.finish_time,o.prescribe_id,o.is_prescribe  from fs_store_order_scrm o  " +
             "where o.is_del=0 and o.is_sys_del=0 " +
             "<if test = 'maps.status != null and maps.status != \"\"     '> " +
             "and o.status =#{maps.status} " +

+ 28 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreAfterSalesItemScrmServiceImpl.java

@@ -1,6 +1,13 @@
 package com.fs.hisStore.service.impl;
 
 import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import com.fs.hisStore.domain.FsStoreOrderItemScrm;
+import com.fs.hisStore.mapper.FsStoreProductScrmMapper;
+import com.fs.hisStore.vo.FsStoreProductActivityListVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.fs.hisStore.mapper.FsStoreAfterSalesItemScrmMapper;
@@ -19,6 +26,9 @@ public class FsStoreAfterSalesItemScrmServiceImpl implements IFsStoreAfterSalesI
     @Autowired
     private FsStoreAfterSalesItemScrmMapper fsStoreAfterSalesItemMapper;
 
+    @Autowired
+    private FsStoreProductScrmMapper fsStoreProductScrmMapper;
+
     /**
      * 查询售后子
      * 
@@ -40,7 +50,24 @@ public class FsStoreAfterSalesItemScrmServiceImpl implements IFsStoreAfterSalesI
     @Override
     public List<FsStoreAfterSalesItemScrm> selectFsStoreAfterSalesItemList(FsStoreAfterSalesItemScrm fsStoreAfterSalesItem)
     {
-        return fsStoreAfterSalesItemMapper.selectFsStoreAfterSalesItemList(fsStoreAfterSalesItem);
+        List<FsStoreAfterSalesItemScrm> resList =fsStoreAfterSalesItemMapper.selectFsStoreAfterSalesItemList(fsStoreAfterSalesItem);
+        if (resList == null || resList.isEmpty()) {
+            return resList;
+        }
+        String stringIds = resList.stream().map(item -> item.getProductId().toString()).distinct().collect(Collectors.joining(","));
+        List<FsStoreProductActivityListVO> fsStoreProductActivityListVOS = fsStoreProductScrmMapper.selectFsStoreProductByIds(stringIds);
+        Map<Long, FsStoreProductActivityListVO> mp = fsStoreProductActivityListVOS.stream().collect(Collectors.toMap(FsStoreProductActivityListVO::getProductId, Function.identity(), (existing, replacement) -> existing));
+        for (FsStoreAfterSalesItemScrm item : resList) {
+            FsStoreProductActivityListVO activity = mp.get(item.getProductId());
+            if(null != activity){
+                item.setMah(activity.getMah());
+                item.setDrugRegCertNo(activity.getDrugRegCertNo());
+                item.setBatchNumber(activity.getBatchNumber());
+                item.setDosageForm(activity.getDosageForm());
+                item.setCommonName(activity.getCommonName());
+            }
+        }
+        return resList;
     }
 
     /**

+ 45 - 40
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -3542,6 +3542,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
     }
 
     @Override
+    @Transactional
     public int afterSales(FsStoreOrderSalesParam fsStoreOrderSalesParam) {
         FsStoreOrderScrm order = fsStoreOrderMapper.selectFsStoreOrderById(fsStoreOrderSalesParam.getOrderId());
         if (order.getStatus() < 0) {
@@ -3552,6 +3553,8 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
         fsStoreAfterSales.setStoreId(order.getStoreId());
         fsStoreAfterSales.setRefundAmount(order.getPayMoney());
         fsStoreAfterSales.setCreateTime(DateUtils.getNowDate());
+        fsStoreAfterSales.setOrderCode(order.getOrderCode());
+        fsStoreAfterSales.setStoreId(order.getStoreId());
         if (order.getStatus() == 2 || order.getStatus() == 3) {
             fsStoreAfterSales.setRefundType(0);
         }
@@ -3588,52 +3591,54 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
         logs.setCompanyId(fsStoreOrderSalesParam.getCompanyId());
         logs.setChangeMessage("平台提交售后");
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
-        //判断是否开启erp
-        FsSysConfig sysConfig = configUtil.getSysConfig();
-        Integer erpOpen = sysConfig.getErpOpen();
-        if (erpOpen != null && erpOpen == 1) {
-            //判断erp类型
-            Integer erpType = sysConfig.getErpType();
-            if (erpType != null) {
-
-                IErpOrderService erpOrderService = null;
-                if (erpType == 1) {
-                    //管易
-                    erpOrderService = gyOrderService;
-                } else if (erpType == 2) {
-                    //旺店通
-                    erpOrderService = wdtOrderService;
-                } else if (erpType == 3) {
-                    //瀚智
-                    erpOrderService = hzOMSOrderService;
-                } else if (erpType == 4) {
-                    //瀚智
-                    erpOrderService = dfOrderService;
-                } else if (erpType == 5) {
-                    erpOrderService = jSTOrderService;
-                } else if (erpType == 6) {
-                    erpOrderService = k9OrderService;
-                }
-                if (erpOrderService != null && StringUtils.isNotEmpty(order.getExtendOrderId())) {
-                    if (!order.getExtendOrderId().equals("HIS")) {
-                        if (erpType != 3) {
-                            ErpRefundUpdateRequest request = new ErpRefundUpdateRequest();
-                            request.setTid(order.getOrderCode());
-                            request.setOid(order.getOrderCode());
-                            request.setRefund_state(1);
-                            erpOrderService.refundUpdate(request);
-                        } else {
-                            ErpRefundOrder param = new ErpRefundOrder();
-                            param.setOrderCode(order.getOrderCode());
-                            param.setAfterSalesId(fsStoreAfterSales.getId());
-                            erpOrderService.refundOrder(param);
+            //判断是否开启erp
+            FsSysConfig sysConfig = configUtil.getSysConfig();
+            Integer erpOpen = sysConfig.getErpOpen();
+            if (erpOpen != null && erpOpen == 1) {
+                //判断erp类型
+                Integer erpType = sysConfig.getErpType();
+                if (erpType != null) {
+
+                    IErpOrderService erpOrderService = null;
+                    if (erpType == 1) {
+                        //管易
+                        erpOrderService = gyOrderService;
+                    } else if (erpType == 2) {
+                        //旺店通
+                        erpOrderService = wdtOrderService;
+                    } else if (erpType == 3) {
+                        //瀚智
+                        erpOrderService = hzOMSOrderService;
+                    } else if (erpType == 4) {
+                        //瀚智
+                        erpOrderService = dfOrderService;
+                    } else if (erpType == 5) {
+                        erpOrderService = jSTOrderService;
+                    } else if (erpType == 6) {
+                        erpOrderService = k9OrderService;
+                    }
+                    //避免出现重复推送订单,判断外部订单是否为空//排除聚水谭
+                    if(order.getExtendOrderId() != null && erpType != 5){
+                    if (erpOrderService != null && StringUtils.isNotEmpty(order.getExtendOrderId())) {
+                        if (!order.getExtendOrderId().equals("HIS")) {
+                            if (erpType != 3) {
+                                ErpRefundUpdateRequest request = new ErpRefundUpdateRequest();
+                                request.setTid(order.getOrderCode());
+                                request.setOid(order.getOrderCode());
+                                request.setRefund_state(1);
+                                erpOrderService.refundUpdate(request);
+                            } else {
+                                ErpRefundOrder param = new ErpRefundOrder();
+                                param.setOrderCode(order.getOrderCode());
+                                param.setAfterSalesId(fsStoreAfterSales.getId());
+                                erpOrderService.refundOrder(param);
+                            }
                         }
                     }
                 }
             }
         }
 
-
         order.setStatus(-1);
         order.setRefundStatus(1);
         fsStoreOrderMapper.updateFsStoreOrder(order);

+ 6 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsMyStoreOrderListQueryVO.java

@@ -47,5 +47,11 @@ public class FsMyStoreOrderListQueryVO implements Serializable
 
     private List<FsStoreOrderItemVO> items;
 
+    /**
+     * 处方ID
+     * **/
+    private Long prescribeId;
+
+    private Long isPrescribe;
 
 }

+ 1 - 0
fs-service/src/main/resources/mapper/user/FsUserComplaintMapper.xml

@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFsUserComplaintVoById" parameterType="Long" resultType="com.fs.user.domain.vo.FsUserComplaintVo">
         select c.id, u.nick_name,c.title, c.content, c.images, c.type, c.link_id, c.create_time, c.create_by, c.update_time, c.update_by,
                c.remark,c.complaint_type,c.is_handle_store,c.is_handle_platform,c.is_read_user,c.is_read_store,c.is_read_platform,c.store_id
+               ,c.is_process_completed
         from fs_user_complaint c
                  left join fs_user u on c.fs_user_id = u.user_id
         where c.id = #{id}

+ 16 - 0
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreAfterSalesScrmController.java

@@ -3,14 +3,17 @@ package com.fs.hisStore.controller.store;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.his.vo.FsStoreAfterSalesExcelVO;
 import com.fs.his.vo.FsStoreAfterSalesListVO;
+import com.fs.hisStore.domain.FsStoreAfterSalesItemScrm;
 import com.fs.hisStore.domain.FsStoreAfterSalesScrm;
 import com.fs.his.param.FsStoreAfterSalesParam;
+import com.fs.hisStore.service.IFsStoreAfterSalesItemScrmService;
 import com.fs.hisStore.service.IFsStoreAfterSalesScrmService;
 import com.fs.hisStore.utils.UserUtil;
 import com.fs.hisStore.vo.FsStoreAfterSalesVO;
@@ -34,6 +37,9 @@ public class FsStoreAfterSalesScrmController extends BaseController
     @Autowired
     private IFsStoreAfterSalesScrmService fsStoreAfterSalesService;
 
+    @Autowired
+    private IFsStoreAfterSalesItemScrmService afterSalesItemService;
+
     /**
      * 查询售后记录列表
      */
@@ -183,6 +189,16 @@ public class FsStoreAfterSalesScrmController extends BaseController
         return toAjax(fsStoreAfterSalesService.storeRefundMoney(fsStoreAfterSales));
     }
 
+    //获取关联商品数据信息
+    @GetMapping("/getRelatedProducts/{id}")
+    public R getRelatedProducts(@PathVariable("id") Long id){
+        if(id == null){
+            return R.error("操作失败,查询关键信息不能为空!");
+        }
+        FsStoreAfterSalesItemScrm salesItemScrm=new FsStoreAfterSalesItemScrm();
+        salesItemScrm.setStoreAfterSalesId(id);
+        return R.ok().put("data",afterSalesItemService.selectFsStoreAfterSalesItemList(salesItemScrm));
+    }
 
 
 }

+ 80 - 10
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreOrderScrmController.java

@@ -12,8 +12,13 @@ import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.ParseUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.param.CompanyStoreOrderMoneyLogsListParam;
+import com.fs.company.service.ICompanyMoneyLogsService;
+import com.fs.company.vo.CompanyStoreOrderMoneyLogsVO;
 import com.fs.erp.dto.ErpOrderQueryRequert;
 import com.fs.erp.dto.ErpOrderQueryResponse;
+import com.fs.his.domain.FsStoreOrderScrmComment;
+import com.fs.his.domain.FsUser;
 import com.fs.his.dto.ExpressInfoDTO;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
@@ -21,25 +26,28 @@ import com.fs.his.dto.FsProdItemDTO;
 import com.fs.his.enums.ShipperCodeEnum;
 import com.fs.his.param.FsStoreOrderSalesParam;
 import com.fs.his.service.IFsExpressService;
+import com.fs.his.service.IFsStoreOrderScrmCommentService;
+import com.fs.his.service.IFsUserService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.his.vo.FsStoreOrderExcelVO;
 import com.fs.his.vo.FsStoreOrderStoreExcelVO;
-import com.fs.hisStore.domain.FsStoreOrderItemScrm;
-import com.fs.hisStore.domain.FsStoreOrderLogsScrm;
-import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.domain.*;
 import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
 import com.fs.hisStore.param.FsStoreOrderExpressEditParam;
 import com.fs.hisStore.param.FsStoreOrderParam;
-import com.fs.hisStore.service.IFsStoreOrderScrmService;
+import com.fs.hisStore.service.*;
 import com.fs.hisStore.utils.UserUtil;
+import com.fs.hisStore.vo.FsStoreOrderAuditLogVO;
 import com.fs.hisStore.vo.FsStoreOrderVO;
 import com.fs.hisStore.vo.FsStoreProductDeliverExcelVO;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -52,6 +60,9 @@ import java.util.List;
 @RequestMapping("/store/store/storeOrder")
 public class FsStoreOrderScrmController extends BaseController
 {
+
+    @Autowired
+    private IFsUserService userService;
     @Autowired
     private IFsStoreOrderScrmService fsStoreOrderService;
     @Autowired
@@ -61,6 +72,9 @@ public class FsStoreOrderScrmController extends BaseController
     IErpOrderService erpOrderService;
     @Autowired
     FsStoreOrderItemScrmMapper fsStoreOrderItemMapper;
+
+    @Autowired
+    private IFsStoreOrderItemScrmService orderItemService;
     @Autowired
     private ConfigUtil configUtil;
     @Autowired
@@ -83,6 +97,18 @@ public class FsStoreOrderScrmController extends BaseController
     @Qualifier("k9OrderScrmServiceImpl")
     private IErpOrderService k9OrderService;
 
+    @Autowired
+    private IFsStoreOrderStatusScrmService orderStatusService;
+
+    @Autowired
+    IFsStorePaymentScrmService paymentService;
+
+    @Autowired
+    private ICompanyMoneyLogsService moneyLogsService;
+
+    @Autowired
+    private IFsStoreOrderAuditLogScrmService orderAuditLogService;
+
     /**
      * 查询订单列表
      */
@@ -153,17 +179,50 @@ public class FsStoreOrderScrmController extends BaseController
         return AjaxResult.success(message);
     }
 
+    @Autowired
+    IFsStoreOrderScrmCommentService fsStoreOrderScrmCommentService;
+
     /**
      * 获取订单详细信息
      */
 
     @GetMapping(value = "/{orderId}")
-    public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
-    {
-        FsStoreOrderScrm fsStoreOrder = fsStoreOrderService.selectFsStoreOrderByOrderId(orderId);
-        fsStoreOrder.setUserAddress(ParseUtils.parseAddress(fsStoreOrder.getUserAddress()));
-        fsStoreOrder.setUserPhone(ParseUtils.parsePhone(fsStoreOrder.getUserPhone()));
-        return AjaxResult.success(fsStoreOrder);
+    public R getInfo(@PathVariable("orderId") Long id) {
+        FsStoreOrderScrm order = fsStoreOrderService.selectFsStoreOrderById(id);
+        order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
+        order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
+        //填充用户评论内容
+        FsStoreOrderScrmComment comment = fsStoreOrderScrmCommentService.getCommentByOrderId(order.getId());
+        if(null != comment){
+            order.setCommentContent(comment.getContent());
+            order.setCommentImageUrl(comment.getImageUrl());
+            order.setRating(comment.getRating());
+            order.setMerchantReply(comment.getMerchantReply());
+            order.setCommentTime(comment.getCreateTime());
+            order.setCommentId(comment.getCommentId());
+        }
+        FsUser user = userService.selectFsUserById(order.getUserId());
+        if (user != null) {
+            user.setPhone(ParseUtils.parsePhone(user.getPhone()));
+        }
+        FsStoreOrderItemScrm itemMap = new FsStoreOrderItemScrm();
+        itemMap.setOrderId(order.getId());
+        List<FsStoreOrderItemScrm> items = orderItemService.selectFsStoreOrderItemList(itemMap);
+        FsStoreOrderStatusScrm statusMap = new FsStoreOrderStatusScrm();
+        statusMap.setOrderId(order.getId());
+        List<FsStoreOrderStatusScrm> logs = orderStatusService.selectFsStoreOrderStatusList(statusMap);
+        List<FsStorePaymentScrm> payments=paymentService.selectFsStorePaymentByOrderId(order.getId());
+        List<CompanyStoreOrderMoneyLogsVO> tuiMoneyLogs=new ArrayList<>();
+        if(order.getCompanyId()!=null){
+            CompanyStoreOrderMoneyLogsListParam moneyLogsMap=new CompanyStoreOrderMoneyLogsListParam();
+            moneyLogsMap.setCompanyId(order.getCompanyId());
+            moneyLogsMap.setBusinessId(order.getId().toString());
+            tuiMoneyLogs=moneyLogsService.selectCompanyStoreOrderMoneyLogsList(moneyLogsMap);
+        }
+
+        List<FsStoreOrderAuditLogVO> auditLogs = orderAuditLogService.selectStoreOrderAuditLogVOByOrderId(order.getId());
+        return R.ok().put("order", order).put("items", items).put("logs", logs).put("user", user).put("payments",payments).put("tuiMoneyLogs",tuiMoneyLogs)
+                .put("auditLogs",auditLogs);
     }
 
     /**
@@ -381,4 +440,15 @@ public class FsStoreOrderScrmController extends BaseController
         }
         return null;
     }
+
+    /**
+     * 修改物流
+     * @param fsStoreOrder
+     * @return
+     */
+    @Log(title = "修改物流", businessType = BusinessType.UPDATE)
+    @PutMapping("/editDeliveryId")
+    public AjaxResult editDeliveryId(@RequestBody FsStoreOrderScrm fsStoreOrder) {
+        return toAjax(fsStoreOrderService.updateFsStoreOrder(fsStoreOrder));
+    }
 }

+ 21 - 7
fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

@@ -399,6 +399,8 @@ public class StoreOrderScrmController extends AppBaseController {
             String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
 //          order.setOrderCode(orderCode);
             if (order.getPayType().equals("1") || order.getPayType().equals("2")) {
+                String json = configService.selectConfigByKey(STORE_PAY_CONF);
+                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
                 FsStorePaymentScrm storePayment = new FsStorePaymentScrm();
                 storePayment.setCompanyId(order.getCompanyId());
                 storePayment.setCompanyUserId(order.getCompanyUserId());
@@ -410,6 +412,7 @@ public class StoreOrderScrmController extends AppBaseController {
                 storePayment.setBusinessType(2);
                 storePayment.setRemark("商城订单支付");
                 storePayment.setOpenId(user.getRealName());
+                storePayment.setPayMode(fsPayConfig.getType());
                 storePayment.setUserId(user.getUserId());
                 storePayment.setBusinessOrderId(order.getId().toString());
                 storePayment.setOrderId(order.getId());
@@ -1461,15 +1464,26 @@ public class StoreOrderScrmController extends AppBaseController {
         List<Long> orderIds = orders.stream()
                 .map(FsStoreOrderScrm::getId)
                 .collect(Collectors.toList());
-
-        Map<Long, Long> prescriptionCountMap = orderService.batchGetPrescriptionDrugCount(orderIds);
-        if(prescriptionCountMap != null){
-            for (FsStoreOrderScrm order : orders) {
-                if (prescriptionCountMap.containsKey(BigInteger.valueOf(order.getId())) && order.getPrescribeId() == null) {
-                    return "处方订单未开具,无法支付!";
-                }
+        for (FsStoreOrderScrm order : orders) {
+//                if (prescriptionCountMap.containsKey(BigInteger.valueOf(order.getId())) && order.getPrescribeId() == null) {
+//                    return "处方订单未开具,无法支付!";
+//                }
+            if (order.getIsPrescribe() == 1 && order.getPrescribeId() == null) {
+                return "处方订单未开具,无法支付!";
             }
         }
+
+//        Map<Long, Long> prescriptionCountMap = orderService.batchGetPrescriptionDrugCount(orderIds);
+//        if(prescriptionCountMap != null){
+//            for (FsStoreOrderScrm order : orders) {
+//                if (prescriptionCountMap.containsKey(BigInteger.valueOf(order.getId())) && order.getPrescribeId() == null) {
+//                    return "处方订单未开具,无法支付!";
+//                }
+//                if (order.getIsPrescribe() == 1 && order.getPrescribeId() == null) {
+//                    return "处方订单未开具,无法支付!";
+//                }
+//            }
+//        }
         return null;
     }
 }