package com.northglass.repository;
|
|
import java.util.Date;
|
import java.util.List;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.Query;
|
|
import com.northglass.constants.StateConstants.RawPackageTxtState;
|
import com.northglass.entity.GalssTaskDetails;
|
import com.northglass.entity.Rank;
|
import com.northglass.entity.RawFile;
|
import com.northglass.entity.RawFile2;
|
|
public interface RawFileDao2 extends JpaRepository<RawFile2, Long>{
|
|
@Query("select t from RawFile t where t.fileName = '052-123' and t.fileUrl = '1' and t.state = '已下发' and t.operator = '1' and t.createTime = '2021-09-22 13:22:18' and t.receiveTime = '2021-09-22 13:22:21' ")
|
public List<RawFile2> findMachineDispose();
|
|
//找到对应产线的状态为已领取的对象
|
@Query("select t from RawFile2 t where t.state = '已领取' and t.operator=?1 and t.jiakong=0")
|
public RawFile2 findAcceptedByGroup(Long operator);
|
|
@Query("select t from RawFile2 t where t.state = '未领取' and (t.operator=?1 or t.operator=0) and t.jiakong=0")
|
public List<RawFile2> findAcceptedByGroups(Long operator);
|
|
//找到对应产线的状态为已领取的对象
|
@Query("select t from RawFile2 t where t.state = '已领取' and t.operator=?1 and t.jiakong=0")
|
public RawFile2 findIdGroup(Long operator);
|
|
//找到对应产线的状态为已领取的对象
|
@Query("select t from RawFile2 t where t.state = '未领取' and (t.operator=?1 or t.operator=0) and t.jiakong=0")
|
public List<RawFile2> findTasks(Long operator);
|
|
@Query("select t from RawFile2 t where t.state = '未领取' and t.operator=0 and t.jiakong=1")
|
public List<RawFile2> findTasks1();
|
|
|
@Query("select t from RawFile2 t where t.state = '中断' and t.operator=?1 and t.jiakong=0")
|
public List<RawFile2> findInterruptTasks(Long operator);
|
|
@Query("select t from RawFile2 t where t.state = '已领取' and t.fileName=?1 and t.jiakong=0")
|
public RawFile2 findfileName(String fileName);
|
|
@Query("select t from RawFile2 t where t.fileName=?1 ")
|
public List<RawFile2> findfileNamelist(String fileName);
|
|
|
|
}
|