Przeglądaj źródła

处方流程完善,商品新增查询字段,处理商品带参数查询异常问题

yjwang 1 tydzień temu
rodzic
commit
4858b3da66

+ 1 - 1
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoRedPackageMapper.java

@@ -73,7 +73,7 @@ public interface FsUserCourseVideoRedPackageMapper
             "ON DUPLICATE KEY UPDATE red_packet_money = VALUES(red_packet_money);")
     void insertOrUpdateFsUserCourseVideoRedPackage(FsUserCourseVideoParam fsUserCourseVideo);
 
-    @Select("select * from fs_user_course_video_red_package where video_id =#{videoId} and company_id = #{companyId} and period_id = #{periodId}")
+    @Select("select * from fs_user_course_video_red_package where video_id =#{videoId} and company_id = #{companyId} and period_id = #{periodId} and del_flag = 0")
     FsUserCourseVideoRedPackage selectRedPacketByCompanyId(@Param("videoId") Long videoId,@Param("companyId") Long companyId, @Param("periodId") Long periodId);
 
     /**

+ 11 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -316,4 +316,15 @@ public class FsStoreProductScrm extends BaseEntity
      */
     private String commentContent;
 
+    /**
+     * 交易类型
+     * **/
+    @TableField(exist = false)
+    private Integer transactionStatus;
+
+    /***
+     * 投诉咨询
+     * **/
+    private String complaint;
+
 }

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

@@ -469,7 +469,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,o.prescribe_id,o.is_prescribe  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,hps.audit_status AS prescriptionAuditStatus  from fs_store_order_scrm o  LEFT JOIN fs_store_hospital580_prescription_scrm hps ON hps.store_order_id = o.id \n" +
             "where o.is_del=0 and o.is_sys_del=0 " +
             "<if test = 'maps.status != null and maps.status != \"\"     '> " +
             "and o.status =#{maps.status} " +

+ 241 - 86
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -72,97 +72,252 @@ public interface FsStoreProductScrmMapper
      * @return 结果
      */
     public int deleteFsStoreProductByIds(Long[] productIds);
-    @Select({"<script> " +
-            "select p.*,pc.cate_name, fs_store.store_name,hs.push_status from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
-            "left join fs_store on fs_store.store_id = p.store_id " +
-            "left join (select product_id, push_status from fs_store_hospital580_product_push_scrm h1 where h1.id = (select max(h2.id) from fs_store_hospital580_product_push_scrm h2 where h2.product_id = h1.product_id)) hs on hs.product_id = p.product_id " +
-            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
-                " inner join fs_store_order_scrm_comment fsosc on FIND_IN_SET(p.product_id,fsosc.product_ids) and fsosc.is_del != 1" +
-            "</if>" +
-            "where 1=1 " +
-            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
-                "and fsosc.comment_content like CONCAT('%',#{maps.commentContent},'%') " +
-            "</if>" +
-            "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
-            "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
-            "</if>" +
-            "<if test = 'maps.cateId != null    '> " +
-            "and (pc.cate_id =#{maps.cateId} or pc.pid=#{maps.cateId} )" +
-            "</if>" +
-            "<if test = 'maps.productType != null    '> " +
-            "and p.product_type =#{maps.productType} " +
-            "</if>" +
-            "<if test = 'maps.isShow != null    '> " +
-            "and p.is_show =#{maps.isShow} " +
-            "</if>" +
-            "<if test = 'maps.companyIds != null and maps.companyIds != \"\" '> " +
-            "and find_in_set(#{maps.companyIds}, p.company_ids) " +
-            "</if>"+
-            "<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
-            "and p.store_id = #{maps.storeId} " +
-            "</if>"+
-            "<if test = 'maps.storeIds != null '>" +
-            "and p.store_id in " +
-            "<foreach collection='maps.storeIds'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach>" +
-            "</if>" +
-            "<if test = 'maps.isAudit != null '> " +
-            "and p.is_audit = #{maps.isAudit} " +
-            "</if>" +
-            "<if test='maps.drugRegCertNo != null and maps.drugRegCertNo != \"\"'>" +
-            "            AND drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
-            "</if>" +
-            "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
-            "    AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
-            "</if>" +
-            "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
-            "    AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
-            "</if>" +
-            "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
-            "    AND unit_price = #{maps.unitPrice}" +
-            "</if>" +
-            "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
-            "    AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
-            "</if>" +
-            "<if test='maps.mah != null and maps.mah != \"\"'>" +
-            "    AND mah LIKE CONCAT('%', #{maps.mah}, '%')" +
-            "</if>" +
-            "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
-            "    AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
-            "</if>" +
-            "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
-            "    AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
-            "</if>" +
-            "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
-            "    AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
-            " </if>" +
-            " <if test='maps.indications != null and maps.indications != \"\"'>" +
-            "     AND indications LIKE CONCAT('%', #{maps.indications}, '%')" +
-            " </if>" +
-            " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
-            "     AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
-            " </if>" +
-            " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
-            "     AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
-            " </if>" +
-            " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
-            "     AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
-            " </if>" +
-            " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
-            "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
-            " </if>"+
-            " <if test='maps.prescribeSpec != null and maps.prescribeSpec != \"\"'>" +
-            "     AND p.prescribe_spec LIKE CONCAT('%', #{maps.prescribeSpec}, '%')" +
-            " </if>"+
-            " order by p.product_id desc "+
-
-            "</script>"})
+//    @Select({"<script> " +
+//            "select DISTINCT p.*,pc.cate_name, fs_store.store_name,hs.push_status from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
+//            "left join fs_store on fs_store.store_id = p.store_id " +
+//            "left join (select product_id, push_status from fs_store_hospital580_product_push_scrm h1 where h1.id = (select max(h2.id) from fs_store_hospital580_product_push_scrm h2 where h2.product_id = h1.product_id)) hs on hs.product_id = p.product_id " +
+//            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
+//                " inner join fs_store_order_scrm_comment fsosc on FIND_IN_SET(p.product_id,fsosc.product_ids) and fsosc.is_del != 1" +
+//            "</if>" +
+//            "<if test = 'maps.transactionStatus != null'> " +
+//            " inner join fs_store_order_item_scrm ois on p.product_id = ois.product_id INNER JOIN fs_store_order_scrm sos on sos.id=ois.order_id" +
+//            "</if>" +
+//            "<if test = 'maps.complaint != null and  maps.complaint !=\"\"    '> " +
+//            " fs_user_complaint uc INNER JOIN FIND_IN_SET(p.product_id,uc.product_ids)" +
+//            "and fsosc.product_ids is not null" +
+//            "</if>" +
+//            "where 1=1 " +
+//            "<if test = 'maps.commentContent != null and  maps.commentContent !=\"\"    '> " +
+//                "and fsosc.content like CONCAT('%',#{maps.commentContent},'%') " +
+//            "</if>" +
+//            "<if test = 'maps.complaint != null and  maps.complaint !=\"\"    '> " +
+//            "and uc.content like CONCAT('%',#{maps.complaint},'%') " +
+//            "</if>" +
+//            "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
+//            "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
+//            "</if>" +
+//            "<if test = 'maps.cateId != null    '> " +
+//            "and (pc.cate_id =#{maps.cateId} or pc.pid=#{maps.cateId} )" +
+//            "</if>" +
+//            "<if test = 'maps.productType != null    '> " +
+//            "and p.product_type =#{maps.productType} " +
+//            "</if>" +
+//            "<if test = 'maps.isShow != null    '> " +
+//            "and p.is_show =#{maps.isShow} " +
+//            "</if>" +
+//            "<if test = 'maps.companyIds != null and maps.companyIds != \"\" '> " +
+//            "and find_in_set(#{maps.companyIds}, p.company_ids) " +
+//            "</if>"+
+//            "<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
+//            "and p.store_id = #{maps.storeId} " +
+//            "</if>"+
+//            "<if test = 'maps.storeIds != null '>" +
+//            "and p.store_id in " +
+//            "<foreach collection='maps.storeIds'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach>" +
+//            "</if>" +
+//            "<if test = 'maps.isAudit != null '> " +
+//            "and p.is_audit = #{maps.isAudit} " +
+//            "</if>" +
+//            "<if test='maps.drugRegCertNo != null and maps.drugRegCertNo != \"\"'>" +
+//            "            AND drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
+//            "</if>" +
+//            "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
+//            "    AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
+//            "</if>" +
+//            "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
+//            "    AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
+//            "</if>" +
+//            "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
+//            "    AND unit_price = #{maps.unitPrice}" +
+//            "</if>" +
+//            "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
+//            "    AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
+//            "</if>" +
+//            "<if test='maps.mah != null and maps.mah != \"\"'>" +
+//            "    AND mah LIKE CONCAT('%', #{maps.mah}, '%')" +
+//            "</if>" +
+//            "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
+//            "    AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
+//            "</if>" +
+//            "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
+//            "    AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
+//            "</if>" +
+//            "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
+//            "    AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
+//            " </if>" +
+//            " <if test='maps.indications != null and maps.indications != \"\"'>" +
+//            "     AND indications LIKE CONCAT('%', #{maps.indications}, '%')" +
+//            " </if>" +
+//            " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
+//            "     AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
+//            " </if>" +
+//            " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
+//            "     AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
+//            " </if>" +
+//            " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
+//            "     AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
+//            " </if>" +
+//            " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
+//            "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
+//            " </if>"+
+//            " <if test='maps.prescribeSpec != null and maps.prescribeSpec != \"\"'>" +
+//            "     AND p.prescribe_spec LIKE CONCAT('%', #{maps.prescribeSpec}, '%')" +
+//            " </if>"+
+//            "<if test = 'maps.transactionStatus != null'> " +
+//            "     AND sos.`status` = #{maps.transactionStatus}" +
+//            "</if>" +
+//            " order by p.product_id desc "+
+//
+//            "</script>"})
+@Select({"<script> " +
+        "select " +
+        "DISTINCT p.*,pc.cate_name, fs_store.store_name,hs.push_status " +
+        "from fs_store_product_scrm p " +
+        "left join fs_store_product_category_scrm pc " +
+        "on p.cate_id = pc.cate_id " +
+        "left join fs_store " +
+        "on fs_store.store_id = p.store_id " +
+        "left join ( " +
+        "select product_id, push_status " +
+        "from ( " +
+        "select " +
+        "product_id, push_status, " +
+        "ROW_NUMBER() over (partition by product_id order by id desc) as rn " +
+        "from fs_store_hospital580_product_push_scrm " +
+        ") t " +
+        "where rn = 1 " +
+        ") hs on hs.product_id = p.product_id " +
+        // 评论表关联
+        "left join fs_store_order_scrm_comment fsosc " +
+        "on FIND_IN_SET(p.product_id, fsosc.product_ids) and fsosc.is_del != 1 " +
+        // 订单表关联
+        "<if test='maps.transactionStatus != null'> " +
+        "inner join fs_store_order_item_scrm ois on p.product_id = ois.product_id " +
+        "inner join fs_store_order_scrm sos on sos.id = ois.order_id " +
+        "</if> " +
+        // 投诉表关联
+        "<if test='maps.complaint != null and maps.complaint.trim() != \"\"'> " +
+        "inner join fs_user_complaint uc " +
+        "on FIND_IN_SET(p.product_id, uc.product_ids) " +
+        "</if> " +
+        "where 1=1 " +
+        // 评论内容条件
+        "<if test='maps.commentContent != null and maps.commentContent.trim() != \"\"'> " +
+        "and fsosc.content like CONCAT('%', #{maps.commentContent}, '%') " +
+        "and fsosc.product_ids is not null  " +
+        "</if> " +
+        // 投诉内容条件
+        "<if test='maps.complaint != null and maps.complaint.trim() != \"\"'> " +
+        "and uc.content like CONCAT('%', #{maps.complaint}, '%') " +
+        "</if> " +
+        // 商品名称模糊查询
+        "<if test='maps.productName != null and maps.productName.trim() != \"\"'> " +
+        "and p.product_name like CONCAT('%', #{maps.productName}, '%') " +
+        "</if> " +
+        // 分类ID条件(包含子分类)
+        "<if test='maps.cateId != null'> " +
+        "and (pc.cate_id = #{maps.cateId} or pc.pid = #{maps.cateId}) " +
+        "</if> " +
+        // 商品类型条件
+        "<if test='maps.productType != null'> " +
+        "and p.product_type = #{maps.productType} " +
+        "</if> " +
+        // 显示状态条件
+        "<if test='maps.isShow != null'> " +
+        "and p.is_show = #{maps.isShow} " +
+        "</if> " +
+        // 公司ID集合匹配
+        "<if test='maps.companyIds != null and maps.companyIds.trim() != \"\"'> " +
+        "and p.company_ids regexp replace(#{maps.companyIds}, ',', '|') " +
+        "</if> " +
+        // 单个店铺ID条件
+        "<if test='maps.storeId != null and maps.storeId.trim() != \"\"'> " +
+        "and p.store_id = #{maps.storeId} " +
+        "</if> " +
+        // 多个店铺ID条件
+        "<if test='maps.storeIds != null'> " +
+        "and p.store_id in " +
+        "<foreach collection='maps.storeIds' item='item' index='index' open='(' separator=',' close=')'> " +
+        "#{item} " +
+        "</foreach> " +
+        "</if> " +
+        // 审核状态条件
+        "<if test='maps.isAudit != null'> " +
+        "and p.is_audit = #{maps.isAudit} " +
+        "</if> " +
+        // 药品注册证号
+        "<if test='maps.drugRegCertNo != null and maps.drugRegCertNo.trim() != \"\"'> " +
+        "and drug_reg_cert_no like CONCAT('%', #{maps.drugRegCertNo}, '%') " +
+        "</if> " +
+        // 通用名称
+        "<if test='maps.commonName != null and maps.commonName.trim() != \"\"'> " +
+        "and common_name like CONCAT('%', #{maps.commonName}, '%') " +
+        "</if> " +
+        // 剂型
+        "<if test='maps.dosageForm != null and maps.dosageForm.trim() != \"\"'> " +
+        "and dosage_form like CONCAT('%', #{maps.dosageForm}, '%') " +
+        "</if> " +
+        // 单价
+        "<if test='maps.unitPrice != null and maps.unitPrice.trim() != \"\"'> " +
+        "and unit_price = #{maps.unitPrice} " +
+        "</if> " +
+        // 批号
+        "<if test='maps.batchNumber != null and maps.batchNumber.trim() != \"\"'> " +
+        "and batch_number like CONCAT('%', #{maps.batchNumber}, '%') " +
+        "</if> " +
+        // 上市许可持有人
+        "<if test='maps.mah != null and maps.mah.trim() != \"\"'> " +
+        "and mah like CONCAT('%', #{maps.mah}, '%') " +
+        "</if> " +
+        // 持有人地址
+        "<if test='maps.mahAddress != null and maps.mahAddress.trim() != \"\"'> " +
+        "and mah_address like CONCAT('%', #{maps.mahAddress}, '%') " +
+        "</if> " +
+        // 生产企业
+        "<if test='maps.manufacturer != null and maps.manufacturer.trim() != \"\"'> " +
+        "and manufacturer like CONCAT('%', #{maps.manufacturer}, '%') " +
+        "</if> " +
+        // 生产地址
+        "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress.trim() != \"\"'> " +
+        "and manufacturer_address like CONCAT('%', #{maps.manufacturerAddress}, '%') " +
+        "</if> " +
+        // 适应症
+        "<if test='maps.indications != null and maps.indications.trim() != \"\"'> " +
+        "and indications like CONCAT('%', #{maps.indications}, '%') " +
+        "</if> " +
+        // 用法用量
+        "<if test='maps.dosage != null and maps.dosage.trim() != \"\"'> " +
+        "and dosage like CONCAT('%', #{maps.dosage}, '%') " +
+        "</if> " +
+        // 不良反应
+        "<if test='maps.adverseReactions != null and maps.adverseReactions.trim() != \"\"'> " +
+        "and adverse_reactions like CONCAT('%', #{maps.adverseReactions}, '%') " +
+        "</if> " +
+        // 禁忌症
+        "<if test='maps.contraindications != null and maps.contraindications.trim() != \"\"'> " +
+        "and contraindications like CONCAT('%', #{maps.contraindications}, '%') " +
+        "</if> " +
+        // 注意事项
+        "<if test='maps.precautions != null and maps.precautions.trim() != \"\"'> " +
+        "and precautions like CONCAT('%', #{maps.precautions}, '%') " +
+        "</if> " +
+        // 处方规格
+        "<if test='maps.prescribeSpec != null and maps.prescribeSpec.trim() != \"\"'> " +
+        "and p.prescribe_spec like CONCAT('%', #{maps.prescribeSpec}, '%') " +
+        "</if> " +
+        // 交易状态条件
+        "<if test='maps.transactionStatus != null'> " +
+        "and sos.`status` = #{maps.transactionStatus} " +
+        "</if> " +
+        "order by p.product_id desc " +
+        "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps") FsStoreProductScrm fsStoreProduct);
 
 
     @Select({"<script> " +
-            "  select p.*,pc.cate_name from (SELECT ave.bar_code as bar_code,p.product_id, p.image, p.slider_image,p.product_name, p.product_info,p.keyword, p.cate_id, p.price, p.vip_price, " +
+            "  select p.*,pc.cate_name,hs.push_status from (SELECT ave.bar_code as bar_code,p.product_id, p.image, p.slider_image,p.product_name, p.product_info,p.keyword, p.cate_id, p.price, p.vip_price, " +
             " p.ot_price,p.agent_price, p.postage,p.unit_name,p.sort,p.sales,p.stock,p.is_show,p.is_hot,p.is_benefit,p.is_best,p.is_new,p.description,p.create_time,p.update_time,p.is_postage,p.is_del,p.give_integral," +
-            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id ,hs.push_status" +
+            " p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral,p.product_type,p.prescribe_code, p.prescribe_spec,p.prescribe_factory,p.prescribe_name,p.is_display,p.tui_cate_id" +
             " FROM fs_store_product_scrm p LEFT JOIN fs_store_product_attr_value_scrm ave on p.product_id=ave.product_id  WHERE ave.bar_code != '' and p.product_id is not null" +
             ") p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id   " +
             "left join (select product_id, push_status from fs_store_hospital580_product_push_scrm h1 where h1.id = (select max(h2.id) from fs_store_hospital580_product_push_scrm h2 where h2.product_id = h1.product_id)) hs on hs.product_id = p.product_id " +

+ 1 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -255,6 +255,7 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
             if(StringUtils.isNotEmpty(item.getStoreId()))
                 item.setStoreName(fsStoreScrmService.selectFsStoreByStoreId(Long.parseLong(item.getStoreId())).getStoreName());
         }
+
         return fsStoreProductListVOS;
     }
 

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

@@ -54,4 +54,9 @@ public class FsMyStoreOrderListQueryVO implements Serializable
 
     private Long isPrescribe;
 
+    /**
+     * 处方审核状态:1为待审核,2为审核通过,3为审核不通过
+     * **/
+    private Integer prescriptionAuditStatus;
+
 }

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

@@ -139,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isReadStore != null">is_read_store,</if>
             <if test="isReadPlatform != null">is_read_platform,</if>
             <if test="storeId != null">store_id,</if>
-            <if test="orderId != null">orderId,</if>
+            <if test="orderId != null">order_id,</if>
             <if test="productIds != null">product_ids,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">

+ 12 - 1
fs-user-app/src/main/java/com/fs/app/controller/StoreOrderController.java

@@ -1,6 +1,7 @@
 package com.fs.app.controller;
 
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fs.app.annotation.Login;
 
 import com.fs.his.param.BillListParam;
@@ -16,6 +17,8 @@ import com.fs.his.param.*;
 import com.fs.his.service.*;
 import com.fs.his.vo.FsStoreOrderItemListUVO;
 import com.fs.his.vo.FsStoreOrderListUVO;
+import com.fs.hospital580.entity.Hospital580PrescriptionScrmEntity;
+import com.fs.hospital580.service.Hospital580PrescriptionScrmService;
 import com.fs.ybPay.service.IPayService;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -58,6 +61,8 @@ public class StoreOrderController extends  AppBaseController {
     private IFsCouponService couponService;
     @Autowired
     private IFsStoreOrderBillLogService orderBillLogService;
+    @Autowired
+    private Hospital580PrescriptionScrmService prescriptionScrmService;
     @Login
     @ApiOperation("获取我的订单列表")
     @GetMapping("/getMyStoreOrderList")
@@ -104,7 +109,13 @@ public class StoreOrderController extends  AppBaseController {
 //        else if(order.getStatus()==2||order.getStatus()==3){
 //            isAfterSales=1;
 //        }
-        return R.ok().put("order",order).put("items",list).put("payLimitTime",payLimitTime);
+        //获取处方数据
+        Integer prescriptionAuditStatus = 0;
+        Hospital580PrescriptionScrmEntity entity =prescriptionScrmService.getOne(new LambdaQueryWrapper<Hospital580PrescriptionScrmEntity>().eq(Hospital580PrescriptionScrmEntity::getStoreOrderId,order.getOrderId()));
+        if(entity != null && entity.getAuditStatus() != null){
+            prescriptionAuditStatus = entity.getAuditStatus();
+        }
+        return R.ok().put("order",order).put("items",list).put("payLimitTime",payLimitTime).put("prescriptionAuditStatus",prescriptionAuditStatus);
     }
 
     @Login