| | |
| | | import basContainer from "../page/basicInfo/basContainer"; |
| | | import outBound from "../page/outWork/outBound"; |
| | | import chineseMessages from "./core/chineseMessages"; |
| | | |
| | | const customChineseMessages = { |
| | |
| | | const refresh = useRefresh(); |
| | | |
| | | const checkClick = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/task/pick/` + record.id); |
| | | const { data: { code, data, msg } } = await request.post(`/task/check/` + record.id); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh(); |
| | |
| | | } |
| | | } |
| | | |
| | | return (record?.taskStatus == 199 && record?.taskType == 107 ? <ConfirmButton label={"toolbar.check"} startIcon={<GradingOutlinedIcon />} onConfirm={checkClick} /> : <></>) |
| | | return (record?.taskStatus == 198 && record?.taskType == 107 ? <ConfirmButton label={"toolbar.check"} startIcon={<GradingOutlinedIcon />} onConfirm={checkClick} /> : <></>) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | return ( |
| | | record?.taskStatus == 198 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></> |
| | | record?.taskStatus == 198 && record?.taskType == 103 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></> |
| | | ) |
| | | } |
| | | |
| | |
| | | http(sta, data); |
| | | } |
| | | const http = async (sta, items) => { |
| | | console.log(items); |
| | | |
| | | const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme); |
| | | if (filter.length > 0) { |
| | | notify(translate('toolbar.request.error.out_stock_qty')) |
| | | return |
| | | } |
| | | const { data: { code, data, msg } } = await request.post(`/locItem/generate/task`, { siteNo: sta, items: items }); |
| | | const { data: { code, data, msg } } = await request.post(`/locItem/generate/task`, { siteNo: sta, items: items, type: 'check' }); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | |
| | | notify(translate('toolbar.request.error.out_stock_qty')) |
| | | return |
| | | } |
| | | const { data: { code, data, msg } } = await request.post(`/locItem/generate/task`, { siteNo: sta, items: items }); |
| | | const { data: { code, data, msg } } = await request.post(`/locItem/check/task`, { siteNo: sta, items: items }); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | |
| | | * @return |
| | | */ |
| | | @PreAuthorize("hasAuthority('manager:locItem:list')") |
| | | @PostMapping("/locItem/generate/check/task") |
| | | @PostMapping("/locItem/check/task") |
| | | public R genStatisticalTask(@RequestBody Map<String, Object> map) { |
| | | if (Objects.isNull(map)) { |
| | | return R.error("参数不能为空!!"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 拣料出库 |
| | | * |
| | | * 拣料出库(用于测试拣料出库) |
| | | * @return |
| | | */ |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 盘点出库 |
| | | * 盘点出库(用于测试盘点出库) |
| | | * |
| | | * @return |
| | | */ |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @ApiOperation("拣料出库") |
| | | @ApiOperation("盘点出库") |
| | | @PostMapping("/task/check/{id}") |
| | | public R checkTask(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | |
| | | WCS_EXECUTE_OUT_CONVEYOR("107", "RCS容器流动任务已下发"),
|
| | |
|
| | | GENERATE_WAVE_SEED("197", "等待容器到达"),
|
| | | WAVE_SEED("198", "播种中"),
|
| | |
|
| | | WAVE_SEED("198", "播种中/盘点中"),
|
| | |
|
| | | COMPLETE_OUT("199", "出库完成"),
|
| | |
|
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R gentMoveTask(Map<String, Object> map) { |
| | | if (Objects.isNull(map.get("targetLoc"))) { |
| | | |
| | | if (Objects.isNull(map.get("targetLoc")) && StringUtils.isNotBlank(map.get("targetLoc").toString())) { |
| | | throw new CoolException("目标库位不能为空!1"); |
| | | } |
| | | if (Objects.isNull(map.get("orgLoc"))) { |
| | | |
| | | if (Objects.isNull(map.get("orgLoc")) && StringUtils.isNotBlank(map.get("orgLoc").toString())) { |
| | | throw new CoolException("源库位不能为空!"); |
| | | } |
| | | |
| | | Loc orgLoc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, map.get("orgLoc"))); |
| | | if (Objects.isNull(orgLoc)) { |
| | | throw new CoolException("源库位不存在!!"); |
| | | } |
| | | |
| | | Loc targetLoc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, map.get("targetLoc").toString())); |
| | | if (Objects.isNull(targetLoc)) { |
| | | throw new CoolException("目标库位不存在!!"); |
| | | } |
| | | |
| | | targetLoc.setUseStatus(LocStsType.LOC_STS_TYPE_R.type); |
| | | |
| | | if (!locService.updateById(targetLoc)) { |
| | | throw new CoolException("目标库位预约失败!!"); |
| | | } |
| | | |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_TASK_CODE, null); |
| | | Task task = new Task(); |
| | | task.setOrgLoc(orgLoc.getCode()) |
| | | .setTaskCode(ruleCode) |
| | | .setTaskType(TaskType.TASK_TYPE_LOC_MOVE.type) |
| | | .setBarcode(orgLoc.getBarcode()); |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | pickComplateInStock(task); |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) { |
| | | //57.盘点再入库 |
| | | pickComplateInStock(task); |
| | | } |
| | | } |
| | | } |
| | |
| | | complateOutStock(task); |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)) { |
| | | //拣料出库 |
| | | // Task seviceOne = pickTask(task.getId()); |
| | | //移除原始库存 |
| | | complateOutStock(task); |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) { |
| | | |
| | | |
| | | //盘点出库 |
| | | complateOutStock(task); |
| | | } |
| | | } |
| | | } |
| | |
| | | throw new CoolException("库位状态修改失败!!"); |
| | | } |
| | | |
| | | if (!task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)) { |
| | | if (!task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || !task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) { |
| | | if (!this.update(new LambdaUpdateWrapper<Task>() |
| | | .eq(Task::getId, task.getId()) |
| | | .set(Task::getTaskStatus, TaskStsType.UPDATED_OUT.id))) { |