自动化立体仓库 - WMS系统
zyx
2023-09-24 c832c7f5d6f8c015d609e044e902e070da5240b0
src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java
@@ -19,7 +19,13 @@
        if (Cools.isEmpty(docName)) {
            return null;
        }
        DocType docType = this.selectOne(new EntityWrapper<DocType>().eq("doc_name", docName));
        DocType docType = null;
        try {
            docType = this.selectById(docName);
        } catch (Exception ignore) {}
        if (docType == null) {
            docType = this.selectOne(new EntityWrapper<DocType>().eq("doc_name", docName));
        }
        if (docType == null) {
            long docId = 1L;
            DocType last = this.selectOne(new EntityWrapper<DocType>().orderBy("doc_id", false));
@@ -31,6 +37,7 @@
            docType.setDocName(docName);
            if (null != pakin) {
                docType.setPakin(pakin ? 1 : 0);
                docType.setPakout(pakin ? 0 : 1);
            }
            docType.setStatus(1);
            docType.setCreateTime(new Date());