´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/09203851-2649-4a0f-b696-332fad6125e4.vsidxBinary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2ce7b081-61db-4780-ab7b-3174d3d998cb.vsidxBinary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/b28e2128-7595-489a-b656-9987625a9f04.vsidxBinary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cdf7c705-afc3-490d-b354-0b04d2de9c9b.vsidxBinary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs
@@ -24,7 +24,7 @@ { bool[] boolArray = ByteToBoolArray(data); Array.Reverse(boolArray); //Array.Reverse(boolArray); Type type = typeof(T); object? obj = Activator.CreateInstance(type); ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/StationTypeEnum.cs
@@ -8,8 +8,24 @@ { public enum StationTypeEnum { /// <summary> /// å ¥åºç«å° /// </summary> StationType_OnlyInbound = 1, /// <summary> /// åºåºç«å° /// </summary> StationType_OnlyOutbound = 2, StationType_InboundAndOutbound = 3 /// <summary> /// åºå ¥åºç«å° /// </summary> StationType_InboundAndOutbound = 3, /// <summary> /// åºå ¥åºå£ /// </summary> StationType_InStartAndOutEnd = 33, } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs
@@ -37,6 +37,24 @@ SC_Finish = 220, /// <summary> /// è¾éçº¿å¾ æ§è¡ /// </summary> [Description("è¾éçº¿å¾ æ§è¡")] Line_Execute = 400, /// <summary> /// è¾é线æ§è¡ä¸ /// </summary> [Description("è¾é线æ§è¡ä¸")] Line_Executing = 410, /// <summary> /// è¾éçº¿å®æ /// </summary> [Description("è¾éçº¿å®æ")] Line_Finish = 420, /// <summary> /// AGVå¾ æ§è¡ /// </summary> [Description("AGVå¾ æ§è¡")] ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj
@@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> <PackageReference Include="WIDESEAWCS_Core" Version="1.0.10" /> <PackageReference Include="WIDESEAWCS_Core" Version="1.0.11" /> </ItemGroup> <ItemGroup> ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -161,27 +161,44 @@ List<Dt_WarehouseDevice> wades = warehouseDevices.Where(x => x.WarehouseId == item.WarehouseId).ToList(); Dt_Router? router = new Dt_Router(); Dt_Router? router; TaskTypeGroup taskTypeGroup = item.TaskType.GetTaskTypeGroup(); if (string.IsNullOrEmpty(item.AGVArea)) { //task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StackerCraneCode == item.RoadWay); Dt_StationManger stationManger; if (taskTypeGroup == TaskTypeGroup.InboundGroup) { stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress); } else { stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode == item.RoadWay); } if (stationManger == null) { return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°é 置信æ¯"); } List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (stationManger.StationCode == x.StartPosi || stationManger.StackerCraneCode == x.StartPosi)); if (routers.FirstOrDefault() == null) List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (item.SourceAddress == x.StartPosi || item.RoadWay == x.StartPosi)); router = routers.FirstOrDefault(); if (router == null) { return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±é 置信æ¯"); } router = routers.FirstOrDefault(); if (routers.Count == 1) { task.NextAddress = router?.NextPosi ?? ""; task.DeviceCode = stationManger.StationDeviceCode; if(taskTypeGroup == TaskTypeGroup.InboundGroup && item.TargetAddress == stationManger.StackerCraneCode) { task.NextAddress = router.NextPosi; task.DeviceCode = stationManger.StationDeviceCode; } else { task.NextAddress = item.TargetAddress; task.DeviceCode = stationManger.StationDeviceCode; } } else { @@ -191,7 +208,7 @@ } else { if (item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) if (taskTypeGroup == TaskTypeGroup.OutbondGroup) { task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi); @@ -253,17 +270,23 @@ WebResponseContent content = new WebResponseContent(); try { Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationDeviceCode == sourceAddress); Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == sourceAddress); if (stationManger == null) { return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°ä¿¡æ¯"); } HttpHelper.Post($"RequestInboundTask?palletCode={palletCode}&stationCode={sourceAddress}"); string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}"); WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); if (responseContent != null && responseContent.Status && responseContent.Data != null) { WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); if (taskDTO != null) { content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); } } WMSTaskDTO taskDTO = new WMSTaskDTO(); content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); } catch (Exception ex) { ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -51,6 +51,11 @@ public byte Status { get; set; } /// <summary> /// é¢ç /// </summary> public byte Undefined { get; set; } /// <summary> /// ä»»å¡å· /// </summary> public int TaskNum { get; set; } @@ -100,6 +105,12 @@ /// 交äºä¿¡å· /// </summary> public byte Signal { get; set; } /// <summary> /// é¢ç /// </summary> public byte Undefined2 { get; set; } } public class R_ConveyorLineStatus @@ -147,20 +158,22 @@ public bool RequestUnpackPellet { get; set; } } public class R_ConveyorLineSignal public class ConveyorLineSignal { /// <summary> /// 请æ±ä¿¡å· /// </summary> [BoolIndex(0)] public bool STB { get; set; } /// <summary> /// ååºä¿¡å· /// </summary> [BoolIndex(1)] public bool ACK { get; set; } } public class W_ConveyorLineInfo public class W_ConveyorLineInfo : DeviceCommand { /// <summary> @@ -168,20 +181,9 @@ /// </summary> public short ConveyorNo { get; set; } /// <summary> /// æ¡æä¿¡å· /// </summary> public bool HandShake { get; set; } public byte Operate { get; set; } /// <summary> /// å¤ä½æ¥è¦ /// </summary> public bool ClearAlarm { get; set; } /// <summary> /// éå /// </summary> public bool Return { get; set; } public byte Undefined { get; set; } /// <summary> /// ä»»å¡å· @@ -214,13 +216,35 @@ public short Sapre2 { get; set; } /// <summary> /// 请æ±ä¿¡å· /// 交äºä¿¡å· /// </summary> public bool STB { get; set; } public byte Signal { get; set; } /// <summary> /// ååºä¿¡å· /// é¢ç /// </summary> public bool ACK { get; set; } public byte Undefined2 { get; set; } } public class W_ConveyorLineOperate { /// <summary> /// æ¡æä¿¡å· /// </summary> [BoolIndex(0)] public bool HandShake { get; set; } /// <summary> /// å¤ä½æ¥è¦ /// </summary> [BoolIndex(1)] public bool ClearAlarm { get; set; } /// <summary> /// éå /// </summary> [BoolIndex(2)] public bool Return { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineDBName.cs
@@ -23,7 +23,7 @@ namespace WIDESEAWCS_Tasks.ConveyorLineJob { public enum R_ConveyorLineDBName public enum R_ConveyorLineDB { /// <summary> /// ç«å°ç¼å· ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs
@@ -6,7 +6,7 @@ namespace WIDESEAWCS_Tasks.ConveyorLineJob { public enum W_ConveyorLineDBName public enum W_ConveyorLineDB { /// <summary> /// ç«å°ç¼å· ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/ConveyorLineJob_GM.cs
@@ -6,6 +6,8 @@ using System.Threading.Tasks; using WIDESEAWCS_Common; using WIDESEAWCS_Common.Helper; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_IBasicInfoRepository; using WIDESEAWCS_ITaskInfoRepository; @@ -13,6 +15,8 @@ using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob; using WIDESEAWCS_QuartzJob.DTO; using WIDESEAWCS_QuartzJob.Models; using WIDESEAWCS_QuartzJob.Repository; using WIDESEAWCS_Tasks.ConveyorLineJob; namespace WIDESEAWCS_Tasks @@ -25,13 +29,15 @@ private readonly ITaskExecuteDetailService _taskExecuteDetailService; private readonly ITaskRepository _taskRepository; private readonly IStationMangerRepository _stationMangerRepository; private readonly IRouterRepository _routerRepository; public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository) public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository,IRouterRepository routerRepository) { _taskService = taskService; _taskExecuteDetailService = taskExecuteDetailService; _taskRepository = taskRepository; _stationMangerRepository = stationMangerRepository; _routerRepository = routerRepository; } public Task Execute(IJobExecutionContext context) @@ -44,21 +50,134 @@ List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) { if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); if (deviceProRead != null && deviceProWrite != null) { DeviceProDTO? devicePro = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); if (devicePro != null) { R_ConveyorLineInfo conveyorLineInfo = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(devicePro.DeviceProAddress); R_ConveyorLineInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress); R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfo.Status.ByteToBoolObject<R_ConveyorLineStatus>(); R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfoRead.Status.ByteToBoolObject<R_ConveyorLineStatus>(); bool stb = device.GetValue<R_ConveyorLineDBName, bool>(R_ConveyorLineDBName.STB); } else ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>(); W_ConveyorLineInfo conveyorLineInfoWrite = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress); ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) { WriteInfo(device.DeviceName, $"æªæ¾å°è®¾å¤åç¼å·{item.StationCode}çå议信æ¯"); if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) { if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) { WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode); if (content.Status) { device.SetValue(W_ConveyorLineDB.ACK, true); } } } else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) { device.SetValue(W_ConveyorLineDB.ACK, false); } } else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt()) { if(conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) { Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StackerCraneCode); if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) { Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode); if (stationManger == null) { WriteInfo(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); continue; } string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode); if (string.IsNullOrEmpty(locationCode)) { WriteInfo(item.StationName, $"请æ±åé è´§ä½è¿åä¿¡æ¯é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); continue; } string oldAddress = task.NextAddress; int oldStatus = task.TaskState; task.CurrentAddress = stationManger.StackerCraneStationCode; task.TargetAddress = locationCode; task.NextAddress = locationCode; task.DeviceCode = stationManger.StackerCraneCode; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); _taskRepository.UpdateData(task); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"ç³»ç»èªå¨æµç¨,ç®æ å°åç±{oldAddress}åæ´ä¸º{task.NextAddress},ä»»å¡ç¶æç±{oldStatus}åæ´ä¸º{task.TaskState}"); device.SetValue(W_ConveyorLineDB.ACK, true); } } else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) { device.SetValue(W_ConveyorLineDB.ACK, false); } else { if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) { Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode); if (stationManger == null) { WriteInfo(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); continue; } Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi)); if (router == null) { WriteInfo(item.StationName, $"æªæ¾å°è·¯ç±é 置信æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); continue; } string oldAddress = task.NextAddress; int oldStatus = task.TaskState; task.NextAddress = router.NextPosi; task.TargetAddress = router.NextPosi; task.TaskState = TaskStatusEnum.Line_Executing.ObjToInt(); _taskRepository.UpdateData(task); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"ç³»ç»èªå¨æµç¨,ç®æ å°åç±{oldAddress}åæ´ä¸º{task.NextAddress},ä»»å¡ç¶æç±{oldStatus}åæ´ä¸º{task.TaskState}"); device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum); device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress); device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress); device.SetValue(W_ConveyorLineDB.STB, true); } } else if(conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) { //todo ä»»å¡å®æ } } } else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()) { if(!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm) { Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType)); if(task != null) { device.SetValue(W_ConveyorLineDB.STB, true); } } } } else { WriteInfo(device.DeviceName, $"æªæ¾å°è®¾å¤åç¼å·{item.StationCode}çå议信æ¯"); } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/²âÊԼܲÖ/GroundStationJob_CSJ.cs
@@ -83,13 +83,13 @@ if (stationManger == null) { WriteInfo(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); break; continue; } string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode); if (string.IsNullOrEmpty(locationCode)) { WriteInfo(item.StationName, $"请æ±åé è´§ä½è¿åä¿¡æ¯é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); break; continue; } task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); task.CurrentAddress = stationManger.StackerCraneStationCode; @@ -118,13 +118,13 @@ if (stationManger == null) { WriteInfo(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); break; continue; } string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode); if (string.IsNullOrEmpty(locationCode)) { WriteInfo(item.StationName, $"请æ±åé è´§ä½è¿åä¿¡æ¯é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); break; continue; } string oldAddress = task.NextAddress; int oldStatus = task.TaskState; ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs
@@ -155,7 +155,7 @@ apiLogAopInfo.ResponseJsonData = jsonResult; Parallel.For(0, 1, e => { LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); LogLock.OutLogAOP("å ¨å±æ¥å¿AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); }); } } @@ -179,7 +179,7 @@ Parallel.For(0, 1, e => { //LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) }); LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); LogLock.OutLogAOP("å ¨å±æ¥å¿AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) }); }); }); } @@ -201,7 +201,7 @@ // å¼å¸¸æ¥å¿éæè¯¦ç»çå æ ä¿¡æ¯ Parallel.For(0, 1, e => { LogLock.OutLogAOP("AOPLogEx", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) }); LogLock.OutLogAOP("å ¨å±å¼å¸¸é误æ¥å¿AOP", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) }); }); } } ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -53,6 +53,15 @@ WebResponseContent RequestInboundTask(SaveModel saveModel); /// <summary> /// WCSç³è¯·å ¥åº /// </summary> /// <param name="stationCode"></param> /// <param name="roadwayNo"></param> /// <param name="palletCode"></param> /// <returns></returns> WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode); /// <summary> /// å ¥åºä»»å¡ç³è¯·åé è´§ä½ /// </summary> /// <param name="taskNum">ä»»å¡å·</param> ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -9,6 +9,7 @@ using WIDESEA_Common.TaskEnum; using WIDESEA_Core; using WIDESEA_Core.Helper; using WIDESEA_DTO.Task; using WIDESEA_Model.Models; namespace WIDESEA_TaskInfoService @@ -102,7 +103,7 @@ Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode); if (task != null) { return WebResponseContent.Instance.Error($"该æçå·²çæä»»å¡"); return WebResponseContent.Instance.OK($"该æçå·²çæä»»å¡", _mapper.Map<WMSTaskDTO>(task)); } if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null) @@ -158,8 +159,10 @@ newTask.TaskId = taskId; _stockRepository.StockInfoRepository.UpdateData(stockInfo); _unitOfWorkManage.CommitTran(); PushTasksToWCS(new List<Dt_Task> { newTask }); return WebResponseContent.Instance.OK(data: newTask); WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); //PushTasksToWCS(new List<Dt_Task> { newTask }); return WebResponseContent.Instance.OK(data: wMSTaskDTO); } catch (Exception ex) { ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -42,10 +42,12 @@ { return Service.RequestInboundTask(saveModel); } //public WebResponseContent RequestInboundTask(string palletCode, string stationCode) //{ // return Service.RequestInboundTask(palletCode, stationCode); //} [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous] public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode) { return Service.DeviceRequestInboundTask(stationCode, roadwayNo, palletCode); } /// <summary> /// å ¥åºä»»å¡ç³è¯·åé è´§ä½