集成WMS调用与入库任务处理
添加WMS集成和机器人入库流程。
- 在ConfigKey枚举中新增HTTP配置键(CreateTaskInboundAsync, GetTasksLocation)。
- 引入RobotTaskTypeEnum用于机器人特定任务类型(GroupPallet, ChangePallet, SplitPallet)。
- 修改HttpRequestHelper.HTTPGetAsync/HTTPPostAsync以返回WebResponseContent并反序列化JSON;添加输入验证并使用System.Text.Json。
- TaskService:调用WMS GetTasksLocation获取最终目标地址(替换之前的随机地址逻辑),并添加QueryByTaskNum实现。
- ITaskService:声明QueryByTaskNum API。
- RobotJob:重构构造函数以同时接受IRobotTaskService和ITaskService,将简单命令处理转换为异步,并添加HandleInboundTaskAsync方法以调用WMS CreateTaskInboundAsync、注册返回的WMS任务,并将任务信息写入设备数据库。
- 更新多个.vs DocumentLayout和CopilotIndices文件(IDE元数据变更)。
备注:HttpRequestHelper签名变更和RobotJob构造函数变更为破坏性变更,会影响调用方和DI注册;请相应更新使用方式和注册配置。
| | |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\robotjob\\robotjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\httpenum\\configkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\httpenum\\configkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|solutionrelative:wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_model\\models\\taskinfo\\dt_robottask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|solutionrelative:wideseawcs_model\\models\\taskinfo\\dt_robottask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_itaskinfoservice\\irobottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 9, |
| | | "SelectedChildIndex": 13, |
| | | "Children": [ |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "Title": "TaskTypeEnum.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "ViewState": "AgIAAEcAAAAAAAAAAAAzwFAAAAAhAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-10T06:23:24.956Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "Title": "ITaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "ViewState": "AgIAALYAAAAAAAAAAAAAAMgAAAAIAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-10T06:18:41.307Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "Title": "TaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ViewState": "AgIAAF4CAAAAAAAAAADwv3gCAAAWAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-10T06:11:48.071Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "DocumentIndex": 5, |
| | | "Title": "CommonConveyorLineJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", |
| | | "ViewState": "AgIAABUAAAAAAAAAAAAowCgAAAAFAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-09T01:53:42.667Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "ConfigKey.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs", |
| | | "ViewState": "AgIAAAsAAAAAAAAAAADwvyUAAAATAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-09T01:45:04.7Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 9, |
| | | "Title": "CreateTaskDto.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs", |
| | | "ViewState": "AgIAABUAAAAAAAAAAAAAwCwAAAArAAAAAAAAAA==", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAeAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T08:09:57.387Z", |
| | | "EditorCaption": "" |
| | | "WhenOpened": "2026-02-06T08:09:57.387Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "CommonStackerCraneJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ViewState": "AgIAACUAAAAAAAAAAAAAwDoAAAAqAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T06:29:00.256Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "DocumentIndex": 8, |
| | | "Title": "StockDTO.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Stock\\StockDTO.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\Stock\\StockDTO.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Stock\\StockDTO.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_DTO\\Stock\\StockDTO.cs", |
| | | "ViewState": "AgIAABwAAAAAAAAAAAA0wCkAAAAOAAAAAAAAAA==", |
| | | "ViewState": "AgIAAB0AAAAAAAAAAAAQwCkAAAAOAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T02:48:18.997Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "DocumentIndex": 7, |
| | | "Title": "Dt_RobotTask.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs", |
| | | "ViewState": "AgIAAEsAAAAAAAAAAAAiwA8AAAARAAAAAAAAAA==", |
| | | "ViewState": "AgIAABUAAAAAAAAAAAAAACEAAAAiAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T06:59:50.829Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 5, |
| | | "DocumentIndex": 6, |
| | | "Title": "RobotTaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\RobotTaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\RobotTaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\RobotTaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\RobotTaskService.cs", |
| | | "ViewState": "AgIAADgAAAAAAAAAAAAUwEkAAAB+AAAAAAAAAA==", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAEkAAAB+AAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T06:22:00.192Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 6, |
| | | "DocumentIndex": 10, |
| | | "Title": "IRobotTaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\IRobotTaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_ITaskInfoService\\IRobotTaskService.cs", |
| | |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAhAAAAAAAAAA==", |
| | | "ViewState": "AgIAAE0BAAAAAAAAAAAowGIBAAAYAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T05:38:04.031Z", |
| | | "EditorCaption": "" |
| | |
| | | /// <summary> |
| | | /// 拆盘 |
| | | /// </summary> |
| | | SplitPalletAsync |
| | | SplitPalletAsync, |
| | | |
| | | /// <summary> |
| | | /// 创建入库任务 |
| | | /// </summary> |
| | | CreateTaskInboundAsync, |
| | | |
| | | /// <summary> |
| | | /// 获取任务可入货位 |
| | | /// </summary> |
| | | GetTasksLocation |
| | | |
| | | #endregion |
| | | } |
| | |
| | | [Description("机械手")] |
| | | RobotToManual = 400, |
| | | } |
| | | |
| | | public enum RobotTaskTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// 组盘任务 |
| | | /// </summary> |
| | | [Description("组盘任务")] |
| | | GroupPallet = 500, |
| | | |
| | | /// <summary> |
| | | /// 换盘任务 |
| | | /// </summary> |
| | | [Description("换盘任务")] |
| | | ChangePallet = 510, |
| | | |
| | | /// <summary> |
| | | /// 拆盘任务 |
| | | /// </summary> |
| | | SplitPallet = 520 |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using System.Text; |
| | | using System.Text.Json; |
| | | using WIDESEAWCS_Code; |
| | | using WIDESEAWCS_Core.Helper; |
| | | |
| | |
| | | /// <summary> |
| | | /// 按配置分类发送GET请求 |
| | | /// </summary> |
| | | public static Task<string> HTTPGetAsync(string category, string? requestContent, string? configKey, int timeOut = 60) |
| | | public static async Task<WebResponseContent> HTTPGetAsync(string category, string? requestContent, string? configKey, int timeOut = 60) |
| | | { |
| | | return SendAsync(requestContent, HttpMethod.Get, category, configKey, "application/json", timeOut); |
| | | if (string.IsNullOrWhiteSpace(category) || string.IsNullOrWhiteSpace(requestContent) || string.IsNullOrWhiteSpace(configKey)) |
| | | { |
| | | throw new ArgumentException("传入配置不能为空", nameof(category)); |
| | | } |
| | | WebResponseContent content = new WebResponseContent(); |
| | | string result = await SendAsync(requestContent, HttpMethod.Get, category, configKey, "application/json", timeOut); |
| | | return content = JsonSerializer.Deserialize<WebResponseContent>(result) ?? new WebResponseContent { Status = false, Message = "解析响应失败" }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按配置分类发送POST请求 |
| | | /// </summary> |
| | | public static Task<string> HTTPPostAsync(string category, string? requestContent, string? configKey, int timeOut = 60) |
| | | public static async Task<WebResponseContent> HTTPPostAsync(string category, string? requestContent, string? configKey, int timeOut = 60) |
| | | { |
| | | return SendAsync(requestContent, HttpMethod.Post, category, configKey, "application/json", timeOut); |
| | | if (string.IsNullOrWhiteSpace(category) || string.IsNullOrWhiteSpace(requestContent) || string.IsNullOrWhiteSpace(configKey)) |
| | | { |
| | | throw new ArgumentException("传入配置不能为空", nameof(category)); |
| | | } |
| | | WebResponseContent content = new WebResponseContent(); |
| | | string result = await SendAsync(requestContent, HttpMethod.Post, category, configKey, "application/json", timeOut); |
| | | return content = JsonSerializer.Deserialize<WebResponseContent>(result) ?? new WebResponseContent { Status = false, Message = "解析响应失败" }; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="taskNum">任务号</param> |
| | | /// <returns>返回处理结果</returns> |
| | | WebResponseContent RollbackTaskStatusToLast(int taskNum); |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取与指定任务编号关联的任务。 |
| | | /// </summary> |
| | | /// <param name="taskNum">要获取的任务的唯一标识符。</param> |
| | | /// <returns>表示指定编号任务的<see cref="Dt_Task"/>对象,如果不存在该任务则返回<c>null</c>。</returns> |
| | | public Dt_Task QueryByTaskNum(int taskNum); |
| | | } |
| | | } |
| | |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Text.Json; |
| | | using WIDESEAWCS_Common.HttpEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Http; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | |
| | | |
| | | if (task.TaskState == (int)TaskInStatusEnum.Line_InFinish) |
| | | { |
| | | Random random = new Random(); |
| | | //Random random = new Random(); |
| | | //task.CurrentAddress = task.NextAddress; |
| | | //task.NextAddress = $"{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}"; |
| | | //task.TargetAddress = task.NextAddress; |
| | | |
| | | // 调用WMS系统接口,获取最终目标地址 |
| | | CreateTaskDto taskDto = new CreateTaskDto() |
| | | { |
| | | Roadway = task.TargetAddress, |
| | | PalletCode = task.PalletCode, |
| | | SourceAddress = task.SourceAddress, |
| | | // 目标地址待定 |
| | | TargetAddress = "CLOutAreaA", |
| | | TaskType = task.TaskType, |
| | | }; |
| | | content = HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), taskDto.ToString(), nameof(ConfigKey.GetTasksLocation)).Result; |
| | | if (!content.Status) |
| | | { |
| | | return WebResponseContent.Instance.Error($"调用WMS接口获取任务目标地址失败,任务号:【{task.TaskNum}】,错误信息:【{content.Message}】"); |
| | | } |
| | | |
| | | string wmsTargetAddress = content.Data?.ToString() ?? string.Empty; |
| | | if (string.IsNullOrEmpty(wmsTargetAddress)) |
| | | { |
| | | return WebResponseContent.Instance.Error($"调用WMS接口获取任务目标地址失败,任务号:【{task.TaskNum}】,错误信息:【未获取到有效的目标地址】"); |
| | | } |
| | | |
| | | task.NextAddress = wmsTargetAddress; |
| | | task.TargetAddress = wmsTargetAddress; |
| | | task.CurrentAddress = task.NextAddress; |
| | | task.NextAddress = $"{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}"; |
| | | task.TargetAddress = task.NextAddress; |
| | | } |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup) |
| | |
| | | else |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNo && TaskRobotTypes.Contains(x.TaskType) && x.CurrentAddress == currentAddress && x.TaskState <= (int)TaskRobotStatusEnum.RobotExecuting, TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取与指定任务编号关联的任务。 |
| | | /// </summary> |
| | | /// <param name="taskNum">要获取的任务的唯一标识符。</param> |
| | | /// <returns>表示指定编号任务的<see cref="Dt_Task"/>对象,如果不存在该任务则返回<c>null</c>。</returns> |
| | | public Dt_Task QueryByTaskNum(int taskNum) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | private readonly TcpSocketServer _TcpSocket; |
| | | private static readonly ConcurrentDictionary<string, RobotSocketState> _socketStates = new(); |
| | | private static int _eventSubscribedFlag; |
| | | private readonly IRobotTaskService _taskService; |
| | | |
| | | |
| | | private readonly ITaskService _taskService; |
| | | private readonly IRobotTaskService _robottaskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly ITaskRepository _taskRepository; |
| | | private readonly IRouterService _routerService; |
| | | |
| | | public RobotJob(TcpSocketServer TcpSocket, IRobotTaskService taskService) |
| | | public RobotJob(TcpSocketServer TcpSocket, IRobotTaskService RobottaskService, ITaskService TaskService) |
| | | { |
| | | _TcpSocket = TcpSocket; |
| | | _taskService = taskService; |
| | | _robottaskService = RobottaskService; |
| | | this._taskService = TaskService; |
| | | } |
| | | |
| | | public async Task Execute(IJobExecutionContext context) |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | string messageLower = message.ToLowerInvariant(); |
| | | |
| | | if (IsSimpleCommand(messageLower, state)) |
| | | if (await IsSimpleCommandAsync(messageLower, state)) |
| | | { |
| | | return null; |
| | | } |
| | |
| | | state.LastPickPositions = positions; |
| | | |
| | | var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), stockDTO.ToJsonString(), state.CurrentTask?.RobotTaskType == 2 ? nameof(ConfigKey.ChangePalletAsync) : nameof(ConfigKey.SplitPalletAsync)); |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | WebResponseContent? contentNullable = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | content = contentNullable ?? new WebResponseContent(); |
| | | |
| | | if (content.Status) |
| | | { |
| | |
| | | .ToList() |
| | | }; |
| | | var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), stockDTO.ToJsonString(), nameof(ConfigKey.GroupPalletAsync)); |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | WebResponseContent? contentNullable = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | content = contentNullable ?? new WebResponseContent(); |
| | | |
| | | if (content.Status) |
| | | { |
| | |
| | | /// <param name="message"></param> |
| | | /// <param name="state"></param> |
| | | /// <returns></returns> |
| | | private bool IsSimpleCommand(string message, RobotSocketState state) |
| | | private async Task<bool> IsSimpleCommandAsync(string message, RobotSocketState state) |
| | | { |
| | | switch (message) |
| | | { |
| | |
| | | state.CurrentAction = "AllPickFinished"; |
| | | if (state.CurrentTask?.RobotTaskType == 2 || state.CurrentTask?.RobotTaskType == 3) |
| | | { |
| | | // TODO 机械手取货完成,判断是否换盘、拆盘任务,创建空托盘回库任务 |
| | | await HandleInboundTaskAsync(state, useSourceAddress: true); |
| | | } |
| | | return true; |
| | | |
| | |
| | | state.CurrentAction = "AllPutFinished"; |
| | | if (state.CurrentTask?.RobotTaskType == 1) |
| | | { |
| | | // TODO 机械手取货完成,判断是否组盘任务,创建组盘入库任务 |
| | | CreateTaskDto taskDto = new CreateTaskDto() |
| | | { |
| | | PalletCode = state.CurrentTask?.RobotTargetAddressPalletCode ?? string.Empty, |
| | | SourceAddress = state.CurrentTask?.RobotTargetAddress ?? string.Empty, |
| | | TargetAddress = state.CurrentTask?.RobotTargetAddress ?? string.Empty, |
| | | Roadway = state.CurrentTask?.RobotRoadway == "1" ? "GWSC001" : state.CurrentTask?.RobotRoadway == "2" ? "HCSC001" : "SC001" ?? string.Empty, |
| | | WarehouseId = state.CurrentTask?.RobotRoadway == "1" ? 1 : state.CurrentTask?.RobotRoadway == "2" ? 2 : 3, |
| | | PalletType = 1, |
| | | TaskType = 4 |
| | | }; |
| | | await HandleInboundTaskAsync(state, useSourceAddress: false); |
| | | } |
| | | return true; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private async Task HandleInboundTaskAsync(RobotSocketState state, bool useSourceAddress) |
| | | { |
| | | var currentTask = state.CurrentTask; |
| | | if (currentTask == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | string roadway = currentTask.RobotRoadway == "1" ? "GWSC001" : currentTask.RobotRoadway == "2" ? "HCSC001" : "SC001"; |
| | | int warehouseId = currentTask.RobotRoadway == "1" ? 1 : currentTask.RobotRoadway == "2" ? 2 : 3; |
| | | |
| | | CreateTaskDto taskDto = new CreateTaskDto |
| | | { |
| | | PalletCode = currentTask.RobotTargetAddressPalletCode ?? string.Empty, |
| | | SourceAddress = currentTask.RobotTargetAddress ?? string.Empty, |
| | | TargetAddress = currentTask.RobotTargetAddress ?? string.Empty, |
| | | Roadway = roadway, |
| | | WarehouseId = warehouseId, |
| | | PalletType = 1, |
| | | TaskType = 4 |
| | | }; |
| | | |
| | | var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), taskDto.ToJsonString(), nameof(ConfigKey.CreateTaskInboundAsync)); |
| | | WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result) ?? new WebResponseContent(); |
| | | if (!content.Status) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | WMSTaskDTO taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString() ?? string.Empty) ?? new WMSTaskDTO(); |
| | | content = _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | if (!content.Status) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var taskInfo = _taskService.QueryByTaskNum(taskDTO.TaskNum); |
| | | |
| | | |
| | | string targetAddress = useSourceAddress ? taskDTO.SourceAddress : taskDTO.TargetAddress; |
| | | |
| | | IDevice? device = Storage.Devices.Where(x => x.DeviceProDTOs.Select(x => x.DeviceChildCode == taskDTO.SourceAddress).FirstOrDefault()).FirstOrDefault() ?? null; |
| | | device?.Communicator.Write(nameof(ConveyorLineDBNameNew.Target), taskInfo.NextAddress); |
| | | device?.Communicator.Write(nameof(ConveyorLineDBNameNew.TaskNo), taskDTO.TaskNum); |
| | | device?.Communicator.Write(nameof(ConveyorLineDBNameNew.WCS_STB), 1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 机械手前缀命令处理 |
| | | /// </summary> |
| | |
| | | |
| | | private Dt_RobotTask? GetTask(RobotCraneDevice robotCrane) |
| | | { |
| | | return _taskService.QueryRobotCraneTask(robotCrane.DeviceCode); |
| | | return _robottaskService.QueryRobotCraneTask(robotCrane.DeviceCode); |
| | | } |
| | | } |
| | | |
| | |
| | | "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|solutionrelative:widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 3, |
| | | "SelectedChildIndex": 6, |
| | | "Children": [ |
| | | { |
| | | "$type": "Bookmark", |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "ApiBaseController.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "RelativeToolTip": "WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "ViewState": "AgIAABEAAAAAAAAAAADwvx8AAAA7AAAAAAAAAA==", |
| | | "DocumentIndex": 1, |
| | | "Title": "TaskController.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "RelativeToolTip": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAfAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-08T08:20:56.818Z", |
| | | "EditorCaption": "" |
| | | "WhenOpened": "2026-02-09T01:23:19.844Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "DocumentIndex": 2, |
| | | "Title": "CreateTaskDto.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "RelativeToolTip": "WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "ViewState": "AgIAAA0AAAAAAAAAAAAqwBoAAAArAAAAAAAAAA==", |
| | | "ViewState": "AgIAAAYAAAAAAAAAAAAuwA4AAAARAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T07:58:13.932Z" |
| | | }, |
| | |
| | | "RelativeDocumentMoniker": "WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeToolTip": "WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "ViewState": "AgIAABIAAAAAAAAAAAAAACkAAABFAAAAAAAAAA==", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAACkAAAAXAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T07:00:19.697Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "DocumentIndex": 0, |
| | | "Title": "TaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "RelativeToolTip": "WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "ViewState": "AgIAADUAAAAAAAAAAAAQwEMAAAA6AAAAAAAAAA==", |
| | | "ViewState": "AgIAAEAAAAAAAAAAAAAQwEoAAAA4AAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T06:34:59.734Z" |
| | | "WhenOpened": "2026-02-06T06:34:59.734Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | |
| | | "RelativeDocumentMoniker": "WIDESEA_StockService\\StockSerivce.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs", |
| | | "RelativeToolTip": "WIDESEA_StockService\\StockSerivce.cs", |
| | | "ViewState": "AgIAADoAAAAAAAAAAAAQwEoAAAAOAAAAAAAAAA==", |
| | | "ViewState": "AgIAAPUAAAAAAAAAAAAAwEUAAAAyAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T01:53:49.077Z" |
| | | } |
| | |
| | | "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|solutionrelative:widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{00CE9885-9F24-4B6C-A7E8-0DE8C9ED7128}|WIDESEA_Model\\WIDESEA_Model.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_model\\models\\stock\\dt_stockinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{00CE9885-9F24-4B6C-A7E8-0DE8C9ED7128}|WIDESEA_Model\\WIDESEA_Model.csproj|solutionrelative:widesea_model\\models\\stock\\dt_stockinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|solutionrelative:widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|solutionrelative:widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|solutionrelative:widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{49716D78-720D-475D-948C-0FC6C5F079E5}|WIDESEA_IStockService\\WIDESEA_IStockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_istockservice\\istockservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 2, |
| | | "SelectedChildIndex": 6, |
| | | "Children": [ |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "Dt_StockInfo.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs", |
| | | "RelativeToolTip": "WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs", |
| | | "ViewState": "AgIAACYAAAAAAAAAAAAQwDIAAAAeAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-11T01:12:04.794Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "ApiBaseController.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "RelativeToolTip": "WIDESEA_Core\\BaseController\\ApiBaseController.cs", |
| | | "ViewState": "AgIAABEAAAAAAAAAAADwvyAAAAAIAAAAAAAAAA==", |
| | | "DocumentIndex": 4, |
| | | "Title": "TaskController.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "RelativeToolTip": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAfAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-08T08:20:56.818Z", |
| | | "EditorCaption": "" |
| | | "WhenOpened": "2026-02-09T01:23:19.844Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "DocumentIndex": 3, |
| | | "Title": "CreateTaskDto.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "RelativeToolTip": "WIDESEA_DTO\\Task\\CreateTaskDto.cs", |
| | | "ViewState": "AgIAAA0AAAAAAAAAAAAqwBoAAAArAAAAAAAAAA==", |
| | | "ViewState": "AgIAABUAAAAAAAAAAAAAAA4AAAARAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T07:58:13.932Z" |
| | | "WhenOpened": "2026-02-06T07:58:13.932Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "DocumentIndex": 5, |
| | | "Title": "ITaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeToolTip": "WIDESEA_ITaskInfoService\\ITaskService.cs", |
| | | "ViewState": "AgIAABIAAAAAAAAAAAAAACkAAABFAAAAAAAAAA==", |
| | | "ViewState": "AgIAACsAAAAAAAAAAIBHwCkAAAAXAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T07:00:19.697Z" |
| | | "WhenOpened": "2026-02-06T07:00:19.697Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "DocumentIndex": 0, |
| | | "Title": "TaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "RelativeToolTip": "WIDESEA_TaskInfoService\\TaskService.cs", |
| | | "ViewState": "AgIAADUAAAAAAAAAAAAQwEMAAAA6AAAAAAAAAA==", |
| | | "ViewState": "AgIAAGQAAAAAAAAAAAApwIsAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T06:34:59.734Z" |
| | | "WhenOpened": "2026-02-06T06:34:59.734Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 6, |
| | | "DocumentIndex": 7, |
| | | "Title": "StockDTO.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Stock\\StockDTO.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_DTO\\Stock\\StockDTO.cs", |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 5, |
| | | "DocumentIndex": 6, |
| | | "Title": "IStockService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_IStockService\\IStockService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_IStockService\\IStockService.cs", |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "DocumentIndex": 1, |
| | | "Title": "StockSerivce.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs", |
| | | "RelativeDocumentMoniker": "WIDESEA_StockService\\StockSerivce.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs", |
| | | "RelativeToolTip": "WIDESEA_StockService\\StockSerivce.cs", |
| | | "ViewState": "AgIAADoAAAAAAAAAAAAQwEoAAAAOAAAAAAAAAA==", |
| | | "ViewState": "AgIAAAkAAAAAAAAAAAAkwI8AAAAzAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-06T01:53:49.077Z" |
| | | "WhenOpened": "2026-02-06T01:53:49.077Z", |
| | | "EditorCaption": "" |
| | | } |
| | | ] |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取空闲货位信息(根据巷道查询) |
| | | /// </summary> |
| | | /// <param name="RoadwayNo">巷道</param> |
| | | /// <returns></returns> |
| | | public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo) |
| | | { |
| | | try |
| | | { |
| | | var locations = await BaseDal.QueryDataAsync(x => x.EnableStatus == EnableStatusEnum.Normal.GetHashCode() && x.RoadwayNo == RoadwayNo && x.LocationStatus == LocationStatusEnum.Free.GetHashCode()); |
| | | |
| | | if (locations == null || locations.Count == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | return locations.OrderBy(x => x.Layer).ThenBy(x => x.Depth).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault(); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取空闲货位信息(根据巷道查询) |
| | | /// </summary> |
| | | /// <param name="RoadwayNo">巷道</param> |
| | | /// <returns></returns> |
| | | public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo,string locationCode) |
| | | { |
| | | try |
| | | { |
| | | var locations = await BaseDal.QueryFirstAsync(x => x.RoadwayNo == RoadwayNo && x.LocationCode == locationCode); |
| | | |
| | | if (locations == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | return locations; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新货位信息 |
| | | /// </summary> |
| | | /// <param name="locationInfo"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> UpdateLocationInfoAsync(Dt_LocationInfo locationInfo) |
| | | { |
| | | try |
| | | { |
| | | return await BaseDal.UpdateDataAsync(locationInfo); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="initializationLocationDTO"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO); |
| | | |
| | | /// <summary> |
| | | /// 获取空闲货位信息 |
| | | /// </summary> |
| | | /// <param name="RoadwayNo">巷道</param> |
| | | /// <returns></returns> |
| | | public Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo); |
| | | |
| | | /// <summary> |
| | | /// 更新货位信息 |
| | | /// </summary> |
| | | /// <param name="locationInfo"></param> |
| | | /// <returns></returns> |
| | | public Task<bool> UpdateLocationInfoAsync(Dt_LocationInfo locationInfo); |
| | | |
| | | /// <summary> |
| | | /// 获取空闲货位信息(根据巷道和货位号查询) |
| | | /// </summary> |
| | | /// <param name="RoadwayNo">巷道</param> |
| | | /// <returns></returns> |
| | | public Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo, string locationCode); |
| | | } |
| | | } |
| | |
| | | public interface IStockInfoService : IService<Dt_StockInfo> |
| | | { |
| | | IRepository<Dt_StockInfo> Repository { get; } |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息列表(出库日期小于当前时间且库存状态为入库完成的记录) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Task<List<Dt_StockInfo>> GetStockInfoAsync(); |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息列表(出库日期小于当前时间且库存状态为入库完成的记录,且仓库ID匹配) |
| | | /// </summary> |
| | | /// <param name="WarehouseId"></param> |
| | | /// <returns></returns> |
| | | public Task<List<Dt_StockInfo>> GetStockInfoAsync(int WarehouseId); |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息(根据托盘码查询) |
| | | /// </summary> |
| | | /// <param name="PalletCode"></param> |
| | | /// <returns></returns> |
| | | public Task<Dt_StockInfo> GetStockInfoAsync(string PalletCode); |
| | | |
| | | /// <summary> |
| | | /// 更新库存数据 |
| | | /// </summary> |
| | | /// <param name="stockInfo"></param> |
| | | /// <returns></returns> |
| | | public Task<bool> UpdateStockAsync(Dt_StockInfo stockInfo); |
| | | } |
| | | } |
| | |
| | | { |
| | | IRepository<Dt_Task> Repository { get; } |
| | | |
| | | Task<Dt_Task?> CreateTaskInboundAsync(CreateTaskDto taskDto); |
| | | /// <summary> |
| | | /// 创建任务(组盘入库任务、空托盘回库任务) |
| | | /// </summary> |
| | | /// <param name="taskDto">要创建的出库任务的详细信息。不能为null。</param> |
| | | /// <returns>是否成功</returns> |
| | | Task<WebResponseContent> CreateTaskInboundAsync(CreateTaskDto taskDto); |
| | | |
| | | /// <summary> |
| | | /// 根据指定的任务详情异步创建新的出库任务。 |
| | | /// </summary> |
| | | /// <param name="taskDto">要创建的出库任务的详细信息。不能为null。</param> |
| | | /// <returns>表示异步操作的任务。任务 |
| | | Task<WebResponseContent> CreateTaskOutboundAsync(CreateTaskDto taskDto); |
| | | |
| | | /// <summary> |
| | | /// 获取可入库货位 |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <param name="taskType"></param> |
| | | /// <returns></returns> |
| | | public Task<WebResponseContent> GetTasksLocationAsync(CreateTaskDto taskDto); |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 货位编号 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "货位ID")] |
| | | public int LocationId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 货位编号 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "货位编号")] |
| | | public string LocationCode { get; set; } |
| | | |
| | |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 库存明细 |
| | | /// 出库日期 |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "出库日期")] |
| | | public DateTime OutboundDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 库存明细 |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))] |
| | | public List<Dt_StockInfoDetail> Details { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 货位明细 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LocationDetails")] |
| | | [Navigate(NavigateType.OneToOne, nameof(LocationId), nameof(Dt_LocationInfo.Id))] |
| | | public Dt_LocationInfo LocationDetails { get; set; } |
| | | } |
| | | } |
| | |
| | | using AutoMapper; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockService; |
| | |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息列表(出库日期小于当前时间且库存状态为入库完成的记录) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<List<Dt_StockInfo>> GetStockInfoAsync() |
| | | { |
| | | return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.入库完成.GetHashCode()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息列表(出库日期小于当前时间且库存状态为入库完成的记录,且仓库ID匹配) |
| | | /// </summary> |
| | | /// <param name="WarehouseId"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<Dt_StockInfo>> GetStockInfoAsync(int WarehouseId) |
| | | { |
| | | return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.入库完成.GetHashCode() && x.WarehouseId == WarehouseId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取库存信息(根据托盘码查询) |
| | | /// </summary> |
| | | /// <param name="PalletCode"></param> |
| | | /// <returns></returns> |
| | | public async Task<Dt_StockInfo> GetStockInfoAsync(string PalletCode) |
| | | { |
| | | return await BaseDal.QueryFirstAsync(x => x.PalletCode == PalletCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新库存数据 |
| | | /// </summary> |
| | | /// <param name="stockInfo"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> UpdateStockAsync(Dt_StockInfo stockInfo) |
| | | { |
| | | return await BaseDal.UpdateDataAsync(stockInfo); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Task; |
| | |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IStockInfoService _stockInfoService; |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | |
| | | public IRepository<Dt_Task> Repository => BaseDal; |
| | | |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockInfoService stockInfoService, ILocationInfoService locationInfoService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _stockInfoService = stockInfoService; |
| | | _locationInfoService = locationInfoService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建任务(组盘入库任务、空托盘回库任务) |
| | | /// </summary> |
| | | /// <param name="palletCode">托盘号</param> |
| | | /// <param name="sourceAddress">起始地址</param> |
| | | /// <param name="targetAddress">目标地址</param> |
| | | /// <param name="roadway">巷道号</param> |
| | | /// <param name="warehouseId">仓库主键</param> |
| | | /// <param name="palletType">托盘类型</param> |
| | | /// <param name="taskType">任务类型</param> |
| | | /// <param name="taskDto">要创建的出库任务的详细信息。不能为null。</param> |
| | | /// <returns>是否成功</returns> |
| | | public async Task<Dt_Task?> CreateTaskInboundAsync(CreateTaskDto taskDto) |
| | | public async Task<WebResponseContent> CreateTaskInboundAsync(CreateTaskDto taskDto) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(taskDto.PalletCode) || string.IsNullOrWhiteSpace(taskDto.SourceAddress) || string.IsNullOrWhiteSpace(taskDto.TargetAddress) || string.IsNullOrWhiteSpace(taskDto.Roadway)) |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | return null; |
| | | if (string.IsNullOrWhiteSpace(taskDto.PalletCode) || string.IsNullOrWhiteSpace(taskDto.SourceAddress) || string.IsNullOrWhiteSpace(taskDto.TargetAddress) || string.IsNullOrWhiteSpace(taskDto.Roadway)) |
| | | { |
| | | return content.Error("Invalid task details."); |
| | | } |
| | | |
| | | if (taskDto.TaskType != TaskTypeEnum.Inbound || taskDto.TaskType != TaskTypeEnum.InEmpty) |
| | | { |
| | | return content.Error("Invalid task details."); |
| | | } |
| | | |
| | | var task = new Dt_Task |
| | | { |
| | | TaskNum = 0, |
| | | PalletCode = taskDto.PalletCode, |
| | | PalletType = taskDto.PalletType, |
| | | Roadway = taskDto.Roadway, |
| | | TaskType = taskDto.TaskType.GetHashCode(), |
| | | TaskStatus = TaskStatusEnum.New.GetHashCode(), |
| | | SourceAddress = taskDto.SourceAddress, |
| | | TargetAddress = taskDto.TargetAddress, |
| | | CurrentAddress = taskDto.SourceAddress, |
| | | NextAddress = taskDto.TargetAddress, |
| | | WarehouseId = taskDto.WarehouseId, |
| | | Grade = 1, |
| | | Creater = "system" |
| | | }; |
| | | |
| | | var result = await Repository.AddDataAsync(task) > 0 ? true : false; |
| | | if (result) |
| | | { |
| | | var WmstaskDto = _mapper.Map<WMSTaskDTO>(task); |
| | | return content.OK("任务创建成功", WmstaskDto); |
| | | } |
| | | else |
| | | { |
| | | return content.Error("任务创建失败"); |
| | | } |
| | | } |
| | | |
| | | if (taskDto.TaskType != TaskTypeEnum.Inbound || taskDto.TaskType != TaskTypeEnum.InEmpty) |
| | | catch (Exception ex) |
| | | { |
| | | return null; |
| | | return content.Error($"任务创建失败: {ex.Message}"); |
| | | } |
| | | |
| | | var task = new Dt_Task |
| | | { |
| | | TaskNum = 0, |
| | | PalletCode = taskDto.PalletCode, |
| | | PalletType = taskDto.PalletType, |
| | | Roadway = taskDto.Roadway, |
| | | TaskType = taskDto.TaskType.GetHashCode(), |
| | | TaskStatus = TaskStatusEnum.New.GetHashCode(), |
| | | SourceAddress = taskDto.SourceAddress, |
| | | TargetAddress = taskDto.TargetAddress, |
| | | CurrentAddress = taskDto.SourceAddress, |
| | | NextAddress = taskDto.TargetAddress, |
| | | WarehouseId = taskDto.WarehouseId, |
| | | Grade = 1, |
| | | Creater = "system" |
| | | }; |
| | | |
| | | return await Repository.AddDataAsync(task) > 0 ? task : null; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据指定的任务详情异步创建新的出库任务。 |
| | | /// </summary> |
| | | /// <param name="taskDto">要创建的出库任务的详细信息。不能为null。</param> |
| | | /// <returns>表示异步操作的任务。任务结果包含表示已创建的出库任务的<see cref="WMSTaskDTO"/>,如果任务无法创建则为<see langword="null"/>。</returns> |
| | | public async Task<WebResponseContent> CreateTaskOutboundAsync(CreateTaskDto taskDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | List<Dt_StockInfo>? stockResult = await _stockInfoService.GetStockInfoAsync(taskDto.WarehouseId); |
| | | var taskList = new List<Dt_Task>(); |
| | | foreach (var item in stockResult) |
| | | { |
| | | var taskInfo = new Dt_Task() |
| | | { |
| | | WarehouseId = item.WarehouseId, |
| | | PalletCode = item.PalletCode, |
| | | PalletType = item.PalletType, |
| | | SourceAddress = item.LocationCode, |
| | | TargetAddress = taskDto.TargetAddress, |
| | | Roadway = item.LocationDetails.RoadwayNo, |
| | | TaskType = TaskTypeEnum.Outbound.GetHashCode(), |
| | | TaskStatus = TaskStatusEnum.New.GetHashCode(), |
| | | Grade = 1, |
| | | TaskNum = 0, |
| | | CurrentAddress = item.LocationCode, |
| | | NextAddress = taskDto.TargetAddress, |
| | | Creater = "system", |
| | | |
| | | }; |
| | | taskList.Add(taskInfo); |
| | | } |
| | | |
| | | var result = await BaseDal.AddDataAsync(taskList) > 0; |
| | | var wmstaskDto = result ? _mapper.Map<WMSTaskDTO>(taskList) : null; |
| | | return content.OK(result ? "任务创建成功" : "任务创建失败", wmstaskDto); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return content.Error($"任务创建失败: {e.Message}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取可入库货位 |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <param name="taskType"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> GetTasksLocationAsync(CreateTaskDto taskDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var stockResult = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode); |
| | | if (stockResult == null) return content.Error("未找到对应的任务"); |
| | | |
| | | |
| | | var locationInfo = await _locationInfoService.GetLocationInfo(stockResult.Roadway); |
| | | if (locationInfo == null) return content.Error("未找到对应的货位"); |
| | | |
| | | // 更新货位信息 |
| | | locationInfo.LocationStatus = LocationStatusEnum.FreeLock.GetHashCode(); |
| | | |
| | | // 跟新任务信息 |
| | | stockResult.CurrentAddress = taskDto.SourceAddress; |
| | | stockResult.NextAddress = locationInfo.LocationCode; |
| | | stockResult.TargetAddress = taskDto.TargetAddress; |
| | | stockResult.TaskStatus = TaskStatusEnum.Line_Finish.GetHashCode(); |
| | | |
| | | var updateResult = await BaseDal.UpdateDataAsync(stockResult); |
| | | var locationResult = await _locationInfoService.UpdateLocationInfoAsync(locationInfo); |
| | | |
| | | return content.OK(updateResult && locationResult ? "任务更新成功" : "任务更新失败", locationInfo.LocationCode); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"获取任务失败: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | // 任务完成。添加库存,修改货位状态,删除任务数据,添加历史任务数据 |
| | | public async Task<WebResponseContent> FinishTaskAsync(CreateTaskDto taskDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var taskResult = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode); |
| | | if (taskResult == null) return content.Error("未找到对应的任务"); |
| | | var locationResult = await _locationInfoService.GetLocationInfo(taskResult.Roadway, taskDto.PalletCode); |
| | | if (locationResult == null) return content.Error("未找到对应的货位"); |
| | | |
| | | // 添加库存信息 |
| | | var stockInfo = await _stockInfoService.GetStockInfoAsync(taskDto.PalletCode); |
| | | stockInfo.LocationCode = locationResult.LocationCode; |
| | | stockInfo.LocationId = locationResult.Id; |
| | | stockInfo.OutboundDate = taskResult.Roadway.Contains("GW") ? DateTime.Now.AddHours(2) : taskResult.Roadway.Contains("CW") ? DateTime.Now.AddHours(1) : DateTime.Now.AddHours(0); |
| | | |
| | | // 修改货位状态 |
| | | locationResult.LocationStatus = LocationStatusEnum.InStock.GetHashCode(); |
| | | var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(locationResult); |
| | | var addStockResult = await _stockInfoService.UpdateStockAsync(stockInfo); |
| | | if (!updateLocationResult || !addStockResult) return content.Error("任务完成失败"); |
| | | |
| | | // 删除任务数据 |
| | | var deleteTaskResult = await BaseDal.DeleteDataAsync(taskResult); |
| | | |
| | | // 添加历史任务数据 |
| | | var historyTask = _mapper.Map<Dt_Task_Hty>(taskResult); |
| | | historyTask.InsertTime = DateTime.Now; |
| | | if (!deleteTaskResult) return content.Error("任务完成失败"); |
| | | return content.OK("任务完成"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"完成任务失败: {ex.Message}"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent CreateTaskInboundAsync(CreateTaskDto taskDto) |
| | | public async Task<WebResponseContent?> CreateTaskInboundAsync(CreateTaskDto taskDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | content.Data = Service.CreateTaskInboundAsync(taskDto); |
| | | return content; |
| | | return await Service.CreateTaskInboundAsync(taskDto); |
| | | } |
| | | } |
| | | } |