| 
					
				 | 
			
			
				@@ -1751,7 +1751,7 @@ public class ExportServiceImpl implements ExportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<JSONObject> orderItemList = JSONObject.parseArray(JSONObject.parseObject(row.getGoodsJson()).getString("orderItemList"), JSONObject.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BigDecimal balanceAmount = row.getBalancePaymentAmount(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            BigDecimal divide = balanceAmount.divide(row.getExpectAmount(), 6, BigDecimal.ROUND_HALF_UP); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal divide = balanceAmount.divide(row.getExpectAmount(), 8, BigDecimal.ROUND_DOWN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BigDecimal subBalanceAmount = balanceAmount; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (int i = 0; i < orderItemList.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 JSONObject json = orderItemList.get(i); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1762,13 +1762,15 @@ public class ExportServiceImpl implements ExportService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     BigDecimal realAmount = new BigDecimal(json.get("realAmount").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    realAmount = realAmount.multiply(new BigDecimal(json.get("productQuantity").toString())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //处理余额部分 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if(balanceAmount.compareTo(BigDecimal.ZERO) > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        BigDecimal decimal = realAmount.multiply(divide).setScale(2, BigDecimal.ROUND_HALF_UP); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        subBalanceAmount = subBalanceAmount.subtract(decimal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        realAmount = realAmount.subtract(decimal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if(i == orderItemList.size() -1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            realAmount = realAmount.add(subBalanceAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            realAmount = realAmount.subtract(subBalanceAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            BigDecimal decimal = realAmount.multiply(divide).setScale(2, BigDecimal.ROUND_DOWN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            subBalanceAmount = subBalanceAmount.subtract(decimal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            realAmount = realAmount.subtract(decimal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Method method = row.getClass().getMethod("getCategory" + index, null); 
			 |