|
|
@@ -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 != '' ">
|