| | |
| | | <select id="clinicProcurementReport" resultType="com.ruoyi.system.vo.ClinicProcurementReportVO"> |
| | | select tep.id, tep.procurement_code, tep.pay_money, tep.status,tep.pay_time,tep.clinic_id, tep.supplier_id, |
| | | tep.money,tep.supplier_money, |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName,tcc.person_charge_name,tcc.phone |
| | | from t_erp_procurement tep |
| | | left join t_crm_supplier tcs on tep.supplier_id = tcs.id |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportClinic" |
| | | resultType="com.ruoyi.system.export.ProcurementReportClinicExport"> |
| | | select tep.id, tep.procurement_code, tep.pay_money, tep.status,tep.pay_time,tep.clinic_id, tep.supplier_id, |
| | | tep.money,tep.supplier_money, |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName,tcc.person_charge_name,tcc.phone |
| | | from t_erp_procurement tep |
| | | left join t_crm_supplier tcs on tep.supplier_id = tcs.id |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportSupplier" |
| | | resultType="com.ruoyi.system.export.ProcurementReportSupplierExport"> |
| | | select tep.id, tep.procurement_code, tep.pay_money, tep.status,tep.pay_time,tep.clinic_id, tep.supplier_id, |
| | | tep.money,tep.supplier_money, |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName,tcc.person_charge_name,tcc.phone |
| | | from t_erp_procurement tep |
| | | left join t_crm_supplier tcs on tep.supplier_id = tcs.id |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportPlatform" |
| | | resultType="com.ruoyi.system.export.ProcurementReportPlatformExport"> |
| | | select tep.id, tep.procurement_code, tep.pay_money, tep.status,tep.pay_time,tep.clinic_id, tep.supplier_id, |
| | | tep.money,tep.supplier_money, |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName,tcc.person_charge_name,tcc.phone |
| | | from t_erp_procurement tep |
| | | left join t_crm_supplier tcs on tep.supplier_id = tcs.id |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |