xuhy
10 天以前 49dd9ee3dea22203cd1a0cc53745cffb6607122c
ruoyi-system/src/main/resources/mapper/system/TErpGoodsMapper.xml
@@ -351,5 +351,75 @@
        </if>
        order by t1.create_time desc
    </select>
    <select id="pageAddList" resultType="com.ruoyi.system.model.TErpGoods">
        SELECT t1.id,
               t1.supplier_clinic_id,
               t1.goods_source,
               t1.goods_name,
               t1.goods_id_code,
               t1.quasi_number,
               t1.manufacturer,
               t1.formulation_spec,
               t1.packing_spec,
               t1.clinic_purchase_price,
               t1.warning_inventory,
               t1.type_id,
               t1.goods_yards,
               t1.maintenance_interval,
               t1.maintenance_interval_unit,
               t1.low_purchase_quantity,
               t1.low_unit_id,
               t1.is_prescription_drug,
               t1.goods_spec,
               t1.sales_amount,
               t1.packing_unit_id,
               t1.instructions_use,
               t1.side_effect,
               t1.platform_commission_price,
               t1.state,
               t1.simplified_code,
               t1.dosage_form,
               t1.usage_classification,
               t1.product_brand,
               t1.place_of_origin,
               t1.ingredient,
               t1.trait,
               t1.indication,
               t1.taboo,
               t1.precautions,
               t1.interaction,
               t1.storage,
               t1.barcode,
               t2.supplier_name,
               t1.clinic_ids,
               t1.create_by,
               t1.update_by,
               t1.`disabled`,
               t1.create_time,
               t1.update_time,
               t1.create_id,
               t3.type_name
        FROM t_erp_goods t1
         LEFT JOIN t_crm_supplier t2 ON t1.supplier_clinic_id = t2.id
        left join t_erp_goods_type t3 on t1.type_id = t3.id
        WHERE t1.`disabled` = 0
          AND (t1.goods_source = 1 AND t1.state = 1 AND t1.`disabled` = 0 AND t1.platform_commission_price IS NOT NULL)
          and (NOT FIND_IN_SET(#{clinicSupplierId}, t1.clinic_ids) or t1.clinic_ids is null)
        <if test="query.goodsName != null and query.goodsName != ''">
            and t1.goods_name like concat('%',#{query.goodsName},'%')
        </if>
        <if test="query.typeId != null and query.typeId != ''">
            and t1.type_id = #{query.typeId}
        </if>
        <if test="query.quasiNumber != null and query.quasiNumber != ''">
            and t1.quasi_number like concat('%',#{query.quasiNumber},'%')
        </if>
        <if test="query.quasiNumber != null and query.quasiNumber != ''">
            and t2.supplier_name like concat('%',#{query.supplierName},'%')
        </if>
        order by t1.create_time desc
    </select>
</mapper>