| | |
| | | |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinJDParam; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private int owner; |
| | | private String ownerName; |
| | | private int beBatch; |
| | | |
| | | private int payment; |
| | | |
| | | private Double weight; |
| | | |
| | | private String sourceLocName;//源仓库 |
| | | private String targetLocName;//目标仓库 |
| | | |
| | | |
| | | public DetlDto() { |
| | | } |
| | | |
| | | public DetlDto(OpenOrderPakinJDParam.DetlDto2 detlDto2) { |
| | | this.matnr=detlDto2.getMatnr(); |
| | | this.batch=detlDto2.getBatch(); |
| | | this.anfme=detlDto2.getAnfme(); |
| | | this.ownerName=detlDto2.getOwner(); |
| | | this.beBatch=detlDto2.getEntryId(); |
| | | this.payment=0; |
| | | } |
| | | |
| | | public DetlDto(String matnr, Double anfme) { |
| | |
| | | this.weight = weight; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, Double anfme,String ownerName,int payment) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | this.ownerName = ownerName; |
| | | this.payment = payment; |
| | | } |
| | | |
| | | |
| | | public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) { |
| | | for (DetlDto dto : detlDtos) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | public static boolean has1(List<DetlDto> detlDtos, DetlDto detlDto) { |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) && Cools.eq(dto.getOwnerName(), detlDto.getOwnerName())) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static boolean has2(List<DetlDto> detlDtos, DetlDto detlDto) { |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) |
| | | && Cools.eq(dto.getOwnerName(), detlDto.getOwnerName()) && dto.getBeBatch()==detlDto.getBeBatch()) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static boolean has3(List<DetlDto> detlDtos, DetlDto detlDto) { |
| | | for (DetlDto dto : detlDtos) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) && Cools.eq(dto.getOwnerName(), detlDto.getOwnerName()) |
| | | && Cools.eq(dto.getSourceLocName(), detlDto.getSourceLocName()) && Cools.eq(dto.getTargetLocName(), detlDto.getTargetLocName())) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) ) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch,String ownerName) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) && Cools.eq(ownerName, detlDto.getOwnerName())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch,String ownerName,int beBatch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && Cools.eq(ownerName, detlDto.getOwnerName()) && beBatch== detlDto.getBeBatch()) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch,String ownerName,String sourceLocName,String targetLocName) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (DetlDto detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) |
| | | && Cools.eq(ownerName, detlDto.getOwnerName()) && Cools.eq(sourceLocName, detlDto.getSourceLocName()) |
| | | && Cools.eq(targetLocName, detlDto.getTargetLocName())) { |
| | | return detlDto; |
| | | } |
| | | } |