| 
					
				 | 
			
			
				@@ -3,7 +3,9 @@ package com.ruoyi.basicData.service.impl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ruoyi.basicData.domain.TGoods; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ruoyi.basicData.mapper.TGoodsMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ruoyi.basicData.service.ITGoodsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ruoyi.common.constant.UserConstants; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ruoyi.common.utils.DateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ruoyi.common.utils.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,4 +89,22 @@ public class TGoodsServiceImpl implements ITGoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int deleteTGoodsById(Long fId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return tGoodsMapper.deleteTGoodsById(fId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String checkUFNoUnique(TGoods tGoods) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        TGoods tGoods1 = tGoodsMapper.checkFNoUnique(tGoods.getfNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNotNull(tGoods1) && tGoods1.getfId()!=tGoods.getfId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return UserConstants.NOT_UNIQUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return UserConstants.UNIQUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String checkUFNnameUnique(TGoods tGoods) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        TGoods tGoods1 = tGoodsMapper.checkUFNnameUnique(tGoods.getfName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNotNull(tGoods1) && tGoods1.getfId()!=tGoods.getfId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return UserConstants.NOT_UNIQUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return UserConstants.UNIQUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |