1
2 天以前 b3780fc93f0805ba273ff33757c3a134cb366258
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -1460,7 +1460,7 @@
                    if (!task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
                        minQty = Math.round((working.getAnfme() - taskItem.getAnfme()) * 1000000) / 1000000.0;
                    }
                    if (minQty.compareTo(0.0) >= 0) {
                    if (!minQty.equals(0D) && minQty>0D) {
                        taskItem.setAnfme(minQty);
                        if (!taskItemService.updateById(taskItem)) {
                            throw new CoolException("任务明细修改失败!!");
@@ -1559,21 +1559,21 @@
            throw new CoolException("库位明细不存在!!");
        }
        List<LocItemWorking> workings = new ArrayList<>();
        for (LocItem item : locItems) {
            LocItemWorking working = new LocItemWorking();
            BeanUtils.copyProperties(item, working);
            working.setId(null)
                    .setTaskId(task.getId())
                    .setLocItemId(item.getId())
                    .setUpdateBy(loginUserId)
                    .setUpdateTime(new Date());
            workings.add(working);
        }
        if (!locItemWorkingService.saveBatch(workings)) {
            throw new CoolException("临时库存保存失败!!");
        }
//        List<LocItemWorking> workings = new ArrayList<>();
//        for (LocItem item : locItems) {
//            LocItemWorking working = new LocItemWorking();
//            BeanUtils.copyProperties(item, working);
//            working.setId(null)
//                    .setTaskId(task.getId())
//                    .setLocItemId(item.getId())
//                    .setUpdateBy(loginUserId)
//                    .setUpdateTime(new Date());
//            workings.add(working);
//        }
//
//        if (!locItemWorkingService.saveBatch(workings)) {
//            throw new CoolException("临时库存保存失败!!");
//        }
        try {
            //更新库位明细