| | |
| | | checkType: "盘点类型", |
| | | areaId: "库区ID", |
| | | areaName: "库区", |
| | | anfme: "库面数量", |
| | | anfme: "库存数量", |
| | | checkQty: "盘点数量", |
| | | exceStatus: "执行状态", |
| | | }, |
| | |
| | | const mas = data.filter(item => selectedIds.includes(item.id)).map(item => item.matnrCode); |
| | | //设置库位信息筛选条件 |
| | | setSelectedMatnr(mas); |
| | | // onUnselectItems() |
| | | onUnselectItems() |
| | | } |
| | | return ( |
| | | record.exceStatus != 3 ? <><Button label="toolbar.confirm" size="medium" onClick={handleRowClick} /></> : <></> |
| | |
| | | </Box> |
| | | <Box sx={{ textAlign: 'center' }}> |
| | | <CloseButton setOpen={setOpen} /> |
| | | <SubmitButton selectedIds={selectedIds} setSelectedIds={setSelectedIds} rowSelectedIds={rowSelectedIds} gridRef={gridRef} record={record} /> |
| | | <SubmitButton selectedIds={selectedIds} setOpen={setOpen} setSelectedIds={setSelectedIds} rowSelectedIds={rowSelectedIds} gridRef={gridRef} record={record} /> |
| | | </Box> |
| | | </Card> |
| | | </Grid> |
| | |
| | | |
| | | |
| | | //提交按钮 |
| | | const SubmitButton = ({ selectedIds, setSelectedIds, rowSelectedIds, gridRef, record }) => { |
| | | const SubmitButton = ({ selectedIds, setSelectedIds, rowSelectedIds, gridRef, record, setOpen }) => { |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const translate = useTranslate(); |
| | |
| | | const { data: { code, data, msg } } = await request.post('/check/generate/tasks', records); |
| | | if (code == 200) { |
| | | refresh(); |
| | | setOpen(false) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | } |
| | | |
| | | public Double getDiffQty() { |
| | | if (checkQty.compareTo(0.0) <= 0) { |
| | | return 0.0; |
| | | } |
| | | Double diffQty = Math.round((this.checkQty - this.anfme) * 1000) / 1000.0; |
| | | return diffQty; |
| | | } |
| | |
| | | * @description: 自动获取已生成盘点任务的盘点列表 |
| | | * @version 1.0 |
| | | */ |
| | | @Scheduled(cron = "0/5 * * * * ?") |
| | | @Scheduled(cron = "0/15 * * * * ?") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void genReCheck() { |
| | | List<CheckDiffItem> list = checkDiffItemService.list(new LambdaQueryWrapper<CheckDiffItem>().select(CheckDiffItem::getTaskItemId)); |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>() |
| | | .select(Task::getId) |
| | | .eq(Task::getTaskType, TaskType.TASK_TYPE_CHECK_OUT.type)); |
| | | if (tasks.isEmpty()) { |
| | | return; |
| | | } |
| | | List<CheckDiffItem> list = checkDiffItemService |
| | | .list(new LambdaQueryWrapper<CheckDiffItem>() |
| | | .select(CheckDiffItem::getTaskItemId)); |
| | | if (list.isEmpty()) { |
| | | return; |
| | | } |
| | | Set<Long> taskIds = tasks.stream().map(Task::getId).collect(Collectors.toSet()); |
| | | List<Long> itemIds = list.stream().map(CheckDiffItem::getTaskItemId).collect(Collectors.toList()); |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().notIn(TaskItem::getId, itemIds)); |
| | | List<TaskItem> taskItems = taskItemService |
| | | .list(new LambdaQueryWrapper<TaskItem>() |
| | | .in(TaskItem::getTaskId, taskIds) |
| | | .notIn(TaskItem::getId, itemIds)); |
| | | if (taskItems.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | private OutStockService outStockService; |
| | | @Autowired |
| | | private OutStockItemService outStockItemService; |
| | | |
| | | @Autowired |
| | | private CheckOrderItemService checkOrderItemService; |
| | | @Autowired |
| | | private CheckOrderService checkOrderService; |
| | | @Autowired |
| | | private CheckDiffService checkDiffService; |
| | | @Autowired |
| | | private CheckDiffItemService checkDiffItemService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | .setSql("work_qty = work_qty - " + taskItem.getAnfme()))) { |
| | | throw new CoolException("盘点单执行数量修改失败!!"); |
| | | } |
| | | |
| | | List<CheckDiffItem> diffItems = checkDiffItemService |
| | | .list(new LambdaQueryWrapper<CheckDiffItem>() |
| | | .eq(CheckDiffItem::getTaskItemId, taskItem.getTaskId())); |
| | | if (!diffItems.isEmpty()) { |
| | | CheckDiffItem item = diffItems.stream().findFirst().get(); |
| | | List<CheckDiffItem> items = checkDiffItemService.list(new LambdaQueryWrapper<CheckDiffItem>() |
| | | .eq(CheckDiffItem::getId, item.getCheckId())); |
| | | if (items.isEmpty()) { |
| | | checkDiffService.removeById(item.getCheckId()); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | # global-config:
|
| | | # field-strategy: 0
|
| | | configuration:
|
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | map-underscore-to-camel-case: true
|
| | | cache-enabled: true
|
| | | call-setters-on-nulls: true
|