|  |  |  | @ -473,7 +473,7 @@ public class UdiProductService { | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductEntity1.setSjcpbm(updateLevelDrugRequest.getSjcpbm()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductEntity1.setBhxjcpbm(updateLevelDrugRequest.getBhxjcpbm()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductEntity1.setBhxjsl(updateLevelDrugRequest.getMyBhxjsl()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductDao.updateById(udiProductEntity1); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             udiProductEntity1 = udiProductDao.findByNameCode(updateLevelDrugRequest.getNameCode()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -486,7 +486,6 @@ public class UdiProductService { | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setSjcpbm(updateLevelDrugRequest.getSjcpbm()); | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setBhxjcpbm(updateLevelDrugRequest.getBhxjcpbm()); | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setBhxjsl(updateLevelDrugRequest.getMyBhxjsl()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductDao.updateById(udiProductEntity1); | 
			
		
	
		
			
				
					|  |  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |  |                 //新增
 | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1 = udiProductDao.findByUuid(udiRelevanceEntity.getUuid()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -498,10 +497,14 @@ public class UdiProductService { | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setBhxjsl(updateLevelDrugRequest.getMyBhxjsl()); | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setUuid(udiRelevanceEntity.getUuid()); | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductEntity1.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductDao.insert(udiProductEntity1); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (IntUtil.value(udiProductEntity1.getPackLevel()) == 1) { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (IntUtil.value(udiProductEntity1.getPackLevel()) == 1) { | 
			
		
	
		
			
				
					|  |  |  |  |                     calculateDistCount(udiProductEntity1, udiRelevanceEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                     calculateUseCount(udiProductEntity1, udiRelevanceEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             udiProductDao.updateById(udiProductEntity1); | 
			
		
	
		
			
				
					|  |  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |  |             //必须先提交后才能保存
 | 
			
		
	
		
			
				
					|  |  |  |  |             UdiProductEntity udiProductEntity1 = udiProductDao.findByNameCode(updateLevelDrugRequest.getNameCode()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -520,6 +523,7 @@ public class UdiProductService { | 
			
		
	
		
			
				
					|  |  |  |  |         findUltimateEntity(udiProductEntity, udiProductEntities, xjCountWrapper); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setDistributeLevelDi(udiProductEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setDistributeLevelUnit(udiProductEntity.getPackUnit()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setDistributeLevel(IntUtil.value(udiProductEntity.getPackLevel())); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setDistributeLevelCount(xjCountWrapper.getCount()); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -532,6 +536,7 @@ public class UdiProductService { | 
			
		
	
		
			
				
					|  |  |  |  |         findUltimateEntity(udiProductEntity, udiProductEntities, xjCountWrapper); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUseLevelDi(udiProductEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUseLevelUnit(udiProductEntity.getPackUnit()); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUseLevel(IntUtil.value(udiProductEntity.getPackLevel())); | 
			
		
	
		
			
				
					|  |  |  |  |         udiRelevanceEntity.setUseLeverCount(xjCountWrapper.getCount()); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |