# assessments **Repository Path**: zgz521/assessments ## Basic Information - **Project Name**: assessments - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-08 - **Last Updated**: 2026-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 打分系统 API 文档 ## 基础信息 **服务地址**:`http://8.155.59.169:9204` **核心功能**:打分代码生成、用户数据导入、打分管理 --- ## 核心接口 ### 1. 创建打分代码 ``` POST /code/generate ``` **请求参数**(JSON格式): ```json { "year": 2025, "type": "群众打分", "percent": 0.3, "count": 47, "expireTime": "2026-02-01", "status": 0 } ``` **参数说明**: | 参数名 | 类型 | 必填 | 说明 | |--------|------|------|------| | `year` | number | 是 | 打分年份 | | `type` | string | 是 | 打分类型(如:群众打分) | | `percent` | number | 否 | 抽样比例(0-1) | | `count` | number | 否 | 生成数量 | | `expireTime` | string | 否 | 代码过期时间(YYYY-MM-DD) | | `status` | number | 否 | 状态码(0:未启用 1:启用) | --- ### 2. 导入模板下载 ``` GET /user/in-template ``` **功能说明**: 下载标准化的用户数据导入模板(Excel格式) --- ### 3. 导入打分用户 ``` POST /user/input ``` **请求方式**:`form-data` **参数要求**: ``` file=用户数据.xlsx ``` **操作说明**: 1. 先通过模板下载接口获取标准模板 2. 填写用户数据后上传 3. 支持批量导入 --- ## 打分管理接口 ### 1. 代码领取接口 ``` GET /get-code?year=2025&type=群众打分 ``` **URL编码示例**: ``` http://8.155.59.169:9204/get-code?year=2025&type=%E7%BE%A4%E4%BC%97%E6%89%93%E5%88%86 ``` ### 2. 状态查询接口 ``` GET /code-status?type=群众打分&year=2025 ``` **响应示例**: ```json { "generatedCount": 47, "usedCount": 12, "remainingCount": 35, "expireDate": "2026-02-01" } ``` --- ## 打分入口 ``` http://8.155.59.169:9204 ``` (直接访问进入打分主页面) --- ## 类型编码对照表 | 中文类型 | URL编码 | |----------|---------| | 领导打分 | `%E9%A2%86%E5%AF%BC%E6%89%93%E5%88%86` | | 考评小组打分 | `%E8%80%83%E8%AF%84%E5%B0%8F%E7%BB%84%E6%89%93%E5%88%86` | | 群众打分 | `%E7%BE%A4%E4%BC%97%E6%89%93%E5%88%86` | --- ## 发送消息给管理人员 ``` http://8.155.59.169:9204/get-code?year=2025&type=%E9%A2%86%E5%AF%BC%E6%89%93%E5%88%86 领导打分代码领取 http://8.155.59.169:9204/get-code?year=2025&type=%E8%80%83%E8%AF%84%E5%B0%8F%E7%BB%84%E6%89%93%E5%88%86 考评小组打分代码领取 http://8.155.59.169:9204/get-code?year=2025&type=%E7%BE%A4%E4%BC%97%E6%89%93%E5%88%86 群众打分代码领取 http://8.155.59.169:9204 打分链接 http://8.155.59.169:9204/code-status?type=%E9%A2%86%E5%AF%BC%E6%89%93%E5%88%86&year=2025 领导打分代码领取状态查看 http://8.155.59.169:9204/code-status?type=%E8%80%83%E8%AF%84%E5%B0%8F%E7%BB%84%E6%89%93%E5%88%86&year=2025 考评小组打分代码领取状态查看 http://8.155.59.169:9204/code-status?type=%E7%BE%A4%E4%BC%97%E6%89%93%E5%88%86&year=2025 群众打分代码领取状态查看 ``` ## 启动 ``` docker run -d -p 9056:80 \ -e PORT=80 \ -e DB_HOST=localhost \ -e DB_USERNAME=root \ -e DB_PASSWORD="123456" \ -e DB_PORT=9036 \ -e DB_DATABASE=assessments \ -e DB_SYNCHRONIZE=true \ --name assessments_container assessments:latest ``` ## 注意事项 1. 所有接口返回格式均为JSON 2. 中文参数必须进行URL编码 3. 文件导入时请检查Excel格式是否符合模板要求 4. 生产环境建议配置HTTPS --- ## 更新日志 | 日期 | 版本 | 更新内容 | |------|------|----------| | 2025-02 | v1.1 | 新增代码生成接口和用户导入功能 | ---