11
yanjinhui
2026-03-02 ef4e456bb392c7260f2d8af886d7786f471b6ae0
11
已修改4个文件
42 ■■■■■ 文件已修改
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -259,3 +259,4 @@
*.2
*.2
/代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/config/applicationhost.config
/代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/HierarchyCache.v1.txt
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs
@@ -5,6 +5,7 @@
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_ITaskInfoService;
namespace WIDESEAWCS_Server.Controllers.WMS
@@ -14,9 +15,11 @@
    public class WMSController : ControllerBase
    {
        private readonly ITaskService _taskService;
        public WMSController(ITaskService taskService)
        private readonly IStationMangerService _stationMangerService;
        public WMSController(ITaskService taskService, IStationMangerService stationMangerService)
        {
            _taskService = taskService;
            _stationMangerService = stationMangerService;
        }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
@@ -76,4 +76,8 @@
        </Content>
    </ItemGroup>
    <ItemGroup>
      <Folder Include="Log\" />
    </ItemGroup>
</Project>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -14,6 +14,7 @@
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_TaskInfoService
@@ -156,10 +157,39 @@
        {
            try
            {
                WMSInOutBoundCompleteFeedback boundCompleteFeedback = new WMSInOutBoundCompleteFeedback();
                WMSReturn agvContent = null;
                dt_Task.TaskState = TaskStatusEnum.Finish.ObjToInt();
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(WMSInOutBoundCompleteFeedback));
                if (apiInfo == null) dt_Task.ExceptionMessage = "未找到出入库完成反馈WMS接口配置信息!请检查接口配置";
                else
                {
                    boundCompleteFeedback.taskCode = dt_Task.WMSTaskNum;
                    boundCompleteFeedback.containerCode = dt_Task.PalletCode;
                    boundCompleteFeedback.fromStationCode = dt_Task.SourceAddress;
                    boundCompleteFeedback.toLocationCode = dt_Task.TargetAddress;
                    switch (deviceTypeEnum)
                    {
                        case DeviceTypeEnum.GALAXIS:
                            boundCompleteFeedback.businessType = 1;
                            break;
                        case DeviceTypeEnum.YuanLiJuHe:
                            boundCompleteFeedback.businessType = 2;
                            break;
                    }
                    boundCompleteFeedback.completeType = 1;
                    string response = HttpHelper.Post(apiInfo.ApiAddress, boundCompleteFeedback.Serialize());
                    agvContent = response.DeserializeObject<WMSReturn>();
                    if (agvContent.code != 0) dt_Task.ExceptionMessage = agvContent.msg;
                }
                Db.Ado.BeginTran();
                UpdateLocationStatus(dt_Task.TargetAddress, deviceTypeEnum, LocationStatusEnum.InStock);
                BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.自动完成);
                if (agvContent != null && agvContent.code == 0)
                    BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.自动完成);
                else
                    BaseDal.UpdateData(dt_Task);
                Db.Ado.CommitTran();
                return WebResponseContent.Instance.OK();
            }