|  |  | @ -301,13 +301,20 @@ public class IoOrderServiceImpl implements IoOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //更新扫码单据详情
 |  |  |  |                 //更新扫码单据详情
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 IoOrderDetailCodeEntity ioOrderDetailCodeEntity = ioOrderDetailCodeService.findByUnique(ioCodeEntity.getOrderId(), ioCodeEntity.getRelId(), ioCodeEntity.getBatchNo()); |  |  |  |                 IoOrderDetailCodeEntity ioOrderDetailCodeEntity = ioOrderDetailCodeService.findByUnique(ioCodeEntity.getOrderId(), ioCodeEntity.getRelId(), ioCodeEntity.getBatchNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (ioOrderDetailCodeEntity != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ioOrderDetailCodeEntity.setReCount(ioOrderDetailCodeEntity.getReCount() - reCount); |  |  |  |                     ioOrderDetailCodeEntity.setReCount(ioOrderDetailCodeEntity.getReCount() - reCount); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ioOrderDetailCodeService.update(ioOrderDetailCodeEntity); |  |  |  |                     ioOrderDetailCodeService.update(ioOrderDetailCodeEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //更新结果详情
 |  |  |  |                 //更新结果详情
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 IoOrderDetailResultEntity ioOrderDetailResultEntity = ioOrderDetailResultService.findByUnique(ioCodeEntity.getOrderId(), ioCodeEntity.getRelId(), ioCodeEntity.getBatchNo()); |  |  |  |                 IoOrderDetailResultEntity ioOrderDetailResultEntity = ioOrderDetailResultService.findByUnique(ioCodeEntity.getOrderId(), ioCodeEntity.getRelId(), ioCodeEntity.getBatchNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (ioOrderDetailResultEntity != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ioOrderDetailResultEntity.setReCount(ioOrderDetailResultEntity.getReCount() - reCount); |  |  |  |                     ioOrderDetailResultEntity.setReCount(ioOrderDetailResultEntity.getReCount() - reCount); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ioOrderDetailResultService.update(ioOrderDetailResultEntity); |  |  |  |                     ioOrderDetailResultService.update(ioOrderDetailResultEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //如果数量扣减之后为0,直接删除此条码
 |  |  |  |                 //如果数量扣减之后为0,直接删除此条码
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 codeService.deleteById(ioCodeEntity.getId()); |  |  |  |                 codeService.deleteById(ioCodeEntity.getId()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -371,6 +378,7 @@ public class IoOrderServiceImpl implements IoOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     invPreProductService.update(invProductEntity); |  |  |  |                     invPreProductService.update(invProductEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } else {   //普通库存
 |  |  |  |                 } else {   //普通库存
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     InvProductDetailEntity invProductDetailEntity = invProductDetailService.selectByCode(billNo, code); |  |  |  |                     InvProductDetailEntity invProductDetailEntity = invProductDetailService.selectByCode(billNo, code); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if (invProductDetailEntity != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         int count = invProductDetailEntity.getCount() - 1; |  |  |  |                         int count = invProductDetailEntity.getCount() - 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (count == 0) { |  |  |  |                         if (count == 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             invProductDetailService.deleteById(invProductDetailEntity.getId()); |  |  |  |                             invProductDetailService.deleteById(invProductDetailEntity.getId()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -381,6 +389,7 @@ public class IoOrderServiceImpl implements IoOrderService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                             invProductDetailEntity.setReCount(invProductDetailEntity.getReCount() - reCount); |  |  |  |                             invProductDetailEntity.setReCount(invProductDetailEntity.getReCount() - reCount); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             invProductDetailService.update(invProductDetailEntity); |  |  |  |                             invProductDetailService.update(invProductDetailEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                     //更新产品表
 |  |  |  |                     //更新产品表
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     InvProductEntity invProductEntity = invProductService.selectByUnique(invProductDetailEntity.getRelId(), invProductDetailEntity.getBatchNo(), invProductDetailEntity.getSupId(), invProductDetailEntity.getDeptCode(), invProductDetailEntity.getInvCode()); |  |  |  |                     InvProductEntity invProductEntity = invProductService.selectByUnique(invProductDetailEntity.getRelId(), invProductDetailEntity.getBatchNo(), invProductDetailEntity.getSupId(), invProductDetailEntity.getDeptCode(), invProductDetailEntity.getInvCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (invProductEntity != null) { |  |  |  |                     if (invProductEntity != null) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |