| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocDetlRullUpDetail; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.LocDetlRullUpDetailService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import io.swagger.models.License; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Data |
| | | public class TrussCombParam { |
| | | |
| | | private String barcode;// 字符串 托盘码 |
| | | private String palletizingNo;// 是 字符串 码垛位编号 |
| | | private String palletizingNo2;// 是 字符串 目标码垛位编号 |
| | | private String boxType;// 是 字符串 木箱类型 |
| | | private String uuid;// 字符串 时间戳 |
| | | private String barcode;// 字符串 托盘码 订单共用 //上传 |
| | | private Integer souSta;// 字符串 托盘码 订单共用 |
| | | private Integer palletizingNo;// 是 字符串 码垛位编号 |
| | | private Integer staStart;// 是 字符串 码垛位编号 |
| | | private Integer palletizingNo2;// 是 字符串 目标码垛位编号 订单共用 //上传 |
| | | private Integer staEnd;// 是 字符串 目标码垛位编号 订单共用 //上传 |
| | | private String boxType;// 是 字符串 木箱类型 brand //上传 |
| | | private String uuid;// 字符串 时间戳 //上传 |
| | | private String createTime;// 字符串 创建时间 |
| | | private String orderNo;// 字符串 订单号 //上传 |
| | | |
| | | private List<MatList> matLists;// 是 列表 拆垛货物信息(2箱,尾箱可能1箱) |
| | | private List<MatList> matList;// 是 列表 拆垛货物信息(2箱,尾箱可能1箱) //上传 |
| | | |
| | | @Data |
| | | public static class MatList{ |
| | | private String matnr;// 是 字符串 物料编码 |
| | | private String maktx;// 字符串 物料名称 |
| | | private String boxNo;// 是 字符串 木箱编号(唯一字段,出库依据,出库时按照木箱编号出库) |
| | | private String position;// 是 字符串 木箱位置(拆垛时需要) |
| | | private Double weight;// 是 小数型 重量 |
| | | private Integer anfme;// 数字型 木箱中铜箔数量 |
| | | private String batch;// 字符串 批次号 |
| | | private String matnr;// 是 字符串 物料编码 //上传 |
| | | private String maktx;// 字符串 物料名称 //上传 |
| | | private String boxNo;// 是 字符串 木箱编号(唯一字段,出库依据,出库时按照木箱编号出库) batch //上传 |
| | | private String position;// 是 字符串 木箱位置(拆垛时需要) origin //上传 |
| | | private Double weight;// 是 小数型 重量 //上传 |
| | | private Integer anfme;// 数字型 木箱中铜箔数量 //上传 |
| | | private String batch;// 字符串 箱号 |
| | | private String specs;// 字符串 规格 |
| | | private String standby4;// 卷信息Id //上传 |
| | | private List<MatDetlList> matDetlList;// 是 列表 木箱中铜箔信息 |
| | | } |
| | | |
| | | @Data |
| | | public static class MatDetlList{ |
| | | private String boxNoDetl;// 是 字符串 铜箔编号(唯一字段) |
| | | private String positionDetl;// 是 字符串 铜箔位置(拆垛时需要) |
| | | private Double weightDetl;// 是 小数型 重量 |
| | | private String batchDetl;// 字符串 批次号 |
| | | private String specsDetl;// 字符串 规格 |
| | | private String boxNoDetl;// 是 字符串 铜箔编号(唯一字段) //上传 |
| | | private String positionDetl;// 是 字符串 铜箔位置(拆垛时需要) //上传 |
| | | private String weightDetl;// 是 小数型 重量 //上传 |
| | | private String batchDetl;// 字符串 批次号 //上传 |
| | | private String specsDetl;// 字符串 规格 //上传 |
| | | } |
| | | |
| | | public TrussCombParam(){} |
| | | |
| | | public TrussCombParam(TrussCombParam trussCombParam, Order order, List<OrderDetl> orderDetlList){ |
| | | LocDetlRullUpDetailService locDetlRullUpDetailService = SpringUtils.getBean(LocDetlRullUpDetailService.class); |
| | | |
| | | this.barcode = trussCombParam.getBarcode(); |
| | | this.staStart = 147; |
| | | this.palletizingNo2 = trussCombParam.getPalletizingNo2(); |
| | | this.staEnd = trussCombParam.getStaEnd(); |
| | | this.boxType = orderDetlList.get(0).getBrand(); |
| | | this.uuid = trussCombParam.getBarcode(); |
| | | this.orderNo = trussCombParam.getOrderNo(); |
| | | List<MatList> matLists = new ArrayList<>(); |
| | | for (OrderDetl orderDetl:orderDetlList){ |
| | | MatList matList = new MatList(); |
| | | matList.setMatnr(orderDetl.getMatnr()); |
| | | matList.setMaktx(orderDetl.getMaktx()); |
| | | matList.setAnfme(orderDetl.getAnfme().intValue()); |
| | | matList.setBatch(orderDetl.getBatch()); |
| | | matList.setBoxNo(orderDetl.getBatch()); |
| | | matList.setPosition("1"); |
| | | matList.setWeight(orderDetl.getWeight()); |
| | | matList.setSpecs(orderDetl.getSpecs()); |
| | | List<MatDetlList> matDetlLists= new ArrayList<>(); |
| | | List<LocDetlRullUpDetail> locDetlRullUpDetails = locDetlRullUpDetailService.selectList(new EntityWrapper<LocDetlRullUpDetail>().eq("uuid", orderDetl.getUnit())); |
| | | for (LocDetlRullUpDetail locDetlRullUpDetail:locDetlRullUpDetails){ |
| | | MatDetlList matDetlList = new MatDetlList(); |
| | | matDetlList.setBoxNoDetl(locDetlRullUpDetail.getRollNo()); |
| | | matDetlList.setWeightDetl(locDetlRullUpDetail.getRollWeight()); |
| | | matDetlList.setBatchDetl(locDetlRullUpDetail.getStandby1()); |
| | | matDetlList.setSpecsDetl(locDetlRullUpDetail.getStandby2()); |
| | | matDetlLists.add(matDetlList); |
| | | } |
| | | matList.setMatDetlList(matDetlLists); |
| | | matLists.add(matList); |
| | | } |
| | | this.matList = matLists; |
| | | } |
| | | |
| | | } |