This commit is contained in:
2025-03-11 19:40:34 +08:00
parent ec49bcfa8b
commit 0c644ac349
2 changed files with 23 additions and 18 deletions
@@ -151,18 +151,29 @@ public class MemberPaymentChartSummaryController {
Sql sql = Sqls.create("""
SELECT
un.unionname,
COALESCE ( SUM( pt.tradingAmount * 0.01 ), 0 ) AS money
COALESCE ( SUM( subquery.money ), 0 ) AS money
FROM
sys_union un
LEFT JOIN payment_transaction pt ON pt.unionId = un.id
AND pt.tradingState = 'PAY_SUCCESS'
AND pt.isRefund = 0
LEFT JOIN member_payment_info mpi ON mpi.id = pt.memberPaymentInfoId
AND mpi.paymentProjectId=@paymentProjectId
LEFT JOIN (
SELECT
pt.unionId,
SUM( pt.tradingAmount * 0.01 ) AS money
FROM
payment_transaction pt
INNER JOIN member_payment_info mpi ON mpi.id = pt.memberPaymentInfoId
AND mpi.paymentProjectId = @paymentProjectId
WHERE
pt.tradingState = 'PAY_SUCCESS'
AND pt.isRefund = 0
GROUP BY
pt.unionId
) subquery ON subquery.unionId = un.id
GROUP BY
un.id
ORDER BY
un.id,
un.unionname,
un.unioncode
ORDER BY
un.unioncode;
""").setParam("paymentProjectId", paymentProjectId);
return Result.success(memberPaymentService.listMap(sql));
}
@@ -170,7 +170,7 @@ layout("/layouts/platform.html"){
</div>
<script>
new Vue({
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
@@ -196,7 +196,7 @@ layout("/layouts/platform.html"){
unionForm: {
year: new Date().getFullYear() + ""
},
paymentProjectList:[],
paymentProjectList: []
}
},
methods: {
@@ -231,9 +231,6 @@ layout("/layouts/platform.html"){
autoRotate: false
}
},
color: ({ type }) => {
return "#63DAAB"
},
meta: {
projectName: {
alias: "项目"
@@ -274,9 +271,6 @@ layout("/layouts/platform.html"){
autoRotate: false
}
},
color: ({ type }) => {
return "#63DAAB"
},
meta: {
projectName: {
alias: "项目"
@@ -311,7 +305,7 @@ layout("/layouts/platform.html"){
autoFit: true,
title: {
visible: true,
text: "年工会经费及活动详情"
text: ""
},
description: {
visible: true,
@@ -361,7 +355,7 @@ layout("/layouts/platform.html"){
const resp = await $.get("/platform/member/payment/project/getAllProject", { year: this.unionForm.year })
if (resp.code === 0) {
this.paymentProjectList = resp.data
this.$set(this.unionForm, "paymentProjectId", this.paymentProjectList ? this.paymentProjectList[0].id : null)
this.$set(this.unionForm, "paymentProjectId", (this.paymentProjectList && this.paymentProjectList.length > 0) ? this.paymentProjectList[0].id : null)
await this.allUnionMoney()
}
}