| | |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | 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); |
| | | // 保存工作主档历史档 |
| | |
| | | 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); |