| | |
| | | id, clinic_id, procurement_code, pay_money, pay_number, pay_transaction_id, status, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TErpProcurementVo"> |
| | | select t1.id, |
| | | t1.procurement_code, |
| | | t1.clinic_id, |
| | | t3.clinic_name, |
| | | sum(t2.total_price) as totalPrice, |
| | | t1.create_time, |
| | | t2.id tErpProcurementGoodsId, |
| | | t4.user_name, |
| | | t1.status |
| | | from t_erp_procurement t1 |
| | | left JOIN t_erp_procurement_goods t2 on t1.id = t2.procurement_id |
| | | LEFT JOIN t_crm_clinic t3 on t1.clinic_id = t3.id |
| | | left JOIN sys_user t4 on t1.create_id = t4.user_id |
| | | where t1.disabled = 0 and t2.supplier_id =#{user.userId} |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and t1.procurement_code = #{query.procurementCode} |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and t3.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.userName != null and query.userName != ''"> |
| | | and t4.user_name like concat('%',#{query.userName},'%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="sTime != null"> |
| | | and t1.create_time between #{sTime} and #{eTime} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |