| | |
| | | public static class MatList{ |
| | | private String boxPos; // 箱子位置 |
| | | private String packageGroupNo; // 包装组号 |
| | | private String boxType; // 木箱类型 |
| | | private String rollType; // 管芯类型 |
| | | private String wideInWidth; // 实测宽幅(分切成品下料) |
| | | private String thickness; // 生箔厚度(分切成品下料) |
| | | private String fqTime; // 分切下料时间 |
| | | private List<Rolls> rolls; // 卷集合 |
| | | } |
| | | @Data |
| | |
| | | List<LocDetl> locDetls = new ArrayList<>(); |
| | | list.forEach(locMat -> { |
| | | LocMast locMast = locMastService.selectById(locMat.getA()); |
| | | if (locMast == null) { |
| | | throw new CoolException(locMat.getA() + ":库位不存在!"); |
| | | } |
| | | if (!locMast.getLocSts().equals("O")) { |
| | | throw new CoolException(locMat.getA() + ":库位不为空!"); |
| | | } |
| | |
| | | if ("F".equals(locMat.getB())) { |
| | | LocDetl locDetl = new LocDetl(); |
| | | locDetl.setLocNo(locMat.getA()); |
| | | locDetl.setZpallet("test" + num); |
| | | locDetl.setAnfme(1.0); |
| | | locDetl.setMatnr("3μm×10mm"); |
| | | locDetl.setMaktx("3μm×10mm"); |
| | | locDetl.setBatch("t" + num); |
| | | locDetl.setSpecs("1"); |
| | | locDetl.setModel("t" + num); |
| | | locDetl.setColor(locMat.getC()); // 木箱类型 |
| | | locDetl.setBrand("t" + num); |
| | | locDetl.setPrice(800.0); |
| | | String flag = "A" + num; |
| | | locDetl.setUnit(flag); |
| | | locDetl.setModel(flag); |
| | | locDetl.setBrand(flag); |
| | | locDetl.setOrigin("中"); |
| | | locDetl.setColor(locMat.getC()); |
| | | locDetl.setManu("A"); |
| | | locDetl.setSku("10"); |
| | | locDetl.setItemNum("10"); |
| | | locDetl.setManuDate("2024-02-01 23:12:21"); |
| | | locDetl.setWeight(900.0); |
| | | locDetl.setVolume(1000.0); |
| | | locDetl.setSpecs("1"); |
| | | locDetl.setLength(800.0); |
| | | locDetl.setZpallet(flag); |
| | | locDetl.setBarcode(flag); |
| | | locDetl.setAnfme(1.0); |
| | | locDetl.setModiTime(now); |
| | | locDetl.setModiUser(userId); |
| | | locDetl.setAppeTime(now); |
| | |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | obj.getRolls().forEach(roll -> { |
| | | // Mat mat = matService.selectByMatnr(roll.getSpecs()); |
| | | // if (mat == null) { |
| | | // mat = new Mat(); |
| | | // mat.setTagId(6L); |
| | | // mat.setMatnr(roll.getSpecs()); |
| | | // mat.setMaktx(roll.getSpecs()); |
| | | // mat.setSpecs(roll.getSpecs()); |
| | | // mat.setStatus(1); |
| | | // mat.setCreateTime(now); |
| | | // mat.setUpdateTime(now); |
| | | // if (!matService.insert(mat)) { |
| | | // throw new CoolException("物料导入失败!"); |
| | | // } |
| | | // } |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setMatnr(roll.getSpecs()); // 规格 |
| | | wrkDetl.setMaktx(roll.getSpecs()); //规格 |
| | | wrkDetl.setBatch(roll.getBoxNo()); // 箱号 |
| | | wrkDetl.setUnit(roll.getBoxNo()); // 箱号 |
| | | wrkDetl.setModel(roll.getRollNo()); // 卷号 |
| | | wrkDetl.setBrand(obj.getPackageGroupNo()); // 包装组号 |
| | | wrkDetl.setZpallet(param.getBarcode()); // 托盘吗 |
| | | wrkDetl.setZpallet(param.getBarcode()); // 托盘码 |
| | | wrkDetl.setBarcode(param.getBarcode()); |
| | | wrkDetl.setOrigin(obj.getBoxPos()); // 木箱在托盘位置 |
| | | wrkDetl.setColor(obj.getBoxType()); // 木箱类型 |
| | | wrkDetl.setManu(obj.getRollType()); // 管芯类型 |
| | | wrkDetl.setSku(obj.getWideInWidth()); // 实测宽幅 |
| | | wrkDetl.setItemNum(obj.getThickness()); // 生箔厚度 |
| | | wrkDetl.setManuDate(obj.getFqTime()); // 分切下料时间 |
| | | wrkDetl.setWeight(roll.getNetWeight()); // 净重 |
| | | wrkDetl.setVolume(roll.getGrossWeight()); // 毛重 |
| | | wrkDetl.setPrice(roll.getLength()); |
| | | wrkDetl.setSpecs(String.valueOf(roll.getSplices())); |
| | | wrkDetl.setLength(roll.getLength()); // 长度 |
| | | wrkDetl.setSpecs(String.valueOf(roll.getSplices())); // 接头 |
| | | wrkDetl.setAnfme(1.0); |
| | | // wrkDetl.setThreeCode(null); // 通过mes或excel导入检测是否合格 0不合格,1 合格 |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setModiTime(now); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作明细失败"); |
| | | } |
| | | |
| | | // 物料表备份一份 |
| | | Mat mat = new Mat(); |
| | | mat.sync(wrkDetl); |
| | | mat.setTagId(6L); |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("备份物料表失败"); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | locDetl.setBatch(""); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | // exceptionHandle("全板入库 ===>> 添加库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | |
| | | |
| | | var matCols = [ |
| | | {field: 'matnr', align: 'center',title: '规格', width: 180} |
| | | ,{field: 'unit', align: 'center',title: '箱号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '卷号', hide: false} |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '编号'} |
| | | // ,{field: 'tagId$', align: 'center',title: '所属归类'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', width: 200} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', width: 200,hide: true} |
| | | // ,{field: 'name', align: 'center',title: '别名'} |
| | | ,{field: 'specs', align: 'center',title: '接头'} |
| | | ,{field: 'model', align: 'center',title: '卷号', hide: false} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '木箱类型', hide: true} |
| | | ,{field: 'brand$', align: 'center',title: '木箱类型', hide: false} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '包装组号', hide: false} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'color', align: 'center',title: '木箱类型', hide: false} |
| | | // ,{field: 'brand$', align: 'center',title: '木箱类型', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '管芯类型', hide: false} |
| | | ,{field: 'sku', align: 'center',title: '实测宽幅', hide: false} |
| | | ,{field: 'itemNum', align: 'center',title: '生箔厚度', hide: false} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '净重', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '毛重', hide: false} |
| | | ,{field: 'length', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'price', align: 'center',title: '价格', hide: true} |
| | | ,{field: 'specs', align: 'center',title: '接头',hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '合格否', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | |
| | | {field: 'matnr', align: 'center',title: '规格', sort:false, hide: false} |
| | | ,{field: 'maktx', align: 'center',title: '品名', sort:true, hide: true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '箱号', hide: false, sort:true} |
| | | ,{field: 'batch', align: 'center',title: '批次', hide: true, sort:true} |
| | | ,{field: 'unit', align: 'center',title: '箱号', hide: false} |
| | | ,{field: 'model', align: 'center',title: '卷号', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '木箱类型', hide: true, sort:true} |
| | | ,{field: 'brand', align: 'center',title: '包装组号', hide: true, sort:true} |
| | | ,{field: 'brand$', align: 'center',title: '木箱类型', hide: false, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false, sort:true} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '接头', hide: false} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'price', align: 'center',title: '价格', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '实测宽幅', hide: true} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '生箔厚度', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: false, sort:true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | |
| | | {field: 'matnr', align: 'center',title: '规格', sort:true,width: 120} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true,hide: true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'batch', align: 'center',title: '箱号', width: 250, sort:true} |
| | | ,{field: 'batch', align: 'center',title: '批次', width: 250, sort:true,hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'specs', align: 'center',title: '接头'} |
| | |
| | | ,{field: 'color', align: 'center',title: '木箱类型', hide: false,width: 250} |
| | | ,{field: 'brand', align: 'center',title: '包装组号', hide: false} |
| | | ,{field: 'brand$', align: 'center',title: '木箱类型', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'unit', align: 'center',title: '箱号', hide: false} |
| | | ,{field: 'price', align: 'center',title: '价格', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '合格否', hide: false} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'tagId$', align: 'center',title: '归类', templet: '#tagTpl'} |
| | | ,{field: 'tagId$', align: 'center',title: '归类', templet: '#tagTpl',hide:true} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | |
| | | <div class="layui-fluid"> |
| | | <!-- 左 --> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md3"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 树工具栏 --> |
| | | <div class="layui-form toolbar" id="organizationTreeBar"> |
| | | <div class="layui-inline" style="max-width: 200px;"> |
| | | <input id="condition" onkeyup="findData(this)" type="text" class="layui-input" placeholder="请输入关键字" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn layui-btn-sm" id="treeReset" style="padding: 0 10px"> |
| | | <i class="layui-icon layui-icon-close"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <!-- 树 --> |
| | | <div class="layui-form toolbar" id="organizationTree"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-col-md3">--> |
| | | <!-- <div class="layui-card">--> |
| | | <!-- <div class="layui-card-body" style="padding: 10px;">--> |
| | | <!-- <!– 树工具栏 –>--> |
| | | <!-- <div class="layui-form toolbar" id="organizationTreeBar">--> |
| | | <!-- <div class="layui-inline" style="max-width: 200px;">--> |
| | | <!-- <input id="condition" onkeyup="findData(this)" type="text" class="layui-input" placeholder="请输入关键字" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <button class="layui-btn icon-btn layui-btn-sm" id="treeReset" style="padding: 0 10px">--> |
| | | <!-- <i class="layui-icon layui-icon-close"></i>--> |
| | | <!-- </button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <!– 树 –>--> |
| | | <!-- <div class="layui-form toolbar" id="organizationTree"></div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 右 --> |
| | | <div class="layui-col-md9"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |