1
17 小时以前 d91fae31f20fa81081fe1b0769437be66470175d
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -988,8 +988,14 @@
                    //110.空板出库
                    complateOutStockEmpty(task, loginUserId);
                } else if (task.getTaskType().equals(TaskType.TASK_TYPE_CROSS_DOCKING_OUT.type)) {
                    //110.空板出库
                    //109.越库
                    complateOutStockDocking(task, loginUserId);
                } else if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
                    //107.盘
                    pickOrCheckTask(task.getId(), Constants.TASK_TYPE_OUT_CHECK);
                } else if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)) {
                    //103.拣选
                    pickOrCheckTask(task.getId(), Constants.TASK_TYPE_OUT_PICK);
                } else {
                    complateOutStock(task, loginUserId);
                }
@@ -1331,7 +1337,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("当前任务不存在!!");
@@ -1362,14 +1368,19 @@
        task.setTaskCode(ruleCode)
                .setTaskType(type)
                .setBarcode(task.getBarcode())
                .setTaskStatus(TaskStsType.GENERATE_IN.id);
                .setTaskStatus(TaskStsType.MISSION_INITIAL.id);
        TaskInParam param = new TaskInParam();
        param.setSourceStaNo(task.getTargSite())
                .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("获取库位失败!!");
@@ -1617,7 +1628,7 @@
    /**
     * @author Ryan
     * @date 2025/5/20
     * @description: 完成出库任务,更新出库库存信息
     * @description: 完成越库任务,更新出库库存信息
     * @version 1.0
     */
    @Synchronized