#
zhou zhou
昨天 2aa107576ba3e2e49723d3bb49644a6ebd9d779a
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -1099,10 +1099,22 @@
            throw new CoolException("库位信息更新失败!!");
        }
        List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()));
        if (taskItems.isEmpty()) {
            throw new CoolException("任务明细不存在!!");
        }
        List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
        list.forEach(item -> {
            item.setOrderId(taskItems.get(0).getSourceId());
            item.setType(taskItems.get(0).getOrderType());
            item.setOrderItemId(taskItems.get(0).getSource());
            item.setPlatOrderCode(taskItems.get(0).getSourceCode());
        });
        locItemService.updateBatchById(list);
        TaskItem taskItem = taskItems.stream().findFirst().get();
        //保存入出库流水
@@ -1337,7 +1349,7 @@
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Task pickOrCheckTask(Long id, String oType) throws Exception {
    public synchronized Task pickOrCheckTask(Long id, String oType) throws Exception {
        Task task = this.getById(id);
        if (Objects.isNull(task)) {
            throw new CoolException("当前任务不存在!!");
@@ -1375,7 +1387,12 @@
                .setIoType(type)
                .setLocType1(Integer.parseInt(loc.getType()));
        //获取新库位
        InTaskMsgDto locInfo = wcsService.getLocNo(param);
        InTaskMsgDto locInfo = null;
        try{
            locInfo = wcsService.getLocNo(param);
        } catch (Exception e) {
            throw new CoolException("获取库位失败!!"+e.getMessage());
        }
        if (Objects.isNull(locInfo)) {
            throw new CoolException("获取库位失败!!");