This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
WIDESEAWCS 是一个仓库控制系统,基于 ASP.NET Core 6.0 构建。用于管理自动化物料处理设备(堆垛机、输送线、机器人、穿梭车等)的工业仓储环境。
# 构建整个解决方案
dotnet build WIDESEAWCS_Server.sln
# 运行服务器(端口 9292)
dotnet run --project WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
# 运行测试
dotnet test WIDESEAWCS_Tests/WIDESEAWCS_Tests.csproj
| 项目 | 用途 |
|---|---|
WIDESEAWCS_Server |
主 Web API 入口(端口 9292) |
WIDESEAWCS_Core |
框架工具(数据库、缓存、依赖注入、日志、认证) |
WIDESEAWCS_Common |
常量、枚举、Redis 键定义 |
WIDESEAWCS_Model |
数据库实体模型 |
WIDESEAWCS_DTO |
数据传输对象 |
WIDESEAWCS_Communicator |
工业设备通信协议(Modbus、Siemens S7、Omron 等) |
WIDESEAWCS_Tasks |
后台设备控制作业 |
WIDESEAWCS_QuartzJob |
Quartz.NET 调度和派发逻辑 |
WIDESEAWCS_RedisService |
L1+L2 混合缓存服务 |
WIDESEAWCS_*Repository 项目)WIDESEAWCS_*Service 项目)AutofacModuleRegister 模块注册UseServiceDIAttribute 实现缓存和日志切面http://*:9292http://localhost:92960.0.0.0:2000.\WIDESEAWCS_ShanMei127.0.0.1:6379,密码 P@ssw0rdWIDESEAWCS_Communicator 项目实现了多种工业协议:
ModbusTcpCommunicatorSiemensS7Communicator、SiemensS7200SmartCommunicatorOmronEtherNetCommunicatorAllenBrandlyEtherNetCommunicatorInovanceTcpCommunicator、InovanceAMTcpSerialPortCommunicator基础接口:IBaseCommunicator
设备控制作业位于 WIDESEAWCS_Tasks/:
StackerCraneJob - 堆垛机控制ConveyorLineJob、ConveyorLineNewJob - 输送线管理RobotJob - 机械手控制ShuttleCarJob - 穿梭车控制SocketServer - 设备通信 TCP 服务器QuartzJob/Controllers/ - 设备信息、协议、派发、调度器System/Controllers/ - 用户、角色、菜单、字典、日志Task/Controllers/ - 任务管理和机器人任务BasicInfo/Controllers/ - 路由配置使用 Serilog,按天滚动保留 30 天日志文件,同时集成 Seq(http://localhost:5341)。
ApiRouteCacheWarmupHostedServiceQuartzJobDataTableHostedService 在启动时自动创建TcpSocketServer 由托管服务运行EnableAutoSync 选项,定期将 Redis 同步到 L1 内存缓存Dt_DeviceProtocol 表),而非配置文件中public 类、接口、方法、属性**必须**包含 XML 文档注释 (/// <summary>...</summary>),解释其用途、参数和返回值。// 行内注释解释“为什么这么做”。// TODO: 说明 标记。async/await。库代码请使用 ConfigureAwait(false)。IUserService)。namespace MyApp.Api;)。Task.Result 或 Task.Wait()。.ToList() (必须用 .ToListAsync())。Exception 而不记录日志。