package com.sw.mes.yb.plan.dao;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.plan.entity.PlanEquipmentOutput;
import org.springframework.data.jpa.repository.Query;

/**
* @Author
* @Description：
* @Date:
* @Modified By:
*/
public interface PlanEquipmentOutputDao extends BaseDao<PlanEquipmentOutput, Long>{

    @Query(value = "SELECT * FROM plan_equipment_output WHERE equipment_code = ?1 AND output_date = ?2 ORDER BY id DESC LIMIT 1 ", nativeQuery = true)
    PlanEquipmentOutput findTopByEcAndDate(String equipmentCode, String date);



}