自动化立体仓库 - WMS系统
pang.jiabao
2025-11-10 11a590bda370ddad398b2c3ae68a218ee8d5a5d2
src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
@@ -11,6 +11,7 @@
import com.zy.asrs.mapper.WrkMastLogMapper;
import com.zy.asrs.service.WrkMastLogService;
import com.zy.asrs.service.WrkMastService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -20,6 +21,7 @@
import java.util.Objects;
@Service("wrkMastLogService")
@Slf4j
public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService {
    @Autowired
@@ -28,21 +30,8 @@
    private WrkMastLogService wrkMastLogService;
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean save(Integer workNo) {
        WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", workNo));
        if (Objects.isNull(mast)) {
            throw new CoolException("数据错误:任务不存在!!");
        }
        WrkMastLog mastLog = new WrkMastLog();
        BeanUtils.copyProperties(mast, mastLog);
        mastLog.setLogId(mast.getId());
        if (!wrkMastLogService.insert(mastLog)) {
            throw new CoolException("任务日志保存失败!!");
        }
        return true;
        return this.baseMapper.save(workNo) > 0;
    }
    @Override