陈勇
2024-11-19 b001df1a9965af13413076fe0c000ecf38762604
更新分容接口
已修改4个文件
60 ■■■■■ 文件已修改
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
@@ -73,6 +73,21 @@
        FreeDisable = 4,
    }
    public enum LocationState
    {
        /// <summary>
        /// 允许
        /// </summary>
        [Description("允许")]
        Allow = 1,
        /// <summary>
        /// 不允许
        /// </summary>
        [Description("不允许")]
        NotAllow = 2
    }
    #region 任务类型
    /// <summary>
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IServices;
using WIDESEA_IStorageBasicRepository;
using WIDESEA_IStorageTaskRepository;
using WIDESEA_IStoragIntegrationServices;
@@ -14,13 +15,16 @@
        private readonly ILocationInfoRepository _locationRepository;
        private readonly IDt_TaskRepository _taskRepository;
        private readonly IStockInfoRepository _stockInfoRepository;
        private readonly ISys_ConfigService _configService;
        public MCSService(ILocationInfoRepository locationRepository,IDt_TaskRepository taskRepository,IStockInfoRepository stockInfoRepository)
        public MCSService(ILocationInfoRepository locationRepository,IDt_TaskRepository taskRepository,IStockInfoRepository stockInfoRepository, ISys_ConfigService configService)
        {
            _locationRepository = locationRepository;
            _taskRepository = taskRepository;
            _stockInfoRepository = stockInfoRepository;
            _configService = configService;
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs
@@ -25,9 +25,9 @@
                if (locationinfo != null)
                {
                    //检测柜提供的货位状态,只有wms未锁定且提供的状态为允许才允许放货
                    if (locationinfo.Remark != LocationStatusByCode(result.StateCode))
                    if (locationinfo.Remark != result.StateCode.ToString())
                    {
                        locationinfo.Remark = LocationStatusByCode(result.StateCode);
                        locationinfo.Remark = result.StateCode.ToString();
                        _locationRepository.UpdateData(locationinfo);
                    }
                }
@@ -41,18 +41,20 @@
                return content.Error(ex.Message);
            }
        }
        private static string LocationStatusByCode(int code)
        {
            string str = null;
            switch (code)
            {
                case 1: str = "LocationState_Allows"; break;
                case 2: str = "LocationState_NotAllows"; break;
                //case 2: str = LocationState.LocationLock.ToString(); break;
                default:
                    str = "LocationState_NotAllows"; break;
            }
            return str;
        }
        //private static string LocationStatusByCode(int code)
        //{
        //    string str = null;
        //    switch (code)
        //    {
        //        case 1: str = "LocationState_Allows"; break;
        //        case 2: str = "LocationState_NotAllows"; break;
        //        //case 2: str = LocationState.LocationLock.ToString(); break;
        //        default:
        //            str = "LocationState_NotAllows"; break;
        //    }
        //    return str;
        //}
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -5,6 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.Const;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
@@ -51,7 +52,6 @@
                    TaskId = 0,
                };
                WMSTaskDTO taskDTO = new WMSTaskDTO
                {
                    Id = 0,
@@ -65,10 +65,11 @@
                    TaskType = result.IsNG == 1 ? (int)TaskOutboundTypeEnum.OutNG : (int)TaskOutboundTypeEnum.Outbound,
                };
                var respon = HttpHelper.Post("http://localhost:9291/api/Task/ReceiveTask", JsonConvert.SerializeObject(taskDTO));
                var sysConfig = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_IPAddress, SysConfigConst.WCSIPAddress);
                var respon = HttpHelper.Post(sysConfig.ConfigValue, JsonConvert.SerializeObject(taskDTO));
                if (respon != null)
                {
                }