From 704bc278fa3c998dce333dfb2b53eceea44943e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E8=AF=9A?= <1009578407@qq.com>
Date: Tue, 28 Jul 2026 17:27:29 +0800
Subject: [PATCH 1/8] =?UTF-8?q?feat:=E6=B5=A6=E5=8F=91=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=BF=81=E7=A7=BB-=E8=81=8C=E4=BB=A3?=
=?UTF-8?q?=E4=BC=9Ah5=E7=AB=AF=E5=88=9D=E5=A7=8B=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../h5controller/CongressH5Controller.java | 373 +++++++++++++
.../db/congress/init_congress_module.sql | 509 ++++++++++++++++++
.../congress/seed_congress_h5_full_test.sql | 437 +++++++++++++++
.../zhghh5/democratic/congress/index.html | 372 +++++++++++++
.../democratic/congress/materials/list.html | 279 ++++++++++
.../democratic/congress/meeting/list.html | 306 +++++++++++
.../zhghh5/democratic/congress/pdf.html | 140 +++++
.../zhghh5/democratic/congress/vote.html | 417 ++++++++++++++
.../zhghh5/democratic/congress/voted.html | 407 ++++++++++++++
9 files changed, 3240 insertions(+)
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
create mode 100644 src/main/resources/db/congress/init_congress_module.sql
create mode 100644 src/main/resources/db/congress/seed_congress_h5_full_test.sql
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/index.html
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/vote.html
create mode 100644 src/main/resources/views/platform/zhghh5/democratic/congress/voted.html
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
new file mode 100644
index 00000000..52017bd2
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
@@ -0,0 +1,373 @@
+package com.budwk.app.zhgh.democratic.congress.h5controller;
+
+import cn.dev33.satoken.annotation.SaCheckLogin;
+import cn.hutool.core.util.StrUtil;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.web.commons.auth.utils.SecurityUtil;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+
+@IocBean
+@At("/platform/h5/congress")
+@Ok("json:full")
+public class CongressH5Controller {
+
+ @Inject
+ private Dao dao;
+
+ @At("")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/index.html")
+ @SaCheckLogin
+ public void index() {
+ }
+
+ @At("/materials/list")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/materials/list.html")
+ @SaCheckLogin
+ public void materialsListPage() {
+ }
+
+ @At("/meeting/list")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/meeting/list.html")
+ @SaCheckLogin
+ public void meetingListPage() {
+ }
+
+ @At("/pdf")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/pdf.html")
+ @SaCheckLogin
+ public void pdfPage() {
+ }
+
+ @At("/vote")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/vote.html")
+ @SaCheckLogin
+ public void votePage() {
+ }
+
+ @At("/voted")
+ @Ok("beetl:/platform/zhghh5/democratic/congress/voted.html")
+ @SaCheckLogin
+ public void votedPage() {
+ }
+
+ @At("/repTimes")
+ @SaCheckLogin
+ public Result repTimes(@Param("emplid") String emplid) {
+ String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
+ Sql sql = Sqls.create("""
+ SELECT
+ t.id,
+ t.id AS timeId,
+ t.name,
+ t.year,
+ t.session_id AS sessionId,
+ t.session_name AS sessionName,
+ s.type,
+ r.id AS repId,
+ r.delegation_id AS delegationId,
+ r.delegation_name AS delegationName
+ FROM congress_times t
+ INNER JOIN (
+ SELECT id, time_id, delegation_id, delegation_name
+ FROM congress_rep
+ WHERE emplid = @emplid
+ AND status = 2
+ AND IFNULL(deleted, 0) = 0
+ GROUP BY id, time_id, delegation_id, delegation_name
+ ) r ON t.id = r.time_id
+ INNER JOIN congress_sessions s ON t.session_id = s.id
+ WHERE IFNULL(t.deleted, 0) = 0
+ AND IFNULL(s.deleted, 0) = 0
+ ORDER BY t.create_time DESC, t.id DESC
+ """);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return Result.success(sql.getList(NutMap.class));
+ }
+
+ @At("/materialsTypeList")
+ @SaCheckLogin
+ public Result materialsTypeList() {
+ Sql sql = Sqls.create("""
+ SELECT
+ SUBSTRING_INDEX(
+ GROUP_CONCAT(
+ id
+ ORDER BY
+ CASE
+ WHEN id IN (
+ 'congress_type_file_notice',
+ 'congress_type_evaluation_vote',
+ 'congress_type_issue_vote',
+ 'congress_type_vote_notice',
+ 'congress_type_prepare_material'
+ ) THEN 0
+ ELSE 1
+ END,
+ sort_no ASC,
+ create_time ASC
+ ),
+ ',',
+ 1
+ ) AS id,
+ MIN(sort_no) AS sortNo,
+ name,
+ MAX(is_vote) AS isVote
+ FROM congress_materials_type
+ WHERE IFNULL(deleted, 0) = 0
+ GROUP BY name
+ ORDER BY sortNo ASC, name ASC
+ """);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return Result.success(sql.getList(NutMap.class));
+ }
+
+ @At("/materialsList")
+ @SaCheckLogin
+ public Result materialsList(@Param("typeId") String typeId, @Param("timeId") String timeId, @Param("emplid") String emplid) {
+ String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
+ Sql sql = Sqls.create("""
+ SELECT
+ cm.id,
+ cm.session_id AS sessionId,
+ cm.time_id AS timeId,
+ cm.type_id AS typeId,
+ cm.sort_no AS sortNo,
+ cm.name,
+ cm.file_name AS fileName,
+ cm.file_url AS fileUrl,
+ cm.file_type AS fileType,
+ cm.file_size AS fileSize,
+ cm.create_time AS uploadTime,
+ CASE
+ WHEN cvi.id IS NULL THEN NULL
+ WHEN cvr.id IS NOT NULL THEN true
+ ELSE false
+ END AS hasVoted,
+ CASE WHEN cvr.id IS NOT NULL THEN true ELSE false END AS voted
+ FROM congress_materials cm
+ INNER JOIN congress_materials_type cmt ON cm.type_id = cmt.id AND IFNULL(cmt.deleted, 0) = 0
+ LEFT JOIN congress_voting_issue cvi ON cm.id = cvi.materials_id
+ AND IFNULL(cvi.deleted, 0) = 0
+ AND cmt.is_vote = true
+ LEFT JOIN congress_voting_record cvr ON cvi.id = cvr.issue_id
+ AND cvr.emplid = @emplid
+ AND IFNULL(cvr.deleted, 0) = 0
+ WHERE IFNULL(cm.deleted, 0) = 0
+ AND cm.type_id = @typeId
+ AND cm.time_id = @timeId
+ ORDER BY cm.sort_no ASC, cm.create_time DESC
+ """);
+ sql.setParam("typeId", typeId);
+ sql.setParam("timeId", timeId);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return Result.success(sql.getList(NutMap.class));
+ }
+
+ @At("/user/meetingList")
+ @SaCheckLogin
+ public Result userMeetingList(@Param("timeId") String timeId, @Param("emplid") String emplid) {
+ String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
+ Sql sql = Sqls.create("""
+ SELECT
+ m.id,
+ m.meeting_name AS meetingName,
+ m.sign_in_start_time AS signInStartTime,
+ m.sign_in_end_time AS signInEndTime,
+ m.session_id AS sessionId,
+ m.time_id AS timeId,
+ m.remark,
+ (
+ SELECT COUNT(1)
+ FROM congress_sign_in s
+ WHERE s.meeting_id = m.id
+ AND IFNULL(s.deleted, 0) = 0
+ ) AS signInCount,
+ si.id AS signInId,
+ si.create_time AS userSignInTime,
+ r.id AS repId
+ FROM congress_sign_in_meeting m
+ LEFT JOIN congress_sign_in si ON m.id = si.meeting_id
+ AND IFNULL(si.deleted, 0) = 0
+ AND si.emplid = @emplid
+ LEFT JOIN congress_rep r ON r.time_id = m.time_id
+ AND r.emplid = @emplid
+ AND IFNULL(r.deleted, 0) = 0
+ WHERE IFNULL(m.deleted, 0) = 0
+ AND m.time_id = @timeId
+ ORDER BY m.sign_in_start_time DESC, m.create_time DESC
+ """);
+ sql.setParam("timeId", timeId);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return Result.success(sql.getList(NutMap.class));
+ }
+
+ @At("/signin")
+ @SaCheckLogin
+ public Result signin(@Param("repId") String repId,
+ @Param("sessionId") String sessionId,
+ @Param("timeId") String timeId,
+ @Param("meetingId") String meetingId) {
+ if (StrUtil.hasBlank(repId, sessionId, timeId, meetingId)) {
+ return Result.error("签到参数不完整");
+ }
+ int count = countBySql("""
+ SELECT COUNT(1)
+ FROM congress_sign_in
+ WHERE rep_id = @repId
+ AND meeting_id = @meetingId
+ AND IFNULL(deleted, 0) = 0
+ """, NutMap.NEW().addv("repId", repId).addv("meetingId", meetingId));
+ if (count > 0) {
+ return Result.success(true);
+ }
+
+ Sql repSql = Sqls.create("""
+ SELECT id, emplid, name, delegation_id AS delegationId
+ FROM congress_rep
+ WHERE id = @repId
+ AND IFNULL(deleted, 0) = 0
+ LIMIT 1
+ """);
+ repSql.setParam("repId", repId);
+ repSql.setCallback(Sqls.callback.map());
+ dao.execute(repSql);
+ NutMap rep = repSql.getObject(NutMap.class);
+ if (rep == null) {
+ return Result.error("未找到代表信息");
+ }
+
+ dao.insert("congress_sign_in", Chain.make("id", R.UU32())
+ .add("session_id", sessionId)
+ .add("time_id", timeId)
+ .add("meeting_id", meetingId)
+ .add("delegation_id", rep.getString("delegationId"))
+ .add("rep_id", repId)
+ .add("emplid", rep.getString("emplid"))
+ .add("name", rep.getString("name"))
+ .add("create_time", new Date())
+ .add("update_time", new Date())
+ .add("deleted", false));
+ return Result.success(true);
+ }
+
+ @At("/votingIssue")
+ @SaCheckLogin
+ public Result votingIssue(@Param("materialsId") String materialsId, @Param("repId") String repId) {
+ Sql sql = Sqls.create("""
+ SELECT
+ i.id,
+ i.session_id AS sessionId,
+ i.session_name AS sessionName,
+ i.time_id AS timeId,
+ i.time_name AS timeName,
+ i.name,
+ i.description,
+ i.content,
+ i.voting_type AS votingType,
+ i.voting_start_time AS votingStartTime,
+ i.voting_end_time AS votingEndTime,
+ i.voting_content AS votingContent,
+ i.voting_content_item_header AS votingContentItemHeader,
+ i.voting_content_option_header AS votingContentOptionHeader,
+ i.materials_id AS materialsId,
+ i.type_id AS typeId,
+ i.delegation_id AS delegationId,
+ mt.name AS typeName,
+ CASE WHEN vr.id IS NULL THEN false ELSE true END AS voted,
+ vr.vote_result AS voteResult
+ FROM congress_voting_issue i
+ LEFT JOIN congress_materials_type mt ON mt.id = i.type_id AND IFNULL(mt.deleted, 0) = 0
+ LEFT JOIN congress_voting_record vr ON vr.issue_id = i.id
+ AND vr.rep_id = @repId
+ AND IFNULL(vr.deleted, 0) = 0
+ WHERE i.materials_id = @materialsId
+ AND IFNULL(i.deleted, 0) = 0
+ LIMIT 1
+ """);
+ sql.setParam("materialsId", materialsId);
+ sql.setParam("repId", repId);
+ sql.setCallback(Sqls.callback.map());
+ dao.execute(sql);
+ return Result.success(sql.getObject(NutMap.class));
+ }
+
+ @At("/api/vote")
+ @SaCheckLogin
+ public Result voteSubmit(@Param("issueId") String issueId,
+ @Param("repId") String repId,
+ @Param("sessionId") String sessionId,
+ @Param("timeId") String timeId,
+ @Param("delegationId") String delegationId,
+ @Param("voteResult") String voteResult) {
+ if (StrUtil.hasBlank(issueId, repId, sessionId, timeId, voteResult)) {
+ return Result.error("投票参数不完整");
+ }
+ int count = countBySql("""
+ SELECT COUNT(1)
+ FROM congress_voting_record
+ WHERE issue_id = @issueId
+ AND rep_id = @repId
+ AND IFNULL(deleted, 0) = 0
+ """, NutMap.NEW().addv("issueId", issueId).addv("repId", repId));
+ if (count > 0) {
+ return Result.error("您已投票,请勿重复提交");
+ }
+
+ Sql repSql = Sqls.create("""
+ SELECT user_id AS userId, emplid, name
+ FROM congress_rep
+ WHERE id = @repId
+ AND IFNULL(deleted, 0) = 0
+ LIMIT 1
+ """);
+ repSql.setParam("repId", repId);
+ repSql.setCallback(Sqls.callback.map());
+ dao.execute(repSql);
+ NutMap rep = repSql.getObject(NutMap.class);
+ if (rep == null) {
+ return Result.error("未找到代表信息");
+ }
+
+ dao.insert("congress_voting_record", Chain.make("id", R.UU32())
+ .add("issue_id", issueId)
+ .add("rep_id", repId)
+ .add("emplid", rep.getString("emplid"))
+ .add("name", rep.getString("name"))
+ .add("session_id", sessionId)
+ .add("time_id", timeId)
+ .add("delegation_id", delegationId)
+ .add("vote_result", voteResult)
+ .add("user_id", rep.getString("userId"))
+ .add("create_time", new Date())
+ .add("update_time", new Date())
+ .add("deleted", false));
+ return Result.success();
+ }
+
+ private int countBySql(String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ sql.setCallback(Sqls.callback.integer());
+ dao.execute(sql);
+ return sql.getInt();
+ }
+}
diff --git a/src/main/resources/db/congress/init_congress_module.sql b/src/main/resources/db/congress/init_congress_module.sql
new file mode 100644
index 00000000..63ab6cb7
--- /dev/null
+++ b/src/main/resources/db/congress/init_congress_module.sql
@@ -0,0 +1,509 @@
+/*
+ * 职代会独立模块初始化脚本。
+ * 说明:
+ * 1. 所有业务表均使用 congress_ 前缀,避免沿用旧职代会模块。
+ * 2. H5 菜单权限使用 h5.congress / h5.congress.index。
+ * 3. sys_menu.path 按当前同级最大 path 自动递增,避免固定 path 导致唯一索引冲突。
+ */
+
+CREATE TABLE IF NOT EXISTS `congress_sessions` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `year` varchar(32) DEFAULT NULL COMMENT '年份',
+ `description` varchar(1000) DEFAULT NULL COMMENT '描述',
+ `sc_session` int DEFAULT NULL COMMENT '省产届次',
+ `uc_session` int DEFAULT NULL COMMENT '校产届次',
+ `union_id` varchar(32) DEFAULT NULL COMMENT '工会ID',
+ `type` int DEFAULT NULL COMMENT '会类型',
+ `union_name` varchar(255) DEFAULT NULL COMMENT '工会名称',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_sessions_union_id` (`union_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会届次';
+
+CREATE TABLE IF NOT EXISTS `congress_times` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `year` varchar(32) DEFAULT NULL COMMENT '年份',
+ `name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `sc_times` int DEFAULT NULL COMMENT '省产次数',
+ `uc_times` int DEFAULT NULL COMMENT '校产次数',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_times_session_id` (`session_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会会议';
+
+CREATE TABLE IF NOT EXISTS `congress_delegation` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `name` varchar(255) DEFAULT NULL COMMENT '代表团名称',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `time_name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `code` varchar(64) DEFAULT NULL COMMENT '编码',
+ `official_number` int DEFAULT '0' COMMENT '正式代表人数',
+ `attendance_number` int DEFAULT '0' COMMENT '列席代表人数',
+ `invite_number` int DEFAULT '0' COMMENT '特邀代表人数',
+ `committee_allot_number` int DEFAULT '0' COMMENT '委员分配人数',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_delegation_time` (`time_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表团';
+
+CREATE TABLE IF NOT EXISTS `congress_delegation_head` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
+ `emplid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `unit` varchar(255) DEFAULT NULL COMMENT '单位',
+ `mobile` varchar(64) DEFAULT NULL COMMENT '电话',
+ `sex` int DEFAULT NULL COMMENT '性别',
+ `identity` int DEFAULT NULL COMMENT '身份',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_delegation_head_delegation` (`delegation_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表团团长';
+
+CREATE TABLE IF NOT EXISTS `congress_delegation_rep` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
+ `empid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `unit` varchar(255) DEFAULT NULL COMMENT '单位',
+ `mobile` varchar(64) DEFAULT NULL COMMENT '电话',
+ `sex` int DEFAULT NULL COMMENT '性别',
+ `identity` int DEFAULT NULL COMMENT '身份',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_delegation_rep_delegation` (`delegation_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表团代表';
+
+CREATE TABLE IF NOT EXISTS `congress_delegation_union` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `union_id` varchar(32) DEFAULT NULL COMMENT '工会ID',
+ `union_name` varchar(255) DEFAULT NULL COMMENT '工会名称',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_delegation_union_delegation` (`delegation_id`),
+ KEY `idx_congress_delegation_union_time` (`time_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表团工会';
+
+CREATE TABLE IF NOT EXISTS `congress_union` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `union_id` varchar(32) DEFAULT NULL COMMENT '工会ID',
+ `union_name` varchar(255) DEFAULT NULL COMMENT '工会名称',
+ `quota_config` text COMMENT '名额配置',
+ `member_number` int DEFAULT '0' COMMENT '会员数',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `sort_no` int DEFAULT '0' COMMENT '排序',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_union_session` (`session_id`),
+ KEY `idx_congress_union_delegation` (`delegation_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会工会名额';
+
+CREATE TABLE IF NOT EXISTS `congress_rep_supplement` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `precinct_union_id` varchar(32) DEFAULT NULL COMMENT '选区',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `time_name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `add_user_id` varchar(32) DEFAULT NULL COMMENT '增加代表用户ID',
+ `add_user_union_id` varchar(32) DEFAULT NULL COMMENT '增加代表工会ID',
+ `add_user_name` varchar(100) DEFAULT NULL COMMENT '增加代表姓名',
+ `add_emplid` varchar(64) DEFAULT NULL COMMENT '增加代表工号',
+ `sub_user_id` varchar(32) DEFAULT NULL COMMENT '替换代表用户ID',
+ `sub_user_name` varchar(100) DEFAULT NULL COMMENT '替换代表姓名',
+ `sub_emplid` varchar(64) DEFAULT NULL COMMENT '替换代表工号',
+ `reason` varchar(1000) DEFAULT NULL COMMENT '原因',
+ `add_precinct_union_id` varchar(32) DEFAULT NULL COMMENT '增加选区工会ID',
+ `add_precinct_union_name` varchar(255) DEFAULT NULL COMMENT '增加选区工会名',
+ `sub_precinct_union_id` varchar(32) DEFAULT NULL COMMENT '替换选区工会ID',
+ `sub_precinct_union_name` varchar(255) DEFAULT NULL COMMENT '替换选区工会名',
+ `type` int DEFAULT NULL COMMENT '类型',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_rep_supplement_time` (`time_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表增补';
+
+CREATE TABLE IF NOT EXISTS `congress_org` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `name` varchar(255) DEFAULT NULL COMMENT '机构名称',
+ `code` varchar(64) DEFAULT NULL COMMENT '机构代码',
+ `type` varchar(64) DEFAULT NULL COMMENT '机构类别',
+ `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+ `parent_id` varchar(32) DEFAULT NULL COMMENT '父节点',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_org_session` (`session_id`),
+ KEY `idx_congress_org_parent` (`parent_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会机构';
+
+CREATE TABLE IF NOT EXISTS `congress_org_member` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
+ `empid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `unit` varchar(255) DEFAULT NULL COMMENT '单位',
+ `mobile` varchar(64) DEFAULT NULL COMMENT '电话',
+ `sex` int DEFAULT NULL COMMENT '性别',
+ `identity` int DEFAULT NULL COMMENT '身份',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `org_id` varchar(32) DEFAULT NULL COMMENT '机构ID',
+ `role_id` varchar(32) DEFAULT NULL COMMENT '角色ID',
+ `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_org_member_org` (`org_id`),
+ KEY `idx_congress_org_member_session` (`session_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会机构成员';
+
+CREATE TABLE IF NOT EXISTS `congress_committee_elect_quota` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `zbztjmes` int DEFAULT '0' COMMENT '筹备组推荐名额数',
+ `wyhyxrs` int DEFAULT '0' COMMENT '委员会预选人数',
+ `dbttjzs` int DEFAULT '0' COMMENT '代表团推荐总数',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `first_preselected_begin_time` datetime DEFAULT NULL COMMENT '第一次预选开始时间',
+ `first_preselected_end_time` datetime DEFAULT NULL COMMENT '第一次预选结束时间',
+ `second_preselected_begin_time` datetime DEFAULT NULL COMMENT '第二次预选开始时间',
+ `second_preselected_end_time` datetime DEFAULT NULL COMMENT '第二次预选结束时间',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_committee_elect_quota_session` (`session_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会委员预选分配';
+
+CREATE TABLE IF NOT EXISTS `congress_committee_elect_rep` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `rep_id` varchar(32) DEFAULT NULL COMMENT '代表ID',
+ `type` int DEFAULT NULL COMMENT '推选类型',
+ `times` int DEFAULT NULL COMMENT '第几次',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '团长用户ID',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_committee_elect_rep_session` (`session_id`),
+ KEY `idx_congress_committee_elect_rep_delegation` (`delegation_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会委员推选';
+
+CREATE TABLE IF NOT EXISTS `congress_rep` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `time_name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `emplid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `sex` varchar(16) DEFAULT NULL COMMENT '性别',
+ `birthdate` varchar(32) DEFAULT NULL COMMENT '出生日期',
+ `politics_status` varchar(100) DEFAULT NULL COMMENT '政治面貌',
+ `position` varchar(255) DEFAULT NULL COMMENT '职务',
+ `education` varchar(100) DEFAULT NULL COMMENT '学历',
+ `work_unit` varchar(255) DEFAULT NULL COMMENT '工作单位',
+ `work_experience` text COMMENT '工作经历',
+ `tags` varchar(255) DEFAULT NULL COMMENT '标签',
+ `filling_status` varchar(32) DEFAULT NULL COMMENT '填报状态',
+ `identity` varchar(64) DEFAULT NULL COMMENT '身份',
+ `type` varchar(64) DEFAULT NULL COMMENT '代表类型',
+ `is_gdh` tinyint(1) DEFAULT '0' COMMENT '是否工代会代表',
+ `is_zdh` tinyint(1) DEFAULT '0' COMMENT '是否职代会代表',
+ `union_id` varchar(32) DEFAULT NULL COMMENT '工会ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `delegation_name` varchar(255) DEFAULT NULL COMMENT '代表团名称',
+ `supplement` text COMMENT '补充说明',
+ `status` int DEFAULT '0' COMMENT '状态',
+ `precinct_union_id` varchar(32) DEFAULT NULL COMMENT '选区工会ID',
+ `precinct_union_name` varchar(255) DEFAULT NULL COMMENT '选区工会名称',
+ `nation` varchar(64) DEFAULT NULL COMMENT '民族',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_rep_emplid` (`emplid`),
+ KEY `idx_congress_rep_time_emplid` (`time_id`,`emplid`),
+ KEY `idx_congress_rep_session_id` (`session_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会代表';
+
+CREATE TABLE IF NOT EXISTS `congress_materials_type` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `sort_no` int DEFAULT '0' COMMENT '排序',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `is_vote` tinyint(1) DEFAULT '0' COMMENT '是否表决类',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会资料类型';
+
+CREATE TABLE IF NOT EXISTS `congress_materials` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `type_id` varchar(32) DEFAULT NULL COMMENT '资料类型ID',
+ `sort_no` int DEFAULT '0' COMMENT '排序',
+ `name` varchar(255) DEFAULT NULL COMMENT '资料名称',
+ `file_name` varchar(255) DEFAULT NULL COMMENT '文件名',
+ `file_url` varchar(1000) DEFAULT NULL COMMENT '文件地址',
+ `file_type` varchar(64) DEFAULT NULL COMMENT '文件类型',
+ `file_size` varchar(64) DEFAULT NULL COMMENT '文件大小',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_materials_time_type` (`time_id`,`type_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会资料';
+
+CREATE TABLE IF NOT EXISTS `congress_sign_in_meeting` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `meeting_name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `sign_in_start_time` datetime DEFAULT NULL COMMENT '签到开始时间',
+ `sign_in_end_time` datetime DEFAULT NULL COMMENT '签到结束时间',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+ `sign_in_count` int DEFAULT '0' COMMENT '签到人数',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_sign_in_meeting_time` (`time_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会签到会议';
+
+CREATE TABLE IF NOT EXISTS `congress_sign_in` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `meeting_id` varchar(32) DEFAULT NULL COMMENT '签到会议ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `rep_id` varchar(32) DEFAULT NULL COMMENT '代表ID',
+ `emplid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uk_congress_sign_in_rep_meeting` (`rep_id`,`meeting_id`,`deleted`),
+ KEY `idx_congress_sign_in_meeting` (`meeting_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会签到记录';
+
+CREATE TABLE IF NOT EXISTS `congress_voting_issue` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `session_name` varchar(255) DEFAULT NULL COMMENT '届次名称',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `time_name` varchar(255) DEFAULT NULL COMMENT '会议名称',
+ `name` varchar(255) DEFAULT NULL COMMENT '议题名称',
+ `description` varchar(1000) DEFAULT NULL COMMENT '描述',
+ `content` text COMMENT '内容',
+ `voting_type` varchar(64) DEFAULT NULL COMMENT '表决类型',
+ `voting_start_time` datetime DEFAULT NULL COMMENT '表决开始时间',
+ `voting_end_time` datetime DEFAULT NULL COMMENT '表决结束时间',
+ `voting_content` text COMMENT '表决内容',
+ `voting_content_item_header` varchar(255) DEFAULT NULL COMMENT '表决项表头',
+ `voting_content_option_header` varchar(255) DEFAULT NULL COMMENT '表决选项表头',
+ `materials_id` varchar(32) DEFAULT NULL COMMENT '资料ID',
+ `type_id` varchar(32) DEFAULT NULL COMMENT '资料类型ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_congress_voting_issue_materials` (`materials_id`),
+ KEY `idx_congress_voting_issue_time` (`time_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会议题表决';
+
+CREATE TABLE IF NOT EXISTS `congress_voting_record` (
+ `id` varchar(32) NOT NULL COMMENT '主键',
+ `issue_id` varchar(32) DEFAULT NULL COMMENT '议题ID',
+ `rep_id` varchar(32) DEFAULT NULL COMMENT '代表ID',
+ `emplid` varchar(64) DEFAULT NULL COMMENT '工号',
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `session_id` varchar(32) DEFAULT NULL COMMENT '届次ID',
+ `time_id` varchar(32) DEFAULT NULL COMMENT '会议ID',
+ `delegation_id` varchar(32) DEFAULT NULL COMMENT '代表团ID',
+ `vote_result` text COMMENT '表决结果',
+ `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
+ `create_by` varchar(32) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `update_by` varchar(32) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `deleted` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uk_congress_voting_record_rep_issue` (`rep_id`,`issue_id`,`deleted`),
+ KEY `idx_congress_voting_record_issue` (`issue_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='职代会表决记录';
+
+INSERT INTO `congress_materials_type` (`id`, `sort_no`, `name`, `is_vote`, `create_time`, `update_time`, `deleted`)
+SELECT 'congress_type_file_notice', 10, '文件公告', 0, NOW(), NOW(), 0
+WHERE NOT EXISTS (SELECT 1 FROM `congress_materials_type` WHERE `id` = 'congress_type_file_notice');
+
+INSERT INTO `congress_materials_type` (`id`, `sort_no`, `name`, `is_vote`, `create_time`, `update_time`, `deleted`)
+SELECT 'congress_type_evaluation_vote', 20, '评议表决', 1, NOW(), NOW(), 0
+WHERE NOT EXISTS (SELECT 1 FROM `congress_materials_type` WHERE `id` = 'congress_type_evaluation_vote');
+
+INSERT INTO `congress_materials_type` (`id`, `sort_no`, `name`, `is_vote`, `create_time`, `update_time`, `deleted`)
+SELECT 'congress_type_issue_vote', 30, '议题表决', 1, NOW(), NOW(), 0
+WHERE NOT EXISTS (SELECT 1 FROM `congress_materials_type` WHERE `id` = 'congress_type_issue_vote');
+
+INSERT INTO `congress_materials_type` (`id`, `sort_no`, `name`, `is_vote`, `create_time`, `update_time`, `deleted`)
+SELECT 'congress_type_vote_notice', 40, '表决公告', 0, NOW(), NOW(), 0
+WHERE NOT EXISTS (SELECT 1 FROM `congress_materials_type` WHERE `id` = 'congress_type_vote_notice');
+
+INSERT INTO `congress_materials_type` (`id`, `sort_no`, `name`, `is_vote`, `create_time`, `update_time`, `deleted`)
+SELECT 'congress_type_prepare_material', 50, '准备资料', 0, NOW(), NOW(), 0
+WHERE NOT EXISTS (SELECT 1 FROM `congress_materials_type` WHERE `id` = 'congress_type_prepare_material');
+
+INSERT INTO `sys_menu` (`id`, `parentId`, `path`, `name`, `aliasName`, `type`, `href`, `target`, `icon`, `showit`, `disabled`, `permission`, `note`, `location`, `hasChildren`, `createdBy`, `createdAt`, `updatedBy`, `updatedAt`, `delFlag`, `platform`, `moduleId`, `picIcon`, `initialPinyinName`, `isRecommendApp`, `isRecommendService`)
+SELECT
+ 'congress_h5',
+ '',
+ LPAD(IFNULL(MAX(CAST(`path` AS UNSIGNED)), 0) + 1, 4, '0'),
+ '职代会',
+ 'Congress',
+ 'menu',
+ '',
+ '_self',
+ 'records-o',
+ 1,
+ 0,
+ 'h5.congress',
+ NULL,
+ 980,
+ 1,
+ '',
+ UNIX_TIMESTAMP(NOW()) * 1000,
+ '',
+ UNIX_TIMESTAMP(NOW()) * 1000,
+ 0,
+ 'H5',
+ NULL,
+ NULL,
+ 'z',
+ 0,
+ 0
+FROM `sys_menu`
+WHERE (`parentId` IS NULL OR `parentId` = '')
+ AND CHAR_LENGTH(`path`) = 4
+HAVING NOT EXISTS (
+ SELECT 1 FROM (SELECT `id` FROM `sys_menu` WHERE `permission` = 'h5.congress') t
+);
+
+INSERT INTO `sys_menu` (`id`, `parentId`, `path`, `name`, `aliasName`, `type`, `href`, `target`, `icon`, `showit`, `disabled`, `permission`, `note`, `location`, `hasChildren`, `createdBy`, `createdAt`, `updatedBy`, `updatedAt`, `delFlag`, `platform`, `moduleId`, `picIcon`, `initialPinyinName`, `isRecommendApp`, `isRecommendService`)
+SELECT
+ 'congress_h5_index',
+ p.`id`,
+ CONCAT(p.`path`, LPAD(IFNULL(MAX(CAST(SUBSTRING(c.`path`, CHAR_LENGTH(p.`path`) + 1) AS UNSIGNED)), 0) + 1, 4, '0')),
+ '职代会首页',
+ 'Congress Index',
+ 'menu',
+ '/platform/h5/congress',
+ '_self',
+ 'records-o',
+ 1,
+ 0,
+ 'h5.congress.index',
+ NULL,
+ 1,
+ 0,
+ '',
+ UNIX_TIMESTAMP(NOW()) * 1000,
+ '',
+ UNIX_TIMESTAMP(NOW()) * 1000,
+ 0,
+ 'H5',
+ NULL,
+ NULL,
+ 'z',
+ 0,
+ 0
+FROM `sys_menu` p
+LEFT JOIN `sys_menu` c ON c.`parentId` = p.`id`
+WHERE p.`permission` = 'h5.congress'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT `id` FROM `sys_menu` WHERE `permission` = 'h5.congress.index') t
+ )
+GROUP BY p.`id`, p.`path`;
+
+INSERT INTO `sys_role_menu` (`roleId`, `menuId`)
+SELECT r.`id`, m.`id`
+FROM `sys_role` r
+INNER JOIN `sys_menu` m ON m.`permission` IN ('h5.congress', 'h5.congress.index')
+LEFT JOIN `sys_role_menu` rm ON rm.`roleId` = r.`id` AND rm.`menuId` = m.`id`
+WHERE r.`code` = 'SYSADMIN'
+ AND rm.`roleId` IS NULL;
diff --git a/src/main/resources/db/congress/seed_congress_h5_full_test.sql b/src/main/resources/db/congress/seed_congress_h5_full_test.sql
new file mode 100644
index 00000000..151adf9e
--- /dev/null
+++ b/src/main/resources/db/congress/seed_congress_h5_full_test.sql
@@ -0,0 +1,437 @@
+/*
+ * 职代会 H5 全流程测试数据。
+ *
+ * 使用方式:
+ * 1. 将 @test_emplid 改成当前登录账号的 loginname/工号。
+ * 2. 先执行 init_congress_module.sql 建表和菜单,再执行本脚本。
+ * 3. 访问 /platform/h5/congress 测试 H5 职代会入口。
+ */
+
+SET @test_emplid = '053181';
+SET @test_user_id = (
+ SELECT id
+ FROM sys_user
+ WHERE loginname = @test_emplid
+ LIMIT 1
+);
+
+-- 给当前账号所属角色授权 H5 职代会菜单,保证“全部应用”可见。
+INSERT INTO sys_role_menu (roleId, menuId)
+SELECT ur.roleId, m.id
+FROM sys_user_role ur
+JOIN sys_menu m ON m.id IN ('congress_h5', 'congress_h5_index')
+LEFT JOIN sys_role_menu rm ON rm.roleId = ur.roleId AND rm.menuId = m.id
+WHERE ur.userId = @test_user_id
+ AND rm.roleId IS NULL;
+
+-- 清理本脚本铺过的测试数据,方便反复执行。
+DELETE FROM congress_voting_record WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_voting_issue WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_sign_in WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_sign_in_meeting WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_materials WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_voting_record WHERE id LIKE 'congress_test_%' OR issue_id LIKE 'congress_test_%';
+DELETE FROM congress_voting_issue WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%' OR materials_id LIKE 'congress_test_%';
+DELETE FROM congress_sign_in WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%' OR meeting_id LIKE 'congress_test_%';
+DELETE FROM congress_sign_in_meeting WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%';
+DELETE FROM congress_materials WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%';
+DELETE FROM congress_rep WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%' OR id = CONCAT('congress_rep_', @test_emplid);
+DELETE FROM congress_delegation_rep WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_delegation_head WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_delegation_union WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_delegation WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_union WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_delegation_rep WHERE id LIKE 'congress_test_%' OR delegation_id LIKE 'congress_test_%';
+DELETE FROM congress_delegation_head WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%' OR delegation_id LIKE 'congress_test_%';
+DELETE FROM congress_delegation_union WHERE id LIKE 'congress_test_%' OR delegation_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%';
+DELETE FROM congress_delegation WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%';
+DELETE FROM congress_union WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR delegation_id LIKE 'congress_test_%';
+DELETE FROM congress_org_member WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_org WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_committee_elect_rep WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_committee_elect_quota WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_rep_supplement WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_times WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_sessions WHERE id LIKE 'congress_h5_test_%' OR id LIKE 'c_h5_%';
+DELETE FROM congress_org_member WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR org_id LIKE 'congress_test_%';
+DELETE FROM congress_org WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%';
+DELETE FROM congress_committee_elect_rep WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%' OR delegation_id LIKE 'congress_test_%';
+DELETE FROM congress_committee_elect_quota WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%';
+DELETE FROM congress_rep_supplement WHERE id LIKE 'congress_test_%' OR session_id LIKE 'congress_test_%' OR time_id LIKE 'congress_test_%';
+DELETE FROM congress_times WHERE id LIKE 'congress_test_%';
+DELETE FROM congress_sessions WHERE id LIKE 'congress_test_%';
+
+-- H5 首页模块类型:覆盖会议签到以外的所有分支。
+INSERT INTO congress_materials_type (id, sort_no, name, is_vote, create_time, update_time, deleted)
+VALUES
+('congress_type_file_notice', 10, '文件公告', 0, NOW(), NOW(), 0),
+('congress_type_evaluation_vote', 20, '评议表决', 1, NOW(), NOW(), 0),
+('congress_type_issue_vote', 30, '议题表决', 1, NOW(), NOW(), 0),
+('congress_type_vote_notice', 40, '表决公告', 0, NOW(), NOW(), 0),
+('congress_type_prepare_material', 50, '准备资料', 0, NOW(), NOW(), 0)
+ON DUPLICATE KEY UPDATE
+ sort_no = VALUES(sort_no),
+ name = VALUES(name),
+ is_vote = VALUES(is_vote),
+ deleted = 0,
+ update_time = NOW();
+
+-- 届次/会议。
+INSERT INTO congress_sessions (
+ id, name, year, description, sc_session, uc_session, union_id, type, union_name,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ '2026',
+ '用于验证职代会H5全流程',
+ 1,
+ 1,
+ 'c_h5_union',
+ 1,
+ '中国地质大学',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_times (
+ id, year, name, session_id, session_name, sc_times, uc_times,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_t_01',
+ '2026',
+ '第1次职代会',
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ 1,
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+-- 代表团/工会/组织侧基础数据,供后续管理端或关联查询测试。
+INSERT INTO congress_delegation (
+ id, name, session_id, session_name, time_id, time_name, code,
+ official_number, attendance_number, invite_number, committee_allot_number,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_d_01',
+ '第一代表团',
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ 'c_h5_t_01',
+ '第1次职代会',
+ 'D001',
+ 1,
+ 1,
+ 1,
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_union (
+ id, session_id, session_name, union_id, union_name, quota_config,
+ member_number, delegation_id, sort_no, create_time, update_time, deleted
+) VALUES (
+ 'c_h5_urow_01',
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ 'c_h5_union',
+ '测试分工会',
+ '{"officialNumber":1,"attendanceNumber":1,"inviteNumber":1}',
+ 100,
+ 'c_h5_d_01',
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_delegation_union (
+ id, delegation_id, time_id, union_id, union_name,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_du_01',
+ 'c_h5_d_01',
+ 'c_h5_t_01',
+ 'c_h5_union',
+ '测试分工会',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_org (
+ id, name, code, type, remark, parent_id, session_id, session_name,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_org_01',
+ '职代会测试委员会',
+ 'ORG001',
+ 'committee',
+ 'H5测试组织',
+ '',
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_org_member (
+ id, user_id, empid, name, unit, mobile, sex, identity,
+ session_id, session_name, org_id, role_id, role_name,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_om_01',
+ @test_user_id,
+ @test_emplid,
+ @test_emplid,
+ '测试单位',
+ '13800000000',
+ 1,
+ 1,
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ 'c_h5_org_01',
+ 'c_h5_role_01',
+ '委员',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_committee_elect_quota (
+ id, zbztjmes, wyhyxrs, dbttjzs, session_id, session_name,
+ first_preselected_begin_time, first_preselected_end_time,
+ second_preselected_begin_time, second_preselected_end_time,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_cq_01',
+ 1,
+ 1,
+ 1,
+ 'c_h5_s_2026',
+ '职代会H5测试届次',
+ DATE_SUB(NOW(), INTERVAL 1 DAY),
+ DATE_ADD(NOW(), INTERVAL 7 DAY),
+ DATE_ADD(NOW(), INTERVAL 8 DAY),
+ DATE_ADD(NOW(), INTERVAL 14 DAY),
+ NOW(),
+ NOW(),
+ 0
+);
+
+-- 当前账号设为正式代表。status=2 是 H5 首页能查到会议的关键。
+INSERT INTO congress_rep (
+ id, session_id, time_id, session_name, time_name, user_id, name, emplid,
+ sex, birthdate, politics_status, position, education, work_unit, work_experience,
+ tags, filling_status, identity, type, is_gdh, is_zdh, union_id,
+ delegation_id, delegation_name, supplement, status, precinct_union_id,
+ precinct_union_name, nation, create_time, update_time, deleted
+) VALUES (
+ 'c_h5_rep_01',
+ 'c_h5_s_2026',
+ 'c_h5_t_01',
+ '职代会H5测试届次',
+ '第1次职代会',
+ @test_user_id,
+ @test_emplid,
+ @test_emplid,
+ '男',
+ '1990-01-01',
+ '群众',
+ '测试人员',
+ '本科',
+ '测试单位',
+ '用于H5职代会测试',
+ '正式代表',
+ '已提交',
+ '正式代表',
+ '正式代表',
+ 0,
+ 1,
+ 'c_h5_union',
+ 'c_h5_d_01',
+ '第一代表团',
+ 'H5测试代表',
+ 2,
+ 'c_h5_union',
+ '测试分工会',
+ '汉族',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_delegation_rep (
+ id, delegation_id, user_id, empid, name, unit, mobile, sex, identity,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_dr_01',
+ 'c_h5_d_01',
+ @test_user_id,
+ @test_emplid,
+ @test_emplid,
+ '测试单位',
+ '13800000000',
+ 1,
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_delegation_head (
+ id, session_id, time_id, delegation_id, user_id, emplid, name,
+ unit, mobile, sex, identity, create_time, update_time, deleted
+) VALUES (
+ 'c_h5_dh_01',
+ 'c_h5_s_2026',
+ 'c_h5_t_01',
+ 'c_h5_d_01',
+ @test_user_id,
+ @test_emplid,
+ @test_emplid,
+ '测试单位',
+ '13800000000',
+ 1,
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_committee_elect_rep (
+ id, rep_id, type, times, user_id, session_id, time_id, delegation_id,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_cr_01',
+ 'c_h5_rep_01',
+ 1,
+ 1,
+ @test_user_id,
+ 'c_h5_s_2026',
+ 'c_h5_t_01',
+ 'c_h5_d_01',
+ NOW(),
+ NOW(),
+ 0
+);
+
+INSERT INTO congress_rep_supplement (
+ id, session_id, precinct_union_id, time_id, time_name,
+ add_user_id, add_user_union_id, add_user_name, add_emplid,
+ sub_user_id, sub_user_name, sub_emplid, reason,
+ add_precinct_union_id, add_precinct_union_name,
+ sub_precinct_union_id, sub_precinct_union_name, type,
+ create_time, update_time, deleted
+) VALUES (
+ 'c_h5_rs_01',
+ 'c_h5_s_2026',
+ 'c_h5_union',
+ 'c_h5_t_01',
+ '第1次职代会',
+ @test_user_id,
+ 'c_h5_union',
+ @test_emplid,
+ @test_emplid,
+ NULL,
+ NULL,
+ NULL,
+ 'H5测试增补记录',
+ 'c_h5_union',
+ '测试分工会',
+ NULL,
+ NULL,
+ 1,
+ NOW(),
+ NOW(),
+ 0
+);
+
+-- 签到列表:覆盖可签到、已签到、未开始、已结束四种状态。
+INSERT INTO congress_sign_in_meeting (
+ id, meeting_name, sign_in_start_time, sign_in_end_time,
+ session_id, time_id, remark, sign_in_count, create_time, update_time, deleted
+) VALUES
+('c_h5_m_open', '测试会议-可签到', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), 'c_h5_s_2026', 'c_h5_t_01', '点击后应可签到', 0, NOW(), NOW(), 0),
+('c_h5_m_signed', '测试会议-已签到', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), 'c_h5_s_2026', 'c_h5_t_01', '应显示已签到时间', 1, NOW(), NOW(), 0),
+('c_h5_m_future', '测试会议-未到签到时间', DATE_ADD(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), 'c_h5_s_2026', 'c_h5_t_01', '按钮应显示未到签到时间', 0, NOW(), NOW(), 0),
+('c_h5_m_expired', '测试会议-已超过签到时间', DATE_SUB(NOW(), INTERVAL 7 DAY), DATE_SUB(NOW(), INTERVAL 1 DAY), 'c_h5_s_2026', 'c_h5_t_01', '按钮应显示已超过签到时间', 0, NOW(), NOW(), 0);
+
+INSERT INTO congress_sign_in (
+ id, session_id, time_id, meeting_id, delegation_id, rep_id,
+ emplid, name, create_time, update_time, deleted
+) VALUES (
+ 'c_h5_si_signed',
+ 'c_h5_s_2026',
+ 'c_h5_t_01',
+ 'c_h5_m_signed',
+ 'c_h5_d_01',
+ 'c_h5_rep_01',
+ @test_emplid,
+ @test_emplid,
+ DATE_SUB(NOW(), INTERVAL 2 HOUR),
+ NOW(),
+ 0
+);
+
+-- 资料列表:覆盖所有 H5 模块。
+INSERT INTO congress_materials (
+ id, session_id, time_id, type_id, sort_no, name,
+ file_name, file_url, file_type, file_size,
+ create_time, update_time, deleted
+) VALUES
+('c_h5_mat_file_01', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_file_notice', 10, '文件公告-会议须知', '会议须知.pdf', '/assets/platform/img/home/avatar_boy.png', 'image/png', '12KB', NOW(), NOW(), 0),
+('c_h5_mat_file_02', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_file_notice', 20, '文件公告-会议议程', '会议议程.pdf', '/assets/platform/img/home/avatar_girl.png', 'image/png', '10KB', NOW(), NOW(), 0),
+('c_h5_mat_eval_p', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_evaluation_vote', 10, '技术保障说明.pdf', '技术保障说明.pdf', '', 'pdf', '1KB', NOW(), NOW(), 0),
+('c_h5_mat_eval_d', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_evaluation_vote', 20, '技术保障说明-已投票.pdf', '技术保障说明-已投票.pdf', '', 'pdf', '1KB', NOW(), NOW(), 0),
+('c_h5_mat_issue_p', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_issue_vote', 10, '议题表决-待投票', '议题表决-待投票.pdf', '', 'pdf', '1KB', NOW(), NOW(), 0),
+('c_h5_mat_issue_d', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_issue_vote', 20, '议题表决-已投票', '议题表决-已投票.pdf', '', 'pdf', '1KB', NOW(), NOW(), 0),
+('c_h5_mat_notice', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_vote_notice', 10, '表决公告-结果公告', '表决结果公告.pdf', '/assets/platform/img/home/avatar_boy.png', 'image/png', '8KB', NOW(), NOW(), 0),
+('c_h5_mat_prepare', 'c_h5_s_2026', 'c_h5_t_01', 'congress_type_prepare_material', 10, '准备资料-会议材料汇编', '会议材料汇编.pdf', '/assets/platform/img/home/avatar_girl.png', 'image/png', '20KB', NOW(), NOW(), 0);
+
+-- 投票议题:覆盖待投票和已投票。
+INSERT INTO congress_voting_issue (
+ id, session_id, session_name, time_id, time_name,
+ name, description, content, voting_type,
+ voting_start_time, voting_end_time, voting_content,
+ voting_content_item_header, voting_content_option_header,
+ materials_id, type_id, delegation_id,
+ create_time, update_time, deleted
+) VALUES
+('c_h5_issue_eval_p', 'c_h5_s_2026', '王西光测试', 'c_h5_t_01', '整行七届一次职代会', '上海浦东发展银行七届一次评议表决', '上海浦东发展银行七届一次评议表决用于验证职代会评议表决投票说明展示,测试内容需在移动端按浦发样式显示。', '评议表决说明', 'single', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), '[{"itemName":"王西光","options":["满意","基本满意","不够满意","不满意"],"selections":{"满意":false,"基本满意":false,"不够满意":false,"不满意":false}},{"itemName":"杜学成","options":["满意","基本满意","不够满意","不满意"],"selections":{"满意":false,"基本满意":false,"不够满意":false,"不满意":false}}]', '评议监事', '评议内容111', 'c_h5_mat_eval_p', 'congress_type_evaluation_vote', 'c_h5_d_01', NOW(), NOW(), 0),
+('c_h5_issue_eval_d', 'c_h5_s_2026', '王西光测试', 'c_h5_t_01', '整行七届一次职代会', '上海浦东发展银行七届一次评议表决', '上海浦东发展银行七届一次评议表决用于验证职代会已投票结果展示,测试内容需在移动端按浦发样式显示。', '评议表决说明', 'single', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), '[{"itemName":"王西光","options":["满意","基本满意","不够满意","不满意"],"selections":{"满意":false,"基本满意":false,"不够满意":false,"不满意":false}},{"itemName":"杜学成","options":["满意","基本满意","不够满意","不满意"],"selections":{"满意":false,"基本满意":false,"不够满意":false,"不满意":false}}]', '评议监事', '评议内容111', 'c_h5_mat_eval_d', 'congress_type_evaluation_vote', 'c_h5_d_01', NOW(), NOW(), 0),
+('c_h5_issue_topic_p', 'c_h5_s_2026', '职代会H5测试届次', 'c_h5_t_01', '第1次职代会', '议题表决-待投票', '用于测试议题表决提交', '议题表决说明', 'single', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), '[{"itemName":"是否同意该议题","options":["赞成","不赞成","弃权"]}]', '议题事项', '表决选项', 'c_h5_mat_issue_p', 'congress_type_issue_vote', 'c_h5_d_01', NOW(), NOW(), 0),
+('c_h5_issue_topic_d', 'c_h5_s_2026', '职代会H5测试届次', 'c_h5_t_01', '第1次职代会', '议题表决-已投票', '用于测试已投票详情页', '议题表决说明', 'single', DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 7 DAY), '[{"itemName":"是否同意已投票议题","options":["赞成","不赞成","弃权"]}]', '议题事项', '表决选项', 'c_h5_mat_issue_d', 'congress_type_issue_vote', 'c_h5_d_01', NOW(), NOW(), 0);
+
+INSERT INTO congress_voting_record (
+ id, issue_id, rep_id, emplid, name, session_id, time_id,
+ delegation_id, vote_result, user_id, create_time, update_time, deleted
+) VALUES
+('c_h5_vr_eval_d', 'c_h5_issue_eval_d', 'c_h5_rep_01', @test_emplid, @test_emplid, 'c_h5_s_2026', 'c_h5_t_01', 'c_h5_d_01', '[{"item":"王西光","result":"满意"},{"item":"杜学成","result":"满意"}]', @test_user_id, DATE_SUB(NOW(), INTERVAL 1 HOUR), NOW(), 0),
+('c_h5_vr_topic_d', 'c_h5_issue_topic_d', 'c_h5_rep_01', @test_emplid, @test_emplid, 'c_h5_s_2026', 'c_h5_t_01', 'c_h5_d_01', '[{"item":"是否同意已投票议题","result":"弃权"}]', @test_user_id, DATE_SUB(NOW(), INTERVAL 1 HOUR), NOW(), 0);
+
+-- 如果库里历史上存在同名资料类型,H5 类型接口会优先返回下面这些标准 ID。
+-- 这里再次校正测试资料绑定,避免点击“评议表决/议题表决”后按 typeId 查询为空。
+UPDATE congress_materials
+SET type_id = 'congress_type_evaluation_vote'
+WHERE id IN ('c_h5_mat_eval_p', 'c_h5_mat_eval_d');
+
+UPDATE congress_voting_issue
+SET type_id = 'congress_type_evaluation_vote'
+WHERE id IN ('c_h5_issue_eval_p', 'c_h5_issue_eval_d');
+
+UPDATE congress_materials
+SET type_id = 'congress_type_issue_vote'
+WHERE id IN ('c_h5_mat_issue_p', 'c_h5_mat_issue_d');
+
+UPDATE congress_voting_issue
+SET type_id = 'congress_type_issue_vote'
+WHERE id IN ('c_h5_issue_topic_p', 'c_h5_issue_topic_d');
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/index.html b/src/main/resources/views/platform/zhghh5/democratic/congress/index.html
new file mode 100644
index 00000000..2566f048
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/index.html
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 切换届次
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
new file mode 100644
index 00000000..e10f48cf
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
@@ -0,0 +1,279 @@
+
+
+
+
+
+
+
+
+
+
+ 已投票
+ 待投票
+
+
+
+
+
+
+
+
+ 上传时间:{{ formatTime(item.uploadTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html b/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
new file mode 100644
index 00000000..428c783d
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 签到时间:{{ formatTimeRange(item.signInStartTime, item.signInEndTime) }}
+
+
+
+ 已签到:{{ formatTime(item.userSignInTime) }}
+
+
+
+ 签到人数:{{ item.signInCount || 0 }} 人
+
+
+
+
+
+
+ {{ getSignInButtonText(item) }}
+
+
+
+ 立即签到
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html b/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
new file mode 100644
index 00000000..92193c39
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/vote.html b/src/main/resources/views/platform/zhghh5/democratic/congress/vote.html
new file mode 100644
index 00000000..0a0c5201
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/vote.html
@@ -0,0 +1,417 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html b/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html
new file mode 100644
index 00000000..ab70ffef
--- /dev/null
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html
@@ -0,0 +1,407 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 8bff6f8ce951d3102cc85861917caccb00020442 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com>
Date: Wed, 29 Jul 2026 14:57:41 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E6=96=B0=E5=A2=9Eweb=E7=AB=AF=E8=81=8C?=
=?UTF-8?q?=E4=BB=A3=E4=BC=9A=E7=AE=A1=E7=90=86(=E8=81=8C=E4=BB=A3?=
=?UTF-8?q?=E4=BC=9A=E5=B1=8A=E6=AC=A1=E5=8F=96=E5=80=BCteacher=5Fcongress?=
=?UTF-8?q?=5Fsession=E8=A1=A8=E6=95=B0=E6=8D=AE);?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CongressMaterialsManageController.java | 170 ++++++++++
.../CongressMaterialsTypeController.java | 132 ++++++++
.../controller/CongressRecordController.java | 92 ++++++
.../controller/CongressSignInController.java | 155 +++++++++
.../CongressVotingIssueController.java | 217 +++++++++++++
.../CongressVotingStatisticalController.java | 134 ++++++++
.../congress/models/CongressBaseModel.java | 48 +++
.../models/CongressCommitteeElectQuota.java | 74 +++++
.../models/CongressCommitteeElectRep.java | 62 ++++
.../congress/models/CongressDelegation.java | 80 +++++
.../models/CongressDelegationHead.java | 76 +++++
.../models/CongressDelegationRep.java | 66 ++++
.../models/CongressDelegationUnion.java | 47 +++
.../congress/models/CongressMaterials.java | 72 +++++
.../models/CongressMaterialsType.java | 40 +++
.../congress/models/CongressOrg.java | 62 ++++
.../congress/models/CongressOrgMember.java | 87 ++++++
.../congress/models/CongressRep.java | 171 ++++++++++
.../models/CongressRepSupplement.java | 111 +++++++
.../congress/models/CongressSessions.java | 66 ++++
.../congress/models/CongressSignIn.java | 62 ++++
.../models/CongressSignInMeeting.java | 62 ++++
.../congress/models/CongressTimes.java | 56 ++++
.../congress/models/CongressUnion.java | 69 ++++
.../congress/models/CongressVotingIssue.java | 107 +++++++
.../congress/models/CongressVotingRecord.java | 72 +++++
.../service/CongressManageService.java | 151 +++++++++
.../db/congress/init_congress_pc_menu.sql | 228 ++++++++++++++
.../congress/materials/issue/index.html | 295 ++++++++++++++++++
.../congress/materials/manage/index.html | 231 ++++++++++++++
.../congress/materials/statistical/index.html | 170 ++++++++++
.../congress/materials/type/index.html | 130 ++++++++
.../democratic/congress/record/index.html | 84 +++++
.../democratic/congress/signIn/index.html | 162 ++++++++++
34 files changed, 3841 insertions(+)
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsTypeController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressRecordController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressSignInController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingStatisticalController.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressBaseModel.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectQuota.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectRep.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegation.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationHead.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationRep.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationUnion.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterials.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterialsType.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrg.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrgMember.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRep.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRepSupplement.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSessions.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignIn.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignInMeeting.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressTimes.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressUnion.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingIssue.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingRecord.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
create mode 100644 src/main/resources/db/congress/init_congress_pc_menu.sql
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/materials/statistical/index.html
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/record/index.html
create mode 100644 src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
new file mode 100644
index 00000000..66e3c453
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
@@ -0,0 +1,170 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaMode;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/materials/manage")
+@Ok("json:full")
+public class CongressMaterialsManageController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/materials/manage/index.html")
+ @SaCheckPermission("congress.materials.manage")
+ public void index() {
+ }
+ @At("/sessions")
+ @SaCheckPermission("congress.materials.manage")
+ public Result sessions() {
+ return Result.success(congressManageService.sessionOptions());
+ }
+
+ @At("/types")
+ @SaCheckPermission("congress.materials.manage")
+ public Result types() {
+ return Result.success(congressManageService.typeOptions());
+ }
+
+ @At("/pageData")
+ @SaCheckPermission("congress.materials.manage")
+ public Result materialsPageData(PageForm pageForm,
+ @Param("sessionId") String sessionId,
+ @Param("typeId") String typeId,
+ @Param("name") String name) {
+ StringBuilder text = new StringBuilder("""
+ SELECT
+ m.id,
+ m.name,
+ m.session_id AS sessionId,
+ m.time_id AS timeId,
+ m.type_id AS typeId,
+ m.sort_no AS sortNo,
+ m.file_name AS fileName,
+ m.file_url AS fileUrl,
+ m.file_type AS fileType,
+ m.file_size AS fileSize,
+ m.create_time AS createTime,
+ mt.name AS typeName,
+ tcs.fullName AS sessionName
+ FROM congress_materials m
+ LEFT JOIN congress_materials_type mt ON mt.id = m.type_id
+ LEFT JOIN teacher_congress_session tcs ON tcs.id = m.session_id
+ WHERE COALESCE(m.deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ congressManageService.appendEquals(text, params, "m.session_id", "sessionId", sessionId);
+ congressManageService.appendEquals(text, params, "m.type_id", "typeId", typeId);
+ if (StrUtil.isNotBlank(name)) {
+ text.append(" AND m.name LIKE @name");
+ params.addv("name", "%" + name.trim() + "%");
+ }
+ text.append(" ORDER BY m.sort_no, m.create_time DESC, m.id DESC");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+ @At("/get")
+ @SaCheckPermission("congress.materials.manage")
+ public Result materialsGet(@Param("id") String id) {
+ return Result.success(congressManageService.fetchMap("""
+ SELECT
+ id,
+ name,
+ session_id AS sessionId,
+ time_id AS timeId,
+ type_id AS typeId,
+ sort_no AS sortNo,
+ file_name AS fileName,
+ file_url AS fileUrl,
+ file_type AS fileType,
+ file_size AS fileSize
+ FROM congress_materials
+ WHERE id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)));
+ }
+
+ @At("/save")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.materials.manage")
+ @SLog(tag = "职代会-会议资料", msg = "保存会议资料")
+ public Result materialsSave(@Param("id") String id,
+ @Param("name") String name,
+ @Param("sessionId") String sessionId,
+ @Param("typeId") String typeId,
+ @Param("sortNo") Integer sortNo,
+ @Param("fileName") String fileName,
+ @Param("fileUrl") String fileUrl,
+ @Param("fileType") String fileType,
+ @Param("fileSize") String fileSize) {
+ if (StrUtil.hasBlank(name, sessionId, typeId, fileUrl)) {
+ return Result.error("届次、资料名称、资料类型和文件不能为空");
+ }
+ Date now = new Date();
+ Chain chain = Chain.make("name", name.trim())
+ .add("session_id", sessionId)
+ .add("time_id", null)
+ .add("type_id", typeId)
+ .add("sort_no", sortNo == null ? 0 : sortNo)
+ .add("file_name", StrUtil.blankToDefault(fileName, name.trim()))
+ .add("file_url", fileUrl)
+ .add("file_type", StrUtil.blankToDefault(fileType, null))
+ .add("file_size", StrUtil.blankToDefault(fileSize, null))
+ .add("update_time", now);
+ if (StrUtil.isBlank(id)) {
+ String newId = R.UU32();
+ chain.add("id", newId)
+ .add("create_time", now)
+ .add("deleted", 0);
+ dao.insert("congress_materials", chain);
+ return Result.success(newId);
+ }
+ dao.update("congress_materials", chain,
+ Cnd.where("id", "=", id).and("deleted", "=", 0));
+ return Result.success(id);
+ }
+
+ @At("/delete")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.materials.manage")
+ @SLog(tag = "职代会-会议资料", msg = "删除会议资料")
+ public Result materialsDelete(@Param("id") String id) {
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_voting_issue
+ WHERE materials_id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)) > 0) {
+ return Result.error("该资料已关联投票议题,不能删除");
+ }
+ congressManageService.softDelete("congress_materials", id);
+ return Result.success();
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsTypeController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsTypeController.java
new file mode 100644
index 00000000..467b508b
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsTypeController.java
@@ -0,0 +1,132 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaMode;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/materials/type")
+@Ok("json:full")
+public class CongressMaterialsTypeController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/materials/type/index.html")
+ @SaCheckPermission("congress.materials.type")
+ public void index() {
+ }
+ @At("/pageData")
+ @SaCheckPermission("congress.materials.type")
+ public Result typePageData(PageForm pageForm,
+ @Param("name") String name,
+ @Param("isVote") String isVote) {
+ StringBuilder text = new StringBuilder("""
+ SELECT id, name, is_vote AS isVote, sort_no AS sortNo, create_time AS createTime
+ FROM congress_materials_type
+ WHERE COALESCE(deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ if (StrUtil.isNotBlank(name)) {
+ text.append(" AND name LIKE @name");
+ params.addv("name", "%" + name.trim() + "%");
+ }
+ if (StrUtil.isNotBlank(isVote)) {
+ text.append(" AND is_vote = @isVote");
+ params.addv("isVote", "1".equals(isVote) || "true".equalsIgnoreCase(isVote) ? 1 : 0);
+ }
+ text.append(" ORDER BY sort_no, create_time, id");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+ @At("/get")
+ @SaCheckPermission("congress.materials.type")
+ public Result typeGet(@Param("id") String id) {
+ return Result.success(congressManageService.fetchMap("""
+ SELECT id, name, is_vote AS isVote, sort_no AS sortNo
+ FROM congress_materials_type
+ WHERE id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)));
+ }
+
+ @At("/save")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.materials.type")
+ @SLog(tag = "职代会-资料类型", msg = "保存资料类型")
+ public Result typeSave(@Param("id") String id,
+ @Param("name") String name,
+ @Param("isVote") boolean isVote,
+ @Param("sortNo") Integer sortNo) {
+ if (StrUtil.isBlank(name)) {
+ return Result.error("资料类型不能为空");
+ }
+ int repeat = congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_materials_type
+ WHERE name = @name
+ AND COALESCE(deleted, 0) = 0
+ AND (@id IS NULL OR id <> @id)
+ """, NutMap.NEW().addv("name", name.trim()).addv("id", StrUtil.blankToDefault(id, null)));
+ if (repeat > 0) {
+ return Result.error("资料类型已存在");
+ }
+ Date now = new Date();
+ Chain chain = Chain.make("name", name.trim())
+ .add("is_vote", isVote ? 1 : 0)
+ .add("sort_no", sortNo == null ? 0 : sortNo)
+ .add("update_time", now);
+ if (StrUtil.isBlank(id)) {
+ chain.add("id", R.UU32())
+ .add("create_time", now)
+ .add("deleted", 0);
+ dao.insert("congress_materials_type", chain);
+ } else {
+ dao.update("congress_materials_type", chain,
+ Cnd.where("id", "=", id).and("deleted", "=", 0));
+ }
+ return Result.success();
+ }
+
+ @At("/delete")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.materials.type")
+ @SLog(tag = "职代会-资料类型", msg = "删除资料类型")
+ public Result typeDelete(@Param("id") String id) {
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_materials
+ WHERE type_id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)) > 0) {
+ return Result.error("该类型下已有资料,不能删除");
+ }
+ congressManageService.softDelete("congress_materials_type", id);
+ return Result.success();
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressRecordController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressRecordController.java
new file mode 100644
index 00000000..34ee0f8d
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressRecordController.java
@@ -0,0 +1,92 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaMode;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/record")
+@Ok("json:full")
+public class CongressRecordController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/record/index.html")
+ @SaCheckPermission("congress.signIn.record")
+ public void index() {
+ }
+ @At("/sessions")
+ @SaCheckPermission("congress.signIn.record")
+ public Result sessions() {
+ return Result.success(congressManageService.sessionOptions());
+ }
+
+ @At("/meetings")
+ @SaCheckPermission("congress.signIn.record")
+ public Result meetings(@Param("sessionId") String sessionId) {
+ return Result.success(congressManageService.meetingOptions(sessionId));
+ }
+
+ @At("/pageData")
+ @SaCheckPermission("congress.signIn.record")
+ public Result recordPageData(PageForm pageForm,
+ @Param("sessionId") String sessionId,
+ @Param("meetingId") String meetingId,
+ @Param("keyword") String keyword) {
+ StringBuilder text = new StringBuilder("""
+ SELECT
+ si.id,
+ si.emplid,
+ si.name,
+ si.create_time AS signInTime,
+ si.meeting_id AS meetingId,
+ si.time_id AS timeId,
+ m.meeting_name AS meetingName,
+ m.sign_in_start_time AS signInStartTime,
+ m.sign_in_end_time AS signInEndTime,
+ tcs.fullName AS sessionName,
+ COALESCE(r.delegation_name, d.name) AS delegationName
+ FROM congress_sign_in si
+ LEFT JOIN congress_sign_in_meeting m ON m.id = si.meeting_id
+ LEFT JOIN teacher_congress_session tcs ON tcs.id = si.session_id AND tcs.delFlag = 0
+ LEFT JOIN congress_rep r ON r.id = si.rep_id
+ LEFT JOIN congress_delegation d ON d.id = si.delegation_id
+ WHERE COALESCE(si.deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ congressManageService.appendEquals(text, params, "si.session_id", "sessionId", sessionId);
+ congressManageService.appendEquals(text, params, "si.meeting_id", "meetingId", meetingId);
+ if (StrUtil.isNotBlank(keyword)) {
+ text.append(" AND (si.emplid LIKE @keyword OR si.name LIKE @keyword)");
+ params.addv("keyword", "%" + keyword.trim() + "%");
+ }
+ text.append(" ORDER BY si.create_time DESC, si.id DESC");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressSignInController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressSignInController.java
new file mode 100644
index 00000000..c1c6fa64
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressSignInController.java
@@ -0,0 +1,155 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaMode;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/signIn")
+@Ok("json:full")
+public class CongressSignInController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/signIn/index.html")
+ @SaCheckPermission("congress.signIn.manage")
+ public void index() {
+ }
+ @At("/sessions")
+ @SaCheckPermission("congress.signIn.manage")
+ public Result sessions() {
+ return Result.success(congressManageService.sessionOptions());
+ }
+
+ @At("/pageData")
+ @SaCheckPermission("congress.signIn.manage")
+ public Result signInPageData(PageForm pageForm, @Param("sessionId") String sessionId) {
+ StringBuilder text = new StringBuilder("""
+ SELECT
+ m.id,
+ m.meeting_name AS meetingName,
+ m.sign_in_start_time AS signInStartTime,
+ m.sign_in_end_time AS signInEndTime,
+ m.session_id AS sessionId,
+ m.time_id AS timeId,
+ m.remark,
+ tcs.fullName AS sessionName,
+ (
+ SELECT COUNT(1)
+ FROM congress_sign_in si
+ WHERE si.meeting_id = m.id
+ AND COALESCE(si.deleted, 0) = 0
+ ) AS signInCount
+ FROM congress_sign_in_meeting m
+ LEFT JOIN teacher_congress_session tcs ON tcs.id = m.session_id AND tcs.delFlag = 0
+ WHERE COALESCE(m.deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ congressManageService.appendEquals(text, params, "m.session_id", "sessionId", sessionId);
+ text.append(" ORDER BY m.sign_in_start_time DESC, m.create_time DESC, m.id DESC");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+ @At("/get")
+ @SaCheckPermission("congress.signIn.manage")
+ public Result signInGet(@Param("id") String id) {
+ return Result.success(congressManageService.fetchMap("""
+ SELECT
+ id,
+ meeting_name AS meetingName,
+ sign_in_start_time AS signInStartTime,
+ sign_in_end_time AS signInEndTime,
+ session_id AS sessionId,
+ time_id AS timeId,
+ remark
+ FROM congress_sign_in_meeting
+ WHERE id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)));
+ }
+
+ @At("/save")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.signIn.manage")
+ @SLog(tag = "职代会-会议签到", msg = "保存会议签到配置")
+ public Result signInSave(@Param("id") String id,
+ @Param("meetingName") String meetingName,
+ @Param("sessionId") String sessionId,
+ @Param("signInStartTime") String signInStartTime,
+ @Param("signInEndTime") String signInEndTime,
+ @Param("remark") String remark) {
+ if (StrUtil.hasBlank(meetingName, sessionId, signInStartTime, signInEndTime)) {
+ return Result.error("届次、会议名称和签到时间不能为空");
+ }
+ Date startTime = congressManageService.parseDate(signInStartTime);
+ Date endTime = congressManageService.parseDate(signInEndTime);
+ if (startTime == null || endTime == null) {
+ return Result.error("签到时间格式不正确");
+ }
+ if (!endTime.after(startTime)) {
+ return Result.error("签到结束时间必须晚于开始时间");
+ }
+ Date now = new Date();
+ Chain chain = Chain.make("meeting_name", meetingName.trim())
+ .add("session_id", sessionId)
+ .add("time_id", null)
+ .add("sign_in_start_time", startTime)
+ .add("sign_in_end_time", endTime)
+ .add("remark", StrUtil.blankToDefault(remark, null))
+ .add("update_time", now);
+ if (StrUtil.isBlank(id)) {
+ chain.add("id", R.UU32())
+ .add("sign_in_count", 0)
+ .add("create_time", now)
+ .add("deleted", 0);
+ dao.insert("congress_sign_in_meeting", chain);
+ } else {
+ dao.update("congress_sign_in_meeting", chain,
+ Cnd.where("id", "=", id).and("deleted", "=", 0));
+ }
+ return Result.success();
+ }
+
+ @At("/delete")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.signIn.manage")
+ @SLog(tag = "职代会-会议签到", msg = "删除会议签到配置")
+ public Result signInDelete(@Param("id") String id) {
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_sign_in
+ WHERE meeting_id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)) > 0) {
+ return Result.error("该会议已有签到记录,不能删除");
+ }
+ congressManageService.softDelete("congress_sign_in_meeting", id);
+ return Result.success();
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
new file mode 100644
index 00000000..75939a37
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
@@ -0,0 +1,217 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/materials/issue")
+@Ok("json:full")
+public class CongressVotingIssueController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/materials/issue/index.html")
+ @SaCheckPermission("congress.vote.issue")
+ public void index() {
+ }
+ @At("/sessions")
+ @SaCheckPermission("congress.vote.issue")
+ public Result sessions() {
+ return Result.success(congressManageService.sessionOptions());
+ }
+
+ @At("/types")
+ @SaCheckPermission("congress.vote.issue")
+ public Result types() {
+ return Result.success(congressManageService.typeOptions());
+ }
+
+ @At("/materials")
+ @SaCheckPermission("congress.vote.issue")
+ public Result materials(@Param("sessionId") String sessionId, @Param("typeId") String typeId) {
+ return Result.success(congressManageService.materialOptions(sessionId, typeId));
+ }
+
+ @At("/pageData")
+ @SaCheckPermission("congress.vote.issue")
+ public Result issuePageData(PageForm pageForm,
+ @Param("sessionId") String sessionId,
+ @Param("name") String name) {
+ StringBuilder text = new StringBuilder("""
+ SELECT
+ i.id,
+ i.name,
+ i.description,
+ i.session_id AS sessionId,
+ i.time_id AS timeId,
+ i.type_id AS typeId,
+ i.materials_id AS materialsId,
+ i.voting_start_time AS votingStartTime,
+ i.voting_end_time AS votingEndTime,
+ mt.name AS typeName,
+ m.name AS materialsName,
+ m.file_name AS fileName,
+ m.file_url AS fileUrl,
+ tcs.fullName AS sessionName,
+ (
+ SELECT COUNT(1)
+ FROM congress_voting_record r
+ WHERE r.issue_id = i.id
+ AND COALESCE(r.deleted, 0) = 0
+ ) AS voteCount
+ FROM congress_voting_issue i
+ LEFT JOIN congress_materials_type mt ON mt.id = i.type_id
+ LEFT JOIN congress_materials m ON m.id = i.materials_id
+ LEFT JOIN teacher_congress_session tcs ON tcs.id = i.session_id AND tcs.delFlag = 0
+ WHERE COALESCE(i.deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ congressManageService.appendEquals(text, params, "i.session_id", "sessionId", sessionId);
+ if (StrUtil.isNotBlank(name)) {
+ text.append(" AND i.name LIKE @name");
+ params.addv("name", "%" + name.trim() + "%");
+ }
+ text.append(" ORDER BY i.create_time DESC, i.id DESC");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+ @At("/get")
+ @SaCheckPermission("congress.vote.issue")
+ public Result issueGet(@Param("id") String id) {
+ return Result.success(congressManageService.fetchMap("""
+ SELECT
+ id,
+ name,
+ description,
+ content,
+ session_id AS sessionId,
+ time_id AS timeId,
+ type_id AS typeId,
+ materials_id AS materialsId,
+ voting_type AS votingType,
+ voting_start_time AS votingStartTime,
+ voting_end_time AS votingEndTime,
+ voting_content AS votingContent,
+ voting_content_item_header AS votingContentItemHeader,
+ voting_content_option_header AS votingContentOptionHeader
+ FROM congress_voting_issue
+ WHERE id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)));
+ }
+
+ @At("/save")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.vote.issue")
+ @SLog(tag = "职代会-投票管理", msg = "保存投票议题")
+ public Result issueSave(@Param("id") String id,
+ @Param("name") String name,
+ @Param("description") String description,
+ @Param("sessionId") String sessionId,
+ @Param("typeId") String typeId,
+ @Param("materialsId") String materialsId,
+ @Param("votingStartTime") String votingStartTime,
+ @Param("votingEndTime") String votingEndTime,
+ @Param("votingContent") String votingContent,
+ @Param("votingContentItemHeader") String votingContentItemHeader,
+ @Param("votingContentOptionHeader") String votingContentOptionHeader) {
+ if (StrUtil.hasBlank(name, sessionId, typeId, materialsId,
+ votingStartTime, votingEndTime, votingContent)) {
+ return Result.error("届次、会议名称、投票类型、资料、投票时间和投票内容不能为空");
+ }
+ Date startTime = congressManageService.parseDate(votingStartTime);
+ Date endTime = congressManageService.parseDate(votingEndTime);
+ if (startTime == null || endTime == null || !endTime.after(startTime)) {
+ return Result.error("投票结束时间必须晚于开始时间");
+ }
+ if (!JSONUtil.isTypeJSONArray(votingContent) || JSONUtil.parseArray(votingContent).isEmpty()) {
+ return Result.error("请至少配置一个投票事项");
+ }
+ NutMap session = congressManageService.fetchMap("""
+ SELECT id, fullName AS `sessionName`
+ FROM teacher_congress_session
+ WHERE id = @id
+ AND delFlag = 0
+ """, NutMap.NEW().addv("id", sessionId));
+ if (session == null) {
+ return Result.error("所选届次不存在");
+ }
+ Date now = new Date();
+ Chain chain = Chain.make("name", name.trim())
+ .add("description", StrUtil.blankToDefault(description, null))
+ .add("session_id", sessionId)
+ .add("session_name", session.getString("sessionName"))
+ .add("time_id", null)
+ .add("time_name", null)
+ .add("type_id", typeId)
+ .add("materials_id", materialsId)
+ .add("voting_type", 1)
+ .add("voting_start_time", startTime)
+ .add("voting_end_time", endTime)
+ .add("voting_content", votingContent)
+ .add("voting_content_item_header", StrUtil.blankToDefault(votingContentItemHeader, "表决事项"))
+ .add("voting_content_option_header", StrUtil.blankToDefault(votingContentOptionHeader, "表决内容"))
+ .add("update_time", now);
+ if (StrUtil.isBlank(id)) {
+ chain.add("id", R.UU32())
+ .add("create_time", now)
+ .add("deleted", 0);
+ dao.insert("congress_voting_issue", chain);
+ } else {
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_voting_record
+ WHERE issue_id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)) > 0) {
+ return Result.error("该议题已有投票记录,不能修改");
+ }
+ dao.update("congress_voting_issue", chain,
+ Cnd.where("id", "=", id).and("deleted", "=", 0));
+ }
+ return Result.success();
+ }
+
+ @At("/delete")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.vote.issue")
+ @SLog(tag = "职代会-投票管理", msg = "删除投票议题")
+ public Result issueDelete(@Param("id") String id) {
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_voting_record
+ WHERE issue_id = @id
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("id", id)) > 0) {
+ return Result.error("该议题已有投票记录,不能删除");
+ }
+ congressManageService.softDelete("congress_voting_issue", id);
+ return Result.success();
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingStatisticalController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingStatisticalController.java
new file mode 100644
index 00000000..b7c43c89
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingStatisticalController.java
@@ -0,0 +1,134 @@
+package com.budwk.app.zhgh.democratic.congress.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.budwk.app.base.annotation.SLog;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.zhgh.democratic.congress.service.CongressManageService;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.aop.Aop;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+import org.nutz.mvc.annotation.At;
+import org.nutz.mvc.annotation.Ok;
+import org.nutz.mvc.annotation.Param;
+
+import java.util.Date;
+@IocBean
+@At("/platform/congress/materials/statistical")
+@Ok("json:full")
+public class CongressVotingStatisticalController {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private CongressManageService congressManageService;
+
+ @At("/index")
+ @Ok("beetl:/platform/zhgh/democratic/congress/materials/statistical/index.html")
+ @SaCheckPermission("congress.vote.statistical")
+ public void index() {
+ }
+ @At("/sessions")
+ @SaCheckPermission("congress.vote.statistical")
+ public Result sessions() {
+ return Result.success(congressManageService.sessionOptions());
+ }
+
+ @At("/pageData")
+ @SaCheckPermission("congress.vote.statistical")
+ public Result statisticalPageData(PageForm pageForm,
+ @Param("sessionId") String sessionId,
+ @Param("name") String name) {
+ StringBuilder text = new StringBuilder("""
+ SELECT
+ i.id,
+ i.name,
+ i.description,
+ i.session_id AS sessionId,
+ i.time_id AS timeId,
+ i.type_id AS typeId,
+ i.materials_id AS materialsId,
+ i.voting_start_time AS votingStartTime,
+ i.voting_end_time AS votingEndTime,
+ mt.name AS typeName,
+ m.name AS materialsName,
+ m.file_name AS fileName,
+ m.file_url AS fileUrl,
+ tcs.fullName AS sessionName,
+ (
+ SELECT COUNT(1)
+ FROM congress_voting_record r
+ WHERE r.issue_id = i.id
+ AND COALESCE(r.deleted, 0) = 0
+ ) AS voteCount
+ FROM congress_voting_issue i
+ LEFT JOIN congress_materials_type mt ON mt.id = i.type_id
+ LEFT JOIN congress_materials m ON m.id = i.materials_id
+ LEFT JOIN teacher_congress_session tcs ON tcs.id = i.session_id AND tcs.delFlag = 0
+ WHERE COALESCE(i.deleted, 0) = 0
+ """);
+ NutMap params = NutMap.NEW();
+ congressManageService.appendEquals(text, params, "i.session_id", "sessionId", sessionId);
+ if (StrUtil.isNotBlank(name)) {
+ text.append(" AND i.name LIKE @name");
+ params.addv("name", "%" + name.trim() + "%");
+ }
+ text.append(" ORDER BY i.create_time DESC, i.id DESC");
+ return congressManageService.page(pageForm, text.toString(), params);
+ }
+
+ @At("/records")
+ @SaCheckPermission("congress.vote.statistical")
+ public Result voteRecords(@Param("issueId") String issueId) {
+ Sql sql = Sqls.create("""
+ SELECT
+ r.id,
+ r.emplid,
+ r.name,
+ r.vote_result AS voteResult,
+ r.create_time AS createTime,
+ COALESCE(rep.union_id, du.union_id) AS unionId,
+ du.union_name AS unionName,
+ COALESCE(rep.delegation_name, d.name) AS delegationName
+ FROM congress_voting_record r
+ LEFT JOIN congress_rep rep ON rep.id = r.rep_id
+ LEFT JOIN congress_delegation d ON d.id = r.delegation_id
+ LEFT JOIN (
+ SELECT delegation_id, time_id, union_id, union_name
+ FROM (
+ SELECT
+ delegation_id,
+ time_id,
+ union_id,
+ union_name,
+ ROW_NUMBER() OVER (
+ PARTITION BY delegation_id, time_id
+ ORDER BY create_time DESC, id DESC
+ ) AS row_num
+ FROM congress_delegation_union
+ WHERE COALESCE(deleted, 0) = 0
+ ) latest_union
+ WHERE row_num = 1
+ ) du ON du.delegation_id = r.delegation_id AND du.time_id = r.time_id
+ WHERE r.issue_id = @issueId
+ AND COALESCE(r.deleted, 0) = 0
+ ORDER BY r.create_time DESC, r.id DESC
+ """);
+ sql.setParam("issueId", issueId);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return Result.success(sql.getList(NutMap.class));
+ }
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressBaseModel.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressBaseModel.java
new file mode 100644
index 00000000..ebfd068c
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressBaseModel.java
@@ -0,0 +1,48 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.ColDefine;
+import org.nutz.dao.entity.annotation.ColType;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.Comment;
+import org.nutz.dao.entity.annotation.Default;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 职代会历史表公共审计字段。
+ *
+ * 这些表使用下划线字段和 DATETIME 时间,不能继承使用驼峰字段、时间戳的通用 BaseModel。
+ */
+@Data
+public abstract class CongressBaseModel implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Column("create_by")
+ @Comment("创建人")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String createBy;
+
+ @Column("create_time")
+ @Comment("创建时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date createTime;
+
+ @Column("update_by")
+ @Comment("修改人")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String updateBy;
+
+ @Column("update_time")
+ @Comment("修改时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date updateTime;
+
+ @Column("deleted")
+ @Comment("删除标记")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean deleted;
+}
\ No newline at end of file
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectQuota.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectQuota.java
new file mode 100644
index 00000000..13e9f2a9
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectQuota.java
@@ -0,0 +1,74 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_committee_elect_quota")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会委员预选分配")
+@TableIndexes({
+ @Index(name = "idx_congress_committee_elect_quota_session", fields = {"sessionId"}, unique = false)
+})
+public class CongressCommitteeElectQuota extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("zbztjmes")
+ @Comment("筹备组推荐名额数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer zbztjmes;
+
+ @Column("wyhyxrs")
+ @Comment("委员会预选人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer wyhyxrs;
+
+ @Column("dbttjzs")
+ @Comment("代表团推荐总数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer dbttjzs;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("first_preselected_begin_time")
+ @Comment("第一次预选开始时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date firstPreselectedBeginTime;
+
+ @Column("first_preselected_end_time")
+ @Comment("第一次预选结束时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date firstPreselectedEndTime;
+
+ @Column("second_preselected_begin_time")
+ @Comment("第二次预选开始时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date secondPreselectedBeginTime;
+
+ @Column("second_preselected_end_time")
+ @Comment("第二次预选结束时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date secondPreselectedEndTime;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectRep.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectRep.java
new file mode 100644
index 00000000..3135bf04
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressCommitteeElectRep.java
@@ -0,0 +1,62 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_committee_elect_rep")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会委员推选")
+@TableIndexes({
+ @Index(name = "idx_congress_committee_elect_rep_session", fields = {"sessionId"}, unique = false),
+ @Index(name = "idx_congress_committee_elect_rep_delegation", fields = {"delegationId"}, unique = false)
+})
+public class CongressCommitteeElectRep extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("rep_id")
+ @Comment("代表ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String repId;
+
+ @Column("type")
+ @Comment("推选类型")
+ @ColDefine(type = ColType.INT)
+ private Integer type;
+
+ @Column("times")
+ @Comment("第几次")
+ @ColDefine(type = ColType.INT)
+ private Integer times;
+
+ @Column("user_id")
+ @Comment("团长用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegation.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegation.java
new file mode 100644
index 00000000..0e667fc8
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegation.java
@@ -0,0 +1,80 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_delegation")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表团")
+@TableIndexes({
+ @Index(name = "idx_congress_delegation_time", fields = {"timeId"}, unique = false)
+})
+public class CongressDelegation extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("name")
+ @Comment("代表团名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("time_name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String timeName;
+
+ @Column("code")
+ @Comment("编码")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String code;
+
+ @Column("official_number")
+ @Comment("正式代表人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer officialNumber;
+
+ @Column("attendance_number")
+ @Comment("列席代表人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer attendanceNumber;
+
+ @Column("invite_number")
+ @Comment("特邀代表人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer inviteNumber;
+
+ @Column("committee_allot_number")
+ @Comment("委员分配人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer committeeAllotNumber;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationHead.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationHead.java
new file mode 100644
index 00000000..e4dfcc26
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationHead.java
@@ -0,0 +1,76 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_delegation_head")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表团团长")
+@TableIndexes({
+ @Index(name = "idx_congress_delegation_head_delegation", fields = {"delegationId"}, unique = false)
+})
+public class CongressDelegationHead extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("user_id")
+ @Comment("用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+ @Column("emplid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String emplid;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("unit")
+ @Comment("单位")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unit;
+
+ @Column("mobile")
+ @Comment("电话")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String mobile;
+
+ @Column("sex")
+ @Comment("性别")
+ @ColDefine(type = ColType.INT)
+ private Integer sex;
+
+ @Column("identity")
+ @Comment("身份")
+ @ColDefine(type = ColType.INT)
+ private Integer identity;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationRep.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationRep.java
new file mode 100644
index 00000000..0907b35f
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationRep.java
@@ -0,0 +1,66 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_delegation_rep")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表团代表")
+@TableIndexes({
+ @Index(name = "idx_congress_delegation_rep_delegation", fields = {"delegationId"}, unique = false)
+})
+public class CongressDelegationRep extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("user_id")
+ @Comment("用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+ @Column("empid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String empid;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("unit")
+ @Comment("单位")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unit;
+
+ @Column("mobile")
+ @Comment("电话")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String mobile;
+
+ @Column("sex")
+ @Comment("性别")
+ @ColDefine(type = ColType.INT)
+ private Integer sex;
+
+ @Column("identity")
+ @Comment("身份")
+ @ColDefine(type = ColType.INT)
+ private Integer identity;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationUnion.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationUnion.java
new file mode 100644
index 00000000..6527cbba
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressDelegationUnion.java
@@ -0,0 +1,47 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_delegation_union")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表团工会")
+@TableIndexes({
+ @Index(name = "idx_congress_delegation_union_delegation", fields = {"delegationId"}, unique = false),
+ @Index(name = "idx_congress_delegation_union_time", fields = {"timeId"}, unique = false)
+})
+public class CongressDelegationUnion extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("union_id")
+ @Comment("工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String unionId;
+
+ @Column("union_name")
+ @Comment("工会名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unionName;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterials.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterials.java
new file mode 100644
index 00000000..1d5daf57
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterials.java
@@ -0,0 +1,72 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_materials")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会资料")
+@TableIndexes({
+ @Index(name = "idx_congress_materials_time_type", fields = {"timeId", "typeId"}, unique = false)
+})
+public class CongressMaterials extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("type_id")
+ @Comment("资料类型ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String typeId;
+
+ @Column("sort_no")
+ @Comment("排序")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer sortNo;
+
+ @Column("name")
+ @Comment("资料名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("file_name")
+ @Comment("文件名")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String fileName;
+
+ @Column("file_url")
+ @Comment("文件地址")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String fileUrl;
+
+ @Column("file_type")
+ @Comment("文件类型")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String fileType;
+
+ @Column("file_size")
+ @Comment("文件大小")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String fileSize;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterialsType.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterialsType.java
new file mode 100644
index 00000000..87b267a5
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressMaterialsType.java
@@ -0,0 +1,40 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_materials_type")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会资料类型")
+public class CongressMaterialsType extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("sort_no")
+ @Comment("排序")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer sortNo;
+
+ @Column("name")
+ @Comment("名称")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("is_vote")
+ @Comment("是否表决类")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean isVote;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrg.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrg.java
new file mode 100644
index 00000000..503d09d5
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrg.java
@@ -0,0 +1,62 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_org")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会机构")
+@TableIndexes({
+ @Index(name = "idx_congress_org_session", fields = {"sessionId"}, unique = false),
+ @Index(name = "idx_congress_org_parent", fields = {"parentId"}, unique = false)
+})
+public class CongressOrg extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("name")
+ @Comment("机构名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("code")
+ @Comment("机构代码")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String code;
+
+ @Column("type")
+ @Comment("机构类别")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String type;
+
+ @Column("remark")
+ @Comment("备注")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String remark;
+
+ @Column("parent_id")
+ @Comment("父节点")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String parentId;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrgMember.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrgMember.java
new file mode 100644
index 00000000..a8728bcf
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressOrgMember.java
@@ -0,0 +1,87 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_org_member")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会机构成员")
+@TableIndexes({
+ @Index(name = "idx_congress_org_member_org", fields = {"orgId"}, unique = false),
+ @Index(name = "idx_congress_org_member_session", fields = {"sessionId"}, unique = false)
+})
+public class CongressOrgMember extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("user_id")
+ @Comment("用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+ @Column("empid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String empid;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("unit")
+ @Comment("单位")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unit;
+
+ @Column("mobile")
+ @Comment("电话")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String mobile;
+
+ @Column("sex")
+ @Comment("性别")
+ @ColDefine(type = ColType.INT)
+ private Integer sex;
+
+ @Column("identity")
+ @Comment("身份")
+ @ColDefine(type = ColType.INT)
+ private Integer identity;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("org_id")
+ @Comment("机构ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String orgId;
+
+ @Column("role_id")
+ @Comment("角色ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String roleId;
+
+ @Column("role_name")
+ @Comment("角色名称")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String roleName;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRep.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRep.java
new file mode 100644
index 00000000..d06c7079
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRep.java
@@ -0,0 +1,171 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_rep")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表")
+@TableIndexes({
+ @Index(name = "idx_congress_rep_emplid", fields = {"emplid"}, unique = false),
+ @Index(name = "idx_congress_rep_time_emplid", fields = {"timeId", "emplid"}, unique = false),
+ @Index(name = "idx_congress_rep_session_id", fields = {"sessionId"}, unique = false)
+})
+public class CongressRep extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("time_name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String timeName;
+
+ @Column("user_id")
+ @Comment("用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("emplid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String emplid;
+
+ @Column("sex")
+ @Comment("性别")
+ @ColDefine(type = ColType.VARCHAR, width = 16)
+ private String sex;
+
+ @Column("birthdate")
+ @Comment("出生日期")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String birthdate;
+
+ @Column("politics_status")
+ @Comment("政治面貌")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String politicsStatus;
+
+ @Column("position")
+ @Comment("职务")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String position;
+
+ @Column("education")
+ @Comment("学历")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String education;
+
+ @Column("work_unit")
+ @Comment("工作单位")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String workUnit;
+
+ @Column("work_experience")
+ @Comment("工作经历")
+ @ColDefine(type = ColType.TEXT)
+ private String workExperience;
+
+ @Column("tags")
+ @Comment("标签")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String tags;
+
+ @Column("filling_status")
+ @Comment("填报状态")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String fillingStatus;
+
+ @Column("identity")
+ @Comment("身份")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String identity;
+
+ @Column("type")
+ @Comment("代表类型")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String type;
+
+ @Column("is_gdh")
+ @Comment("是否工代会代表")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean isGdh;
+
+ @Column("is_zdh")
+ @Comment("是否职代会代表")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean isZdh;
+
+ @Column("union_id")
+ @Comment("工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String unionId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("delegation_name")
+ @Comment("代表团名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String delegationName;
+
+ @Column("supplement")
+ @Comment("补充说明")
+ @ColDefine(type = ColType.TEXT)
+ private String supplement;
+
+ @Column("status")
+ @Comment("状态")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer status;
+
+ @Column("precinct_union_id")
+ @Comment("选区工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String precinctUnionId;
+
+ @Column("precinct_union_name")
+ @Comment("选区工会名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String precinctUnionName;
+
+ @Column("nation")
+ @Comment("民族")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String nation;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRepSupplement.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRepSupplement.java
new file mode 100644
index 00000000..338c146d
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressRepSupplement.java
@@ -0,0 +1,111 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_rep_supplement")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会代表增补")
+@TableIndexes({
+ @Index(name = "idx_congress_rep_supplement_time", fields = {"timeId"}, unique = false)
+})
+public class CongressRepSupplement extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("precinct_union_id")
+ @Comment("选区")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String precinctUnionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("time_name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String timeName;
+
+ @Column("add_user_id")
+ @Comment("增加代表用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String addUserId;
+
+ @Column("add_user_union_id")
+ @Comment("增加代表工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String addUserUnionId;
+
+ @Column("add_user_name")
+ @Comment("增加代表姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String addUserName;
+
+ @Column("add_emplid")
+ @Comment("增加代表工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String addEmplid;
+
+ @Column("sub_user_id")
+ @Comment("替换代表用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String subUserId;
+
+ @Column("sub_user_name")
+ @Comment("替换代表姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String subUserName;
+
+ @Column("sub_emplid")
+ @Comment("替换代表工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String subEmplid;
+
+ @Column("reason")
+ @Comment("原因")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String reason;
+
+ @Column("add_precinct_union_id")
+ @Comment("增加选区工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String addPrecinctUnionId;
+
+ @Column("add_precinct_union_name")
+ @Comment("增加选区工会名")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String addPrecinctUnionName;
+
+ @Column("sub_precinct_union_id")
+ @Comment("替换选区工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String subPrecinctUnionId;
+
+ @Column("sub_precinct_union_name")
+ @Comment("替换选区工会名")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String subPrecinctUnionName;
+
+ @Column("type")
+ @Comment("类型")
+ @ColDefine(type = ColType.INT)
+ private Integer type;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSessions.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSessions.java
new file mode 100644
index 00000000..b1986f2d
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSessions.java
@@ -0,0 +1,66 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_sessions")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会届次")
+@TableIndexes({
+ @Index(name = "idx_congress_sessions_union_id", fields = {"unionId"}, unique = false)
+})
+public class CongressSessions extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("year")
+ @Comment("年份")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String year;
+
+ @Column("description")
+ @Comment("描述")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String description;
+
+ @Column("sc_session")
+ @Comment("省产届次")
+ @ColDefine(type = ColType.INT)
+ private Integer scSession;
+
+ @Column("uc_session")
+ @Comment("校产届次")
+ @ColDefine(type = ColType.INT)
+ private Integer ucSession;
+
+ @Column("union_id")
+ @Comment("工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String unionId;
+
+ @Column("type")
+ @Comment("会类型")
+ @ColDefine(type = ColType.INT)
+ private Integer type;
+
+ @Column("union_name")
+ @Comment("工会名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unionName;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignIn.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignIn.java
new file mode 100644
index 00000000..30b7ddc8
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignIn.java
@@ -0,0 +1,62 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_sign_in")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会签到记录")
+@TableIndexes({
+ @Index(name = "uk_congress_sign_in_rep_meeting", fields = {"repId", "meetingId", "deleted"}, unique = true),
+ @Index(name = "idx_congress_sign_in_meeting", fields = {"meetingId"}, unique = false)
+})
+public class CongressSignIn extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("meeting_id")
+ @Comment("签到会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String meetingId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("rep_id")
+ @Comment("代表ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String repId;
+
+ @Column("emplid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String emplid;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignInMeeting.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignInMeeting.java
new file mode 100644
index 00000000..57106e19
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressSignInMeeting.java
@@ -0,0 +1,62 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_sign_in_meeting")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会签到会议")
+@TableIndexes({
+ @Index(name = "idx_congress_sign_in_meeting_time", fields = {"timeId"}, unique = false)
+})
+public class CongressSignInMeeting extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("meeting_name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String meetingName;
+
+ @Column("sign_in_start_time")
+ @Comment("签到开始时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date signInStartTime;
+
+ @Column("sign_in_end_time")
+ @Comment("签到结束时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date signInEndTime;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("remark")
+ @Comment("备注")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String remark;
+
+ @Column("sign_in_count")
+ @Comment("签到人数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer signInCount;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressTimes.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressTimes.java
new file mode 100644
index 00000000..0abcc041
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressTimes.java
@@ -0,0 +1,56 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_times")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会会议")
+@TableIndexes({
+ @Index(name = "idx_congress_times_session_id", fields = {"sessionId"}, unique = false)
+})
+public class CongressTimes extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("year")
+ @Comment("年份")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String year;
+
+ @Column("name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("sc_times")
+ @Comment("省产次数")
+ @ColDefine(type = ColType.INT)
+ private Integer scTimes;
+
+ @Column("uc_times")
+ @Comment("校产次数")
+ @ColDefine(type = ColType.INT)
+ private Integer ucTimes;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressUnion.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressUnion.java
new file mode 100644
index 00000000..61182e1d
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressUnion.java
@@ -0,0 +1,69 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_union")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会工会名额")
+@TableIndexes({
+ @Index(name = "idx_congress_union_session", fields = {"sessionId"}, unique = false),
+ @Index(name = "idx_congress_union_delegation", fields = {"delegationId"}, unique = false)
+})
+public class CongressUnion extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("union_id")
+ @Comment("工会ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String unionId;
+
+ @Column("union_name")
+ @Comment("工会名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String unionName;
+
+ @Column("quota_config")
+ @Comment("名额配置")
+ @ColDefine(type = ColType.TEXT)
+ private String quotaConfig;
+
+ @Column("member_number")
+ @Comment("会员数")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer memberNumber;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("sort_no")
+ @Comment("排序")
+ @ColDefine(type = ColType.INT)
+ @Default("0")
+ private Integer sortNo;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingIssue.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingIssue.java
new file mode 100644
index 00000000..b8c688ba
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingIssue.java
@@ -0,0 +1,107 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_voting_issue")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会议题表决")
+@TableIndexes({
+ @Index(name = "idx_congress_voting_issue_materials", fields = {"materialsId"}, unique = false),
+ @Index(name = "idx_congress_voting_issue_time", fields = {"timeId"}, unique = false)
+})
+public class CongressVotingIssue extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("session_name")
+ @Comment("届次名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String sessionName;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("time_name")
+ @Comment("会议名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String timeName;
+
+ @Column("name")
+ @Comment("议题名称")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String name;
+
+ @Column("description")
+ @Comment("描述")
+ @ColDefine(type = ColType.VARCHAR, width = 1000)
+ private String description;
+
+ @Column("content")
+ @Comment("内容")
+ @ColDefine(type = ColType.TEXT)
+ private String content;
+
+ @Column("voting_type")
+ @Comment("表决类型")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String votingType;
+
+ @Column("voting_start_time")
+ @Comment("表决开始时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date votingStartTime;
+
+ @Column("voting_end_time")
+ @Comment("表决结束时间")
+ @ColDefine(type = ColType.DATETIME)
+ private Date votingEndTime;
+
+ @Column("voting_content")
+ @Comment("表决内容")
+ @ColDefine(type = ColType.TEXT)
+ private String votingContent;
+
+ @Column("voting_content_item_header")
+ @Comment("表决项表头")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String votingContentItemHeader;
+
+ @Column("voting_content_option_header")
+ @Comment("表决选项表头")
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ private String votingContentOptionHeader;
+
+ @Column("materials_id")
+ @Comment("资料ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String materialsId;
+
+ @Column("type_id")
+ @Comment("资料类型ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String typeId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingRecord.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingRecord.java
new file mode 100644
index 00000000..50eb797a
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/models/CongressVotingRecord.java
@@ -0,0 +1,72 @@
+package com.budwk.app.zhgh.democratic.congress.models;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table("congress_voting_record")
+@TableMeta("{'mysql-charset':'utf8mb4'}")
+@Comment("职代会表决记录")
+@TableIndexes({
+ @Index(name = "uk_congress_voting_record_rep_issue", fields = {"repId", "issueId", "deleted"}, unique = true),
+ @Index(name = "idx_congress_voting_record_issue", fields = {"issueId"}, unique = false)
+})
+public class CongressVotingRecord extends CongressBaseModel {
+
+ @Name
+ @Comment("主键")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ @PrevInsert(uu32 = true)
+ private String id;
+
+ @Column("issue_id")
+ @Comment("议题ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String issueId;
+
+ @Column("rep_id")
+ @Comment("代表ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String repId;
+
+ @Column("emplid")
+ @Comment("工号")
+ @ColDefine(type = ColType.VARCHAR, width = 64)
+ private String emplid;
+
+ @Column("name")
+ @Comment("姓名")
+ @ColDefine(type = ColType.VARCHAR, width = 100)
+ private String name;
+
+ @Column("session_id")
+ @Comment("届次ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String sessionId;
+
+ @Column("time_id")
+ @Comment("会议ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String timeId;
+
+ @Column("delegation_id")
+ @Comment("代表团ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String delegationId;
+
+ @Column("vote_result")
+ @Comment("表决结果")
+ @ColDefine(type = ColType.TEXT)
+ private String voteResult;
+
+ @Column("user_id")
+ @Comment("用户ID")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String userId;
+
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
new file mode 100644
index 00000000..6b293c45
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
@@ -0,0 +1,151 @@
+package com.budwk.app.zhgh.democratic.congress.service;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import com.budwk.app.base.page.Pagination;
+import com.budwk.app.base.param.PageForm;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.base.service.BaseService;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Cnd;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.util.NutMap;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 职代会管理公共服务类。
+ *
+ * 本服务不注册页面路由,只集中维护六个菜单控制器共用的查询和基础操作。
+ */
+@IocBean
+public class CongressManageService {
+
+ @Inject
+ private Dao dao;
+
+ @Inject
+ private BaseService> baseService;
+
+
+ public List sessionOptions() {
+ return listMaps("""
+ SELECT id AS `id`, fullName AS `fullName`
+ FROM teacher_congress_session
+ WHERE delFlag = 0
+ ORDER BY startDate desc, createdAt desc
+ """);
+ }
+
+ public List typeOptions() {
+ return listMaps("""
+ SELECT id, name, sort_no AS sortNo, is_vote AS isVote
+ FROM congress_materials_type
+ WHERE COALESCE(deleted, 0) = 0
+ ORDER BY sort_no, create_time, id
+ """);
+ }
+
+ public List meetingOptions(String sessionId) {
+ Sql sql = Sqls.create("""
+ SELECT id, meeting_name AS meetingName
+ FROM congress_sign_in_meeting
+ WHERE COALESCE(deleted, 0) = 0
+ AND session_id = @sessionId
+ ORDER BY sign_in_start_time DESC, create_time DESC
+ """);
+ sql.setParam("sessionId", sessionId);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ public List materialOptions(String sessionId, String typeId) {
+ StringBuilder sqlText = new StringBuilder("""
+ SELECT
+ m.id,
+ m.name,
+ m.type_id AS typeId,
+ m.file_name AS fileName,
+ m.file_url AS fileUrl
+ FROM congress_materials m
+ WHERE COALESCE(m.deleted, 0) = 0
+ AND m.session_id = @sessionId
+ """);
+ if (StrUtil.isNotBlank(typeId)) {
+ sqlText.append(" AND m.type_id = @typeId");
+ }
+ sqlText.append(" ORDER BY m.sort_no, m.create_time DESC");
+ Sql sql = Sqls.create(sqlText.toString());
+ sql.setParam("sessionId", sessionId);
+ sql.setParam("typeId", typeId);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ public Result page(PageForm pageForm, String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ Pagination pagination = baseService.listPageMap(
+ pageForm.getPageNumber(), pageForm.getPageSize(), sql);
+ return Result.success(pagination);
+ }
+
+ public List listMaps(String sqlText) {
+ Sql sql = Sqls.create(sqlText);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ public NutMap fetchMap(String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ sql.setCallback(Sqls.callback.map());
+ dao.execute(sql);
+ return sql.getObject(NutMap.class);
+ }
+
+ public int count(String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ sql.setCallback(Sqls.callback.integer());
+ dao.execute(sql);
+ return sql.getInt();
+ }
+
+ public void softDelete(String tableName, String id) {
+ dao.update(tableName,
+ Chain.make("deleted", 1).add("update_time", new Date()),
+ Cnd.where("id", "=", id).and("deleted", "=", 0));
+ }
+
+ public Date parseDate(String value) {
+ if (StrUtil.isBlank(value)) {
+ return null;
+ }
+ try {
+ return DateUtil.parse(value);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ public void appendEquals(StringBuilder sql, NutMap params,
+ String column, String paramName, Object value) {
+ if (value instanceof String && StrUtil.isBlank((String) value)) {
+ return;
+ }
+ if (value == null) {
+ return;
+ }
+ sql.append(" AND ").append(column).append(" = @").append(paramName);
+ params.addv(paramName, value);
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/db/congress/init_congress_pc_menu.sql b/src/main/resources/db/congress/init_congress_pc_menu.sql
new file mode 100644
index 00000000..d68ed0b9
--- /dev/null
+++ b/src/main/resources/db/congress/init_congress_pc_menu.sql
@@ -0,0 +1,228 @@
+-- 职代会电脑端菜单(MySQL 8)。
+-- 不包含库名前缀,可重复执行。
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_root', '',
+ LPAD(IFNULL(MAX(CAST(`path` AS UNSIGNED)), 0) + 1, 4, '0'),
+ '职代会管理', 'Congress', 'menu', '', '', 'ti-agenda',
+ 1, 0, 'congress', NULL, 1, 1,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'z', 0, 0
+FROM sys_menu
+WHERE (parentId IS NULL OR parentId = '') AND CHAR_LENGTH(path) = 4
+HAVING NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress') t
+);
+
+-- 一级分组:会议资料(排序 6)。
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_materials', p.id, CONCAT(p.path, '0006'),
+ '会议资料', 'Congress Materials', 'menu', '', '', 'ti-file',
+ 1, 0, 'congress.materials', NULL, 6, 1,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'h', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.materials') t
+ );
+
+-- 一级分组:会议签到(排序 7)。
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_signin', p.id, CONCAT(p.path, '0007'),
+ '会议签到', 'Congress Sign In', 'menu', '', '', 'ti-calendar',
+ 1, 0, 'congress.signIn', NULL, 7, 1,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'h', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.signIn') t
+ );
+
+-- 一级分组:会议投票(排序 8)。
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_vote', p.id, CONCAT(p.path, '0008'),
+ '会议投票', 'Congress Vote', 'menu', '', '', 'ti-bar-chart',
+ 1, 0, 'congress.vote', NULL, 8, 1,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'h', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.vote') t
+ );
+
+-- 二级页面菜单。
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_signin_manage', p.id, CONCAT(p.path, '0001'),
+ '会议管理', 'Meeting Manage', 'menu', '/platform/congress/signIn/index', 'data-pjax', 'ti-layout-grid2',
+ 1, 0, 'congress.signIn.manage', NULL, 1, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'h', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.signIn'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.signIn.manage') t
+ );
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_signin_record', p.id, CONCAT(p.path, '0002'),
+ '签到记录', 'Sign In Record', 'menu', '/platform/congress/record/index', 'data-pjax', 'ti-layout-grid2',
+ 1, 0, 'congress.signIn.record', NULL, 2, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'q', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.signIn'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.signIn.record') t
+ );
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_vote_issue', p.id, CONCAT(p.path, '0001'),
+ '投票管理', 'Vote Manage', 'menu', '/platform/congress/materials/issue/index', 'data-pjax', 'ti-menu-alt',
+ 1, 0, 'congress.vote.issue', NULL, 1, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 't', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.vote'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.vote.issue') t
+ );
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_vote_statistics', p.id, CONCAT(p.path, '0002'),
+ '投票统计', 'Vote Statistics', 'menu', '/platform/congress/materials/statistical/index', 'data-pjax', 'ti-menu-alt',
+ 1, 0, 'congress.vote.statistical', NULL, 2, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 't', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.vote'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.vote.statistical') t
+ );
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_materials_manage', p.id, CONCAT(p.path, '0002'),
+ '资料管理', 'Materials Manage', 'menu', '/platform/congress/materials/manage/index', 'data-pjax', 'ti-file',
+ 1, 0, 'congress.materials.manage', NULL, 2, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'z', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.materials'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.materials.manage') t
+ );
+
+INSERT INTO sys_menu (
+ id, parentId, path, name, aliasName, type, href, target, icon,
+ showit, disabled, permission, note, location, hasChildren,
+ createdBy, createdAt, updatedBy, updatedAt, delFlag, platform,
+ moduleId, picIcon, initialPinyinName, isRecommendApp, isRecommendService
+)
+SELECT
+ 'congress_pc_materials_type', p.id, CONCAT(p.path, '0001'),
+ '资料类型', 'Materials Type', 'menu', '/platform/congress/materials/type/index', 'data-pjax', 'ti-share-alt',
+ 1, 0, 'congress.materials.type', NULL, 1, 0,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ '', UNIX_TIMESTAMP(NOW()) * 1000,
+ 0, 'PC', NULL, NULL, 'z', 0, 0
+FROM sys_menu p
+WHERE p.permission = 'congress.materials'
+ AND NOT EXISTS (
+ SELECT 1 FROM (SELECT id FROM sys_menu WHERE permission = 'congress.materials.type') t
+ );
+
+-- 兼容已执行过旧版脚本的数据:根菜单和分组菜单只负责展开,不请求后台地址。
+UPDATE sys_menu
+SET href = '',
+ target = '',
+ updatedBy = '',
+ updatedAt = UNIX_TIMESTAMP(NOW()) * 1000
+WHERE id IN (
+ 'congress_pc_root',
+ 'congress_pc_materials',
+ 'congress_pc_signin',
+ 'congress_pc_vote'
+);
+-- 系统管理员默认拥有模块菜单,其他角色在角色管理中按需授权。
+INSERT INTO sys_role_menu (roleId, menuId)
+SELECT r.id, m.id
+FROM sys_role r
+JOIN sys_menu m ON m.permission IN (
+ 'congress',
+ 'congress.signIn',
+ 'congress.signIn.manage',
+ 'congress.signIn.record',
+ 'congress.vote',
+ 'congress.vote.issue',
+ 'congress.vote.statistical',
+ 'congress.materials',
+ 'congress.materials.manage',
+ 'congress.materials.type'
+)
+LEFT JOIN sys_role_menu rm ON rm.roleId = r.id AND rm.menuId = m.id
+WHERE r.code = 'SYSADMIN' AND rm.roleId IS NULL;
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
new file mode 100644
index 00000000..f484f3fe
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+ {{row.sessionName}}
+
+
+
+
+
+ {{row.materialsName}}
+
+ {{row.materialsName || "-"}}
+
+
+
+
+ {{formatDate(row.votingStartTime)}} 至 {{formatDate(row.votingEndTime)}}
+
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+ 添加表决事项
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
new file mode 100644
index 00000000..3a305d74
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ {{row.sessionName}}
+
+
+
+
+
+ {{row.fileName || row.name}}
+
+ -
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/statistical/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/statistical/index.html
new file mode 100644
index 00000000..8c98b79b
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/statistical/index.html
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{row.materialsName}}
+
+ {{row.materialsName || "-"}}
+
+
+
+
+ {{row.sessionName}}
+
+
+
+ 查看统计
+
+
+
+
+
+
+
+
+
+ {{currentIssue.name}}
+ {{currentIssue.sessionName}}
+ {{currentIssue.typeName}}
+ {{currentIssue.voteCount}}
+
+
+
+
+
+
+
+
+
+ {{percent(row.count, row.itemTotal)}}
+
+
+
+
+
+
+
+
+
+
+
+ {{voteResultText(row.voteResult)}}
+
+
+ {{formatDate(row.createTime)}}
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
new file mode 100644
index 00000000..18f9f6ad
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+ {{row.isVote ? "是" : "否"}}
+
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/record/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/record/index.html
new file mode 100644
index 00000000..7eb83f2f
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/record/index.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{row.sessionName}}
+
+
+
+ 已签到
+
+
+ {{formatDate(row.signInTime)}}
+
+
+
+
+
+
+
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
new file mode 100644
index 00000000..8e7f5f55
--- /dev/null
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+ {{row.sessionName}}
+
+
+
+ {{formatDate(row.signInStartTime)}} 至 {{formatDate(row.signInEndTime)}}
+
+
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
From bff78c6ced28c36d35f1ba4d8ff32ed2a0c485a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com>
Date: Wed, 29 Jul 2026 15:56:03 +0800
Subject: [PATCH 3/8] =?UTF-8?q?web=E7=AB=AF=E8=81=8C=E4=BB=A3=E4=BC=9A?=
=?UTF-8?q?=E7=AE=A1=E7=90=86:=20=E4=BF=AE=E5=A4=8Dcongress=5Fmaterials?=
=?UTF-8?q?=E8=81=8C=E4=BB=A3=E4=BC=9A=E8=B5=84=E6=96=99=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E7=9A=84fileType,fileSize=E5=AD=97=E6=AE=B5=E4=B8=BA=E7=A9=BA?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CongressMaterialsManageController.java | 6 +-
.../CongressVotingIssueController.java | 54 ++++++++++
.../service/CongressManageService.java | 28 ++++++
.../congress/materials/issue/index.html | 98 +++++++++++++++++--
.../congress/materials/manage/index.html | 11 ++-
.../congress/materials/type/index.html | 4 +-
.../democratic/congress/signIn/index.html | 4 +-
7 files changed, 185 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
index 66e3c453..fceac324 100644
--- a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressMaterialsManageController.java
@@ -134,7 +134,7 @@ public class CongressMaterialsManageController {
.add("sort_no", sortNo == null ? 0 : sortNo)
.add("file_name", StrUtil.blankToDefault(fileName, name.trim()))
.add("file_url", fileUrl)
- .add("file_type", StrUtil.blankToDefault(fileType, null))
+ .add("file_type", congressManageService.normalizeFileType(fileType, fileName, fileUrl))
.add("file_size", StrUtil.blankToDefault(fileSize, null))
.add("update_time", now);
if (StrUtil.isBlank(id)) {
@@ -143,11 +143,11 @@ public class CongressMaterialsManageController {
.add("create_time", now)
.add("deleted", 0);
dao.insert("congress_materials", chain);
- return Result.success(newId);
+ return Result.success().addData(newId);
}
dao.update("congress_materials", chain,
Cnd.where("id", "=", id).and("deleted", "=", 0));
- return Result.success(id);
+ return Result.success().addData(id);
}
@At("/delete")
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
index 75939a37..b71c3b4e 100644
--- a/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/controller/CongressVotingIssueController.java
@@ -57,6 +57,60 @@ public class CongressVotingIssueController {
return Result.success(congressManageService.materialOptions(sessionId, typeId));
}
+ @At("/uploadMaterial")
+ @Aop(TransAop.READ_COMMITTED)
+ @SaCheckPermission("congress.vote.issue")
+ @SLog(tag = "职代会-投票管理", msg = "快捷上传投票资料")
+ public Result uploadMaterial(@Param("sessionId") String sessionId,
+ @Param("typeId") String typeId,
+ @Param("name") String name,
+ @Param("fileName") String fileName,
+ @Param("fileUrl") String fileUrl,
+ @Param("fileType") String fileType,
+ @Param("fileSize") String fileSize) {
+ if (StrUtil.hasBlank(sessionId, typeId, fileUrl)) {
+ return Result.error("届次、投票类型和文件不能为空");
+ }
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM teacher_congress_session
+ WHERE id = @sessionId
+ AND delFlag = 0
+ """, NutMap.NEW().addv("sessionId", sessionId)) <= 0) {
+ return Result.error("所选届次不存在");
+ }
+ if (congressManageService.count("""
+ SELECT COUNT(1)
+ FROM congress_materials_type
+ WHERE id = @typeId
+ AND COALESCE(deleted, 0) = 0
+ AND COALESCE(is_vote, 0) = 1
+ """, NutMap.NEW().addv("typeId", typeId)) <= 0) {
+ return Result.error("所选投票类型不存在");
+ }
+ Date now = new Date();
+ String materialName = StrUtil.blankToDefault(name, StrUtil.blankToDefault(fileName, "资料")).trim();
+ String newId = R.UU32();
+ dao.insert("congress_materials", Chain.make("id", newId)
+ .add("name", materialName)
+ .add("session_id", sessionId)
+ .add("time_id", null)
+ .add("type_id", typeId)
+ .add("sort_no", 0)
+ .add("file_name", StrUtil.blankToDefault(fileName, materialName))
+ .add("file_url", fileUrl)
+ .add("file_type", congressManageService.normalizeFileType(fileType, fileName, fileUrl))
+ .add("file_size", StrUtil.blankToDefault(fileSize, null))
+ .add("create_time", now)
+ .add("update_time", now)
+ .add("deleted", 0));
+ return Result.success(NutMap.NEW()
+ .addv("id", newId)
+ .addv("name", materialName)
+ .addv("fileName", StrUtil.blankToDefault(fileName, materialName))
+ .addv("fileUrl", fileUrl));
+ }
+
@At("/pageData")
@SaCheckPermission("congress.vote.issue")
public Result issuePageData(PageForm pageForm,
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
index 6b293c45..9e934a25 100644
--- a/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressManageService.java
@@ -17,6 +17,7 @@ import org.nutz.lang.util.NutMap;
import java.util.Date;
import java.util.List;
+import java.util.Locale;
/**
* 职代会管理公共服务类。
@@ -148,4 +149,31 @@ public class CongressManageService {
sql.append(" AND ").append(column).append(" = @").append(paramName);
params.addv(paramName, value);
}
+
+ public String normalizeFileType(String fileType, String fileName, String fileUrl) {
+ if (StrUtil.isNotBlank(fileType) && !fileType.contains("/")) {
+ return fileType.replace(".", "").trim().toLowerCase(Locale.ROOT);
+ }
+ String suffix = extractFileExtension(fileName);
+ if (StrUtil.isBlank(suffix)) {
+ suffix = extractFileExtension(fileUrl);
+ }
+ return StrUtil.blankToDefault(suffix, null);
+ }
+
+ private String extractFileExtension(String name) {
+ if (StrUtil.isBlank(name)) {
+ return "";
+ }
+ String value = name.split("\\?", 2)[0];
+ int slashIndex = Math.max(value.lastIndexOf('/'), value.lastIndexOf('\\'));
+ if (slashIndex >= 0) {
+ value = value.substring(slashIndex + 1);
+ }
+ int dotIndex = value.lastIndexOf('.');
+ if (dotIndex < 0 || dotIndex == value.length() - 1) {
+ return "";
+ }
+ return value.substring(dotIndex + 1).toLowerCase(Locale.ROOT);
+ }
}
\ No newline at end of file
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
index f484f3fe..e134efa9 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
+ width="880px" :close-on-click-modal="false">
@@ -77,11 +77,27 @@ layout("/layouts/platform.html"){
-
-
-
+
+
+
+
+
+
+
+
+ 上传资料
+
+
+
@@ -157,6 +173,8 @@ layout("/layouts/platform.html"){
sessionOptions: [],
typeOptions: [],
materialOptions: [],
+ materialUploadLoading: false,
+ materialLoadSeq: 0,
voteItems: [],
pageForm: {pageNumber: 1, pageSize: 10, totalCount: 0, sessionId: "", name: ""},
formData: {},
@@ -172,7 +190,10 @@ layout("/layouts/platform.html"){
},
computed: {
voteTypeOptions() {
- return this.typeOptions.filter(v => !!v.isVote)
+ return this.typeOptions.filter(v => Number(v.isVote) === 1)
+ },
+ materialUploadDisabled() {
+ return !this.formData.sessionId || !this.formData.typeId
}
},
methods: {
@@ -188,20 +209,77 @@ layout("/layouts/platform.html"){
if (typesRes.code === 0) this.typeOptions = typesRes.data || []
},
async loadMaterials() {
+ const seq = ++this.materialLoadSeq
this.materialOptions = []
if (!this.formData.sessionId || !this.formData.typeId) return
const res = await this.$axios.post("/platform/congress/materials/issue/materials", {
sessionId: this.formData.sessionId,
typeId: this.formData.typeId
})
- if (res.code === 0) this.materialOptions = res.data || []
+ if (seq === this.materialLoadSeq && res.code === 0) this.materialOptions = res.data || []
+ },
+ getUploadedUrl(res) {
+ if (!res) return ""
+ if (typeof res === "string") return res
+ return res.data || res.url || res.fileUrl || res.path || res.filePath || ""
+ },
+ fileNameWithoutExt(name) {
+ return name ? String(name).replace(/\.[^/.]+$/, "") : ""
+ },
+ fileExtension(name) {
+ const fileName = String(name || "")
+ const index = fileName.lastIndexOf(".")
+ return index >= 0 ? fileName.substring(index + 1).toLowerCase() : ""
+ },
+ beforeMaterialUpload(file) {
+ if (this.materialUploadDisabled) {
+ this.$message.warning("请先选择届次和投票类型")
+ return false
+ }
+ this.materialUploadLoading = true
+ return true
+ },
+ async uploadMaterialSuccess(response, file) {
+ const fileUrl = this.getUploadedUrl(response)
+ if (!fileUrl) {
+ this.materialUploadLoading = false
+ this.$message.error(response && response.msg ? response.msg : "上传资料失败")
+ return
+ }
+ const fileName = file.name || "附件"
+ try {
+ const res = await this.$axios.post("/platform/congress/materials/issue/uploadMaterial", {
+ sessionId: this.formData.sessionId,
+ typeId: this.formData.typeId,
+ name: this.fileNameWithoutExt(fileName),
+ fileName: fileName,
+ fileUrl: fileUrl,
+ fileType: this.fileExtension(fileName),
+ fileSize: file.raw && file.raw.size ? file.raw.size : ""
+ })
+ if (res.code === 0) {
+ await this.loadMaterials()
+ this.formData.materialsId = res.data && res.data.id ? res.data.id : res.data
+ this.$message.success("上传资料成功")
+ } else {
+ this.$message.error(res.msg)
+ }
+ } finally {
+ this.materialUploadLoading = false
+ }
+ },
+ uploadMaterialError() {
+ this.materialUploadLoading = false
+ this.$message.error("上传资料失败")
},
async sessionChanged() {
this.formData.materialsId = ""
+ this.materialOptions = []
await this.loadMaterials()
},
async typeChanged() {
this.formData.materialsId = ""
+ this.materialOptions = []
await this.loadMaterials()
},
addVoteItem() {
@@ -262,7 +340,7 @@ layout("/layouts/platform.html"){
const res = await this.$axios.post("/platform/congress/materials/issue/save", data)
if (res.code === 0) {
this.dialogFormVisible = false
- this.$message.success(res.msg)
+ this.$message.success("保存成功")
this.pageData()
} else {
this.$message.error(res.msg)
@@ -276,7 +354,7 @@ layout("/layouts/platform.html"){
this.$confirm("确认删除该投票议题吗?", "提示", {type: "warning"}).then(async () => {
const res = await this.$axios.post("/platform/congress/materials/issue/delete", {id})
if (res.code === 0) {
- this.$message.success(res.msg)
+ this.$message.success("删除成功")
this.doSearch()
} else {
this.$message.error(res.msg)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
index 3a305d74..8684b2f3 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
@@ -160,6 +160,11 @@ layout("/layouts/platform.html"){
fileNameWithoutExt(name) {
return name ? String(name).replace(/\.[^/.]+$/, "") : ""
},
+ fileExtension(name) {
+ const fileName = String(name || "")
+ const index = fileName.lastIndexOf(".")
+ return index >= 0 ? fileName.substring(index + 1).toLowerCase() : ""
+ },
getUploadFileUrl(file) {
return file && file.response && file.response.data ? file.response.data : file && (file.url || file.data) || ""
},
@@ -175,7 +180,7 @@ layout("/layouts/platform.html"){
const fileName = file.name || this.fileNameFromUrl(this.getUploadFileUrl(file))
this.$set(this.formData, "fileName", fileName)
this.$set(this.formData, "fileUrl", this.getUploadFileUrl(file))
- this.$set(this.formData, "fileType", file.raw && file.raw.type ? file.raw.type : file.type || "")
+ this.$set(this.formData, "fileType", this.fileExtension(fileName))
this.$set(this.formData, "fileSize", file.raw && file.raw.size ? file.raw.size : file.size || "")
if (!this.formData.name && fileName) {
this.$set(this.formData, "name", this.fileNameWithoutExt(fileName))
@@ -190,7 +195,7 @@ layout("/layouts/platform.html"){
const res = await this.$axios.post("/platform/congress/materials/manage/save", this.formData)
if (res.code === 0) {
this.dialogFormVisible = false
- this.$message.success(res.msg)
+ this.$message.success("保存成功")
this.pageData()
} else {
this.$message.error(res.msg)
@@ -204,7 +209,7 @@ layout("/layouts/platform.html"){
this.$confirm("确认删除该会议资料吗?", "提示", {type: "warning"}).then(async () => {
const res = await this.$axios.post("/platform/congress/materials/manage/delete", {id})
if (res.code === 0) {
- this.$message.success(res.msg)
+ this.$message.success("删除成功")
this.doSearch()
} else {
this.$message.error(res.msg)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
index 18f9f6ad..a28fd967 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
@@ -98,7 +98,7 @@ layout("/layouts/platform.html"){
const res = await this.$axios.post("/platform/congress/materials/type/save", this.formData)
if (res.code === 0) {
this.dialogFormVisible = false
- this.$message.success(res.msg)
+ this.$message.success("保存成功")
this.pageData()
} else {
this.$message.error(res.msg)
@@ -112,7 +112,7 @@ layout("/layouts/platform.html"){
this.$confirm("确认删除该资料类型吗?", "提示", {type: "warning"}).then(async () => {
const res = await this.$axios.post("/platform/congress/materials/type/delete", {id})
if (res.code === 0) {
- this.$message.success(res.msg)
+ this.$message.success("删除成功")
this.doSearch()
} else {
this.$message.error(res.msg)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
index 8e7f5f55..d90c5cb1 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
@@ -129,7 +129,7 @@ layout("/layouts/platform.html"){
const res = await this.$axios.post("/platform/congress/signIn/save", this.formData)
if (res.code === 0) {
this.dialogFormVisible = false
- this.$message.success(res.msg)
+ this.$message.success("保存成功")
this.pageData()
} else {
this.$message.error(res.msg)
@@ -143,7 +143,7 @@ layout("/layouts/platform.html"){
this.$confirm("确认删除该会议签到配置吗?", "提示", {type: "warning"}).then(async () => {
const res = await this.$axios.post("/platform/congress/signIn/delete", {id})
if (res.code === 0) {
- this.$message.success(res.msg)
+ this.$message.success("删除成功")
this.doSearch()
} else {
this.$message.error(res.msg)
From 058f6b256390c69c117e4abd739ee14080c26be4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com>
Date: Wed, 29 Jul 2026 16:08:05 +0800
Subject: [PATCH 4/8] =?UTF-8?q?web=E7=AB=AF-=E8=81=8C=E4=BB=A3=E4=BC=9A?=
=?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=8A=95=E7=A5=A8=E7=AE=A1=E7=90=86:=20?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../congress/materials/issue/index.html | 39 +++++++++----------
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
index e134efa9..ffde2310 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
@@ -77,27 +77,24 @@ layout("/layouts/platform.html"){
-
-
-
-
-
-
-
-
- 上传资料
-
-
-
+
+
+
+
+
+ 上传资料
+
+
From cc71822aae48f12a5cfc165bc59460c8053035a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com>
Date: Thu, 30 Jul 2026 14:07:18 +0800
Subject: [PATCH 5/8] =?UTF-8?q?web=E7=AB=AF-=E8=81=8C=E4=BB=A3=E4=BC=9A?=
=?UTF-8?q?=E7=AE=A1=E7=90=86:=20=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E8=B0=83=E6=95=B4(=E5=BC=B9=E7=AA=97=E5=8A=A0=E5=AE=BD?=
=?UTF-8?q?=E8=87=B365%=E5=B7=A6=E5=8F=B3);?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zhgh/democratic/congress/materials/issue/index.html | 2 +-
.../zhgh/democratic/congress/materials/manage/index.html | 2 +-
.../platform/zhgh/democratic/congress/materials/type/index.html | 2 +-
.../views/platform/zhgh/democratic/congress/signIn/index.html | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
index ffde2310..37fe70bd 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
+ width="80%" :close-on-click-modal="false">
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
index 8684b2f3..f4e8d4bb 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/manage/index.html
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
+ width="65%" :close-on-click-modal="false">
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
index a28fd967..387d53d0 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/type/index.html
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
+ :visible.sync="dialogFormVisible" width="50%" :close-on-click-modal="false">
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
index d90c5cb1..f43607f9 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/signIn/index.html
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
+ width="65%" :close-on-click-modal="false">
From 11ae8175c131f3b1fc977965c84a44fc1b07a7bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E5=AD=A6=E6=88=90?= <1274337408@qq.com>
Date: Fri, 31 Jul 2026 10:39:57 +0800
Subject: [PATCH 6/8] =?UTF-8?q?web=E7=AB=AF-=E8=81=8C=E4=BB=A3=E4=BC=9A:?=
=?UTF-8?q?=20=E6=9A=82=E6=97=B6=E6=B3=A8=E9=87=8A=E6=8A=95=E7=A5=A8?=
=?UTF-8?q?=E7=AE=A1=E7=90=86-=E4=BC=9A=E8=AE=AE=E6=8A=95=E7=A5=A8'?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=96=99'=E6=8C=89=E9=92=AE,?=
=?UTF-8?q?=E9=81=BF=E5=85=8D=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9=E6=97=B6?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=96=87=E4=BB=B6=E7=B4=AF=E5=8A=A0?=
=?UTF-8?q?=E8=87=B3=E4=BC=9A=E8=AE=AE=E8=B5=84=E6=96=99=E8=A1=A8;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zhgh/democratic/congress/materials/issue/index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
index 37fe70bd..0a4f6f07 100644
--- a/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
+++ b/src/main/resources/views/platform/zhgh/democratic/congress/materials/issue/index.html
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
- 上传资料
-
+ -->
From 5477355f6427692411a11e9d978577282cf49991 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E8=AF=9A?= <1009578407@qq.com>
Date: Fri, 31 Jul 2026 11:06:45 +0800
Subject: [PATCH 7/8] =?UTF-8?q?feat:=E8=81=8C=E4=BB=A3=E4=BC=9Ah5=E7=AB=AF?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88=E5=85=BC=E5=AE=B9=E3=80=81?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=87=E6=8D=A2=E5=B1=8A=E6=AC=A1=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../h5controller/CongressH5Controller.java | 290 +--------------
.../congress/service/CongressH5Service.java | 24 ++
.../service/impl/CongressH5ServiceImpl.java | 340 ++++++++++++++++++
.../resources/views/layouts/platform_h5.html | 5 +-
.../zhghh5/democratic/congress/index.html | 102 ++++--
.../democratic/congress/materials/list.html | 86 ++++-
.../democratic/congress/meeting/list.html | 10 +-
.../zhghh5/democratic/congress/pdf.html | 156 ++++++--
.../zhghh5/democratic/congress/vote.html | 12 +-
.../zhghh5/democratic/congress/voted.html | 12 +-
10 files changed, 676 insertions(+), 361 deletions(-)
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressH5Service.java
create mode 100644 src/main/java/com/budwk/app/zhgh/democratic/congress/service/impl/CongressH5ServiceImpl.java
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
index 52017bd2..29e270b1 100644
--- a/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/h5controller/CongressH5Controller.java
@@ -1,30 +1,23 @@
package com.budwk.app.zhgh.democratic.congress.h5controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
-import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.result.Result;
-import com.budwk.app.web.commons.auth.utils.SecurityUtil;
-import org.nutz.dao.Chain;
-import org.nutz.dao.Dao;
-import org.nutz.dao.Sqls;
-import org.nutz.dao.sql.Sql;
+import com.budwk.app.zhgh.democratic.congress.service.CongressH5Service;
+import org.nutz.aop.interceptor.ioc.TransAop;
+import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
-import org.nutz.lang.random.R;
-import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
-import java.util.Date;
-
@IocBean
@At("/platform/h5/congress")
@Ok("json:full")
public class CongressH5Controller {
@Inject
- private Dao dao;
+ private CongressH5Service congressH5Service;
@At("")
@Ok("beetl:/platform/zhghh5/democratic/congress/index.html")
@@ -65,309 +58,52 @@ public class CongressH5Controller {
@At("/repTimes")
@SaCheckLogin
public Result repTimes(@Param("emplid") String emplid) {
- String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
- Sql sql = Sqls.create("""
- SELECT
- t.id,
- t.id AS timeId,
- t.name,
- t.year,
- t.session_id AS sessionId,
- t.session_name AS sessionName,
- s.type,
- r.id AS repId,
- r.delegation_id AS delegationId,
- r.delegation_name AS delegationName
- FROM congress_times t
- INNER JOIN (
- SELECT id, time_id, delegation_id, delegation_name
- FROM congress_rep
- WHERE emplid = @emplid
- AND status = 2
- AND IFNULL(deleted, 0) = 0
- GROUP BY id, time_id, delegation_id, delegation_name
- ) r ON t.id = r.time_id
- INNER JOIN congress_sessions s ON t.session_id = s.id
- WHERE IFNULL(t.deleted, 0) = 0
- AND IFNULL(s.deleted, 0) = 0
- ORDER BY t.create_time DESC, t.id DESC
- """);
- sql.setParam("emplid", loginName);
- sql.setCallback(Sqls.callback.maps());
- dao.execute(sql);
- return Result.success(sql.getList(NutMap.class));
+ return Result.success(congressH5Service.repTimes(emplid));
}
@At("/materialsTypeList")
@SaCheckLogin
public Result materialsTypeList() {
- Sql sql = Sqls.create("""
- SELECT
- SUBSTRING_INDEX(
- GROUP_CONCAT(
- id
- ORDER BY
- CASE
- WHEN id IN (
- 'congress_type_file_notice',
- 'congress_type_evaluation_vote',
- 'congress_type_issue_vote',
- 'congress_type_vote_notice',
- 'congress_type_prepare_material'
- ) THEN 0
- ELSE 1
- END,
- sort_no ASC,
- create_time ASC
- ),
- ',',
- 1
- ) AS id,
- MIN(sort_no) AS sortNo,
- name,
- MAX(is_vote) AS isVote
- FROM congress_materials_type
- WHERE IFNULL(deleted, 0) = 0
- GROUP BY name
- ORDER BY sortNo ASC, name ASC
- """);
- sql.setCallback(Sqls.callback.maps());
- dao.execute(sql);
- return Result.success(sql.getList(NutMap.class));
+ return Result.success(congressH5Service.materialsTypeList());
}
@At("/materialsList")
@SaCheckLogin
public Result materialsList(@Param("typeId") String typeId, @Param("timeId") String timeId, @Param("emplid") String emplid) {
- String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
- Sql sql = Sqls.create("""
- SELECT
- cm.id,
- cm.session_id AS sessionId,
- cm.time_id AS timeId,
- cm.type_id AS typeId,
- cm.sort_no AS sortNo,
- cm.name,
- cm.file_name AS fileName,
- cm.file_url AS fileUrl,
- cm.file_type AS fileType,
- cm.file_size AS fileSize,
- cm.create_time AS uploadTime,
- CASE
- WHEN cvi.id IS NULL THEN NULL
- WHEN cvr.id IS NOT NULL THEN true
- ELSE false
- END AS hasVoted,
- CASE WHEN cvr.id IS NOT NULL THEN true ELSE false END AS voted
- FROM congress_materials cm
- INNER JOIN congress_materials_type cmt ON cm.type_id = cmt.id AND IFNULL(cmt.deleted, 0) = 0
- LEFT JOIN congress_voting_issue cvi ON cm.id = cvi.materials_id
- AND IFNULL(cvi.deleted, 0) = 0
- AND cmt.is_vote = true
- LEFT JOIN congress_voting_record cvr ON cvi.id = cvr.issue_id
- AND cvr.emplid = @emplid
- AND IFNULL(cvr.deleted, 0) = 0
- WHERE IFNULL(cm.deleted, 0) = 0
- AND cm.type_id = @typeId
- AND cm.time_id = @timeId
- ORDER BY cm.sort_no ASC, cm.create_time DESC
- """);
- sql.setParam("typeId", typeId);
- sql.setParam("timeId", timeId);
- sql.setParam("emplid", loginName);
- sql.setCallback(Sqls.callback.maps());
- dao.execute(sql);
- return Result.success(sql.getList(NutMap.class));
+ return Result.success(congressH5Service.materialsList(typeId, timeId, emplid));
}
@At("/user/meetingList")
@SaCheckLogin
public Result userMeetingList(@Param("timeId") String timeId, @Param("emplid") String emplid) {
- String loginName = StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
- Sql sql = Sqls.create("""
- SELECT
- m.id,
- m.meeting_name AS meetingName,
- m.sign_in_start_time AS signInStartTime,
- m.sign_in_end_time AS signInEndTime,
- m.session_id AS sessionId,
- m.time_id AS timeId,
- m.remark,
- (
- SELECT COUNT(1)
- FROM congress_sign_in s
- WHERE s.meeting_id = m.id
- AND IFNULL(s.deleted, 0) = 0
- ) AS signInCount,
- si.id AS signInId,
- si.create_time AS userSignInTime,
- r.id AS repId
- FROM congress_sign_in_meeting m
- LEFT JOIN congress_sign_in si ON m.id = si.meeting_id
- AND IFNULL(si.deleted, 0) = 0
- AND si.emplid = @emplid
- LEFT JOIN congress_rep r ON r.time_id = m.time_id
- AND r.emplid = @emplid
- AND IFNULL(r.deleted, 0) = 0
- WHERE IFNULL(m.deleted, 0) = 0
- AND m.time_id = @timeId
- ORDER BY m.sign_in_start_time DESC, m.create_time DESC
- """);
- sql.setParam("timeId", timeId);
- sql.setParam("emplid", loginName);
- sql.setCallback(Sqls.callback.maps());
- dao.execute(sql);
- return Result.success(sql.getList(NutMap.class));
+ return Result.success(congressH5Service.userMeetingList(timeId, emplid));
}
@At("/signin")
@SaCheckLogin
+ @Aop(TransAop.READ_COMMITTED)
public Result signin(@Param("repId") String repId,
@Param("sessionId") String sessionId,
@Param("timeId") String timeId,
@Param("meetingId") String meetingId) {
- if (StrUtil.hasBlank(repId, sessionId, timeId, meetingId)) {
- return Result.error("签到参数不完整");
- }
- int count = countBySql("""
- SELECT COUNT(1)
- FROM congress_sign_in
- WHERE rep_id = @repId
- AND meeting_id = @meetingId
- AND IFNULL(deleted, 0) = 0
- """, NutMap.NEW().addv("repId", repId).addv("meetingId", meetingId));
- if (count > 0) {
- return Result.success(true);
- }
-
- Sql repSql = Sqls.create("""
- SELECT id, emplid, name, delegation_id AS delegationId
- FROM congress_rep
- WHERE id = @repId
- AND IFNULL(deleted, 0) = 0
- LIMIT 1
- """);
- repSql.setParam("repId", repId);
- repSql.setCallback(Sqls.callback.map());
- dao.execute(repSql);
- NutMap rep = repSql.getObject(NutMap.class);
- if (rep == null) {
- return Result.error("未找到代表信息");
- }
-
- dao.insert("congress_sign_in", Chain.make("id", R.UU32())
- .add("session_id", sessionId)
- .add("time_id", timeId)
- .add("meeting_id", meetingId)
- .add("delegation_id", rep.getString("delegationId"))
- .add("rep_id", repId)
- .add("emplid", rep.getString("emplid"))
- .add("name", rep.getString("name"))
- .add("create_time", new Date())
- .add("update_time", new Date())
- .add("deleted", false));
- return Result.success(true);
+ return congressH5Service.signin(repId, sessionId, timeId, meetingId);
}
@At("/votingIssue")
@SaCheckLogin
public Result votingIssue(@Param("materialsId") String materialsId, @Param("repId") String repId) {
- Sql sql = Sqls.create("""
- SELECT
- i.id,
- i.session_id AS sessionId,
- i.session_name AS sessionName,
- i.time_id AS timeId,
- i.time_name AS timeName,
- i.name,
- i.description,
- i.content,
- i.voting_type AS votingType,
- i.voting_start_time AS votingStartTime,
- i.voting_end_time AS votingEndTime,
- i.voting_content AS votingContent,
- i.voting_content_item_header AS votingContentItemHeader,
- i.voting_content_option_header AS votingContentOptionHeader,
- i.materials_id AS materialsId,
- i.type_id AS typeId,
- i.delegation_id AS delegationId,
- mt.name AS typeName,
- CASE WHEN vr.id IS NULL THEN false ELSE true END AS voted,
- vr.vote_result AS voteResult
- FROM congress_voting_issue i
- LEFT JOIN congress_materials_type mt ON mt.id = i.type_id AND IFNULL(mt.deleted, 0) = 0
- LEFT JOIN congress_voting_record vr ON vr.issue_id = i.id
- AND vr.rep_id = @repId
- AND IFNULL(vr.deleted, 0) = 0
- WHERE i.materials_id = @materialsId
- AND IFNULL(i.deleted, 0) = 0
- LIMIT 1
- """);
- sql.setParam("materialsId", materialsId);
- sql.setParam("repId", repId);
- sql.setCallback(Sqls.callback.map());
- dao.execute(sql);
- return Result.success(sql.getObject(NutMap.class));
+ return Result.success(congressH5Service.votingIssue(materialsId, repId));
}
@At("/api/vote")
@SaCheckLogin
+ @Aop(TransAop.READ_COMMITTED)
public Result voteSubmit(@Param("issueId") String issueId,
@Param("repId") String repId,
@Param("sessionId") String sessionId,
@Param("timeId") String timeId,
@Param("delegationId") String delegationId,
@Param("voteResult") String voteResult) {
- if (StrUtil.hasBlank(issueId, repId, sessionId, timeId, voteResult)) {
- return Result.error("投票参数不完整");
- }
- int count = countBySql("""
- SELECT COUNT(1)
- FROM congress_voting_record
- WHERE issue_id = @issueId
- AND rep_id = @repId
- AND IFNULL(deleted, 0) = 0
- """, NutMap.NEW().addv("issueId", issueId).addv("repId", repId));
- if (count > 0) {
- return Result.error("您已投票,请勿重复提交");
- }
-
- Sql repSql = Sqls.create("""
- SELECT user_id AS userId, emplid, name
- FROM congress_rep
- WHERE id = @repId
- AND IFNULL(deleted, 0) = 0
- LIMIT 1
- """);
- repSql.setParam("repId", repId);
- repSql.setCallback(Sqls.callback.map());
- dao.execute(repSql);
- NutMap rep = repSql.getObject(NutMap.class);
- if (rep == null) {
- return Result.error("未找到代表信息");
- }
-
- dao.insert("congress_voting_record", Chain.make("id", R.UU32())
- .add("issue_id", issueId)
- .add("rep_id", repId)
- .add("emplid", rep.getString("emplid"))
- .add("name", rep.getString("name"))
- .add("session_id", sessionId)
- .add("time_id", timeId)
- .add("delegation_id", delegationId)
- .add("vote_result", voteResult)
- .add("user_id", rep.getString("userId"))
- .add("create_time", new Date())
- .add("update_time", new Date())
- .add("deleted", false));
- return Result.success();
- }
-
- private int countBySql(String sqlText, NutMap params) {
- Sql sql = Sqls.create(sqlText);
- params.forEach(sql::setParam);
- sql.setCallback(Sqls.callback.integer());
- dao.execute(sql);
- return sql.getInt();
+ return congressH5Service.voteSubmit(issueId, repId, sessionId, timeId, delegationId, voteResult);
}
}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressH5Service.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressH5Service.java
new file mode 100644
index 00000000..a7c2b366
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/CongressH5Service.java
@@ -0,0 +1,24 @@
+package com.budwk.app.zhgh.democratic.congress.service;
+
+import com.budwk.app.base.result.Result;
+import org.nutz.lang.util.NutMap;
+
+import java.util.List;
+
+public interface CongressH5Service {
+
+ List repTimes(String emplid);
+
+ List materialsTypeList();
+
+ List materialsList(String typeId, String sessionId, String emplid);
+
+ List userMeetingList(String sessionId, String emplid);
+
+ Result signin(String repId, String sessionId, String timeId, String meetingId);
+
+ NutMap votingIssue(String materialsId, String repId);
+
+ Result voteSubmit(String issueId, String repId, String sessionId, String timeId,
+ String delegationId, String voteResult);
+}
diff --git a/src/main/java/com/budwk/app/zhgh/democratic/congress/service/impl/CongressH5ServiceImpl.java b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/impl/CongressH5ServiceImpl.java
new file mode 100644
index 00000000..373bb124
--- /dev/null
+++ b/src/main/java/com/budwk/app/zhgh/democratic/congress/service/impl/CongressH5ServiceImpl.java
@@ -0,0 +1,340 @@
+package com.budwk.app.zhgh.democratic.congress.service.impl;
+
+import cn.hutool.core.util.StrUtil;
+import com.budwk.app.base.result.Result;
+import com.budwk.app.web.commons.auth.utils.SecurityUtil;
+import com.budwk.app.zhgh.democratic.congress.service.CongressH5Service;
+import org.nutz.dao.Chain;
+import org.nutz.dao.Dao;
+import org.nutz.dao.Sqls;
+import org.nutz.dao.sql.Sql;
+import org.nutz.ioc.loader.annotation.Inject;
+import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.random.R;
+import org.nutz.lang.util.NutMap;
+
+import java.util.Date;
+import java.util.List;
+
+@IocBean
+public class CongressH5ServiceImpl implements CongressH5Service {
+
+ @Inject
+ private Dao dao;
+
+ @Override
+ public List repTimes(String emplid) {
+ String loginName = loginName(emplid);
+ Sql sql = Sqls.create("""
+ SELECT
+ s.id,
+ s.id AS timeId,
+ COALESCE(s.fullName, CONCAT(s.year, '年职代会')) AS name,
+ s.year,
+ s.id AS sessionId,
+ s.fullName AS sessionName,
+ NULL AS type,
+ d.id AS repId,
+ d.delegationId AS delegationId,
+ dg.name AS delegationName
+ FROM teacher_congress_delegate d
+ INNER JOIN teacher_congress_session s ON s.id = d.sessionId
+ AND COALESCE(s.delFlag, 0) = 0
+ LEFT JOIN teacher_congress_delegation dg ON dg.id = d.delegationId
+ AND COALESCE(dg.delFlag, 0) = 0
+ WHERE d.loginName = @emplid
+ AND COALESCE(d.delFlag, 0) = 0
+ ORDER BY s.startDate DESC, s.createdAt DESC, s.id DESC
+ """);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ @Override
+ public List materialsTypeList() {
+ Sql sql = Sqls.create("""
+ SELECT
+ SUBSTRING_INDEX(
+ GROUP_CONCAT(
+ id
+ ORDER BY
+ CASE
+ WHEN id IN (
+ 'congress_type_file_notice',
+ 'congress_type_evaluation_vote',
+ 'congress_type_issue_vote',
+ 'congress_type_vote_notice',
+ 'congress_type_prepare_material'
+ ) THEN 0
+ ELSE 1
+ END,
+ sort_no ASC,
+ create_time ASC
+ ),
+ ',',
+ 1
+ ) AS id,
+ MIN(sort_no) AS sortNo,
+ name,
+ MAX(is_vote) AS isVote
+ FROM congress_materials_type
+ WHERE COALESCE(deleted, 0) = 0
+ GROUP BY name
+ ORDER BY sortNo ASC, name ASC
+ """);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ @Override
+ public List materialsList(String typeId, String sessionId, String emplid) {
+ String loginName = loginName(emplid);
+ Sql sql = Sqls.create("""
+ SELECT
+ cm.id,
+ cm.session_id AS sessionId,
+ COALESCE(cm.time_id, cm.session_id) AS timeId,
+ cm.type_id AS typeId,
+ cm.sort_no AS sortNo,
+ cm.name,
+ cm.file_name AS fileName,
+ cm.file_url AS fileUrl,
+ cm.file_type AS fileType,
+ cm.file_size AS fileSize,
+ cm.create_time AS uploadTime,
+ CASE
+ WHEN cvi.id IS NULL THEN NULL
+ WHEN cvr.id IS NOT NULL THEN true
+ ELSE false
+ END AS hasVoted,
+ CASE WHEN cvr.id IS NOT NULL THEN true ELSE false END AS voted
+ FROM congress_materials cm
+ INNER JOIN teacher_congress_delegate d ON d.sessionId = cm.session_id
+ AND d.loginName = @emplid
+ AND COALESCE(d.delFlag, 0) = 0
+ INNER JOIN congress_materials_type cmt ON cm.type_id = cmt.id
+ AND COALESCE(cmt.deleted, 0) = 0
+ LEFT JOIN congress_voting_issue cvi ON cm.id = cvi.materials_id
+ AND COALESCE(cvi.deleted, 0) = 0
+ AND COALESCE(cmt.is_vote, 0) = 1
+ LEFT JOIN congress_voting_record cvr ON cvi.id = cvr.issue_id
+ AND (cvr.rep_id = d.id OR cvr.emplid = @emplid)
+ AND COALESCE(cvr.deleted, 0) = 0
+ WHERE COALESCE(cm.deleted, 0) = 0
+ AND cm.type_id = @typeId
+ AND (cm.session_id = @sessionId OR cm.time_id = @sessionId)
+ ORDER BY cm.sort_no ASC, cm.create_time DESC
+ """);
+ sql.setParam("typeId", typeId);
+ sql.setParam("sessionId", sessionId);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ @Override
+ public List userMeetingList(String sessionId, String emplid) {
+ String loginName = loginName(emplid);
+ Sql sql = Sqls.create("""
+ SELECT
+ m.id,
+ m.meeting_name AS meetingName,
+ m.sign_in_start_time AS signInStartTime,
+ m.sign_in_end_time AS signInEndTime,
+ m.session_id AS sessionId,
+ COALESCE(m.time_id, m.session_id) AS timeId,
+ m.remark,
+ (
+ SELECT COUNT(1)
+ FROM congress_sign_in s
+ WHERE s.meeting_id = m.id
+ AND COALESCE(s.deleted, 0) = 0
+ ) AS signInCount,
+ si.id AS signInId,
+ si.create_time AS userSignInTime,
+ d.id AS repId
+ FROM congress_sign_in_meeting m
+ INNER JOIN teacher_congress_delegate d ON d.sessionId = m.session_id
+ AND d.loginName = @emplid
+ AND COALESCE(d.delFlag, 0) = 0
+ LEFT JOIN congress_sign_in si ON m.id = si.meeting_id
+ AND COALESCE(si.deleted, 0) = 0
+ AND si.rep_id = d.id
+ WHERE COALESCE(m.deleted, 0) = 0
+ AND (m.session_id = @sessionId OR m.time_id = @sessionId)
+ ORDER BY m.sign_in_start_time DESC, m.create_time DESC
+ """);
+ sql.setParam("sessionId", sessionId);
+ sql.setParam("emplid", loginName);
+ sql.setCallback(Sqls.callback.maps());
+ dao.execute(sql);
+ return sql.getList(NutMap.class);
+ }
+
+ @Override
+ public Result signin(String repId, String sessionId, String timeId, String meetingId) {
+ if (StrUtil.hasBlank(repId, sessionId, meetingId)) {
+ return Result.error("签到参数不完整");
+ }
+ int count = count("""
+ SELECT COUNT(1)
+ FROM congress_sign_in
+ WHERE rep_id = @repId
+ AND meeting_id = @meetingId
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("repId", repId).addv("meetingId", meetingId));
+ if (count > 0) {
+ return Result.success(true);
+ }
+
+ NutMap rep = fetchMap("""
+ SELECT id, userId, loginName, userName, delegationId
+ FROM teacher_congress_delegate
+ WHERE id = @repId
+ AND sessionId = @sessionId
+ AND COALESCE(delFlag, 0) = 0
+ LIMIT 1
+ """, NutMap.NEW().addv("repId", repId).addv("sessionId", sessionId));
+ if (rep == null) {
+ return Result.error("当前用户不是该届次职工代表,无法签到");
+ }
+
+ dao.insert("congress_sign_in", Chain.make("id", R.UU32())
+ .add("session_id", sessionId)
+ .add("time_id", StrUtil.blankToDefault(timeId, sessionId))
+ .add("meeting_id", meetingId)
+ .add("delegation_id", rep.getString("delegationId"))
+ .add("rep_id", repId)
+ .add("emplid", rep.getString("loginName"))
+ .add("name", rep.getString("userName"))
+ .add("create_time", new Date())
+ .add("update_time", new Date())
+ .add("deleted", false));
+ return Result.success(true);
+ }
+
+ @Override
+ public NutMap votingIssue(String materialsId, String repId) {
+ Sql sql = Sqls.create("""
+ SELECT
+ i.id,
+ i.session_id AS sessionId,
+ i.session_name AS sessionName,
+ COALESCE(i.time_id, i.session_id) AS timeId,
+ i.time_name AS timeName,
+ i.name,
+ i.description,
+ i.content,
+ i.voting_type AS votingType,
+ i.voting_start_time AS votingStartTime,
+ i.voting_end_time AS votingEndTime,
+ i.voting_content AS votingContent,
+ i.voting_content_item_header AS votingContentItemHeader,
+ i.voting_content_option_header AS votingContentOptionHeader,
+ i.materials_id AS materialsId,
+ i.type_id AS typeId,
+ i.delegation_id AS delegationId,
+ mt.name AS typeName,
+ CASE WHEN vr.id IS NULL THEN false ELSE true END AS voted,
+ vr.vote_result AS voteResult
+ FROM congress_voting_issue i
+ INNER JOIN teacher_congress_delegate d ON d.id = @repId
+ AND d.sessionId = i.session_id
+ AND COALESCE(d.delFlag, 0) = 0
+ LEFT JOIN congress_materials_type mt ON mt.id = i.type_id
+ AND COALESCE(mt.deleted, 0) = 0
+ LEFT JOIN congress_voting_record vr ON vr.issue_id = i.id
+ AND (vr.rep_id = d.id OR vr.emplid = d.loginName)
+ AND COALESCE(vr.deleted, 0) = 0
+ WHERE i.materials_id = @materialsId
+ AND COALESCE(i.deleted, 0) = 0
+ LIMIT 1
+ """);
+ sql.setParam("materialsId", materialsId);
+ sql.setParam("repId", repId);
+ sql.setCallback(Sqls.callback.map());
+ dao.execute(sql);
+ return sql.getObject(NutMap.class);
+ }
+
+ @Override
+ public Result voteSubmit(String issueId, String repId, String sessionId, String timeId,
+ String delegationId, String voteResult) {
+ if (StrUtil.hasBlank(issueId, repId, sessionId, voteResult)) {
+ return Result.error("投票参数不完整");
+ }
+ NutMap issue = fetchMap("""
+ SELECT id, session_id AS sessionId, COALESCE(time_id, session_id) AS timeId
+ FROM congress_voting_issue
+ WHERE id = @issueId
+ AND session_id = @sessionId
+ AND COALESCE(deleted, 0) = 0
+ LIMIT 1
+ """, NutMap.NEW().addv("issueId", issueId).addv("sessionId", sessionId));
+ if (issue == null) {
+ return Result.error("投票议题不存在");
+ }
+
+ NutMap rep = fetchMap("""
+ SELECT id, userId, loginName, userName, delegationId
+ FROM teacher_congress_delegate
+ WHERE id = @repId
+ AND sessionId = @sessionId
+ AND COALESCE(delFlag, 0) = 0
+ LIMIT 1
+ """, NutMap.NEW().addv("repId", repId).addv("sessionId", sessionId));
+ if (rep == null) {
+ return Result.error("当前用户不是该届次职工代表,无法投票");
+ }
+
+ int count = count("""
+ SELECT COUNT(1)
+ FROM congress_voting_record
+ WHERE issue_id = @issueId
+ AND rep_id = @repId
+ AND COALESCE(deleted, 0) = 0
+ """, NutMap.NEW().addv("issueId", issueId).addv("repId", repId));
+ if (count > 0) {
+ return Result.error("您已投票,请勿重复提交");
+ }
+
+ dao.insert("congress_voting_record", Chain.make("id", R.UU32())
+ .add("issue_id", issueId)
+ .add("rep_id", repId)
+ .add("emplid", rep.getString("loginName"))
+ .add("name", rep.getString("userName"))
+ .add("session_id", sessionId)
+ .add("time_id", StrUtil.blankToDefault(timeId, issue.getString("timeId")))
+ .add("delegation_id", StrUtil.blankToDefault(delegationId, rep.getString("delegationId")))
+ .add("vote_result", voteResult)
+ .add("user_id", rep.getString("userId"))
+ .add("create_time", new Date())
+ .add("update_time", new Date())
+ .add("deleted", false));
+ return Result.success();
+ }
+
+ private String loginName(String emplid) {
+ return StrUtil.blankToDefault(emplid, SecurityUtil.getUserLoginname());
+ }
+
+ private NutMap fetchMap(String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ sql.setCallback(Sqls.callback.map());
+ dao.execute(sql);
+ return sql.getObject(NutMap.class);
+ }
+
+ private int count(String sqlText, NutMap params) {
+ Sql sql = Sqls.create(sqlText);
+ params.forEach(sql::setParam);
+ sql.setCallback(Sqls.callback.integer());
+ dao.execute(sql);
+ return sql.getInt();
+ }
+}
diff --git a/src/main/resources/views/layouts/platform_h5.html b/src/main/resources/views/layouts/platform_h5.html
index 50966147..a37a9c31 100644
--- a/src/main/resources/views/layouts/platform_h5.html
+++ b/src/main/resources/views/layouts/platform_h5.html
@@ -112,8 +112,11 @@
$(document).on("pjax:complete", function () {
if (window.customStyleList) {
window.customStyleList.forEach((style) => {
- style.parentNode.removeChild(style)
+ if (style && style.parentNode) {
+ style.parentNode.removeChild(style)
+ }
})
+ window.customStyleList = null
}
NProgress.done()
toggleShowBar()
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/index.html b/src/main/resources/views/platform/zhghh5/democratic/congress/index.html
index 2566f048..4c0fc779 100644
--- a/src/main/resources/views/platform/zhghh5/democratic/congress/index.html
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/index.html
@@ -15,8 +15,12 @@ layout("/layouts/platform_h5.html"){
@@ -41,12 +45,6 @@ layout("/layouts/platform_h5.html"){
-
-
-
- 切换届次
-
-
@@ -69,6 +67,7 @@ layout("/layouts/platform_h5.html"){
loading: true,
timesList: [],
selectedTimeId: "",
+ selectedSessionId: "",
selectedTimeText: "",
selectedSessionName: "",
selectedRepId: "",
@@ -80,7 +79,7 @@ layout("/layouts/platform_h5.html"){
formattedTimeColumns() {
return this.timesList.map((item) => ({
text: item.name,
- value: item.id
+ value: item.timeId || item.id || item.sessionId
}))
}
},
@@ -90,7 +89,8 @@ layout("/layouts/platform_h5.html"){
try {
await this.fetchRepTimes()
if (this.timesList.length > 0) {
- this.selectTime(this.timesList[0])
+ const initialTimeId = this.initialTimeId()
+ this.selectTime(this.resolveInitialTime(initialTimeId), !!initialTimeId)
await this.fetchModules()
}
} finally {
@@ -108,6 +108,13 @@ layout("/layouts/platform_h5.html"){
this.timesList = res.data || []
}
},
+ initialTimeId() {
+ const params = new URLSearchParams(window.location.search)
+ return params.get("timeId") || params.get("sessionId") || ""
+ },
+ resolveInitialTime(timeId) {
+ return this.timesList.find((item) => this.sameTime(item, timeId)) || this.timesList[0]
+ },
async fetchModules() {
const res = await this.$axios.get("/platform/h5/congress/materialsTypeList")
if (res.code !== 0) return
@@ -125,19 +132,38 @@ layout("/layouts/platform_h5.html"){
desc: "点击进行会议签到"
}].concat(modules)
},
- selectTime(item) {
- this.selectedTimeId = item.id || item.timeId || ""
+ selectTime(item, syncUrl) {
+ this.selectedTimeId = item.timeId || item.id || item.sessionId || ""
+ this.selectedSessionId = item.sessionId || this.selectedTimeId
this.selectedTimeText = item.name || ""
this.selectedSessionName = item.sessionName || ""
this.selectedRepId = item.repId || ""
+ window.localStorage.setItem("congressTimeId", this.selectedTimeId)
+ window.localStorage.setItem("congressSessionId", this.selectedSessionId)
window.localStorage.setItem("timeName", this.selectedTimeText)
window.localStorage.setItem("sessionName", this.selectedSessionName)
window.localStorage.setItem("repId", this.selectedRepId)
+ if (syncUrl) {
+ this.syncSelectedTimeToUrl()
+ }
+ },
+ sameTime(item, timeId) {
+ if (!item || !timeId) return false
+ return item.id === timeId || item.timeId === timeId || item.sessionId === timeId
+ },
+ syncSelectedTimeToUrl() {
+ if (!this.selectedTimeId) return
+ const params = new URLSearchParams(window.location.search)
+ params.set("timeId", this.selectedTimeId)
+ const nextUrl = window.location.pathname + "?" + params.toString()
+ const state = Object.assign({}, window.history.state || {})
+ state.url = nextUrl
+ window.history.replaceState(state, document.title, nextUrl)
},
onTimeConfirm(value) {
- const selected = this.timesList.find((item) => item.id === value.value)
+ const selected = this.timesList.find((item) => this.sameTime(item, value.value))
if (selected) {
- this.selectTime(selected)
+ this.selectTime(selected, true)
this.fetchModules()
}
this.showTimePicker = false
@@ -148,13 +174,15 @@ layout("/layouts/platform_h5.html"){
return
}
if (module.id === "signin" || module.name.indexOf("会议签到") > -1) {
- this.$pjaxReplace("/platform/h5/congress/meeting/list?moduleId=signin&moduleName=会议签到&timeId=" + encodeURIComponent(this.selectedTimeId))
+ this.$pjaxReplace("/platform/h5/congress/meeting/list?moduleId=signin&moduleName=会议签到&timeId=" + encodeURIComponent(this.selectedTimeId) +
+ "&sessionId=" + encodeURIComponent(this.selectedSessionId))
return
}
this.$pjaxReplace("/platform/h5/congress/materials/list?moduleId=" + encodeURIComponent(module.id) +
"&typeId=" + encodeURIComponent(module.id) +
"&moduleName=" + encodeURIComponent(module.name) +
- "&timeId=" + encodeURIComponent(this.selectedTimeId))
+ "&timeId=" + encodeURIComponent(this.selectedTimeId) +
+ "&sessionId=" + encodeURIComponent(this.selectedSessionId))
},
resolveIcon(name) {
if (!name) return "orders-o"
@@ -191,12 +219,13 @@ layout("/layouts/platform_h5.html"){
.page-header {
background: linear-gradient(135deg, #1989fa 0%, #0d6efd 100%);
- padding: 24px 16px 28px;
+ padding: 34px 16px 28px;
color: #fff;
box-shadow: 0 4px 16px rgba(25, 137, 250, 0.15);
display: flex;
justify-content: center;
align-items: center;
+ position: relative;
}
.session-info-card {
@@ -221,6 +250,31 @@ layout("/layouts/platform_h5.html"){
margin: 0;
}
+ .header-switch-btn {
+ position: absolute;
+ top: 10px;
+ right: 12px;
+ height: 28px;
+ padding: 0 10px;
+ border: 0;
+ border-radius: 14px;
+ background: rgba(255, 255, 255, 0.18);
+ color: #fff;
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
+ font-size: 12px;
+ line-height: 1;
+ cursor: pointer;
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
+ backdrop-filter: blur(8px);
+ }
+
+ .header-switch-btn:active {
+ background: rgba(255, 255, 255, 0.28);
+ transform: scale(0.98);
+ }
+
.module-list-container {
padding: 16px;
}
@@ -327,22 +381,6 @@ layout("/layouts/platform_h5.html"){
transform: translateX(4px);
}
- .bottom-switch-bar {
- padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
- display: flex;
- justify-content: center;
- }
-
- .switch-text {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- font-size: 13px;
- color: #969799;
- cursor: pointer;
- user-select: none;
- }
-
.empty-box {
min-height: calc(100vh - 46px);
display: flex;
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
index e10f48cf..30072ce6 100644
--- a/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html
@@ -3,7 +3,7 @@ layout("/layouts/platform_h5.html"){
#-->
-
+
@@ -16,7 +16,7 @@ layout("/layouts/platform_h5.html"){
-
+
@@ -51,7 +51,8 @@ layout("/layouts/platform_h5.html"){
refreshing: false,
loadedOnce: false,
typeId: "",
- timeId: ""
+ timeId: "",
+ sessionId: ""
}
},
methods: {
@@ -60,6 +61,11 @@ layout("/layouts/platform_h5.html"){
this.pageTitle = params.get("moduleName") || "文件公告"
this.typeId = params.get("typeId") || params.get("moduleId") || ""
this.timeId = params.get("timeId") || ""
+ this.sessionId = params.get("sessionId") || this.timeId
+ },
+ backToCongress() {
+ const timeId = this.timeId || this.sessionId || window.localStorage.getItem("congressTimeId") || ""
+ this.$pjaxReplace("/platform/h5/congress" + (timeId ? "?timeId=" + encodeURIComponent(timeId) : ""))
},
loginName() {
const user = (this.$store.state && this.$store.state.user) || JSON.parse(window.sessionStorage.getItem("user") || "{}")
@@ -95,16 +101,39 @@ layout("/layouts/platform_h5.html"){
this.refreshing = false
})
},
- getFileIcon(mimeType) {
- if (!mimeType) return "description"
- const type = String(mimeType).toLowerCase()
- if (type.indexOf("pdf") > -1) return "description"
- if (type.indexOf("word") > -1) return "edit"
- if (type.indexOf("excel") > -1 || type.indexOf("sheet") > -1) return "chart-trending-o"
- if (type.indexOf("powerpoint") > -1 || type.indexOf("presentation") > -1) return "play-circle-o"
- if (type.indexOf("image") > -1) return "photo"
- if (type.indexOf("zip") > -1 || type.indexOf("rar") > -1) return "bag-o"
- return "description"
+ getFileIconUrl(item) {
+ return this.$commonUtil.getFileItemShowIcon(this.resolveFileSuffix(item))
+ },
+ resolveFileSuffix(item) {
+ const fileType = String(item.fileType || "").replace(".", "").toLowerCase()
+ if (this.isKnownSuffix(fileType)) return fileType
+
+ const fileNameSuffix = this.extractSuffix(item.fileName || item.name || "")
+ if (fileNameSuffix) return fileNameSuffix
+
+ const fileUrlSuffix = this.extractSuffix((item.fileUrl || "").split("?")[0])
+ if (fileUrlSuffix) return fileUrlSuffix
+
+ if (fileType.indexOf("pdf") > -1) return "pdf"
+ if (fileType.indexOf("word") > -1) return "docx"
+ if (fileType.indexOf("excel") > -1 || fileType.indexOf("sheet") > -1) return "xlsx"
+ if (fileType.indexOf("powerpoint") > -1 || fileType.indexOf("presentation") > -1) return "pptx"
+ if (fileType.indexOf("image") > -1) return "jpg"
+ if (fileType.indexOf("zip") > -1 || fileType.indexOf("rar") > -1) return "zip"
+ if (fileType.indexOf("text") > -1) return "txt"
+ if (fileType.indexOf("video") > -1) return "mp4"
+ if (fileType.indexOf("audio") > -1) return "mp3"
+ return ""
+ },
+ extractSuffix(value) {
+ const text = String(value || "").trim()
+ const index = text.lastIndexOf(".")
+ if (index < 0 || index === text.length - 1) return ""
+ const suffix = text.substring(index + 1).toLowerCase()
+ return this.isKnownSuffix(suffix) ? suffix : ""
+ },
+ isKnownSuffix(suffix) {
+ return ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "zip", "rar", "jpg", "jpeg", "png", "gif", "bmp", "webp", "mp4", "avi", "wmv", "rmvb", "flv", "mkv", "mp3", "wav", "wma", "flac", "ape"].indexOf(suffix) > -1
},
formatTime(time) {
if (!time) return ""
@@ -126,12 +155,26 @@ layout("/layouts/platform_h5.html"){
return
}
this.$pjaxReplace("/platform/h5/congress/pdf?pdfPath=" + encodeURIComponent(item.fileUrl) +
- "&fileName=" + encodeURIComponent(item.fileName || item.name || ""))
+ "&fileName=" + encodeURIComponent(item.fileName || item.name || "") +
+ "&fileType=" + encodeURIComponent(item.fileType || "") +
+ "&sysFileId=" + encodeURIComponent(this.resolveSysFileId(item.fileUrl)))
},
openVotePdf(item) {
this.$pjaxReplace("/platform/h5/congress/pdf?pdfPath=" + encodeURIComponent(item.fileUrl || "") +
"&fileName=" + encodeURIComponent(item.fileName || item.name || "") +
- "&fileId=" + encodeURIComponent(item.id || ""))
+ "&materialsId=" + encodeURIComponent(item.id || "") +
+ "&fileType=" + encodeURIComponent(item.fileType || "") +
+ "&sysFileId=" + encodeURIComponent(this.resolveSysFileId(item.fileUrl)))
+ },
+ resolveSysFileId(fileUrl) {
+ if (!fileUrl) return ""
+ try {
+ const url = new URL(fileUrl, window.location.origin)
+ return url.searchParams.get("id") || ""
+ } catch (e) {
+ const match = String(fileUrl).match(/[?&]id=([^&]+)/)
+ return match ? decodeURIComponent(match[1]) : ""
+ }
},
isVoted(value) {
return value === true || value === 1 || value === "1" || value === "true"
@@ -224,12 +267,19 @@ layout("/layouts/platform_h5.html"){
.icon-wrapper {
width: 52px;
height: 52px;
- border-radius: 14px;
- background: linear-gradient(135deg, #f0f5ff 0%, #e6f0ff 100%);
+ border-radius: 12px;
+ background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
- color: #1989fa;
+ border: 1px solid #eef0f4;
+ }
+
+ .file-type-icon {
+ width: 38px;
+ height: 38px;
+ display: block;
+ object-fit: contain;
}
.card-content {
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html b/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
index 428c783d..cdb86587 100644
--- a/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/meeting/list.html
@@ -3,7 +3,7 @@ layout("/layouts/platform_h5.html"){
#-->
-
+
@@ -63,13 +63,19 @@ layout("/layouts/platform_h5.html"){
finished: false,
refreshing: false,
loadedOnce: false,
- timeId: ""
+ timeId: "",
+ sessionId: ""
}
},
methods: {
initQuery() {
const params = new URLSearchParams(window.location.search)
this.timeId = params.get("timeId") || ""
+ this.sessionId = params.get("sessionId") || this.timeId
+ },
+ backToCongress() {
+ const timeId = this.timeId || this.sessionId || window.localStorage.getItem("congressTimeId") || ""
+ this.$pjaxReplace("/platform/h5/congress" + (timeId ? "?timeId=" + encodeURIComponent(timeId) : ""))
},
loginName() {
const user = (this.$store.state && this.$store.state.user) || JSON.parse(window.sessionStorage.getItem("user") || "{}")
diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html b/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
index 92193c39..81d1eacd 100644
--- a/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
+++ b/src/main/resources/views/platform/zhghh5/democratic/congress/pdf.html
@@ -4,11 +4,15 @@ layout("/layouts/platform_h5.html"){
-
+
-
-
+
+
![]()
+
+
+
+