|  |  | @ -1512,7 +1512,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (CollUtil.isNotEmpty(udiRlSupEntitys)) { |  |  |  |                 if (CollUtil.isNotEmpty(udiRlSupEntitys)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     for (UdiRlSupEntity udiRlSupEntity : udiRlSupEntitys) { |  |  |  |                     for (UdiRlSupEntity udiRlSupEntity : udiRlSupEntitys) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         Integer count1 = invProductService.selectExitCount(thrInvOrder.getInvCode(), Long.parseLong(udiRlSupEntity.getCustomerId()), Long.parseLong(udiRlSupEntity.getUdiRlIdFk())); |  |  |  |                         Integer count1 = invProductService.selectExitCount(thrInvOrder.getInvCode(), Long.parseLong(udiRlSupEntity.getCustomerId()), Long.parseLong(udiRlSupEntity.getUdiRlIdFk())); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (IntUtil.value(count1 > 0)) { |  |  |  |                         if (IntUtil.value(count1) > 0) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             thrInvOrderDetail.setSupId(udiRlSupEntity.getCustomerId()); |  |  |  |                             thrInvOrderDetail.setSupId(udiRlSupEntity.getCustomerId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             if (udiRlSupEntity.getPrice() == null) |  |  |  |                             if (udiRlSupEntity.getPrice() == null) | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 thrInvOrderDetail.setPrice(BigDecimal.ZERO); |  |  |  |                                 thrInvOrderDetail.setPrice(BigDecimal.ZERO); | 
			
		
	
	
		
		
			
				
					|  |  | @ -1574,11 +1574,28 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             BeanUtils.copyProperties(item, thrInvOrderDetail); |  |  |  |                             BeanUtils.copyProperties(item, thrInvOrderDetail); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             thrInvOrderDetail.setOrderIdFk(billNo); |  |  |  |                             thrInvOrderDetail.setOrderIdFk(billNo); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             thrInvOrderDetail.setRelId(sk.getRelId()); |  |  |  |                             thrInvOrderDetail.setRelId(sk.getRelId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             thrInvOrderDetail.setSupId(sk.getSupId() + ""); |  |  |  |                             List<UdiRlSupEntity> udiRlSupEntitys = udiRlSupService.findByUdiRlId(sk.getRelId()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             UdiRlSupEntity udiRlSupEntity = udiRlSupService.findByUdiRlIdUnitFk(thrInvOrderDetail.getRelId() + "", thrInvOrderDetail.getSupId()); |  |  |  |                             if (CollUtil.isNotEmpty(udiRlSupEntitys)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             if (udiRlSupEntity != null && udiRlSupEntity.getPrice() != null) { |  |  |  |                                 for (UdiRlSupEntity udiRlSupEntity : udiRlSupEntitys) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 thrInvOrderDetail.setPrice(udiRlSupEntity.getPrice()); |  |  |  |                                     Integer count1 = invProductService.selectExitCount(thrInvOrder.getInvCode(), Long.parseLong(udiRlSupEntity.getCustomerId()), Long.parseLong(udiRlSupEntity.getUdiRlIdFk())); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                                     if (IntUtil.value(count1) > 0) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         thrInvOrderDetail.setSupId(udiRlSupEntity.getCustomerId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         if (udiRlSupEntity.getPrice() == null) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                             thrInvOrderDetail.setPrice(BigDecimal.ZERO); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                             thrInvOrderDetail.setPrice(udiRlSupEntity.getPrice()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 if (thrInvOrderDetail.getSupId() == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     thrInvOrderDetail.setSupId(udiRlSupEntitys.get(0).getCustomerId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     if (udiRlSupEntitys.get(0).getPrice() == null) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         thrInvOrderDetail.setPrice(BigDecimal.ZERO); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         thrInvOrderDetail.setPrice(udiRlSupEntitys.get(0).getPrice()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             } else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 exmsg.append(thrCode + "供应商未关联"); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             Integer skCount = sk.getCount(); |  |  |  |                             Integer skCount = sk.getCount(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             if (skCount != null && skCount > 0) { |  |  |  |                             if (skCount != null && skCount > 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount)); |  |  |  |                                 thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount)); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |