| | |
| | | </if> |
| | | ) as o where 1=1 |
| | | <if test="query.type != null"> |
| | | and o.type = #{query.type} |
| | | and o.category = #{query.type} |
| | | </if> |
| | | order by o.operationTime desc |
| | | |
| | |
| | | <select id="validityPeriodWarning" resultType="com.ruoyi.system.vo.ValidityPeriodWarningVo"> |
| | | select * from (select t2.warehouse_id,t2.warehouse_no warehousingNo, t4.goods_name, t4.quasi_number, |
| | | t1.batch_number, t1.id as batchId,t1.expiry_date, t4.id as goodsId,t5.type_name,t6.unit_name packingUnitName, |
| | | t1.warehousing_number -t3.outbound_count as num |
| | | t1.warehousing_number -COALESCE (t3.outbound_count,0) as num |
| | | from t_erp_supplier_warehousing_batch t1 |
| | | left join t_erp_supplier_warehousing t2 on t1.warehousing_id = t2.id |
| | | left join ( |
| | |
| | | left join t_erp_goods_type t5 on t4.type_id = t5.id |
| | | left join t_erp_goods_unit t6 on t4.packing_unit_id = t6.id |
| | | where #{time} > t1.expiry_date |
| | | <if test="user.roleType !=null and user.roleType ==4"> and t2.supplier_id =#{supplierClinicId} |
| | | <if test="user.roleType !=null and user.roleType ==4"> |
| | | and t2.supplier_id =#{supplierClinicId} |
| | | </if> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and t4.goods_name like concat('%',#{query.name},'%') |