|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.pj.constants.business.FeeTypeEnum;
|
|
import com.pj.constants.business.FeeTypeEnum;
|
|
|
|
+import com.pj.constants.business.PayEnum;
|
|
import com.pj.current.config.MyConfig;
|
|
import com.pj.current.config.MyConfig;
|
|
import com.pj.current.satoken.StpUserUtil;
|
|
import com.pj.current.satoken.StpUserUtil;
|
|
import com.pj.project.tb_business_car.TbBusinessCar;
|
|
import com.pj.project.tb_business_car.TbBusinessCar;
|
|
@@ -37,6 +38,7 @@ import java.io.File;
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Service: tb_fee_statistics -- 收费统计表
|
|
* Service: tb_fee_statistics -- 收费统计表
|
|
@@ -108,10 +110,11 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
return tbFeeStatisticsMapper.getYear(so);
|
|
return tbFeeStatisticsMapper.getYear(so);
|
|
}
|
|
}
|
|
|
|
|
|
- public TbFeeStatistics getByDayAndFeeType(String day, Integer feeType) {
|
|
|
|
|
|
+ public TbFeeStatistics getByDayAndFeeType(String day, Integer feeType, int payType) {
|
|
QueryWrapper<TbFeeStatistics> qw = new QueryWrapper<>();
|
|
QueryWrapper<TbFeeStatistics> qw = new QueryWrapper<>();
|
|
- qw.eq("day", day);
|
|
|
|
- qw.eq("fee_type", feeType);
|
|
|
|
|
|
+ qw.lambda().eq(TbFeeStatistics::getDay, day)
|
|
|
|
+ .eq(TbFeeStatistics::getFeeType, feeType)
|
|
|
|
+ .eq(TbFeeStatistics::getPayType, payType);
|
|
return getOne(qw);
|
|
return getOne(qw);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -119,43 +122,44 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
/**
|
|
/**
|
|
* 照搬收费明细到日统计
|
|
* 照搬收费明细到日统计
|
|
*/
|
|
*/
|
|
- public void addOrUpdateStatistic(Date now,int payType) {
|
|
|
|
|
|
+ public void addOrUpdateStatistic(Date now, int payType) {
|
|
String toDay = DateUtil.format(now, "yyyy-MM-dd");
|
|
String toDay = DateUtil.format(now, "yyyy-MM-dd");
|
|
String thisYear = StrUtil.sub(toDay, 0, 4);
|
|
String thisYear = StrUtil.sub(toDay, 0, 4);
|
|
String thisMonth = StrUtil.sub(toDay, 0, 7);
|
|
String thisMonth = StrUtil.sub(toDay, 0, 7);
|
|
List<TbFeeStatistics> detailsStats = tbFeeDetailsService.getDayStatistics(toDay);
|
|
List<TbFeeStatistics> detailsStats = tbFeeDetailsService.getDayStatistics(toDay);
|
|
- for (TbFeeStatistics stat : detailsStats) {
|
|
|
|
- TbFeeStatistics statistics = this.getByDayAndFeeType(toDay, stat.getFeeType());
|
|
|
|
- if (statistics == null) {
|
|
|
|
- statistics = new TbFeeStatistics();
|
|
|
|
- }
|
|
|
|
- TbFeeItem tbFeeItem= tbFeeItemService.getById(stat.getFeeType());
|
|
|
|
- statistics.setFeeType(stat.getFeeType()).setDayTime(now).setFeeTypeName(tbFeeItem.getName())
|
|
|
|
- .setNum(stat.getNum()).setTaxMoney(stat.getTaxMoney()).setTaxRate(stat.getTaxRate())
|
|
|
|
- .setTaxes(stat.getTaxes()).setNoTaxMoney(stat.getNoTaxMoney())
|
|
|
|
- .setDay(toDay).setMonth(thisMonth).setYear(thisYear)
|
|
|
|
- .setPayType(payType);
|
|
|
|
- this.saveOrUpdate(statistics);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public TbFeeStatistics updateParkNum(String day) {
|
|
|
|
- QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
|
|
|
|
- qw.like("create_time", day);
|
|
|
|
- List<TbFeeDetails> list = tbFeeDetailsService.list(qw);
|
|
|
|
- Integer totalNum = 0;
|
|
|
|
- for (TbFeeDetails feeDetail : list) {
|
|
|
|
- if (feeDetail.getFeeType() == FeeTypeEnum.PARK_FEE.getCode()) {
|
|
|
|
- totalNum = totalNum + feeDetail.getNum();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- TbFeeStatistics feeStatistics = getByDayAndFeeType(day, FeeTypeEnum.PARK_FEE.getCode());
|
|
|
|
- feeStatistics.setNum(totalNum);
|
|
|
|
- this.updateById(feeStatistics);
|
|
|
|
- return feeStatistics;
|
|
|
|
|
|
+ detailsStats.stream().collect(Collectors.groupingBy(TbFeeStatistics::getPayType))
|
|
|
|
+ .forEach((type, list) -> {
|
|
|
|
+ for (TbFeeStatistics stat : list) {
|
|
|
|
+ TbFeeStatistics statistics = this.getByDayAndFeeType(toDay, stat.getFeeType(), type);
|
|
|
|
+ if (statistics == null) {
|
|
|
|
+ statistics = new TbFeeStatistics();
|
|
|
|
+ }
|
|
|
|
+ TbFeeItem tbFeeItem = tbFeeItemService.getById(stat.getFeeType());
|
|
|
|
+ statistics.setFeeType(stat.getFeeType()).setDayTime(now).setFeeTypeName(tbFeeItem.getName())
|
|
|
|
+ .setNum(stat.getNum()).setTaxMoney(stat.getTaxMoney()).setTaxRate(stat.getTaxRate())
|
|
|
|
+ .setTaxes(stat.getTaxes()).setNoTaxMoney(stat.getNoTaxMoney())
|
|
|
|
+ .setDay(toDay).setMonth(thisMonth).setYear(thisYear)
|
|
|
|
+ .setPayType(type);
|
|
|
|
+ this.saveOrUpdate(statistics);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
+//
|
|
|
|
+// public TbFeeStatistics updateParkNum(String day) {
|
|
|
|
+// QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
|
|
|
|
+// qw.like("create_time", day);
|
|
|
|
+// List<TbFeeDetails> list = tbFeeDetailsService.list(qw);
|
|
|
|
+// Integer totalNum = 0;
|
|
|
|
+// for (TbFeeDetails feeDetail : list) {
|
|
|
|
+// if (feeDetail.getFeeType() == FeeTypeEnum.PARK_FEE.getCode()) {
|
|
|
|
+// totalNum = totalNum + feeDetail.getNum();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// TbFeeStatistics feeStatistics = getByDayAndFeeType(day, FeeTypeEnum.PARK_FEE.getCode());
|
|
|
|
+// feeStatistics.setNum(totalNum);
|
|
|
|
+// this.updateById(feeStatistics);
|
|
|
|
+// return feeStatistics;
|
|
|
|
+// }
|
|
|
|
|
|
public String exportMonthStatistics(SoMap so) throws Exception {
|
|
public String exportMonthStatistics(SoMap so) throws Exception {
|
|
String monthStr = so.getString("exportMonth");
|
|
String monthStr = so.getString("exportMonth");
|
|
@@ -287,10 +291,11 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
time = "所有时间";
|
|
time = "所有时间";
|
|
}
|
|
}
|
|
|
|
|
|
- BigDecimal totalFee = new BigDecimal(0);
|
|
|
|
- BigDecimal totalTaxes = new BigDecimal(0);
|
|
|
|
- BigDecimal totalNoTaxFee = new BigDecimal(0);
|
|
|
|
- BigDecimal totalWxPrice = new BigDecimal(0);
|
|
|
|
|
|
+ final BigDecimal[] totalFee = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalTaxes = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalNoTaxFee = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalWxPrice = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalYuePrice = {new BigDecimal(0)};
|
|
|
|
|
|
List<TbFeeStatistics> statsList = this.getList(so);
|
|
List<TbFeeStatistics> statsList = this.getList(so);
|
|
if (StrUtil.isNotEmpty(isMonth)) {
|
|
if (StrUtil.isNotEmpty(isMonth)) {
|
|
@@ -301,38 +306,62 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
}
|
|
}
|
|
|
|
|
|
List<ExportDayStatsDTO> printList = new ArrayList<>();
|
|
List<ExportDayStatsDTO> printList = new ArrayList<>();
|
|
- for (TbFeeStatistics stats : statsList) {
|
|
|
|
- TbFeeItem tbFeeItem = tbFeeItemService.getById(stats.getFeeType());
|
|
|
|
- ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
|
|
|
|
- dayStatsDTO.setDayTime(stats.getDay())
|
|
|
|
- .setFeeType(tbFeeItem.getName()).setNum(stats.getNum())
|
|
|
|
- .setTaxMoney(stats.getTaxMoney())
|
|
|
|
- .setTaxRate(stats.getTaxRate())
|
|
|
|
- .setTaxes(stats.getTaxes())
|
|
|
|
- .setNoTaxMoney(stats.getNoTaxMoney())
|
|
|
|
- .setWxPrice(stats.getTaxMoney())
|
|
|
|
- .setKaiDanPerson(stats.getKaiDanPerson() != null ? stats.getKaiDanPerson() : "")
|
|
|
|
- .setJiChaPerson(stats.getJiChaPerson() != null ? stats.getJiChaPerson() : "")
|
|
|
|
- .setDiaoDuPerson(stats.getDiaoDuPerson() != null ? stats.getDiaoDuPerson() : "")
|
|
|
|
- .setJudgeBy(stats.getJudgeBy() == null ? "" : stats.getJudgeBy());
|
|
|
|
- if (StrUtil.isNotEmpty(isMonth)) {
|
|
|
|
- dayStatsDTO.setDayTime(stats.getMonth());
|
|
|
|
- }
|
|
|
|
- if (StrUtil.isNotEmpty(isYear)) {
|
|
|
|
- dayStatsDTO.setDayTime(stats.getYear());
|
|
|
|
- }
|
|
|
|
- printList.add(dayStatsDTO);
|
|
|
|
- totalFee = totalFee.add(stats.getTaxMoney());
|
|
|
|
- totalTaxes = totalTaxes.add(stats.getTaxes());
|
|
|
|
- totalNoTaxFee = totalNoTaxFee.add(stats.getNoTaxMoney());
|
|
|
|
- totalWxPrice = totalWxPrice.add(stats.getTaxMoney());
|
|
|
|
- }
|
|
|
|
|
|
+ statsList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getDay)).forEach((day, dayList) -> {
|
|
|
|
+ TbFeeStatistics dayItem = dayList.get(0);
|
|
|
|
+ dayList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getFeeType))
|
|
|
|
+ .forEach((feeType, feeTypeList) -> {
|
|
|
|
+ TbFeeItem tbFeeItem = tbFeeItemService.getById(feeType);
|
|
|
|
+ Map<Integer, List<TbFeeStatistics>> listMap = feeTypeList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getPayType));
|
|
|
|
+ ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
|
|
|
|
+ dayStatsDTO.setDayTime(day)
|
|
|
|
+ .setFeeType(tbFeeItem.getName())
|
|
|
|
+ .setKaiDanPerson(dayItem.getKaiDanPerson() != null ? dayItem.getKaiDanPerson() : "")
|
|
|
|
+ .setJiChaPerson(dayItem.getJiChaPerson() != null ? dayItem.getJiChaPerson() : "")
|
|
|
|
+ .setDiaoDuPerson(dayItem.getDiaoDuPerson() != null ? dayItem.getDiaoDuPerson() : "")
|
|
|
|
+ .setJudgeBy(dayItem.getJudgeBy() == null ? "" : dayItem.getJudgeBy());
|
|
|
|
+ List<TbFeeStatistics> wxPayList = listMap.get(PayEnum.PayType.WX_PAY.getCode());
|
|
|
|
+ BigDecimal wxPay = BigDecimal.ZERO;
|
|
|
|
+ if (wxPayList != null && !wxPayList.isEmpty()) {
|
|
|
|
+ for (TbFeeStatistics tbFeeStatistics : wxPayList) {
|
|
|
|
+ totalFee[0] =tbFeeStatistics.getTaxMoney().add(totalFee[0]);
|
|
|
|
+ totalNoTaxFee[0] =tbFeeStatistics.getNoTaxMoney().add(totalNoTaxFee[0]);
|
|
|
|
+ totalWxPrice[0] = totalWxPrice[0].add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ totalTaxes[0] = totalTaxes[0].add(tbFeeStatistics.getTaxes());
|
|
|
|
+ wxPay = wxPay.add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setWxPrice(wxPay);
|
|
|
|
+ }
|
|
|
|
+ List<TbFeeStatistics> prePayList = listMap.get(PayEnum.PayType.PER_PAY.getCode());
|
|
|
|
+ BigDecimal prePay = BigDecimal.ZERO;
|
|
|
|
+ if (prePayList != null && !prePayList.isEmpty()) {
|
|
|
|
+ for (TbFeeStatistics tbFeeStatistics : prePayList) {
|
|
|
|
+ totalFee[0] =tbFeeStatistics.getTaxMoney().add(totalFee[0]);
|
|
|
|
+ totalNoTaxFee[0] =tbFeeStatistics.getNoTaxMoney().add(totalNoTaxFee[0]);
|
|
|
|
+ totalYuePrice[0] = totalYuePrice[0].add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ totalTaxes[0] = totalTaxes[0].add(tbFeeStatistics.getTaxes());
|
|
|
|
+ prePay = prePay.add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setYuePrice(prePay);
|
|
|
|
+ }
|
|
|
|
+ int num = 0;
|
|
|
|
+ BigDecimal noTaxMoney = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal taxMoney = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal tax = BigDecimal.ZERO;
|
|
|
|
+ for (TbFeeStatistics stats : feeTypeList) {
|
|
|
|
+ num = num + stats.getNum();
|
|
|
|
+ tax=tax.add(stats.getTaxes());
|
|
|
|
+ noTaxMoney = noTaxMoney.add(stats.getNoTaxMoney());
|
|
|
|
+ taxMoney = taxMoney.add(stats.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num).setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
|
|
|
|
+ printList.add(dayStatsDTO);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
PrintDayStatsDTO printData = new PrintDayStatsDTO();
|
|
PrintDayStatsDTO printData = new PrintDayStatsDTO();
|
|
printData.setList(printList)
|
|
printData.setList(printList)
|
|
.setTime(time)
|
|
.setTime(time)
|
|
- .setTotalMoney(totalFee).setTotalTaxes(totalTaxes).setTotalNoTaxMoney(totalNoTaxFee)
|
|
|
|
- .setTotalWxPrice(totalWxPrice);
|
|
|
|
-
|
|
|
|
|
|
+ .setTotalMoney(totalFee[0]).setTotalTaxes(totalTaxes[0]).setTotalNoTaxMoney(totalNoTaxFee[0])
|
|
|
|
+ .setTotalWxPrice(totalWxPrice[0]).setTotalYuePrice(totalYuePrice[0]);
|
|
return printData;
|
|
return printData;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -360,12 +389,11 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
}
|
|
}
|
|
Map<String, String> head = new HashMap<>();
|
|
Map<String, String> head = new HashMap<>();
|
|
head.put("time", time);
|
|
head.put("time", time);
|
|
-
|
|
|
|
- BigDecimal totalFee = new BigDecimal(0);
|
|
|
|
- BigDecimal totalTaxes = new BigDecimal(0);
|
|
|
|
- BigDecimal totalNoTaxFee = new BigDecimal(0);
|
|
|
|
- BigDecimal totalWxPrice = new BigDecimal(0);
|
|
|
|
-
|
|
|
|
|
|
+ final BigDecimal[] totalFee = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalTaxes = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalNoTaxFee = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalWxPrice = {new BigDecimal(0)};
|
|
|
|
+ final BigDecimal[] totalYuePrice = {new BigDecimal(0)};
|
|
List<TbFeeStatistics> statsList = this.getList(so);
|
|
List<TbFeeStatistics> statsList = this.getList(so);
|
|
if (StrUtil.isNotEmpty(isMonth)) {
|
|
if (StrUtil.isNotEmpty(isMonth)) {
|
|
statsList = this.getMonth(so);
|
|
statsList = this.getMonth(so);
|
|
@@ -375,35 +403,62 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
|
|
}
|
|
}
|
|
|
|
|
|
List<ExportDayStatsDTO> exportList = new ArrayList<>();
|
|
List<ExportDayStatsDTO> exportList = new ArrayList<>();
|
|
- for (TbFeeStatistics stats : statsList) {
|
|
|
|
- TbFeeItem tbFeeItem = tbFeeItemService.getById(stats.getFeeType());
|
|
|
|
- ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
|
|
|
|
- dayStatsDTO.setDayTime(stats.getDay())
|
|
|
|
- .setFeeType(tbFeeItem.getName()).setNum(stats.getNum())
|
|
|
|
- .setTaxMoney(stats.getTaxMoney())
|
|
|
|
- .setTaxRate(stats.getTaxRate().multiply(BigDecimal.valueOf(100)))
|
|
|
|
- .setTaxes(stats.getTaxes())
|
|
|
|
- .setNoTaxMoney(stats.getNoTaxMoney())
|
|
|
|
- .setWxPrice(stats.getTaxMoney())
|
|
|
|
- .setKaiDanPerson(stats.getKaiDanPerson())
|
|
|
|
- .setJiChaPerson(stats.getJiChaPerson())
|
|
|
|
- .setDiaoDuPerson(stats.getDiaoDuPerson()).setJudgeBy(stats.getJudgeBy());
|
|
|
|
- if (StrUtil.isNotEmpty(isMonth)) {
|
|
|
|
- dayStatsDTO.setDayTime(stats.getMonth());
|
|
|
|
- }
|
|
|
|
- if (StrUtil.isNotEmpty(isYear)) {
|
|
|
|
- dayStatsDTO.setDayTime(stats.getYear());
|
|
|
|
- }
|
|
|
|
- exportList.add(dayStatsDTO);
|
|
|
|
- totalFee = totalFee.add(stats.getTaxMoney());
|
|
|
|
- totalTaxes = totalTaxes.add(stats.getTaxes());
|
|
|
|
- totalNoTaxFee = totalNoTaxFee.add(stats.getNoTaxMoney());
|
|
|
|
- totalWxPrice = totalWxPrice.add(stats.getTaxMoney());
|
|
|
|
- }
|
|
|
|
- head.put("totalMoney", totalFee.toString());
|
|
|
|
- head.put("totalTaxes", totalTaxes.toString());
|
|
|
|
- head.put("totalNoTaxMoney", totalNoTaxFee.toString());
|
|
|
|
- head.put("totalWxPrice", totalWxPrice.toString());
|
|
|
|
|
|
+ statsList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getDay)).forEach((day, dayList) -> {
|
|
|
|
+ TbFeeStatistics dayItem = dayList.get(0);
|
|
|
|
+ dayList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getFeeType))
|
|
|
|
+ .forEach((feeType, feeTypeList) -> {
|
|
|
|
+ TbFeeItem tbFeeItem = tbFeeItemService.getById(feeType);
|
|
|
|
+ Map<Integer, List<TbFeeStatistics>> listMap = feeTypeList.stream().collect(Collectors.groupingBy(TbFeeStatistics::getPayType));
|
|
|
|
+ ExportDayStatsDTO dayStatsDTO = new ExportDayStatsDTO();
|
|
|
|
+ dayStatsDTO.setDayTime(day)
|
|
|
|
+ .setFeeType(tbFeeItem.getName())
|
|
|
|
+ .setKaiDanPerson(dayItem.getKaiDanPerson() != null ? dayItem.getKaiDanPerson() : "")
|
|
|
|
+ .setJiChaPerson(dayItem.getJiChaPerson() != null ? dayItem.getJiChaPerson() : "")
|
|
|
|
+ .setDiaoDuPerson(dayItem.getDiaoDuPerson() != null ? dayItem.getDiaoDuPerson() : "")
|
|
|
|
+ .setJudgeBy(dayItem.getJudgeBy() == null ? "" : dayItem.getJudgeBy());
|
|
|
|
+ List<TbFeeStatistics> wxPayList = listMap.get(PayEnum.PayType.WX_PAY.getCode());
|
|
|
|
+ BigDecimal wxPay = BigDecimal.ZERO;
|
|
|
|
+ if (wxPayList != null && !wxPayList.isEmpty()) {
|
|
|
|
+ for (TbFeeStatistics tbFeeStatistics : wxPayList) {
|
|
|
|
+ totalFee[0] =tbFeeStatistics.getTaxMoney().add(totalFee[0]);
|
|
|
|
+ totalNoTaxFee[0] =tbFeeStatistics.getNoTaxMoney().add(totalNoTaxFee[0]);
|
|
|
|
+ totalWxPrice[0] = totalWxPrice[0].add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ totalTaxes[0] = totalTaxes[0].add(tbFeeStatistics.getTaxes());
|
|
|
|
+ wxPay = wxPay.add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setWxPrice(wxPay);
|
|
|
|
+ }
|
|
|
|
+ List<TbFeeStatistics> prePayList = listMap.get(PayEnum.PayType.PER_PAY.getCode());
|
|
|
|
+ BigDecimal prePay = BigDecimal.ZERO;
|
|
|
|
+ if (prePayList != null && !prePayList.isEmpty()) {
|
|
|
|
+ for (TbFeeStatistics tbFeeStatistics : prePayList) {
|
|
|
|
+ totalFee[0] =tbFeeStatistics.getTaxMoney().add(totalFee[0]);
|
|
|
|
+ totalNoTaxFee[0] =tbFeeStatistics.getNoTaxMoney().add(totalNoTaxFee[0]);
|
|
|
|
+ totalYuePrice[0] = totalYuePrice[0].add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ totalTaxes[0] = totalTaxes[0].add(tbFeeStatistics.getTaxes());
|
|
|
|
+ prePay = prePay.add(tbFeeStatistics.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setYuePrice(prePay);
|
|
|
|
+ }
|
|
|
|
+ int num = 0;
|
|
|
|
+ BigDecimal noTaxMoney = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal taxMoney = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal tax = BigDecimal.ZERO;
|
|
|
|
+ for (TbFeeStatistics stats : feeTypeList) {
|
|
|
|
+ num = num + stats.getNum();
|
|
|
|
+ tax=tax.add(stats.getTaxes());
|
|
|
|
+ noTaxMoney = noTaxMoney.add(stats.getNoTaxMoney());
|
|
|
|
+ taxMoney = taxMoney.add(stats.getTaxMoney());
|
|
|
|
+ }
|
|
|
|
+ dayStatsDTO.setTaxRate(feeTypeList.get(0).getTaxRate()).setNum(num).setNoTaxMoney(noTaxMoney).setTaxMoney(taxMoney).setTaxes(tax);
|
|
|
|
+ exportList.add(dayStatsDTO);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ head.put("totalMoney", totalFee[0].toString());
|
|
|
|
+ head.put("totalTaxes", totalTaxes[0].toString());
|
|
|
|
+ head.put("totalNoTaxMoney", totalNoTaxFee[0].toString());
|
|
|
|
+ head.put("totalWxPrice", totalWxPrice[0].toString());
|
|
|
|
+ head.put("totalYuePrice", totalYuePrice[0].toString());
|
|
|
|
|
|
String separator = File.separator;
|
|
String separator = File.separator;
|
|
String today = DateUtil.today();
|
|
String today = DateUtil.today();
|