public async Task <IActionResult> BalanceExport(string billId) { var res = await balanceService.GetDetailPageAsync(new PageParm { key = billId, page = 1, limit = int.MaxValue }); if (res.data.Items.Count == 0) { return(Content("没有数据")); } var data = await res.data.Items.Write("返佣结算明细", p => new EC("商户名称", p.mch_name), p => new EC("支付渠道", p.Settle_Name), p => new EC("支付金额", p.success_amount, "¥#,##0.00", sum: true), p => new EC("退款金额", p.refund_create_amount, "¥#,##0.00", sum: true), p => new EC("商家优惠", p.coupon_amount, "¥#,##0.00", sum: true), p => new EC("参与返佣净额", p.balance_amount, "¥#,##0.00", sum: true), p => new EC("返佣比例", p.rebate / 100M, "0.00%"), p => new EC("应返金额", p.rebate_amount, "¥#,##0.00", sum: true), p => new EC("调整金额", p.modify_amount, "¥#,##0.00", sum: true), p => new EC("实际返佣", p.rebate_amount_rel, "¥#,##0.00", sum: true)); return(File( data, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "返佣结算明细.xlsx" )); }
public async Task <IActionResult> GetDetailPages([FromQuery] PageParm parm) { var res = await balanceService.GetDetailPageAsync(parm); return(Ok(new { code = 0, msg = "success", count = res.data.TotalItems, data = res.data.Items })); }