项目:学员管理系统的缴费统计
框架:若依RuoyiFast
效果图:

Java代码
/**
* author 阿卜QQ932696181
* date 2023-08-03
* 学员缴费信息统计
*/
@Controller
@RequestMapping("/lxmember/stupaymentstatistic")
public class StuPaymentStatistic extends BaseController {
private String prefix = "lxmember/stupayment";
@Autowired
private IStuPaymentService stuPaymentService;
@RequiresPermissions("lxmember:stupaymentstatistic:view")
@GetMapping()
public String stupayment(ModelMap mmp)
{
List<PaymentStatisticVo> paymentStatisticVoList = stuPaymentService.selectStuPaymentStatistic();
mmp.put("paymentStatisticVoList",paymentStatisticVoList);
return prefix + "/statistic1";
}
}
<select id="selectStuPaymentStatistic"
resultType="com.ruoyi.project.lxmember.stupayment.domain.vo.PaymentStatisticVo">
SELECT SUBSTRING(create_time,1,7) as paydate
,sum(case payment_type when '1' then payment_amount else 0 end) as paymoney
,sum(case payment_type when '2' then payment_amount else 0 end) as payonmoney
,sum(case payment_type when '3' then payment_amount else 0 end) as payexammoney
FROM `lxl_stu_payment`
group by SUBSTRING(create_time,1,7)
</select>
HTML前端代码
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h2>缴费统计</h2>
</div>
<div class="ibox-content">
<table class="table" style="text-align: center">
<thead >
<th style="text-align: center">编号</th>
<th style="text-align: center">时间</th>
<th style="text-align: center">费用合计</th>
<th style="text-align: center">其中首次缴费</th>
<th style="text-align: center">其中续费</th>
<th style="text-align: center">其中考试费用</th>
</thead>
<tbody>
<tr th:each="item,paymentStatisticVoListStat:${paymentStatisticVoList}">
<td><span th:text="${paymentStatisticVoListStat.index+1}"></span></td>
<td><span th:text="${item.paydate}"></span></td>
<td><span th:text="${item.paymoney+item.payonmoney+item.payexammoney}"></span></td>
<td><span th:text="${item.paymoney}"></span></td>
<td><span th:text="${item.payonmoney}"></span></td>
<td><span th:text="${item.payexammoney}"></span></td>
</tr>
<tfoot>
<tr style="color: red">
<td colspan="2">总合计</td>
<td>
<span th:text="${#aggregates.sum(paymentStatisticVoList.![paymoney + payonmoney + payexammoney])}"></span>
</td>
<td>
<span th:text="${#aggregates.sum(paymentStatisticVoList.![paymoney])}"></span>
</td>
<td>
<span th:text="${#aggregates.sum(paymentStatisticVoList.![payonmoney])}"></span>
</td>
<td>
<span th:text="${#aggregates.sum(paymentStatisticVoList.![payexammoney])}"></span>
</td>
</tr>
</tfoot>
</tbody>
</table>
</div>
</div>
</div>
若对你有帮助请点赞,有建议请留下,勿喷,谢谢!!

本文介绍了使用若依RuoyiFast框架在学员管理系统中进行缴费统计的方法,包括后端Java代码和前端HTML的实现细节,旨在展示如何在该框架下生成统计报表。
&spm=1001.2101.3001.5002&articleId=132144311&d=1&t=3&u=f0352ec771384a20a7f176f4653f5276)
5275

被折叠的 条评论
为什么被折叠?



