From be554d9e52799a0ee14c98b0959d07ab3847c8e6 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期一, 20 十月 2025 15:24:27 +0800
Subject: [PATCH] 联调
---
src/main/java/com/zy/asrs/utils/MatExcelListener.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/MatExcelListener.java b/src/main/java/com/zy/asrs/utils/MatExcelListener.java
index a3858b4..c4eec8f 100644
--- a/src/main/java/com/zy/asrs/utils/MatExcelListener.java
+++ b/src/main/java/com/zy/asrs/utils/MatExcelListener.java
@@ -5,9 +5,11 @@
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
+import com.zy.asrs.entity.InOut;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.entity.Tag;
import com.zy.asrs.mapper.TagMapper;
+import com.zy.asrs.service.InOutService;
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.TagService;
import com.zy.common.entity.MatExcel;
@@ -57,6 +59,7 @@
TagService tagService = SpringUtils.getBean(TagService.class);
TagMapper tagMapper = SpringUtils.getBean(TagMapper.class);
MatService matService = SpringUtils.getBean(MatService.class);
+ InOutService inOutService = SpringUtils.getBean(InOutService.class);
Date now = new Date();
Long tagId;
// 鍒嗙被
@@ -129,10 +132,19 @@
// 鍟嗗搧
Mat mat = matService.selectByMatnr(excel.getMatnr());
if (mat == null) {
+ InOut inOut=new InOut();
mat = excel;
mat.setTagId(tagId);
mat.setMatnr(excel.getMatnr()+"__"+excel.getName());
+ inOut.setMatnr(mat.getMatnr());
+ inOut.setMaktx(mat.getMaktx());
+ inOut.setColor(mat.getColor());
+ inOut.setSpecs(mat.getSpecs());
+ inOut.setTemp1("");
if (!matService.insert(mat)) {
+ throw new CoolException("淇濆瓨鍟嗗搧妗f澶辫触锛屽晢鍝佺紪鐮侊細" + excel.getMatnr());
+ }
+ if (!inOutService.insert(inOut)){
throw new CoolException("淇濆瓨鍟嗗搧淇℃伅澶辫触锛屽晢鍝佺紪鐮侊細" + excel.getMatnr());
}
total++;
--
Gitblit v1.9.1