| | |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'matnrId', 'asnId']} |
| | | omit={['id', 'createTime', 'purQty','purUnit', 'createBy', 'memo', 'poDetlId', 'matnrId', 'asnId']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="asnId" label="table.field.asnOrderItem.asnId" /> |
| | |
| | | preferenceKey='waitPakinItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | omit={['id', 'pakinId', 'createTime', 'createBy', 'memo']} |
| | | omit={['id', 'pakinId', 'createTime', 'createBy', 'memo', 'fieldsIndex']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="pakinId" label="table.field.waitPakinItem.pakinId" /> |
| | |
| | | const createTask = () => { |
| | | setSiteDialog(true) |
| | | setSource(rows) |
| | | onUnselectItems() |
| | | refresh() |
| | | } |
| | | |
| | |
| | | public R getDeltByCode(String code) { |
| | | //TODO 后续需根据策略配置,获取组拖数据。如:混装,按批次混装等 |
| | | LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new QueryWrapper<WarehouseAreasItem>() |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch, qty, work_qty, matnr_code, matnr_id, maktx").lambda() |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch,unit, stock_unit, qty, work_qty, matnr_code, matnr_id, maktx").lambda() |
| | | .eq(WarehouseAreasItem::getTrackCode, code) |
| | | .groupBy(WarehouseAreasItem::getSplrBatch, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getAreaId, WarehouseAreasItem::getMatnrId); |
| | | return R.ok(warehouseAreasItemService.getOne(queryWrapper)); |
| | |
| | | .setFieldsIndex(asnOrderItem.getFieldsIndex()) |
| | | .setBarcode(asnOrderItem.getTrackCode()) |
| | | .setQty(asnOrderItem.getQty()) |
| | | .setStockUnit(asnOrderItem.getStockUnit()) |
| | | .setPurUnit(asnOrderItem.getPurUnit()) |
| | | .setPoCode(asnOrderItem.getPoCode()) |
| | | .setAnfme(asnOrderItem.getAnfme()) |
| | | .setPurQty(asnOrderItem.getPurQty()) |
| | |
| | | } |
| | | //SET 物料最大存放数量 |
| | | detlsDto.setMaxQty(matnr.getMaxQty()) |
| | | .setMatnrId(matnr.getId()) |
| | | .setStockUnit(matnr.getStockUnit()); |
| | | .setMatnrId(matnr.getId()); |
| | | QlyInspect inspect = qlyInspectMapper.selectOne(new LambdaQueryWrapper<QlyInspect>() |
| | | .eq(QlyInspect::getAsnId, asnOrderItem.getAsnId())); |
| | | if (!Objects.isNull(inspect)) { |
| | |
| | | LocItem stockItem = locItemService.getOne(new LambdaQueryWrapper<LocItem>() |
| | | // .eq(LocItem::getOrderItemId, asnOrderItem.getId()) |
| | | .eq(LocItem::getFieldsIndex, asnOrderItem.getFieldsIndex()) |
| | | .eq(LocItem::getBatch, asnOrderItem.getBatch()) |
| | | .eq(LocItem::getBatch, asnOrderItem.getSplrBatch()) |
| | | .eq(LocItem::getMatnrId, asnOrderItem.getMatnrId())); |
| | | //SET 当前库存数量 |
| | | if (Objects.isNull(stockItem)) { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @ApiOperation("任务出库置顶") |
| | | @PostMapping("/task/top/{id}") |
| | |
| | | * @return |
| | | * @time 2025/4/2 12:37 |
| | | */ |
| | | @Scheduled(cron = "0 0/05 * * * ? ") |
| | | // @Scheduled(cron = "0/5 * * * * ?") |
| | | // @Scheduled(cron = "0 0/05 * * * ? ") |
| | | @Scheduled(cron = "0/15 * * * * ?") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void completeInStock() throws Exception { |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTaskStatus, TaskStsType.COMPLETE_IN.id)); |
| | |
| | | @Autowired |
| | | private WarehouseAreasService warehouseAreasService; |
| | | |
| | | @Autowired |
| | | private WarehouseAreasItemService warehouseAreasItemService; |
| | | |
| | | |
| | | /** |
| | | * @param |
| | |
| | | if (!taskItemService.saveBatch(taskItems)) { |
| | | throw new CoolException("任务明细保存失败!!"); |
| | | } |
| | | waitPakinItems.forEach(item -> { |
| | | if (! waitPakinItemService.update(new LambdaUpdateWrapper<WaitPakinItem>() |
| | | .set(WaitPakinItem::getWorkQty, item.getAnfme()) |
| | | .eq(WaitPakinItem::getId, item.getId()))) { |
| | | throw new CoolException("组托明细修执行数量修改失败!!"); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | if (!waitPakinService.update(new LambdaUpdateWrapper<WaitPakin>() |
| | |
| | | //保存库存明细 |
| | | try { |
| | | saveStockItems(items, pakinItem); |
| | | //移出收货区库存 |
| | | removeReceiptStock(pakinItem); |
| | | } catch (Exception e) { |
| | | throw new CoolException("库存管理保存更新失败!!"); |
| | | } |
| | |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 移除收货区库存 |
| | | * @param |
| | | * @return |
| | | * @time 2025/4/30 16:32 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | private void removeReceiptStock(WaitPakinItem pakinItem) { |
| | | WarehouseAreasItem itemServiceOne = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>() |
| | | .eq(WarehouseAreasItem::getTrackCode, pakinItem.getTrackCode()) |
| | | .eq(WarehouseAreasItem::getSplrBatch, pakinItem.getBatch())); |
| | | if (Objects.isNull(itemServiceOne)) { |
| | | throw new CoolException("数据错误,请查看请货区库存是否存在!!"); |
| | | } |
| | | Double workQty = itemServiceOne.getWorkQty() - pakinItem.getAnfme(); |
| | | Double qty = itemServiceOne.getQty() + pakinItem.getAnfme(); |
| | | itemServiceOne.setWorkQty(workQty).setQty(qty); |
| | | |
| | | if (!waitPakinService.update(new LambdaUpdateWrapper<WaitPakin>() |
| | | .set(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_TASK_DONE.val) |
| | | .eq(WaitPakin::getId, pakinItem.getPakinId()))) { |
| | | throw new CoolException("组拖状态修改失败!!"); |
| | | } |
| | | |
| | | if (qty.compareTo(itemServiceOne.getAnfme()) == 0.00) { |
| | | if (!warehouseAreasItemService.removeById(itemServiceOne.getId())) { |
| | | throw new CoolException("收货区物料删除失败!!"); |
| | | } |
| | | } else { |
| | | if (!warehouseAreasItemService.updateById(itemServiceOne)) { |
| | | throw new CoolException("收货区库完成数量修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 更新库位明细 |
| | | * @param |
| | | * @return |
| | |
| | | } |
| | | } else { |
| | | LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new QueryWrapper<WarehouseAreasItem>() |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch, qty, work_qty, matnr_code, matnr_id, maktx") |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch, qty, unit, stock_unit, work_qty, matnr_code, matnr_id, maktx") |
| | | .lambda() |
| | | .in(WarehouseAreasItem::getTrackCode, tracks) |
| | | .groupBy(WarehouseAreasItem::getSplrBatch, |