xuhy
4 天以前 433bc1e314ecfd483379ca0e2e74e7c815d3261f
ruoyi-system/src/main/resources/mapper/system/TErpGoodsMapper.xml
@@ -278,7 +278,7 @@
        select * from (
        SELECT t1.id,t2.warehouse_no,
        t3.goods_name,
        t4.supplier_name,
        case t3.goods_source when 1 then t4.supplier_name when 2 then t3.supplier_name end as supplierName,
        t3.type_id,
        t3.packing_unit_id,
        t3.quasi_number,
@@ -294,19 +294,19 @@
        LEFT JOIN t_erp_clinic_warehousing t2 on t1.warehousing_id = t2.id
        LEFT JOIN t_erp_goods t3 on t1.goods_id = t3.id
        LEFT JOIN t_crm_supplier t4 on t3.supplier_clinic_id = t4.id
        LEFT JOIN t_erp_supplier_outbound_goods t5 on t5.warehousing_batch_id =t1.id
        LEFT JOIN t_erp_clinic_outbound_goods t5 on t5.warehousing_batch_id =t1.id
        where t2.disabled = 0
        and #{endDate} > t1.expiry_date
        <if test="user.roleType !=null and user.roleType ==4">
            and t3.supplier_clinic_id =#{supplierClinicId} and t3.goods_source=1
            and t2.clinic_id =#{supplierClinicId}
        </if>
        <if test="user.roleType !=null and user.roleType ==5">
            and t3.supplier_clinic_id =#{supplierClinicId} and t3.goods_source=2
            and t2.clinic_id =#{supplierClinicId}
        </if>
        GROUP BY t1.id
        ) as o
        where (o.warehousing_number -o.outbound_count) >0
        where o.num >0
        order by o.create_time desc
    </select>
    <select id="getGoodsById" resultType="com.ruoyi.system.model.TErpGoods">