|  |  |  | @ -1,5 +1,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  | package com.glxp.api.service.dev.impl; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 
			
		
	
	
		
			
				
					|  |  |  | @ -52,6 +53,19 @@ public class DeviceChangeOrderItemServiceImpl extends ServiceImpl<DeviceChangeOr | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public boolean updateOrderItem(DeviceChangeOrderItemEntity 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<DeviceChangeOrderItemEntity> uw = new UpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         uw.eq("deviceCode",entity.getDeviceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         return super.update(entity,uw); | 
			
		
	
	
		
			
				
					|  |  |  | @ -59,6 +73,20 @@ public class DeviceChangeOrderItemServiceImpl extends ServiceImpl<DeviceChangeOr | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public boolean entryOrderItemChange(List<DeviceChangeOrderItemEntity> entitys) { | 
			
		
	
		
			
				
					|  |  |  |  | //        //解析医保编码
 | 
			
		
	
		
			
				
					|  |  |  |  | //        entitys.forEach( i -> {
 | 
			
		
	
		
			
				
					|  |  |  |  | //            String ybbm = i.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));
 | 
			
		
	
		
			
				
					|  |  |  |  | //                i.setCatalogCode1(catalogcode1);
 | 
			
		
	
		
			
				
					|  |  |  |  | //                i.setCatalogCode2(catalogcode2);
 | 
			
		
	
		
			
				
					|  |  |  |  | //                i.setCatalogCode3(catalogcode3);
 | 
			
		
	
		
			
				
					|  |  |  |  | //                i.setCatalogCode(catalogCode);
 | 
			
		
	
		
			
				
					|  |  |  |  | //            }
 | 
			
		
	
		
			
				
					|  |  |  |  | //        });
 | 
			
		
	
		
			
				
					|  |  |  |  |         return super.saveBatch(entitys); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |