# 动力电池智溯源分析平台 **Repository Path**: xtitxss/project-development ## Basic Information - **Project Name**: 动力电池智溯源分析平台 - **Description**: 新能源汽车电池追溯与决策分析 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-08-05 - **Last Updated**: 2026-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Power Battery Full Lifecycle Management System (BTLD) ## Project Introduction BTLD (Battery Traceability and Lifecycle Management System) is a professional power battery full lifecycle management platform built on Java (Spring Boot). This project aims to realize digital management and intelligent decision support for the entire process of power batteries from production and delivery, maintenance and repair, recycling, to cascade utilization and dismantling. The project integrates blockchain technology to store evidence for key data, ensuring data authenticity, traceability, and immutability, facilitating compliance development within the new energy industry chain. ## Core Functions 1. **Full Lifecycle Management**: Record every status change (production, repair, recycling, cascade utilization, etc.) starting from the battery leaving the production line, establishing a complete historical profile. 2. **Intelligent Decision Engine**: * **Repair Decision**: Intelligently determine repair plans or scrapping suggestions based on battery status (SOH, voltage, internal resistance, etc.). * **Diversion Decision**: Automatically categorize destinations based on battery status (Cascade Utilization, Recycling/Dismantling). * **Value Assessment**: Calculate the optimal recycling price based on material prices and battery residual value. 3. **Blockchain Evidence Storage**: Upload key business data such as production information, repair records, and quality inspection data to the chain for evidence storage, supporting hash verification and transaction tracing. 4. **Compliance Monitoring**: Monitor battery flow in real-time, detect abnormal data, and generate warnings. 5. **Recall Management**: Support recall batch management, execution progress tracking, and logistics information management. 6. **Data Analysis**: Integrate ClickHouse database to provide big data capabilities such as battery SOH degradation analysis and material price trend prediction. ## Technical Architecture * **Backend Framework**: Spring Boot 2.7 + MyBatis-Plus * **Database**: MySQL (Main Business Data) + ClickHouse (Massive Data Analysis) * **Cache**: Redis * **Blockchain Underlying Layer**: FISCO BCOS (Interacted via Webase node) * **Permission Management**: Spring Security + JWT * **Frontend Framework**: Vue 2/3 (Separated Frontend and Backend) ## Project Structure The project adopts a Maven multi-module structure: * **btld-admin**: Backend service for the administration management system. * Responsible for system basic functions such as users, roles, menus, dictionaries, etc. * Provides Swagger API documentation. * **btld-btld**: Core business module. * `controller`: Business interface controllers (battery production, recycling, decision-making, etc.). * `service`: Business logic layer implementation. * `domain`: Entity classes and data transfer objects. * `mapper`: Database access layer. * `client` / `contracts`: Blockchain client configuration and smart contract interaction. * `config`: System configuration classes (including ClickHouse, blockchain, etc.). * **btld-common**: Common base module. * General utility classes, constant definitions, exception handling, global annotations, etc. ## Quick Start ### Environment Requirements * JDK 1.8+ * Maven 3.0+ * MySQL 5.7+ / 8.0+ * Redis 3.0+ * ClickHouse (Optional, for data analysis features) * FISCO BCOS Node (Optional, for blockchain evidence storage features) ### Configuration Instructions 1. **Database Initialization**: Execute SQL scripts to create the database and table structure. 2. **Modify Configuration**: Edit the configuration files under `btld-admin/src/main/resources/application.yml` or `btld-btld/src/main/resources`, configuring the datasource and Redis connection information. 3. **Blockchain Configuration**: Configure the blockchain node IP, port, certificate path, and Webase-related configurations in the configuration file. ### Running The project provides startup scripts for Windows, located in the `bin/` directory: * `run.bat`: Directly start the application. * `package.bat`: Package the application. You can also use Maven commands: ```bash mvn clean package -DskipTests java -jar btld-admin/target/btld-admin.jar ``` ## Blockchain Integration The BTLD project has built-in blockchain interaction capabilities, realizing on-chain evidence storage for key data: * **Core Components**: * `BlockchainClient`: Responsible for initializing the connection with the blockchain node. * `ContractInvoker`: Encapsulates contract call methods, supporting on-chain transactions. * `BlockchainEvidenceService`: Business layer service responsible for generating data hashes and calling evidence storage interfaces. * **Evidence Storage Process**: * At key business nodes such as production, repair, and recycling, the system will automatically capture the current data snapshot. * Calculate the SHA-256 hash value of the data. * Call the smart contract (e.g., `LifecycleTrace`) to upload the hash value and key information to the chain. * The returned transaction hash (TxHash) serves as the on-chain evidence credential. ## Related Documentation * **Architecture Design**: View the architecture diagram files in the `blog/architecture-diagram/` directory. * **Development Notes**: View `blog/blog.md`, where the author detailedly records the journey of building this system from 0 to 1, including experience summaries on database design, Maven dependencies, blockchain integration, and lessons learned from development challenges. ## License This project follows the open-source protocol in [LICENSE](LICENSE).