½­ËÕ𩾧ÏîÄ¿/Haojing/src/main/java/com/northglass/repository/OutTasksDao.java
@@ -3,10 +3,21 @@
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import com.northglass.entity.OutTasks;
public interface OutTasksDao extends JpaRepository<OutTasks, Long>{
   //查询  æœ€ç»ˆä»»åŠ¡çŠ¶æ€
   @Query("select t from OutTasks t order by t.taskIds desc")
   public List<OutTasks> FindAll100();
   @Query("select t from OutTasks t where t.mesStatus=?1 and t.destination=?2 order by t.taskIds asc")
   public List<OutTasks> FindTaskLine(String mesStatus,String destination);
   @Query("select t from OutTasks t where t.mesStatus!=?1 and t.destination=?2 order by t.taskIds asc")
   public List<OutTasks> FindNotTaskLine(String mesStatus,String destination);
   
   //查询  æœ€ç»ˆä»»åŠ¡çŠ¶æ€
   @Query("select t from OutTasks t where t.mesStatus=?1 order by t.finshTime desc")
@@ -57,11 +68,15 @@
   public List<OutTasks> FindOutTasksTaskIds(String taskid);
   
   //查询 machineStatus, workStatus , flag      æœºå™¨ï¼Œå·¥ä½œçŠ¶æ€ï¼Œä»»åŠ¡çŠ¶æ€
   @Query("select t from OutTasks t where t.machineStatus=?1 and t.workStatus=?2 and t.flag=?3 order by t.taskIds asc")
   @Query("select t from OutTasks t where t.machineStatus=?1 and t.workStatus=?2 and t.flag=?3 order by t.priority desc,t.taskIds asc")
   public List<OutTasks> FindMachineStatusWorkStatus(String machineStatus,String workStatus,String flag);
   
   //查询 æœªå®Œæˆä»»åŠ¡
   @Query("select t from OutTasks t where t.machineStatus!='任务完成' and t.flag='正常' order by t.priority desc,t.taskIds asc")
   public List<OutTasks> findWaitTask();
   //查询 machineStatus1,machineStatus2 workStatus
   @Query("select t from OutTasks t where (t.machineStatus=?1 or t.machineStatus=?2) and t.workStatus=?3 and t.flag=?4")
   @Query("select t from OutTasks t where (t.machineStatus=?1 or t.machineStatus=?2) and t.workStatus=?3 and t.flag=?4 order by t.taskIds asc")
   public List<OutTasks> FindMachineStatusWorkStatus(String machineStatus1,String machineStatus2,String workStatus,String flag);
   
   
@@ -69,4 +84,12 @@
   @Query("select t from OutTasks t where t.taskType=?1 and t.machineStatus=?2 and t.workStatus=?3")
   public List<OutTasks> FindTaskTypeTasking(String taskType,String machineStatus,String workStatus);
   
   //查询此料架  æœªå¼€å§‹çš„任务
   @Query("select t from OutTasks t where t.stockName=?1 and t.machineStatus='等待开始' and t.workStatus='等待中' order by t.taskIds asc")
   public List<OutTasks> FindStockName(String stockName);
   //查询此目的地的 æœªå®Œæˆçš„任务
   @Query("select t from OutTasks t where t.destination=?1 and t.machineStatus='等待开始' and t.workStatus='等待中' order by t.taskIds asc")
   public List<OutTasks> FindDestination(String destination);
}