| | |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | return false; |
| | | } |
| | | |
| | | public static DetlDto find(Set<DetlDto> detlDtos, String matnr, String batch) { |
| | | public static boolean has(List<DetlDto> detlDtos, DetlDto detlDto) { |
| | | for (DetlDto dto : detlDtos) { |
| | | if (Cools.isEmpty(dto.getBatch()) && Cools.isEmpty(detlDto.getBatch())) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr())) { |
| | | return true; |
| | | } |
| | | } else { |
| | | if (!Cools.isEmpty(dto.getBatch()) && !Cools.isEmpty(detlDto.getBatch())) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && dto.getBatch().equals(detlDto.getBatch())) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |