From da13bea76b64183790ab17775f04d43d8c7f6607 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 26 十二月 2025 14:36:44 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
index 377ec10..766b520 100644
--- a/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
@@ -1,5 +1,6 @@
package com.zy.asrs.service.impl;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
@@ -10,6 +11,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -101,6 +103,21 @@
}
if (mat.getColor().equals("鎶ュ簾")){
throw new CoolException("璇ョ墿鏂欏凡鎶ュ簾锛岃鍕跨粦瀹�");
+ }
+ //瀵逛簬宸茬粡缁勬墭杩囩殑 妯″叿 涓嶅厑璁稿啀娆$粦瀹�
+ Integer waitPakinCount = waitPakinService.selectByBarcodeAndMatnr(waitPakin.getMatnr());
+ if (waitPakinCount >= 1){
+ throw new CoolException("璇ユā鍏峰凡缁忕粍鎵�,鍟嗗搧妯″叿鍚嶇О:" + waitPakin.getMatnr());
+ }
+ //瀵逛簬宸茬粡鏈夊簱瀛樼殑妯″叿 涓嶅厑璁稿啀娆$粦瀹�
+ List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", waitPakin.getMatnr()));
+ if (!Cools.isEmpty(locDetlList)) {
+ throw new CoolException("璇ユā鍏峰凡缁忓叆搴�,鍟嗗搧妯″叿鍚嶇О:" + waitPakin.getMatnr());
+ }
+ //瀵逛簬宸茬粡鏈夊伐浣滄。鐨勬ā鍏� 涓嶅厑璁稿啀娆$粦瀹�
+ List<WrkDetl> wrkDetlList = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("matnr", waitPakin.getMatnr()));
+ if (!Cools.isEmpty(wrkDetlList)) {
+ throw new CoolException("璇ユā鍏峰凡缁忓瓨鍦ㄥ伐浣滄。,鍟嗗搧妯″叿鍚嶇О:" + waitPakin.getMatnr());
}
// HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(waitPakin.getBarcode());
//瀵规ā鍏风殑瑙勬牸鍋氬鐞嗗緱鍒板帤搴�
@@ -219,4 +236,9 @@
Integer spec = Integer.valueOf(param.get("spec").toString());
return matBarcodeMapper.page(pageNo,pageSize,barcode,spec);
}
+
+ @Override
+ public List<MatBarcode> select100() {
+ return this.baseMapper.select100();
+ }
}
--
Gitblit v1.9.1