|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.entity.OrderDetl; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Set; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String temp2; | 
|---|
|  |  |  | private String proType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String outOrderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto() { | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String matnr, String batch) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String matnr, String batch, Double anfme) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String matnr, String batch, Double anfme, String proType, String temp2, String outOrderNo) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.proType = proType; | 
|---|
|  |  |  | this.temp2 = temp2; | 
|---|
|  |  |  | this.outOrderNo = outOrderNo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String orderNo, String matnr, String batch, Double anfme) { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch())) { | 
|---|
|  |  |  | 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())) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Cools.isEmpty(batch) && Cools.isEmpty(detlDto.getBatch())) { | 
|---|
|  |  |  | return detlDto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Cools.isEmpty(batch) && !Cools.isEmpty(detlDto.getBatch())) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Cools.isEmpty(detlDto.getBatch()) && !Cools.isEmpty(batch)) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (batch.equals(detlDto.getBatch())) { | 
|---|
|  |  |  | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) { | 
|---|
|  |  |  | return detlDto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|