自动化立体仓库 - WMS系统
skyouc
1 天以前 05466547c913ad2cd29944e5444dd387ce64b25f
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -132,6 +132,7 @@
        return SUCCESS;
    }
    @Transactional(rollbackFor = Exception.class)
    public ReturnT<String> AgvStart(Task task) {
        try {
            List<TaskDetl> taskDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo()));
@@ -191,21 +192,6 @@
//                }
            }
            for (TaskDetl taskDetl :taskDetls){
                TaskDetlLog taskDetlLog = new TaskDetlLog();
                BeanUtils.copyProperties(taskDetl, taskDetlLog);
                // 保存工作明细档历史档
                if (!taskDetlLogService.insert(taskDetlLog)) {
                exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo());
                }
                // 删除工作明细档
                if (!taskDetlService.deleteById(taskDetl)) {
                exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo());
                }
            }
            TaskLog taskLog = new TaskLog();
            BeanUtils.copyProperties(task, taskLog);
            // 保存工作主档历史档
@@ -217,6 +203,22 @@
            if (!taskService.deleteById(task)) {
                exceptionHandle("删除工作主档[workNo={0}]失败", task.getWrkNo());
            }
            List<TaskDetl> taskDetls2 = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo()));
            for (TaskDetl taskDetl :taskDetls2){
                TaskDetlLog taskDetlLog = new TaskDetlLog();
                BeanUtils.copyProperties(taskDetl, taskDetlLog);
                taskDetlLog.setLogId(taskLog.getId());
                taskDetlLog.setId(null);
                // 保存工作明细档历史档
                if (!taskDetlLogService.insert(taskDetlLog)) {
                exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo());
                }
                // 删除工作明细档
                if (!taskDetlService.deleteById(taskDetl)) {
                exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo());
                }
            }
        } catch (Exception e) {
            log.error("fail", e);