From d52b5d11199cc6b7cec42deb82c831a4ed15a3b4 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 31 五月 2024 14:56:58 +0800
Subject: [PATCH] 仓库: 显示在库信息,入库完成后显示成功入库的包数 订单出库页面显示剩余待检包数 (PDA) 未查询到的提示改为显示物料实际状态 拣货单已完成,单据未完成 ✔ 单据数量字段显示变更 ✔ 拣货单按实际操作时间降序排序 ✔ 拣货单明细导出 ✔ 拣货单显示创建时间与操作时间 ✔
---
src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java
index 0192d5c..4f2a66d 100644
--- a/src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/DocTypeServiceImpl.java
@@ -1,12 +1,45 @@
package com.zy.asrs.service.impl;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.core.common.Cools;
+import com.core.exception.CoolException;
import com.zy.asrs.mapper.DocTypeMapper;
import com.zy.asrs.entity.DocType;
import com.zy.asrs.service.DocTypeService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
+import java.util.Date;
+
@Service("docTypeService")
public class DocTypeServiceImpl extends ServiceImpl<DocTypeMapper, DocType> implements DocTypeService {
+ @Override
+ public DocType selectOrAdd(String docName, Boolean pakin) {
+ if (Cools.isEmpty(docName)) {
+ return null;
+ }
+ DocType 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));
+ if (last != null) {
+ docId = last.getDocId() + 1;
+ }
+ docType = new DocType();
+ docType.setDocId(docId);
+ docType.setDocName(docName);
+ if (null != pakin) {
+ docType.setPakin(pakin ? 1 : 0);
+ docType.setPakout(pakin ? 0 : 1);
+ }
+ docType.setStatus(1);
+ docType.setCreateTime(new Date());
+ docType.setUpdateTime(new Date());
+ if (!this.insert(docType)) {
+ throw new CoolException("鍗曟嵁绫诲瀷閿欒");
+ }
+ }
+ return docType;
+ }
}
--
Gitblit v1.9.1