|  |  | @ -115,44 +115,14 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe | 
			
		
	
		
		
			
				
					
					|  |  |  |             filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate()); |  |  |  |             filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             datas = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); |  |  |  |             datas = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (CollUtil.isNotEmpty(datas)) { |  |  |  |         if (CollUtil.isNotEmpty(datas)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             InvProductDetailEntity invProductDetailEntity = datas.get(0); |  |  |  |             InvProductDetailEntity invProductDetailEntity = datas.get(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |             String bacthNo = null; |  |  |  |             for (int i = 1; i < datas.size(); i++) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (StrUtil.isEmpty(invProductDetailEntity.getBatchNo())) { |  |  |  |                 invProductDetailEntity.setCount(invProductDetailEntity.getCount() + datas.get(i).getCount()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 bacthNo = "empty"; |  |  |  |             } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 bacthNo = invProductDetailEntity.getBatchNo(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            InvProductEntity invProductEntity = invPreInProductDao.selectByUuid(invProductDetailEntity.getProductIdFk(), bacthNo, invProductDetailEntity.getSupId(), invProductDetailEntity.getInvStorageCode(), invProductDetailEntity.getInvWarehouseCode());
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            invProductDetailEntity.setCount(invProductEntity.getInCount() - invProductEntity.getOutCount());
 |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return invProductDetailEntity; |  |  |  |             return invProductDetailEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return null; |  |  |  |         return null; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //        Map<String, InvProductDetailEntity> invProductDetailEntityMap = new HashMap<>();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //        for (InvProductDetailEntity invProductDetailEntity : datas) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            InvProductDetailEntity temp = invProductDetailEntityMap.get(invProductDetailEntity.getOriginCode());
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            if (temp == null) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                invProductDetailEntityMap.put(invProductDetailEntity.getOriginCode(), invProductDetailEntity);
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            } else {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                int count1 = 0;
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                int count2 = 0;
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                if (temp.getMainAction().equals(ConstantType.TYPE_PUT)) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                    count1 = temp.getCount();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                } else {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                    count1 = 0 - temp.getCount();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                    count2 = invProductDetailEntity.getCount();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                } else {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                    count2 = 0 - invProductDetailEntity.getCount();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                temp.setCount(count1 + count2);
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //        }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
	
		
		
			
				
					|  |  | 
 |