自动化立体仓库 - WMS系统
#
zhou zhou
16 小时以前 56e2544343ec595f9f5ad7c6b0457188916a9043
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -191,21 +191,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 +202,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);