|
@@ -4,9 +4,8 @@ import com.bz.smart_city.commom.model.Pagination;
|
|
|
import com.bz.smart_city.commom.util.UserUtil;
|
|
|
import com.bz.smart_city.dao.pay.PayReportMapper;
|
|
|
import com.bz.smart_city.dto.LoginUser;
|
|
|
-import com.bz.smart_city.dto.pay.PayArrearagedetailsReportDto;
|
|
|
-import com.bz.smart_city.dto.pay.PayOperatordetailsReportDto;
|
|
|
-import com.bz.smart_city.dto.pay.PayTransactiondetailsReportDto;
|
|
|
+import com.bz.smart_city.dto.pay.*;
|
|
|
+import com.bz.smart_city.service.pay.PayAgenttransactionService;
|
|
|
import com.bz.smart_city.service.pay.PayReportService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -14,6 +13,7 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.BigInteger;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -42,22 +42,30 @@ public class PayReportServiceImpl implements PayReportService {
|
|
|
payTransactiondetailsReportDto.setCustomerId(customerId);
|
|
|
payTransactiondetailsReportDto.setSiteId(siteId);
|
|
|
|
|
|
- PageHelper.startPage(pageNum, pageSize);
|
|
|
+ //PageHelper.startPage(pageNum, pageSize);
|
|
|
+ Pagination<PayTransactiondetailsReportDto> pg = new Pagination<>();
|
|
|
List<PayTransactiondetailsReportDto> reList = payReportMapper.getPayTransactiondetailsReportList(payTransactiondetailsReportDto);
|
|
|
-
|
|
|
if(reList != null && reList.size() > 0){
|
|
|
- PayTransactiondetailsReportDto subDto = new PayTransactiondetailsReportDto();
|
|
|
+
|
|
|
+ PayTransactiondetailsReportDto totalDto = new PayTransactiondetailsReportDto();
|
|
|
+ List<PayTransactiondetailsReportDto> reSubList = new ArrayList<>();
|
|
|
BigDecimal transAmount = BigDecimal.ZERO;
|
|
|
for(int i=0;i<reList.size();i++){
|
|
|
transAmount = transAmount.add(reList.get(i).getTransAmount());
|
|
|
+ if(i >= (pageNum-1)*pageSize && i < pageNum*pageSize){
|
|
|
+ reSubList.add(reList.get(i));
|
|
|
+ }
|
|
|
}
|
|
|
- subDto.setTransAmount(transAmount);
|
|
|
- subDto.setAccountNumber("合计");
|
|
|
- reList.add(0,subDto);
|
|
|
- }
|
|
|
+ totalDto.setTransAmount(transAmount);
|
|
|
+ totalDto.setAccountNumber("合计");
|
|
|
+ reSubList.add(0,totalDto);
|
|
|
|
|
|
+ pg.setTotal(reList.size());
|
|
|
+ pg.setList(reSubList);
|
|
|
+ }
|
|
|
|
|
|
- return new Pagination<>(reList);
|
|
|
+ return pg;
|
|
|
+ //return new Pagination<>(reList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -78,10 +86,12 @@ public class PayReportServiceImpl implements PayReportService {
|
|
|
|
|
|
//数据权限
|
|
|
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ //PageHelper.startPage(pageNum,pageSize);
|
|
|
+ Pagination<PayOperatordetailsReportDto> pg = new Pagination<>();
|
|
|
List<PayOperatordetailsReportDto> reList = payReportMapper.getPayOperatordetailsReportList(payOperatordetailsReportDto);
|
|
|
+ List<PayOperatordetailsReportDto> reSubList = new ArrayList<>();
|
|
|
if(reList != null && reList.size() > 0){
|
|
|
- PayOperatordetailsReportDto subDto = new PayOperatordetailsReportDto();
|
|
|
+ PayOperatordetailsReportDto totalDto = new PayOperatordetailsReportDto();
|
|
|
BigDecimal receivedCount = BigDecimal.ZERO;
|
|
|
BigDecimal transamount = BigDecimal.ZERO;
|
|
|
BigDecimal subtotal = BigDecimal.ZERO;
|
|
@@ -89,15 +99,21 @@ public class PayReportServiceImpl implements PayReportService {
|
|
|
receivedCount = receivedCount.add(reList.get(i).getReceivedCount());
|
|
|
transamount = transamount.add(reList.get(i).getTransamount());
|
|
|
subtotal = subtotal.add(reList.get(i).getSubtotal());
|
|
|
+ if(i >= (pageNum-1)*pageSize && i<pageNum*pageSize){
|
|
|
+ reSubList.add(reList.get(i));
|
|
|
+ }
|
|
|
}
|
|
|
- subDto.setSubtotal(subtotal);
|
|
|
- subDto.setTransamount(transamount);
|
|
|
- subDto.setReceivedCount(receivedCount);
|
|
|
- subDto.setAccountName("合计");
|
|
|
- reList.add(0,subDto);
|
|
|
+ totalDto.setSubtotal(subtotal);
|
|
|
+ totalDto.setTransamount(transamount);
|
|
|
+ totalDto.setReceivedCount(receivedCount);
|
|
|
+ totalDto.setAccountName("合计");
|
|
|
+ reSubList.add(0,totalDto);
|
|
|
+
|
|
|
+ pg.setList(reSubList);
|
|
|
+ pg.setTotal(reList.size());
|
|
|
}
|
|
|
-
|
|
|
- return new Pagination<>(reList);
|
|
|
+ return pg;
|
|
|
+ //return new Pagination<>(reList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -116,10 +132,12 @@ public class PayReportServiceImpl implements PayReportService {
|
|
|
BigInteger siteId = new BigInteger(String.valueOf(loginUser.getSiteId()));
|
|
|
payArrearagedetailsReportDto.setSiteId(siteId);
|
|
|
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ //PageHelper.startPage(pageNum,pageSize);
|
|
|
+ Pagination<PayArrearagedetailsReportDto> pg = new Pagination<>();
|
|
|
+ List<PayArrearagedetailsReportDto> reSubList = new ArrayList<>();
|
|
|
List<PayArrearagedetailsReportDto> reList = payReportMapper.getPayArrearagedetailsReportList(payArrearagedetailsReportDto);
|
|
|
if(reList != null && reList.size() > 0){
|
|
|
- PayArrearagedetailsReportDto subDto = new PayArrearagedetailsReportDto();
|
|
|
+ PayArrearagedetailsReportDto totalDto = new PayArrearagedetailsReportDto();
|
|
|
Integer payamount = 0;
|
|
|
BigDecimal payamountFee = BigDecimal.ZERO;
|
|
|
BigDecimal polluteFee= BigDecimal.ZERO;
|
|
@@ -135,19 +153,26 @@ public class PayReportServiceImpl implements PayReportService {
|
|
|
penltyFee = penltyFee.add(reList.get(i).getPenltyFee());
|
|
|
outLevelFee = outLevelFee.add(reList.get(i).getOutLevelFee());
|
|
|
subtotal = subtotal.add(reList.get(i).getSubtotal());
|
|
|
+
|
|
|
+ if(i>= (pageNum-1)*pageSize && i< pageNum*pageSize){
|
|
|
+ reSubList.add(reList.get(i));
|
|
|
+ }
|
|
|
}
|
|
|
- subDto.setPayamount(payamount);
|
|
|
- subDto.setPayamountFee(payamountFee);;
|
|
|
- subDto.setPolluteFee(polluteFee);
|
|
|
- subDto.setTaxExemptFee(taxExemptFee);
|
|
|
- subDto.setPenltyFee(penltyFee);
|
|
|
- subDto.setOutLevelFee(outLevelFee);
|
|
|
- subDto.setSubtotal(subtotal);
|
|
|
- subDto.setAccountNumber("合计");
|
|
|
- reList.add(0,subDto);
|
|
|
+ totalDto.setPayamount(payamount);
|
|
|
+ totalDto.setPayamountFee(payamountFee);;
|
|
|
+ totalDto.setPolluteFee(polluteFee);
|
|
|
+ totalDto.setTaxExemptFee(taxExemptFee);
|
|
|
+ totalDto.setPenltyFee(penltyFee);
|
|
|
+ totalDto.setOutLevelFee(outLevelFee);
|
|
|
+ totalDto.setSubtotal(subtotal);
|
|
|
+ totalDto.setAccountNumber("合计");
|
|
|
+ reSubList.add(0,totalDto);
|
|
|
+
|
|
|
+ pg.setTotal(reList.size());
|
|
|
+ pg.setList(reSubList);
|
|
|
}
|
|
|
-
|
|
|
- return new Pagination<>(reList);
|
|
|
+ return pg;
|
|
|
+ //return new Pagination<>(reList);
|
|
|
}
|
|
|
|
|
|
}
|