package com.zy.asrs.entity.param; import lombok.Data; import java.util.List; /** * Created by vincent on 2020/6/18 */ @Data public class LocDetlAdjustParam { // 库位号 private String locNo; // 调整库存明细集合 private List list; @Data public static class LocDetlAdjust { // 商品编号 private String matnr; // 序列码 private String batch; // 变更数量 private Double count; private String zpallet; private String model; private String manuDate; private Double weight; private Double manLength; private Double volume; // public LocDetlAdjust(String matnr, String batch, Double count) { // this.matnr = matnr; // this.batch = batch; // this.count = count; // } } // public void integrate() { // if (Cools.isEmpty(list)) { // return; // } // List copyList = new ArrayList<>(); // for (LocDetlAdjust adjust : list) { // boolean exit = false; // for (LocDetlAdjust copy : copyList) { // if (adjust.getMatnr().equals(copy.getMatnr()) && Cools.eq(adjust.getBatch(), copy.getBatch())) { // copy.setCount(copy.getCount() + adjust.getCount()); // exit = true; // break; // } // } // if (!exit) { // copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount())); // } // } // list = copyList; // } }