| | |
| | | |
| | | |
| | | <select id="pageWarehouseList" resultType="com.ruoyi.system.vo.TErpGoodsWarehouseRecordLastVO"> |
| | | select t1.warehouse_id houseId,t2.warehouse_name houseName,t1.total_money allTotalPrice,t1.outbound_type |
| | | |
| | | select * from ( |
| | | select t1.id,t1.warehouse_id houseId,t2.warehouse_name houseName,t1.total_price allTotalPrice,t1.type,1 category,null as outboundReason,t1.create_time operationTime |
| | | from t_erp_supplier_warehousing t1 left join t_crm_warehouse t2 on t1.warehouse_id = t2.id |
| | | where t1.disabled = 0 and t1.goods_id = #{query.goodsId} and t1.supplier_id =#{user.userId} |
| | | <if test="query.warehouseName != null and query.warehouseName != ''"> |
| | | and t2.warehouse_name =#{query.warehouseName} |
| | | </if> |
| | | <if test="sTime != null and eTime !=null "> |
| | | and t1.create_time between #{sTime} and #{eTime} |
| | | </if> |
| | | |
| | | union all |
| | | |
| | | select t1.id,t1.warehouse_id houseId,t2.warehouse_name houseName,t1.total_money allTotalPrice,t1.outbound_type as type,2 category,t1.outbound_reason as outboundReason,t1.create_time operationTime |
| | | from t_erp_supplier_outbound t1 left join t_crm_warehouse t2 on t1.warehouse_id = t2.id |
| | | where t1.disabled = 0 and t1.goods_id = #{query.goodsId} and t1.supplier_id =#{user.userId} |
| | | <if test="query.warehouseName != null and query.warehouseName != ''"> |
| | | and t2.warehouse_name =#{query.warehouseName} |
| | | </if> |
| | | <if test="sTime != null and eTime !=null "> |
| | | and t1.create_time between #{sTime} and #{eTime} |
| | | </if> |
| | | ) as o where 1=1 |
| | | <if test="query.type != null"> |
| | | and o.type = #{query.type} |
| | | </if> |
| | | order by o.operationTime desc |
| | | |
| | | </select> |
| | | |
| | | |