| | |
| | | select t1.id, |
| | | t1.procurement_code, |
| | | t1.clinic_id, |
| | | t3.clinic_name, |
| | | t3.supplier_name, |
| | | sum(t2.total_price) as totalPrice, |
| | | t1.create_time, |
| | | t2.id tErpProcurementGoodsId, |
| | |
| | | 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 t_crm_supplier t3 on t1.supplier_id = t3.id |
| | | left JOIN sys_user t4 on t1.create_id = t4.user_id |
| | | where t1.disabled = 0 |
| | | where t1.disabled = 0 and t1.status !=1 |
| | | <if test="user.roleType !=null and user.roleType==4"> |
| | | and t2.supplier_id =#{supplierClinicId} |
| | | </if> |
| | |
| | | and t1.procurement_code = #{query.procurementCode} |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and t3.clinic_name like concat('%',#{query.clinicName},'%') |
| | | and t3.supplier_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.userName != null and query.userName != ''"> |
| | | and t4.user_name like concat('%',#{query.userName},'%') |
| | |
| | | <if test="sTime != null"> |
| | | and t1.create_time between #{sTime} and #{eTime} |
| | | </if> |
| | | group by t1.id |
| | | |
| | | </select> |
| | | <select id="inventoryNotEnoughList" resultType="com.ruoyi.system.vo.TErpGoodsVO"> |