| 
					
				 | 
			
			
				@@ -8,10 +8,7 @@ import com.ym.mec.biz.dal.dto.SporadicChargeInfoDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.Goods; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.StudentPaymentOrder; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.DealStatusEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.GroupType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.biz.dal.enums.OrderTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.dal.enums.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.SporadicOrderQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.*; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -285,17 +282,25 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<StudentPaymentOrder> dataList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int count = this.findCount(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        StudentPaymentOrder orderMoneyAmount = studentPaymentOrderDao.getOrderMoneyAmount(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(orderMoneyAmount != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            BigDecimal totalExpectAmount = orderMoneyAmount.getExpectAmount() !=null? orderMoneyAmount.getExpectAmount():BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            BigDecimal totalActualAmount = orderMoneyAmount.getActualAmount() !=null? orderMoneyAmount.getActualAmount():BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pageInfo.setTotalExpectAmount(totalExpectAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pageInfo.setTotalActualAmount(totalActualAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (count > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             pageInfo.setTotal(count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             params.put("offset", pageInfo.getOffset()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dataList = studentPaymentOrderDao.queryPageOrder(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            StudentPaymentOrder orderMoneyAmount = studentPaymentOrderDao.getOrderMoneyAmount(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal totalExpectAmount = orderMoneyAmount.getExpectAmount() != null ? orderMoneyAmount.getExpectAmount() : BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal totalActualAmount = orderMoneyAmount.getActualAmount() != null ? orderMoneyAmount.getActualAmount() : BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal totalBalancePaymentAmount = orderMoneyAmount.getBalancePaymentAmount() != null ? orderMoneyAmount.getBalancePaymentAmount() : BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            params.put("chargeType", SporadicChargeTypeEnum.RECHARGE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal totalChargeAmount = studentPaymentOrderDao.getChargeAmount(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            totalChargeAmount = totalChargeAmount != null ? totalChargeAmount : BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal totalAdvanceAmount = totalChargeAmount.subtract(totalBalancePaymentAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageInfo.setTotalAdvanceAmount(totalAdvanceAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageInfo.setTotalExpectAmount(totalExpectAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageInfo.setTotalActualAmount(totalActualAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageInfo.setTotalRevenueAmount(totalActualAmount.subtract(totalAdvanceAmount)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageInfo.setRows(dataList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return pageInfo; 
			 |