From 742a2f40e5dfd42bee8f1fcdcb2f9098fbb73ccb Mon Sep 17 00:00:00 2001
From: 邱宇豪 <qyh123230312>
Date: 星期四, 16 十一月 2023 10:22:32 +0800
Subject: [PATCH] 20231116_qiuyh_料仓大屏

---
 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/service/impl/SuMaterialWarehouseServiceImpl.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/service/impl/SuMaterialWarehouseServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/service/impl/SuMaterialWarehouseServiceImpl.java
index 1e8d274..c57870e 100644
--- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/service/impl/SuMaterialWarehouseServiceImpl.java
+++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/service/impl/SuMaterialWarehouseServiceImpl.java
@@ -4,10 +4,12 @@
 import com.github.pagehelper.PageInfo;
 import com.thhy.general.common.BasicResult;
 import com.thhy.general.config.SysUserInfo;
+import com.thhy.general.utils.UUIDUtils;
 import com.thhy.general.utils.UserInfoUtils;
 import com.thhy.materials.modules.biz.suMaterialWarehouse.entity.SuMaterialWarehouseEntity;
 import com.thhy.materials.modules.biz.suMaterialWarehouse.mapper.SuMaterialWarehouseMapper;
 import com.thhy.materials.modules.biz.suMaterialWarehouse.service.SuMaterialWarehouseService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -30,10 +32,12 @@
 		SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo();
 		String companyId = sysUserInfo.getCompanyId();
 		String userId = sysUserInfo.getUserId();
-		Integer id = suMaterialWarehouseEntity.getId();
-		if(id != null){
+		String id = suMaterialWarehouseEntity.getId();
+		if(StringUtils.isNotBlank(id)){
 			suMaterialWarehouseEntity.setUpdateTime(new Date());
 			suMaterialWarehouseEntity.setUpdateUser(userId);
+		}else {
+			suMaterialWarehouseEntity.setId(UUIDUtils.create());
 		}
 		suMaterialWarehouseEntity.setCreateUser(userId);
 		suMaterialWarehouseEntity.setCompanyId(companyId);

--
Gitblit v1.9.3