|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class DetlDto { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String matnr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private int owner; | 
|---|
|  |  |  | private String ownerName; | 
|---|
|  |  |  | private int beBatch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private int payment; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Double weight; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.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; | 
|---|
|  |  |  | this.owner = 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String orderNo, String matnr, String batch, Double anfme) { | 
|---|
|  |  |  | this.orderNo = orderNo; | 
|---|
|  |  |  | public DetlDto(String matnr, String batch, Double anfme,int owner) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.owner = owner; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String matnr, String batch, Double anfme,int owner,Double weight) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.owner = owner; | 
|---|
|  |  |  | this.weight = weight; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public DetlDto(String matnr, String batch, Double anfme,Double weight) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.anfme = 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) { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch())) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|