|  |  |  | @ -14,7 +14,6 @@ import com.glxp.api.req.auth.FilterInvSpaceRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.auth.InvSpaceResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.CustomerService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.InvSpaceService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.IdUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
	
		
			
				
					|  |  |  | @ -61,7 +60,7 @@ public class InvSpaceServiceImpl extends ServiceImpl<InvSpaceDao, InvSpace> impl | 
			
		
	
		
			
				
					|  |  |  |  |         if (StrUtil.isBlank(maxSpaceCode)) { | 
			
		
	
		
			
				
					|  |  |  |  |             maxSpaceCode = "0000"; | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         String spaceCode = IdUtil.getSpaceCode(maxSpaceCode); | 
			
		
	
		
			
				
					|  |  |  |  |         String spaceCode = getSpaceCode(maxSpaceCode); | 
			
		
	
		
			
				
					|  |  |  |  |         invSpace.setCode(spaceCode); | 
			
		
	
		
			
				
					|  |  |  |  |         Date date = new Date(); | 
			
		
	
		
			
				
					|  |  |  |  |         AuthAdmin user = customerService.getUserBean(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -167,4 +166,16 @@ public class InvSpaceServiceImpl extends ServiceImpl<InvSpaceDao, InvSpace> impl | 
			
		
	
		
			
				
					|  |  |  |  |         return "success"; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 获取新的货位编码,基于传入的最大编码参数+1,并拼接成4位数返回 | 
			
		
	
		
			
				
					|  |  |  |  |      * | 
			
		
	
		
			
				
					|  |  |  |  |      * @param maxSpaceCode 当前最大货位编码 | 
			
		
	
		
			
				
					|  |  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |  |     public String getSpaceCode(String maxSpaceCode) { | 
			
		
	
		
			
				
					|  |  |  |  |         Long l = Long.parseLong(maxSpaceCode) + 1L; | 
			
		
	
		
			
				
					|  |  |  |  |         return String.format("%04d", l); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |