Merge remote-tracking branch 'origin/feature_程诚_0831问题修复' into release_20260831
This commit is contained in:
+11
-3
@@ -91,6 +91,7 @@ public class CongressVotingStatisticalController {
|
|||||||
@At("/records")
|
@At("/records")
|
||||||
@SaCheckPermission("congress.vote.statistical")
|
@SaCheckPermission("congress.vote.statistical")
|
||||||
public Result voteRecords(@Param("issueId") String issueId) {
|
public Result voteRecords(@Param("issueId") String issueId) {
|
||||||
|
// H5 投票使用现有职代会代表表写入 rep_id,旧表关联仅作为历史数据兼容回退。
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
r.id,
|
r.id,
|
||||||
@@ -98,10 +99,17 @@ public class CongressVotingStatisticalController {
|
|||||||
r.name,
|
r.name,
|
||||||
r.vote_result AS voteResult,
|
r.vote_result AS voteResult,
|
||||||
r.create_time AS createTime,
|
r.create_time AS createTime,
|
||||||
COALESCE(rep.union_id, du.union_id) AS unionId,
|
COALESCE(tc_delegate.unionId, rep.union_id, du.union_id) AS unionId,
|
||||||
du.union_name AS unionName,
|
COALESCE(tc_delegate.unionName, du.union_name) AS unionName,
|
||||||
COALESCE(rep.delegation_name, d.name) AS delegationName
|
COALESCE(delegate_delegation.name, rep.delegation_name, d.name) AS delegationName
|
||||||
FROM congress_voting_record r
|
FROM congress_voting_record r
|
||||||
|
LEFT JOIN teacher_congress_delegate tc_delegate ON tc_delegate.id = r.rep_id
|
||||||
|
AND tc_delegate.sessionId = r.session_id
|
||||||
|
AND COALESCE(tc_delegate.delFlag, 0) = 0
|
||||||
|
LEFT JOIN teacher_congress_delegation delegate_delegation
|
||||||
|
ON delegate_delegation.id = COALESCE(r.delegation_id, tc_delegate.delegationId)
|
||||||
|
AND delegate_delegation.sessionId = r.session_id
|
||||||
|
AND COALESCE(delegate_delegation.delFlag, 0) = 0
|
||||||
LEFT JOIN congress_rep rep ON rep.id = r.rep_id
|
LEFT JOIN congress_rep rep ON rep.id = r.rep_id
|
||||||
LEFT JOIN congress_delegation d ON d.id = r.delegation_id
|
LEFT JOIN congress_delegation d ON d.id = r.delegation_id
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
|
|||||||
Reference in New Issue
Block a user