|
|
@@ -97,7 +97,7 @@ public interface FsStoreProductScrmMapper
|
|
|
"<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
|
|
|
"and p.store_id = #{maps.storeId} " +
|
|
|
"</if>"+
|
|
|
- "<if test = 'maps.storeIds != null '>" +
|
|
|
+ "<if test = 'maps.storeIds != null and maps.storeIds.length > 0'>" +
|
|
|
"and p.store_id in " +
|
|
|
"<foreach collection='maps.storeIds' item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach>" +
|
|
|
"</if>" +
|
|
|
@@ -303,6 +303,74 @@ public interface FsStoreProductScrmMapper
|
|
|
" 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,ave.sku,ave.stock,ave.price,ave.bar_code,ave.group_bar_code,ave.weight,ave.volume FROM fs_store_product_scrm p " +
|
|
|
" LEFT JOIN fs_store_product_attr_value_scrm ave on p.product_id=ave.product_id WHERE p.product_id is not null " +
|
|
|
+ "<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 maps.storeIds.length > 0'>" +
|
|
|
+ "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 p.drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
|
|
|
+ " AND p.common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
|
|
|
+ " AND p.dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
|
|
|
+ " AND p.unit_price = #{maps.unitPrice}" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
|
|
|
+ " AND p.batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.mah != null and maps.mah != \"\"'>" +
|
|
|
+ " AND p.mah LIKE CONCAT('%', #{maps.mah}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
|
|
|
+ " AND p.mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
|
|
|
+ " AND p.manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
|
|
|
+ "</if>" +
|
|
|
+ "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
|
|
|
+ " AND p.manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
|
|
|
+ " </if>" +
|
|
|
+ " <if test='maps.indications != null and maps.indications != \"\"'>" +
|
|
|
+ " AND p.indications LIKE CONCAT('%', #{maps.indications}, '%')" +
|
|
|
+ " </if>" +
|
|
|
+ " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
|
|
|
+ " AND p.dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
|
|
|
+ " </if>" +
|
|
|
+ " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
|
|
|
+ " AND p.adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
|
|
|
+ " </if>" +
|
|
|
+ " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
|
|
|
+ " AND p.contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
|
|
|
+ " </if>" +
|
|
|
+ " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
|
|
|
+ " AND p.precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
|
|
|
+ " </if>"+
|
|
|
+ " order by p.product_id desc "+
|
|
|
"</script>"})
|
|
|
List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps") FsStoreProductScrm fsStoreProduct);
|
|
|
|