自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-04-23 4072a7775f72a186b0f4b6e48cdef40b3c2d7f5a
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -12,6 +12,7 @@
import com.zy.asrs.entity.result.OpenOrderCompeteResult;
import com.zy.asrs.entity.result.StockVo;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.model.DetlDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -320,7 +321,6 @@
            throw new CoolException(barcode + "重复提交");
        }
        Date now = new Date();
        // todo:luxiaotao 解析条码规则,获取物料代码
        pack = new Pack(
                barcode,    // 条码[非空]
                null,    // 商品编号
@@ -336,9 +336,14 @@
        if (!packService.insert(pack)) {
            throw new CoolException("服务器内部错误,请联系管理员");
        }
        Mat mat = new Mat();
        Mat analyse = MatUtils.analyseMat(barcode);
        Mat mat = matService.selectByMatnr(analyse.getMatnr());
        if (mat == null) {
            mat = new Mat();
            // todo
        mat.setTagId(tagService.getTop().getId());
        mat.setMatnr(barcode);
            mat.setMatnr(analyse.getMatnr());
        mat.setMaktx(barcode);
        mat.setStatus(1);
        mat.setCreateTime(now);
@@ -348,5 +353,6 @@
            throw new CoolException("服务器内部错误,请联系管理员");
        }
    }
    }
}