自动化立体仓库 - WMS系统
luxiaotao1123
2022-04-02 c61be765fe40fce1a57471a8fc8b93932c0a970c
src/main/java/com/zy/common/model/DetlDto.java
@@ -29,6 +29,11 @@
        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;
@@ -61,16 +66,8 @@
    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;
@@ -81,19 +78,7 @@
            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;
            }
        }