自动化立体仓库 - WMS系统
#
pang.jiabao
4 天以前 52b21b24130c75197c039ae0fd761e2ef5b43cb3
src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java
@@ -30,18 +30,18 @@
    @Transactional(rollbackFor = Exception.class)
    public boolean save(Integer wrkNo) {
        List<TaskDetl> detls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkNo));
        if (Objects.isNull(detls) || detls.isEmpty()) {
            throw new CoolException("数据错误:任务不存在!!");
        if (!detls.isEmpty()) {
            detls.forEach(detl -> {
                TaskDetlLog detlLog = new TaskDetlLog();
                BeanUtils.copyProperties(detl, detlLog);
                detlLog.setId(null);
                detlLog.setLogId(detl.getId());
                if (!this.insert(detlLog)) {
                    throw new CoolException("工作档明细历史保存失败!!");
                }
            });
        }
        detls.forEach(detl -> {
            TaskDetlLog detlLog = new TaskDetlLog();
            BeanUtils.copyProperties(detl, detlLog);
            detlLog.setId(null);
            detlLog.setLogId(detl.getId());
            if (!this.insert(detlLog)) {
                throw new CoolException("工作档明细历史保存失败!!");
            }
        });
        return false;
        return true;
    }
}