| | |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | @TableId(value = "wrk_no", type = IdType.AUTO) |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty("任务类型: agv, crn") |
| | |
| | | throw new CoolException("数据错误,组拖档已不存在!!"); |
| | | } |
| | | |
| | | //修改单据执行数量 |
| | | waitPakins.forEach(waitPakin -> { |
| | | OrderDetlPakin detlPakin = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("matnr", waitPakin.getMatnr()) |
| | | .eq("barcode", waitPakin.getZpallet()) |
| | | .eq("order_no", waitPakin.getOrderNo())); |
| | | if (Objects.isNull(detlPakin)) { |
| | | throw new CoolException("单据明细不存在!!"); |
| | | } |
| | | detlPakin.setWorkQty(waitPakin.getAnfme()); |
| | | |
| | | if (!orderDetlPakinService.updateById(detlPakin)) { |
| | | throw new CoolException("单据明细修改失败!!"); |
| | | } |
| | | }); |
| | | |
| | | |
| | | generateCrnInTask(waitPakins, param.getStation(), param.getLocType1(), userId); |
| | | } |
| | | |
| | |
| | | OrderInAndOutUtil.updateOrder(Boolean.FALSE, orderDetl.getOrderId(), 2L, userId); |
| | | } |
| | | |
| | | //TODO 判断设备号,生成入库任务。没有机台号,说明是普通出库任务 |
| | | if (!Objects.isNull(deviceNo)) { |
| | | genInStock(wrkMast, deviceNo, userId); |
| | | } |
| | | // //TODO 判断设备号,生成入库任务。没有机台号,说明是普通出库任务 |
| | | // if (!Objects.isNull(deviceNo)) { |
| | | // genInStock(wrkMast, deviceNo, userId); |
| | | // } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | if (locMast.getLocSts().equals("F")) { |
| | |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | wrkMast.setStaNo(staNo + ""); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | //判断是否为领料出库 |
| | | if (Objects.isNull(wrkMast.getWrkCode())) { |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | } |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setModiUser(userId); |
| | |
| | | * @author Ryan |
| | | * @date 2026/1/5 14:07 |
| | | */ |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReportOrderIssued() { |
| | | // String erpReport = Parameter.get().getErpReport(); |
| | |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("组托档保存失败!!"); |
| | | } |
| | | |
| | | //修改单据执行数量 |
| | | OrderDetlPakin detlPakin = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("matnr", waitPakin.getMatnr()) |
| | | .eq("barcode", waitPakin.getZpallet()) |
| | | .eq("order_no", waitPakin.getOrderNo())); |
| | | if (Objects.isNull(detlPakin)) { |
| | | throw new CoolException("单据明细不存在!!"); |
| | | } |
| | | detlPakin.setWorkQty(waitPakin.getAnfme() * matnr.getVolume()); |
| | | |
| | | if (!orderDetlPakinService.updateById(detlPakin)) { |
| | | throw new CoolException("单据明细修改失败!!"); |
| | | } |
| | | }); |
| | | } else { |
| | | throw new CoolException("入库单据明细不存在!!!"); |
| | |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(15L); |
| | | if (!Objects.isNull(wrkMast.getWrkCode())) { |
| | | //领料出库任务,不修改 |
| | | } else { |
| | | wrkMast.setWrkSts(15L); |
| | | } |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | // exceptionHandle("更新出库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | |
| | | return num.toFixed(2); |
| | | } |
| | | } |
| | | , {field: 'zpallet', align: 'center', title: '托盘条码', hide: false} |
| | | , {field: 'zpallet', align: 'center', title: 'SN', hide: false} |
| | | , {field: 'specs', align: 'center', title: '规格', hide: false} |
| | | , { |
| | | field: 'safeQty', align: 'center', title: '归零阀值', hide: true, templet: function (d) { |
| | |
| | | , {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: 'SN', hide: false} |
| | | , {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: 'batch', title: '批号' }, |
| | | { field: 'specs', title: '规格' }, |
| | | { field: 'unit', title: '单位' }, |
| | | { field: 'anfme', title: '待完结数量' }, |
| | | { field: 'qty', title: '待上报数量', style: 'font-weight: bold' }, |
| | | { field: 'workQty', title: '已上报数量' } |
| | | { field: 'anfme', title: '数量' }, |
| | | { field: 'workQty', title: '执行中' }, |
| | | { field: 'qty', title: '已完成', style: 'font-weight: bold' } |
| | | |
| | | |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | |
| | | // {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: '数量', |
| | |
| | | templet: '#locFrozenLoc' |
| | | }, |
| | | { |
| | | field: 'staNos', |
| | | field: 'standby1', |
| | | align: 'center', |
| | | title: '机台', |
| | | merge: ['deviceNo'], |
| | | templet: '#tbBasicTbStaNos' |
| | | }, |
| | | { |
| | | field: 'locNo', |
| | | align: 'center', |
| | | title: '出库站', |
| | | merge: ['locNo'], |
| | |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true, width: 160} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:300} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:350} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | |
| | | }); |
| | | break; |
| | | // 取消 |
| | |
| | | }); |
| | | } |
| | | break; |
| | | //空板回库 |
| | | case 'empty': |
| | | layer.confirm('空板入库该笔工作档', {title: '工作号:'+data.wrkNo, shadeClose: true}, function () { |
| | | http.post() |
| | | }) |
| | | layer.closeAll(); |
| | | break; |
| | | // 拣料入库 |
| | | case 'pick': |
| | | layer.confirm('拣料入库该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="priWrkMast">维护状态</a> |
| | | {{#if (d.ioType === 101) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">空</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">余</a> |
| | | {{# } }} |
| | | {{#if (d.ioType === 103) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">拣</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">空</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">余</a> |
| | | {{# } }} |
| | | {{#if (d.ioType === 107) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">盘</a> |