diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..8b7a05c3d992d44eecc63a079b1ca0be12ab00c1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,121 @@ +# Wisdom Master Municipal Smart Management System + +This project is a backend service for a municipal engineering smart management system, built on mainstream technologies including **Spring Boot 2.7.x**, **MyBatis-Plus**, and **Redis**. It integrates a comprehensive workflow engine, digital signature system, and DingTalk integration, making it suitable for departments such as road maintenance and municipal engineering management. + +## Core Features + +* **Municipal Work Order Management**: Supports full lifecycle management including creation, bulk import, multi-level approval (district supervisor, department head), rejection, and resubmission. +* **Repair Menu & Engineering Voucher**: Provides summary of repair menus, generation of engineering vouchers, workload calculation, and review functionality. +* **Digital Signature**: Built-in modules for generating handwritten signatures and artistic text signatures for electronic approval audit trails. +* **Workflow Engine**: Flexible workflow management based on **Activiti** or custom controls, supporting process initiation, approval, withdrawal, and node diagram viewing. +* **Data Permissions**: Robust data permission control supporting isolation by department, district, and other dimensions. +* **System Integration**: + * **DingTalk Integration**: Supports DingTalk QR code login, user information synchronization, and department synchronization. + * **Code Generator**: Automatically generates Controller, Service, Mapper, Entity, and Vue code based on database table structures. + * **Scheduled Tasks**: Integrates Quartz for scheduled job orchestration and logging monitoring. + +## Technology Stack + +* **Core Framework**: Spring Boot 2.7.x +* **Security Framework**: Spring Security 5.x + JWT Token +* **Persistence Layer**: MyBatis-Plus 3.5.x +* **Connection Pool**: Alibaba Druid +* **Caching**: Redis +* **API Documentation**: Swagger 3.0 +* **Scheduled Tasks**: Quartz +* **Logging & Monitoring**: Logback + AOP Log + +## Project Structure + +```text +wisdom-master/ +├── wisdom-admin/ # Backend Management Module (Entry Point, Controller Layer) +│ └── src/main/java/com/wisdom/web/controller/ +│ ├── common/ # CAPTCHA, General Upload/Download +│ ├── hr/ # Human Resources (Leave Applications) +│ ├── municipal/ # Core Municipal Business (Work Orders, Vouchers, Signatures, Workflows) +│ ├── monitor/ # System Monitoring (Cache, Server, Logs) +│ └── system/ # System Management (Users, Roles, Dictionaries, Configurations) +├── wisdom-common/ # Common Module (Utils, Annotations, Constants, Exceptions, VO) +├── wisdom-framework/ # Framework Core (Security Configuration, Data Source Aspect, Web Configuration) +├── wisdom-generator/ # Code Generator Module +├── wisdom-quartz/ # Scheduled Tasks Module +└── wisdom-system/ # Business Logic Layer (Service Layer and Entity Models) +``` + +## Main Functional Modules Description + +### 1. Municipal Work Order +* **Work Order Management**: `MunicipalWorkOrderController` + * Supports regular work orders and road work orders. + * Includes填报 of workload details (`WorkloadDetail`). + * Supports image uploads (defect photos, construction photos, completion photos). +* **Repair Menu**: `RepairMenuController` + * Bulk submission of work orders to generate repair menus. + * Two-level approval: **District Supervisor** and **Department Head**. + * Generates engineering vouchers (`Voucher`). +* **Signature Management**: `SignatureController` + * Generates artistic text signatures (`generateArtText`). + * Saves handwritten signatures (`saveHandwritten`). +* **Workflow Management**: `ProcessController` + * Initiates processes, approves, withdraws. + * Retrieves approval history and workflow node diagrams. + +### 2. System Management +* **User Management**: Supports import/export, password reset, and DingTalk synchronization. +* **Role Management**: Supports data permission configuration (current department, current department and sub-departments, all custom options). +* **Menu Management**: Dynamic routing configuration. + +### 3. Infrastructure +* **Cache Monitoring**: `CacheController` provides Redis key-value viewing and cleanup. +* **Server Monitoring**: `ServerController` monitors CPU, memory, and disk usage. +* **Code Generation**: `GenController` allows visual configuration of table information and source code download. + +## Quick Start + +### Environment Requirements +* JDK 1.8+ +* Maven 3.6+ +* MySQL 5.7+ / 8.0+ +* Redis 6.x+ + +### Database Configuration +1. Create a database in MySQL (e.g., `wisdom_master`). +2. Import the SQL script from the project directory (typically located at `wisdom-admin/src/main/resources/sql/`). +3. Update the database connection details in `wisdom-admin/src/main/resources/application-druid.yml`. + +### Running the Project +```bash +# 1. Clone the code +git clone https://gitee.com/micro_code/wisdom-master.git + +# 2. Compile and package +cd wisdom-master +mvn clean install -DskipTests + +# 3. Run (or directly run WisdomApplication) +cd wisdom-admin +java -jar wisdom-admin.jar +``` + +### API Documentation +After starting the project, access the Swagger documentation at: +`http://localhost:8080/swagger-ui/index.html` + +## Configuration Guide + +Core configurations are located in `wisdom-admin/src/main/resources/application.yml`: +* **Profile**: Specifies the runtime environment (dev/prod). +* **DingTalk**: Configure `corpId`, `appKey`, and `appSecret` to enable DingTalk login and synchronization. +* **Redis**: Configure Redis connection details. +* **Generator**: Configure author name, generation path, and other code generation settings. + +## License + +This project is licensed under the [MIT License](LICENSE). + +## Contributors + +Thank you to everyone who has contributed to this project! + +*(Note: This README is auto-generated based on the code structure. For detailed functionality, refer to the actual code implementation and API documentation.)* \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d91ec5e89f943b8279bf562983c1dde5ed1921af --- /dev/null +++ b/README.md @@ -0,0 +1,123 @@ + + +# 市政智慧管理系统 (Wisdom Master) + +本项目是基于 **Spring Boot 2.7.x**、**MyBatis-Plus**、**Redis** 等主流技术栈构建的市政工程智慧管理系统后端服务。项目集成了完善的工作流引擎、数字化签名系统以及钉钉集成功能,适用于道路维护、市政工程管理等部门。 + +## 核心特性 + +* **市政工单管理**:支持工单的创建、批量导入、多级审核(片区长、科长)、驳回、重提交等全生命周期管理。 +* **工程签证与维修菜单**:提供维修菜单汇总、工程签证单生成、工作量核算及审核功能。 +* **数字化签名**:内置手写签名与艺术字签名生成模块,用于电子审批留痕。 +* **流程引擎**:基于 **Activiti** 或自定义流程控制,实现灵活的流程管理(启动、审批、撤回、查看节点图)。 +* **数据权限**:强大的数据权限控制,支持按部门、片区等维度隔离数据。 +* **系统集成**: + * **钉钉集成**:支持钉钉扫码登录、用户信息同步、部门同步。 + * **代码生成器**:基于数据库表结构自动生成 Controller、Service、Mapper、Entity 及 Vue 代码。 + * **定时任务**:集成 Quartz 实现定时调度与日志监控。 + +## 技术栈 + +* **核心框架**:Spring Boot 2.7.x +* **安全框架**:Spring Security 5.x + JWT Token +* **持久层框架**:MyBatis-Plus 3.5.x +* **连接池**:Alibaba Druid +* **缓存**:Redis +* **API 文档**:Swagger 3.0 +* **定时任务**:Quartz +* **日志监控**:Logback + AOP Log + +## 项目结构 + +```text +wisdom-master/ +├── wisdom-admin/ # 后台管理模块 (启动入口、Controller层) +│ └── src/main/java/com/wisdom/web/controller/ +│ ├── common/ # 验证码、通用上传下载 +│ ├── hr/ # 人事管理 (请假申请) +│ ├── municipal/ # 市政核心业务 (工单、签证、签名、流程) +│ ├── monitor/ # 系统监控 (缓存、服务器、日志) +│ └── system/ # 系统管理 (用户、角色、字典、配置) +├── wisdom-common/ # 通用模块 (工具类、注解、常量、异常、VO) +├── wisdom-framework/ # 框架核心 (安全配置、数据源切面、Web配置) +├── wisdom-generator/ # 代码生成器模块 +├── wisdom-quartz/ # 定时任务模块 +└── wisdom-system/ # 业务逻辑层 (Service层及Entity实体) +``` + +## 主要功能模块说明 + +### 1. 市政工单 (Municipal Work Order) +* **工单管理**:`MunicipalWorkOrderController` + * 支持普通工单和道路工单。 + * 包含工作量明细 (`WorkloadDetail`) 填报。 + * 支持图片上传(病害图、施工图、竣工图)。 +* **维修菜单**:`RepairMenuController` + * 批量提交工单生成维修菜单。 + * **片区长审核**、**科长审核**二级审批。 + * 生成工程签证 (`Voucher`)。 +* **签名管理**:`SignatureController` + * 生成艺术字签名 (`generateArtText`)。 + * 保存手写签名 (`saveHandwritten`)。 +* **流程管理**:`ProcessController` + * 启动流程、审批、撤回。 + * 获取审批历史和节点流程图。 + +### 2. 系统管理 (System) +* **用户管理**:支持导入导出、重置密码、钉钉同步。 +* **角色管理**:支持数据权限配置(本部门、本部门及子部门、全部自定义等)。 +* **菜单管理**:动态路由配置。 + +### 3. 基础设施 +* **缓存监控**:`CacheController` 提供 Redis 缓存键值查看与清理。 +* **服务监控**:`ServerController` 监控 CPU、内存、磁盘信息。 +* **代码生成**:`GenController` 可视化配置表信息并下载源码。 + +## 快速开始 + +### 环境要求 +* JDK 1.8+ +* Maven 3.6+ +* MySQL 5.7+ / 8.0+ +* Redis 6.x+ + +### 数据库配置 +1. 在 MySQL 中创建数据库(例如:`wisdom_master`)。 +2. 导入项目目录下的 SQL 脚本(通常位于 `wisdom-admin/src/main/resources/sql/`)。 +3. 修改 `wisdom-admin/src/main/resources/application-druid.yml` 配置数据库连接信息。 + +### 运行项目 +```bash +# 1. 克隆代码 +git clone https://gitee.com/micro_code/wisdom-master.git + +# 2. 编译打包 +cd wisdom-master +mvn clean install -DskipTests + +# 3. 运行 (或直接运行 WisdomApplication) +cd wisdom-admin +java -jar wisdom-admin.jar +``` + +### API 文档 +启动项目后,访问 Swagger 文档: +`http://localhost:8080/swagger-ui/index.html` + +## 配置说明 + +核心配置位于 `wisdom-admin/src/main/resources/application.yml`: +* **Profile**: 指定运行环境(dev/prod)。 +* **DingTalk**: 配置钉钉 `corpId`, `appKey`, `appSecret` 以启用钉钉登录和同步。 +* **Redis**: 配置 Redis 连接信息。 +* **Generator**: 配置代码生成作者名、生成路径等。 + +## 许可证 + +本项目遵循 [MIT License](LICENSE) 开源协议。 + +## 贡献者 + +感谢所有为这个项目做出贡献的人! + +*(注:本 README 基于代码结构自动生成,具体功能细节请参考代码实现及 API 文档。)* \ No newline at end of file