| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<HollowGlassQueueInfo> queryHollowGlassQueueInfoByLine(int cell) { |
| | | LocalDateTime twoDaysAgo = LocalDate.now().atStartOfDay().minusDays(1); |
| | | List<String> relationIds = this.listObjs( |
| | | new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .lt(HollowGlassQueueInfo::getState, 1) |
| | |
| | | .in("relation_id", relationIds) |
| | | .eq("cell", cell) |
| | | .eq("is_pair", 1) |
| | | .ge("create_time", twoDaysAgo) |
| | | .select("width","height","flow_card_id","relation_id", "hollow_sequence", "cell", "MAX(state) as state", "MAX(layer) as layer") |
| | | .groupBy("relation_id", "hollow_sequence") |
| | | .orderByAsc("relation_id", "hollow_sequence") |