| | |
| | | * @date 2026/1/9 20:16 |
| | | */ |
| | | private void generateOutStock(TaskDto taskDto, Long userId, int workNo, String wrkCode, Date now, int ioType, LocMast locMast, StaDesc staDesc, String deviceNo) { |
| | | if (Objects.isNull(deviceNo)) { |
| | | throw new CoolException("机台号不能为空!!"); |
| | | } |
| | | BasDevice basDevice = basDeviceService.selectOne(new EntityWrapper<BasDevice>() |
| | | .eq("status", 1) |
| | | .eq("dev_no", deviceNo)); |
| | | if (Objects.isNull(basDevice)) { |
| | | throw new CoolException("机台信息不存在或已禁用!!"); |
| | | } |
| | | |
| | | List<LocAroundBind> binds = locAroundBindService.selectList( new EntityWrapper<LocAroundBind>() |
| | | .eq("dev_no", basDevice.getDevNo()) |
| | | .eq("is_default", 1)); |
| | | |
| | | if (Objects.isNull(binds) || binds.isEmpty()) { |
| | | throw new CoolException("机台未设置默认工作位!!"); |
| | | } |
| | | |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet()); |
| | | |
| | | LocMast locMasts = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .in("loc_no", locs) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .orderAsc(Arrays.asList("loc_no")) |
| | | .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY")); |
| | | |
| | | if (Objects.isNull(locMasts)) { |
| | | binds = locAroundBindService.selectList(new EntityWrapper<LocAroundBind>() |
| | | .eq("dev_no", basDevice.getDevNo())); |
| | | |
| | | Set<String> nlocs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet()); |
| | | |
| | | locMasts = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .in("loc_no", nlocs) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .orderAsc(Arrays.asList("loc_no")) |
| | | .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY")); |
| | | if (Objects.isNull(locMasts)) { |
| | | throw new CoolException("暂无可用工作位!!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(), 1); |
| | | //TODO 1. 获取入库站点, 目标库位 3. 将出库明细添加至入库明细 |
| | | Integer staNo = staNos.stream().findFirst().get(); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn() + ""); // 源站 |
| | | wrkMast.setStaNo(staDesc.getStnNo() + ""); // 目标站 |
| | | // wrkMast.setStaNo(staDesc.getStnNo() + ""); // 目标站 |
| | | wrkMast.setStaNo(staNo + ""); // 目标站 |
| | | wrkMast.setLocNo(locMasts.getLocNo()); |
| | | wrkMast.setSourceLocNo(taskDto.getLocNo()); // 源库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | |
| | | throw new CoolException("当前机台,无可用工作台!!"); |
| | | } |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(1)); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(),1); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(), 1); |
| | | //TODO 1. 获取入库站点, 目标库位 3. 将出库明细添加至入库明细 |
| | | Integer staNo = staNos.stream().findFirst().get(); |
| | | |
| | |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | // {field: 'standby1', title: '机台号', align: 'center'}, |
| | | {field: 'standby1', title: '机台号', align: 'center'}, |
| | | { |
| | | field: 'anfme', |
| | | title: '数量', |
| | |
| | | width: 90, |
| | | templet: '#locFrozenLoc' |
| | | }, |
| | | { |
| | | field: 'standby1', |
| | | align: 'center', |
| | | title: '机台', |
| | | merge: ['deviceNo'], |
| | | templet: '#tbBasicTbStaNos' |
| | | }, |
| | | // { |
| | | // field: 'standby1', |
| | | // align: 'center', |
| | | // title: '机台', |
| | | // merge: ['deviceNo'], |
| | | // templet: '#tbBasicTbStaNos' |
| | | // }, |
| | | { |
| | | field: 'locNo', |
| | | align: 'center', |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'barcode',title: '条码'} |
| | | ,{field: 'barcode',title: 'SN'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号', minWidth: 250, width: 250} |
| | | ,{field: 'batch', align: 'center',title: '批号', hide: true} |
| | | ,{field: 'settle$', align: 'center',title: '状态', templet: '#settleTpl', minWidth: 160, width: 160} |
| | |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false, hide: true} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true , hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: true} |
| | | ,{field: 'zpallet', align: 'center',title: 'SN', hide: true} |
| | | ,{field: 'specs', align: 'center',title: '配置' , hide: true} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | |
| | | ,{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: 'barcode', align: 'center',title: 'SN', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | |
| | | , {field: 'staNo$', align: 'center', title: '目标站', width: 120} |
| | | , {field: 'sourceLocNo', align: 'center', title: '源库位', width: 120} |
| | | , {field: 'locNo', align: 'center', title: '目标库位', width: 120} |
| | | , {field: 'barcode', align: 'center', title: '条码', width: 110} |
| | | , {field: 'barcode', align: 'center', title: 'SN', width: 110} |
| | | , {field: 'preHave', align: 'center', title: '先入品', hide: true} |
| | | , {field: 'takeNone', align: 'center', title: '空操作', hide: true} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | |
| | | , {field: 'locNo$', align: 'center', title: '目标库位'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true} |
| | | , {field: 'barcode', align: 'center', title: '条码'} |
| | | , {field: 'barcode', align: 'center', title: 'SN'} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 80} |
| | | ]], |
| | | request: { |
| | |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width: 140} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级', width: 95} |
| | | // ,{field: 'taskType$', align: 'center',title: '任务类型', width: 95} |
| | | ,{field: 'barcode', align: 'center',title: '条码', width: 120} |
| | | ,{field: 'barcode', align: 'center',title: 'SN', width: 120} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机', width: 95} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站', width: 95} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站', width: 95} |
| | |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'barcode', align: 'center',title: 'SN'} |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | |
| | | <td style="font-weight: bold">{{ wrkDetl.anfme }}</td> |
| | | </tr> |
| | | <tr style="background: none"> |
| | | <td>条码:</td> |
| | | <td>SN:</td> |
| | | <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td> |
| | | </tr> |
| | | {{# }); }} |
| | |
| | | <td style="font-weight: bold">{{ wrkDetl.anfme }}</td> |
| | | </tr> |
| | | <tr style="background: none"> |
| | | <td>条码:</td> |
| | | <td>SN:</td> |
| | | <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td> |
| | | </tr> |
| | | {{# }); }} |
| | |
| | | <td style="font-weight: bold">{{ wrkDetl.anfme }}</td> |
| | | </tr> |
| | | <tr style="background: none"> |
| | | <td>条码:</td> |
| | | <td>SN:</td> |
| | | <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td> |
| | | </tr> |
| | | {{# }); }} |
| | |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">条码: </label> |
| | | <label class="layui-form-label layui-form-required">SN: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <label class="layui-form-label">SN</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px"> |
| | |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <label class="layui-form-label">SN</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px" class="layui-form"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">托盘条码: </label> |
| | | <label class="layui-form-label">SN: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="zpallet" placeholder="请输入托盘条码"> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <label class="layui-form-label">SN: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |