自动化立体仓库 - WMS系统
zwl
7 天以前 b6681bc12173c1179d0185805ba461211472ac18
src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
@@ -16,6 +16,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
@@ -34,11 +35,33 @@
        if (Objects.isNull(mast)) {
            throw new CoolException("数据错误:任务不存在!!");
        }
        WrkMastLog mastLog = new WrkMastLog();
        BeanUtils.copyProperties(mast, mastLog);
        mastLog.setLogId(mast.getId());
        Date now = new Date();
        WrkMastLog wrkMastLog = new WrkMastLog();
        wrkMastLog.setWrkNo(mast.getWrkNo());
        wrkMastLog.setIoTime(now);
        wrkMastLog.setWrkSts(Math.toIntExact(mast.getWrkSts()));
        wrkMastLog.setIoType(mast.getIoType());
        wrkMastLog.setIoPri(mast.getIoPri()); // 优先级
        wrkMastLog.setCrnNo(mast.getCrnNo());
        wrkMastLog.setSourceLocNo(mast.getSourceLocNo());
        wrkMastLog.setLocNo(mast.getLocNo());
        wrkMastLog.setBarcode(mast.getBarcode()); // 托盘码
        wrkMastLog.setFullPlt(mast.getFullPlt()); // 满板:Y
        wrkMastLog.setPicking(mast.getPicking()); // 拣料
        wrkMastLog.setExitMk(mast.getExitMk()); // 退出
        wrkMastLog.setEmptyMk(mast.getEmptyMk()); // 空板
        wrkMastLog.setLinkMis(mast.getLinkMis());
        wrkMastLog.setWrkDate(mast.getWrkDate());
        wrkMastLog.setPic(mast.getPic());
        // 操作人员数据
        wrkMastLog.setAppeTime(now);
        wrkMastLog.setModiTime(now);
        wrkMastLog.setAppeUser(mast.getAppeUser());
        wrkMastLog.setModiUser(mast.getModiUser());
        wrkMastLog.setLogId(mast.getId());
        boolean res = wrkMastLogService.insert(wrkMastLog);
        if (!wrkMastLogService.insert(mastLog)) {
        if (!res) {
            throw new CoolException("任务日志保存失败!!");
        }