|  |  | @ -1,12 +1,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | package com.glxp.api.service.dev.impl; |  |  |  | package com.glxp.api.service.dev.impl; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import cn.hutool.core.util.RandomUtil; |  |  |  | import cn.hutool.core.util.RandomUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.github.pagehelper.PageHelper; |  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.common.util.ResultVOUtils; |  |  |  | import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.auth.AuthAdmin; |  |  |  | import com.glxp.api.entity.auth.AuthAdmin; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.dev.DeviceChangeOrderItemEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.dev.DeviceInfoEntity; |  |  |  | import com.glxp.api.entity.dev.DeviceInfoEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.enums.dev.DeviceStatusEnum; |  |  |  | import com.glxp.api.enums.dev.DeviceStatusEnum; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.exception.JsonException; |  |  |  | import com.glxp.api.exception.JsonException; | 
			
		
	
	
		
		
			
				
					|  |  | @ -202,6 +205,25 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI | 
			
		
	
		
		
			
				
					
					|  |  |  |         } while (deviceInfo != null); |  |  |  |         } while (deviceInfo != null); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return deviceCode; |  |  |  |         return deviceCode; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public boolean updateOrderItem(DeviceInfoEntity entity) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         String ybbm = entity.getYbbm(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (StrUtil.isNotEmpty(ybbm) && ybbm.length() >= 7) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             String catalogCode = ybbm.substring(0, 7); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             Integer catalogcode1 = Integer.valueOf(ybbm.substring(1, 3)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             Integer catalogcode2 = Integer.valueOf(catalogcode1 + ybbm.substring(3, 5)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             Integer catalogcode3 = Integer.valueOf(catalogcode2 + ybbm.substring(5, 7)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             entity.setCatalogCode1(catalogcode1); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             entity.setCatalogCode2(catalogcode2); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             entity.setCatalogCode3(catalogcode3); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             entity.setCatalogCode(catalogCode); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         UpdateWrapper<DeviceInfoEntity> uw = new UpdateWrapper<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         uw.eq("deviceCode",entity.getDeviceCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return super.update(entity,uw); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |