This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
PadService is a .NET 8.0 MES (Manufacturing Execution System) backend service that manages barcode printing, work reporting, and data collection for factory production processes. The system provides RESTful APIs for frontend applications like mobile devices and tablets.
# Build the project
dotnet build
# Run in development mode (launches Swagger UI at http://localhost:5106)
dotnet run
# Run with specific profile
dotnet run --launch-profile http
# Publish the application
dotnet publish
# Restore packages
dotnet restore
# Check for build errors
dotnet build --verbosity normal
Controllers/ # API controllers for different modules
├── MesInvItemBarcodesController.cs # Barcode management
├── DeviceMetricsController.cs # Device metrics
├── MesOrderSelectController.cs # Work order management
└── ...
Services/ # Business logic managers
├── MesInvItemBarcodesManager.cs # Core barcode operations
├── WomdaaManager.cs # Work order management
└── ...
Entites/ # Data models
├── DbModels/ # Database entity models
└── Dto/ # Data transfer objects
DB/ # Data access layer
├── Repository.cs # Generic repository with SqlSugar
└── RepositoryNoEntity.cs
util/ # Utility classes
├── AppSettings.cs # Configuration model
├── ResponseResult.cs # API response wrapper
└── ...
AppSettings.DataBaseConnMES_INV_ITEM_BARCODES: Barcode informationMES_REPORTING: Work reporting recordsWOMDAA: Work order master dataMES_NUMERICAL: Data collection from devicesMES_ANCHORS: Work order anchor points (initial values)MES_QA_ITEMS_DETECT_02: Quality inspection recordsThe central module handles:
- Barcode generation with uniqueness validation
- Print quantity validation against work orders
- Work order status verification (must be "开工" - started)
- Quality inspection status verification
- Integration with work reporting system
Repository<T> base class extends SqlSugar's SimpleClient<T>UseTransaction methodCommonPage methodsAppSettings class and appsettings.jsonAppSettings.DataBaseConn/swagger