فهرست منبع

销售订单、商场订单、退款订单增加查询条件

luolinsong 2 ماه پیش
والد
کامیت
3936068202

+ 19 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreAfterSalesScrm.java

@@ -156,4 +156,23 @@ public class FsStoreAfterSalesScrm extends BaseEntity
      * 处方编码
      * **/
     private String serialNo;
+
+    //通用名称
+    private String commonName;
+    //入住企业名称
+    private String unitName;
+    //剂型
+    private String dosageForm;
+    //规格
+    private Integer specType;
+    //上市许可持有人
+    private String mah;
+    //生产企业
+    private String manufacturer;
+    //药品注册证书编号
+    private String drugRegCertNo;
+    //交易状态
+    private Integer transactionStatus;
+    //评价投诉
+    private String complaint;
 }

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

@@ -87,13 +87,18 @@ public interface FsStoreAfterSalesScrmMapper
     List<FsStoreAfterSalesQueryVO>  selectFsStoreAfterSalesListQuery(@Param("maps") FsStoreAfterSalesQueryParam storeAfterSalesParam);
 
     @Select({"<script> " +
-            "select s.*,o.delivery_status,o.delivery_id,u.phone as user_phone,c.company_name ," +
+            "select DISTINCT s.*,o.delivery_status,o.delivery_id,u.phone as user_phone,c.company_name ," +
             "cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber,ssc.store_name as storeName,ssc.store_seq as storeSeq,ssc.merchant_id as merchantId,hps.serial_no  " +
             "from fs_store_after_sales_scrm s INNER join fs_store_order_scrm o on o.order_code=s.order_code " +
+            "inner join fs_store_order_item_scrm ois on o.id = ois.order_id " +
+            "inner join fs_store_product_scrm p on  p.product_id = ois.product_id " +
             "left join fs_user u on s.user_id=u.user_id left join company c on c.company_id=s.company_id " +
             "left join company_user cu on cu.user_id=s.company_user_id " +
             "left join fs_store_scrm ssc on o.store_id=ssc.store_id " +
             "left join fs_store_hospital580_prescription_scrm hps on hps.store_order_id = o.id " +
+            "<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.status != null    '> " +
             "and s.status = #{maps.status} " +
@@ -152,6 +157,43 @@ public interface FsStoreAfterSalesScrmMapper
             "<if test = 'maps.merchantId != null and maps.merchantId != \"\"   '> " +
             " AND ssc.merchant_id  like CONCAT('%',#{maps.merchantId},'%')  " +
             "</if>" +
+
+            "<if test = 'maps.commonName != null and maps.commonName.trim() != \"\"  '>" +
+            "and p.common_name like concat('%', #{maps.commonName}, '%')" +
+            "</if>" +
+
+            "<if test= 'maps.unitName != null and maps.unitName != \"\"  '>" +
+            "and p.unit_name = #{maps.unitName}" +
+            "</if>" +
+
+            "<if test= 'maps.specType != null and maps.specType != \"\"  '>" +
+            "and p.spec_type = #{maps.specType}" +
+            "</if>" +
+
+            "<if test = 'maps.dosageForm != null and maps.dosageForm.trim() != \"\"  '>" +
+            "and p.dosage_form like concat('%', #{maps.dosageForm}, '%')" +
+            "</if>" +
+
+            "<if test= 'maps.mah != null and maps.mah.trim() != \"\"  '>" +
+            "and p.mah like concat('%', #{maps.mah}, '%')" +
+            "</if>" +
+
+            "<if test= 'maps.manufacturer != null and maps.manufacturer.trim() != \"\"  '>" +
+            "and p.manufacturer like concat('%', #{maps.manufacturer}, '%')" +
+            "</if>" +
+
+            "<if test= 'maps.drugRegCertNo != null and maps.drugRegCertNo.trim() != \"\"  '>" +
+            "and p.drug_reg_cert_no like concat('%', #{maps.drugRegCertNo}, '%')" +
+            "</if>" +
+
+            "<if test= 'maps.transactionStatus != null    '> " +
+            "and o.status = #{maps.drugRegCertNo}" +
+            "</if>" +
+
+            "<if test= 'maps.specType != null and maps.specType != \"\"  '>" +
+            "and p.spec_type = #{maps.specType}" +
+            "</if>" +
+
             " ${maps.params.dataScope} "+
             "order by s.create_time desc "+
             "</script>"})

+ 18 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderParam.java

@@ -131,4 +131,22 @@ public class FsStoreOrderParam extends BaseEntity implements Serializable
      * **/
     private String serialNo;
 
+    //通用名称
+    private String commonName;
+    //入住企业名称
+    private String unitName;
+     //剂型
+     private String dosageForm;
+     //规格
+     private Integer specType;
+     //上市许可持有人
+     private String mah;
+     //生产企业
+     private String manufacturer;
+     //药品注册证书编号
+     private String drugRegCertNo;
+     //交易状态
+     private Integer transactionStatus;
+     //评价投诉
+     private String complaint;
 }

+ 36 - 5
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -1576,7 +1576,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ) AS t
     </select>
     <select id="selectFsStoreOrderListVO" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
-        select o.*,u.phone,u.register_code,u.register_date,u.source, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber
+        select DISTINCT o.*,u.phone,u.register_code,u.register_date,u.source, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber
         , csc.name miniProgramName,ssc.store_name,
         ssc.store_seq,
         ssc.merchant_id,hps.serial_no
@@ -1589,10 +1589,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN fs_store_order_df df on df.order_id=o.id
 
         </if>
-        <if test = "maps.productName != null and  maps.productName !=  '' ">
-            left join fs_store_order_item_scrm oi on o.id = oi.order_id
-            left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
-        </if>
+
+        inner join fs_store_order_item_scrm oi on o.id = oi.order_id
+        inner join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
+
         LEFT JOIN (
         SELECT
         sp.*,
@@ -1602,7 +1602,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ) sp_latest ON sp_latest.business_code = o.order_code AND sp_latest.rn = 1
         LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
         LEFT JOIN fs_store_scrm ssc on o.store_id=ssc.store_id
+        <if test="maps.complaint != null and maps.complaint.trim() !=''">
+            inner join fs_user_complaint uc on FIND_IN_SET(fsp.product_id, uc.product_ids)
+        </if>
         <where>
+
+            <if test="maps.complaint != null and maps.complaint.trim() !=''">
+                and uc.content like CONCAT('%', #{maps.complaint}, '%')
+            </if>
             <if test="maps.coursePlaySourceConfigId != null">
                 and csc.id = #{maps.coursePlaySourceConfigId}
             </if>
@@ -1728,6 +1735,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maps.merchantId != null and maps.merchantId != ''">
                 and ssc.merchant_id like concat('%',#{maps.merchantId},'%')
             </if>
+            <if test="maps.commonName != null and maps.commonName.trim() !=''">
+                and fsp.common_name like concat('%', #{maps.commonName}, '%')
+            </if>
+            <if test="maps.dosageForm != null and maps.dosageForm.trim() !=''">
+                and fsp.dosage_form like concat('%', #{maps.dosageForm}, '%')
+            </if>
+            <if test="maps.mah != null and maps.mah.trim() !=''">
+                and fsp.mah like concat('%', #{maps.mah}, '%')
+            </if>
+            <if test="maps.manufacturer != null and maps.manufacturer.trim() !=''">
+                and fsp.manufacturer like concat('%', #{maps.manufacturer}, '%')
+            </if>
+            <if test="maps.drugRegCertNo != null and maps.drugRegCertNo.trim() !=''">
+                and fsp.drug_reg_cert_no like concat('%', #{maps.drugRegCertNo}, '%')
+            </if>
+            <if test="maps.transactionStatus != null">
+                and o.status = #{maps.transactionStatus}
+            </if>
+            <if test="maps.specType != null and maps.specType !=''">
+                and fsp.spec_type = #{maps.specType}
+            </if>
+            <if test="maps.unitName != null and maps.unitName !=''">
+                and fsp.unit_name = #{maps.unitName}
+            </if>
         </where>
         ${maps.params.dataScope}
         <if test="maps.productName != null and  maps.productName !=  ''   ">