OrdersDao.java 1.0 KB

1234567891011121314151617181920212223242526
  1. package cn.com.lzt.orders.dao;
  2. import java.util.List;
  3. import org.jeecgframework.minidao.annotation.MiniDao;
  4. import org.jeecgframework.minidao.annotation.Param;
  5. import org.jeecgframework.minidao.annotation.Sql;
  6. import org.springframework.stereotype.Repository;
  7. import cn.com.lzt.orderproducts.entity.OrderProductsEntity;
  8. @Repository
  9. @MiniDao
  10. public interface OrdersDao {
  11. @Sql(" select pnumber,pname,spec_type as specType,measure_unit as measureUnit,purchase_price as purchasePrice,goods_id as goodsId from t_b_order_products where fk_id in ( select id from (SELECT id FROM t_b_orders where order_months in ( SELECT max(order_months) FROM t_b_orders \n" +
  12. " WHERE warehouse_id = :warehouseid ) and warehouse_id = :warehouseid ORDER BY create_date ASC LIMIT 1 ) temp )")
  13. public List<OrderProductsEntity> getLastOrderProducts(@Param("warehouseid")String warehouseid);
  14. /**
  15. * 根据货品分类大类获取货品明细
  16. * */
  17. public List<OrderProductsEntity> getOrderProductsOrderByCategory(@Param("orderid")String orderid);
  18. }