报表导出

This commit is contained in:
shuo.wang
2025-05-16 18:18:50 +08:00
parent 74b3ba88b9
commit 3de0a3aef6
2 changed files with 27 additions and 2 deletions

View File

@@ -79,13 +79,18 @@ public class FranchiseReportResponse {
@ColumnWidth(20) @ColumnWidth(20)
private BigDecimal loanMarginTotal = BigDecimal.ZERO; private BigDecimal loanMarginTotal = BigDecimal.ZERO;
@ApiModelProperty(value = "收款金额总计")
@ExcelProperty(value = "收款金额总计=加盟费+管理/品牌/设计费+保证金",order = 13)
@ColumnWidth(25)
private BigDecimal total = BigDecimal.ZERO;
@ApiModelProperty(value = "昨日日期") @ApiModelProperty(value = "昨日日期")
@ExcelProperty(value = "昨日日期",order = 13) @ExcelProperty(value = "昨日日期",order = 14)
@ColumnWidth(15) @ColumnWidth(15)
private String yesterdayDate; private String yesterdayDate;
@ApiModelProperty(value = "昨天门店数") @ApiModelProperty(value = "昨天门店数")
@ExcelProperty(value = "昨天门店数",order = 14) @ExcelProperty(value = "昨天门店数",order = 15)
@ColumnWidth(15) @ColumnWidth(15)
private Integer yesterdayStoreNum = 0; private Integer yesterdayStoreNum = 0;
@ExcelIgnore @ExcelIgnore

View File

@@ -630,9 +630,29 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
} }
@Override @Override
@Async
public void exportZxjpOpenShopReport(List<FranchiseReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request) { public void exportZxjpOpenShopReport(List<FranchiseReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request) {
String url = ""; String url = "";
try { try {
FranchiseReportResponse total = new FranchiseReportResponse();
total.setYesterdayDate(list.get(0).getYesterdayDate());
total.setJoinGroupName("总计");
for (FranchiseReportResponse response : list){
response.setTotal(response.getFranchiseFeeTotal().add(response.getManagementBrandingDesignFeeTotal()).add(response.getLoanMarginTotal()));
total.setTotal(total.getTotal().add(response.getTotal()));
total.setStoreNum(total.getStoreNum() + response.getStoreNum());
total.setNormalStoreNum(total.getNormalStoreNum() + response.getNormalStoreNum());
total.setRestaurantStoreNum(total.getRestaurantStoreNum() + response.getRestaurantStoreNum());
total.setNoShowStoreNum(total.getNoShowStoreNum() + response.getNoShowStoreNum());
total.setFranchiseFeeTotal(total.getFranchiseFeeTotal().add(response.getFranchiseFeeTotal()));
total.setFirstYearBrandingFeeTotal(total.getFirstYearBrandingFeeTotal().add(response.getFirstYearBrandingFeeTotal()));
total.setFirstYearManagementFeeTotal(total.getFirstYearManagementFeeTotal().add(response.getFirstYearManagementFeeTotal()));
total.setPerformanceBondTotal(total.getPerformanceBondTotal().add(response.getPerformanceBondTotal()));
total.setManagementBrandingDesignFeeTotal(total.getManagementBrandingDesignFeeTotal().add(response.getManagementBrandingDesignFeeTotal()));
total.setLoanMarginTotal(total.getLoanMarginTotal().add(response.getLoanMarginTotal()));
total.setYesterdayStoreNum(total.getYesterdayStoreNum() + response.getYesterdayStoreNum());
}
list.add(total);
url = easyExcelUtil.exportExcelSpecial(FranchiseReportResponse.class, list, null, url = easyExcelUtil.exportExcelSpecial(FranchiseReportResponse.class, list, null,
FileTypeEnum.ZXJP_OPEN_SHOP_REPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()), FileTypeEnum.ZXJP_OPEN_SHOP_REPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),
FileTypeEnum.ZXJP_OPEN_SHOP_REPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()), FileTypeEnum.ZXJP_OPEN_SHOP_REPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),