| | |
| | | t1.create_time, |
| | | t2.id tErpProcurementGoodsId, |
| | | t4.user_name, |
| | | t1.status |
| | | t1.status, |
| | | t1.supplier_money, |
| | | t1.money as platformMoney, |
| | | t5.clinic_name |
| | | from t_erp_procurement t1 |
| | | left JOIN t_erp_procurement_goods t2 on t1.id = t2.procurement_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 |
| | | left join t_crm_clinic t5 on t1.clinic_id = t5.id |
| | | where t1.disabled = 0 and t1.status !=1 |
| | | <if test="user.roleType !=null and user.roleType==4"> |
| | | and t2.supplier_id =#{supplierClinicId} |
| | |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | order by t1.create_time desc |
| | | |
| | | |
| | | </select> |
| | |
| | | </if> |
| | | group by date_format(t1.pay_time, '%Y.%m') |
| | | </select> |
| | | <select id="branchAdminStatisticsThree" resultType="com.ruoyi.system.model.TErpProcurementGoods"> |
| | | select t2.goods_id,t2.goods_name,t2.purchase_count as purchaseCount,t1.pay_time as payTime,t1.pay_money |
| | | from t_erp_procurement t1 |
| | | left join t_erp_procurement_goods t2 on t1.id = t2.procurement_id |
| | | where t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | and t1.status in (3,4,5) |
| | | and t1.clinic_id in |
| | | <foreach item="item" collection="clinicIds" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |