From 73f923ea4ececa98dcbf091903ddbe91efe0a8c0 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 29 五月 2024 16:21:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/nbncasrs' into nbncasrs

---
 zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
index 61f40b5..324e562 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/openapi/service/impl/ApiServiceImpl.java
@@ -247,6 +247,24 @@
             mat.setMatnr(matParam.getMatnr());//鐗╂枡鍙�
             mat.setHostId(hostId);//浠撳簱ID
             mat.setTagId(tag.getId());//鍒嗙被ID
+            if (!Cools.isEmpty(matParam.getShopCategory())) {
+                Tag shopTag = tagService.getOne(new LambdaQueryWrapper<Tag>()
+                        .eq(Tag::getName, matParam.getShopCategory())
+                        .eq(Tag::getHostId, hostId));
+                if (shopTag == null) {
+                    //鍟嗗搧鍒嗙被涓虹┖锛屽垱寤哄晢鍝佸垎绫�
+                    shopTag = new Tag();
+                    shopTag.setName(matParam.getShopCategory());
+                    shopTag.setParentId(tag.getId());
+                    shopTag.setStatus(1);
+                    shopTag.setHostId(hostId);
+                    shopTag.setCreateTime(new Date());
+                    shopTag.setUpdateTime(new Date());
+                    tagService.save(shopTag);
+                }
+                mat.setTagId(shopTag.getId());//鍒嗙被ID
+            }
+
             if (!Cools.isEmpty(matParam.getMaktx())) {
                 mat.setMaktx(matParam.getMaktx());
             }
@@ -338,7 +356,7 @@
                 mat.setUnits(matParam.getUnits());
             }
             if (!Cools.isEmpty(matParam.getLength())) {
-                mat.setLength(Double.parseDouble(matParam.getLength()));
+                mat.setLength(matParam.getLength());
             }
             if (!Cools.isEmpty(matParam.getWidth())) {
                 mat.setWidth(matParam.getWidth());
@@ -346,6 +364,15 @@
             if (!Cools.isEmpty(matParam.getHeight())) {
                 mat.setHeight(matParam.getHeight());
             }
+            if (!Cools.isEmpty(matParam.getAccountingClass())) {
+                mat.setAccountingClass(matParam.getAccountingClass());
+            }
+            if (!Cools.isEmpty(matParam.getBatch())) {
+                mat.setBatch(matParam.getBatch());
+            }
+            if (!Cools.isEmpty(matParam.getInventoryAccount())) {
+                mat.setInventoryAccount(matParam.getInventoryAccount());
+            }
 
             if (matService.save(mat)) {
                 count++;

--
Gitblit v1.9.1