´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/package-lock.json
ÎļþÒÑɾ³ý ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/DeviceTypeEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common { public enum DeviceTypeEnum { /// <summary> /// å¯ä¹å£« /// </summary> GALAXIS, /// <summary> /// 海康 /// </summary> HIKROBOT, /// <summary> /// ååèååå车 /// </summary> YuanLiJuHe, } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/EnableStatusEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,39 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common.LocationEnum { /// <summary> /// è´§ä½ç¦ç¨ç¶æ /// </summary> public enum EnableStatusEnum { /// <summary> /// æ£å¸¸ /// </summary> [Description("æ£å¸¸")] Normal = 0, /// <summary> /// åªå ¥ /// </summary> [Description("åªå ¥")] OnlyIn = 1, /// <summary> /// åªåº /// </summary> [Description("åªåº")] OnlyOut = 2, /// <summary> /// ç¦ç¨ /// </summary> [Description("ç¦ç¨")] Disable = 3 } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/LocationChangeType.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,57 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common.LocationEnum { /// <summary> /// è´§ä½ç¶æåæ´ç±»å /// </summary> public enum LocationChangeType { /// <summary> /// å ¥åºåé /// </summary> [Description("å ¥åºåé ")] InboundAssignLocation, /// <summary> /// åºåºåé /// </summary> [Description("åºåºåé ")] OutboundAssignLocation, /// <summary> /// ç§»åºåé /// </summary> [Description("ç§»åºåé ")] RelocationAssignLocation, /// <summary> /// å ¥åºä»»å¡å®æ /// </summary> [Description("å ¥åºä»»å¡å®æ")] InboundCompleted, /// <summary> /// åºåºä»»å¡å®æ /// </summary> [Description("åºåºä»»å¡å®æ")] OutboundCompleted, /// <summary> /// ç§»åºä»»å¡å®æ /// </summary> [Description("ç§»åºä»»å¡å®æ")] RelocationCompleted, /// <summary> /// æå¨ä¿®æ¹ /// </summary> [Description("æå¨ä¿®æ¹")] HandUpdate } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/LocationStatusEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common.LocationEnum { /// <summary> /// è´§ä½ç¶æ /// </summary> public enum LocationStatusEnum { /// <summary> /// ç©ºé² /// </summary> [Description("空é²")] Free = 0, /// <summary> /// éå® /// </summary> [Description("éå®")] Lock = 1, /// <summary> /// å ¥åºéå® /// </summary> [Description("å ¥åºéå®")] InLock = 10, /// <summary> /// åºåºéå® /// </summary> [Description("åºåºéå®")] OutLock = 20, /// <summary> /// æè´§ /// </summary> [Description("æè´§")] InStock = 100, /// <summary> /// 大æçéå® /// </summary> [Description("大æçéå®")] PalletLock = 99 } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/LocationTypeEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,45 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common.LocationEnum { /// <summary> /// è´§ä½ç±»å /// </summary> public enum LocationTypeEnum { /// <summary> /// æªå®ä¹ /// </summary> [Description("æªå®ä¹")] Undefined = 0, /// <summary> /// å°æç /// </summary> [Description("å°æç")] SmallPallet = 1, /// <summary> /// 䏿ç /// </summary> [Description("䏿ç")] MediumPallet = 2, /// <summary> /// 大æç /// </summary> [Description("大æç")] LargePallet = 3, /// <summary> /// ç¹å¤§æç /// </summary> [Description("ç¹å¤§æç")] ExtraPallet = 4, } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/SequenceEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_Common { public enum SequenceEnum { SeqTaskNum } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/CancelGALAXISTask.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// åæ¶å¯ä¹å£«ä»»å¡ /// </summary> public class CancelGALAXISTask { /// ä»»å¡ç¼å· /// </summary> public string taskId { get; set; } /// <summary> /// è¯·æ±æ¶é´æ³ /// </summary> public string reportTime { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/GALAXISReturn.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,45 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// å¯ä¹å£«è¿åç»æ /// </summary> public class GALAXISReturn { /// <summary> /// è¿åç /// </summary> public int code { get; set; } /// <summary> /// è¿åæ¶é´æ³ /// </summary> public string reportTime { get; set; } public bool success { get; set; } public GALAXISReturnData data { get; set; } } public class GALAXISReturnData { /// <summary> /// å¤ä»»å¡ç» /// </summary> public string groupId { get; set; } /// <summary> /// ä»»å¡ç¼å· /// </summary> public string taskId { get; set; } /// <summary> /// 请æ±ç»æï¼0æåï¼1失败 /// </summary> public int returnStatus { get; set; } /// <summary> /// 请æ±å¼å¸¸ç»ææè¿° /// </summary> public string returnInfo { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/GALAXISTaskInfo.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,68 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// å¯ä¹å£«ä»»å¡ä¿¡æ¯ /// </summary> public class GALAXISTaskInfo { public string groupId { get; set; } public string msgTime { get; set; } public GALAXISTask tasks { get; set; } } public class GALAXISTask { /// <summary> /// ä»»å¡ç¼å· /// </summary> public string taskId { get; set; } /// <summary> /// 0å ¥åºï¼1åºåºï¼2ç§»åº /// </summary> public int taskType { get; set; } /// <summary> /// ä¼å 级 /// </summary> public int priorityCode { get; set; } /// <summary> /// ä»»å¡åºåºï¼RCSå®ä¹ /// </summary> public string district { get; set; } /// <summary> /// 容å¨ç±»åï¼å¾ å® /// </summary> public int containerType { get; set; } /// <summary> /// 容å¨ç¼å· /// </summary> public string barCode { get; set; } /// <summary> /// èµ·ç¹ç¹ä½ /// </summary> public string startNode { get; set; } /// <summary> /// èµ·ç¹åºå,使ç¨ç¹ä½é»è®¤-1 /// </summary> public int fromArea { get; set; } = -1; /// <summary> /// ç»ç¹ç¹ä½ /// </summary> public string endNode { get; set; } /// <summary> /// ç»ç¹åºå,使ç¨ç¹ä½é»è®¤-1 /// </summary> public int toArea { get; set; } = -1; /// <summary> /// ä¾§åæå çæå®å±æ°ï¼ä»»å¡ç±»åå ¥åº /// </summary> public int layer { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/GALAXISUpdateTaskStatus.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,62 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// å¯ä¹å£«æ´æ°ä»»å¡ç¶æ /// </summary> public class GALAXISUpdateTaskStatus { /// <summary> /// ä»»å¡ç¼å· /// </summary> public string taskId { get; set; } /// <summary> /// æ§è¡ä»»å¡åºä½ /// </summary> public string siteCode { get; set; } /// <summary> /// 容å¨ç¼å· /// </summary> public string rackNo { get; set; } /// <summary> /// 设å¤ç¼å· /// </summary> public int vid { get; set; } /// <summary> /// æµéé«åº¦ï¼ /// 0ï¼è´§ç©é«åº¦å°äºæç®ä¼ æå¨ ///1ï¼è´§ç©é«åº¦å¤§äºæç®ä¼ æå¨å°äºæé«ä¼ æå¨ ///2ï¼è´§ç©é«åº¦å¤§äºæé«ä¼ æå¨ /// </summary> public int height { get; set; } /// <summary> /// è¯·æ±æ¶é´æ³ /// </summary> public string reportTime { get; set; } /// <summary> /// ä»»å¡ç¶æ<br></br> /// 0ä»»å¡å®æï¼<br></br> /// 1èµ·ç¹æ è´§ï¼<br></br> /// 2ç»ç¹æè´§ï¼<br></br> /// 3ä»»å¡ç¼å·éå¤ï¼<br></br> /// 4åè´§å®æï¼<br></br> /// 5RCSæ¥æ¶ä»»å¡æä½æ°æ®åºå¼å¸¸ï¼<br></br> /// 6ä»»å¡ç±»åæè¯¯ï¼<br></br> /// 7åæ°æè¯¯ï¼<br></br> /// 8RCSæªç¥å¼å¸¸ï¼<br></br> /// 9æ£å¨æ§è¡æå·²æ§è¡å®æ¯çä»»å¡ä¸è½åæ¶ï¼<br></br> /// 10å¼å§æ§è¡ä»»å¡ï¼<br></br> /// 13ä»»å¡åºæ¢ï¼ä¸åæ§è¡<br></br> /// </summary> public int taskStatus { get; set; } /// <summary> /// 请æ±ç»ææè¿° /// </summary> public string returnInfo { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/ReturnGALAXIS.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// è¿åå¯ä¹å£«ç»æä¿¡æ¯ /// </summary> public class ReturnGALAXIS { /// <summary> /// 请æ±ç»æï¼0æåï¼1失败 /// </summary> public int returnStatus { get; set; } /// <summary> /// 请æ±å¼å¸¸ç»ææè¿° /// </summary> public string returnInfo { get; set; } /// <summary> /// è¯·æ±æ¶é´æ³ /// </summary> public string msgTime { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/UpdateGALAXISTaskGrade.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO { /// <summary> /// æ´æ°å¯ä¹å£«ä»»å¡ä¼å 级 /// </summary> public class UpdateGALAXISTaskGrade { /// <summary> /// ä»»å¡ç¼å· /// </summary> public string taskId { get; set; } /// <summary> /// è¯·æ±æ¶é´æ³ /// </summary> public string reportTime { get; set; } /// <summary> /// ä»»å¡åºåº /// </summary> public string district { get; set; } /// <summary> /// æ°çä¼å 级 /// </summary> public int priorityCode { get; set; } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj
@@ -11,10 +11,9 @@ </ItemGroup> <ItemGroup> <Folder Include="AGV\HIKROBOT\" /> <Folder Include="BasicInfo\" /> <Folder Include="WMS\" /> <Folder Include="RGV\" /> <Folder Include="AGV\" /> </ItemGroup> </Project> ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/WMSTasksDTO.cs
ÎļþÃû´Ó ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTasksDTO.cs ÐÞ¸Ä @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO.TaskInfo namespace WIDESEAWCS_DTO.WMS { public class WMSTasksDTO { ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -30,6 +30,8 @@ using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core.BaseRepository; using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_Common; namespace WIDESEAWCS_ITaskInfoService { @@ -190,5 +192,12 @@ /// <param name="taskNum">ä»»å¡å·</param> /// <returns>è¿åå¤çç»æ</returns> WebResponseContent RollbackTaskStatusToLast(int taskNum); /// <summary> /// è·åä»»å¡å· /// </summary> /// <param name="sequenceName"></param> /// <returns></returns> int GetTaskNum(string sequenceName); WebResponseContent UpdateTaskStatus(object TaskDTO, DeviceTypeEnum deviceTypeEnum); } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs
@@ -66,7 +66,7 @@ /// </summary> [ImporterHeader(Name = "å··éå·")] [ExporterHeader(DisplayName = "å··éå·")] [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "å··éå·")] [SugarColumn(IsNullable = true, Length = 10, ColumnDescription = "å··éå·")] public string Roadway { get; set; } /// <summary> @@ -138,7 +138,7 @@ /// </summary> [ImporterHeader(Name = "WMSä»»å¡ä¸»é®")] [ExporterHeader(DisplayName = "WMSä»»å¡ä¸»é®")] [SugarColumn(IsNullable = false, ColumnDescription = "WMSä»»å¡ä¸»é®")] [SugarColumn(IsNullable = true, ColumnDescription = "WMSä»»å¡ä¸»é®")] public int WMSId { get; set; } /// <summary> ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/KLSAGVController.cs
@@ -1,5 +1,10 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_Common; using WIDESEAWCS_Core; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_ITaskInfoService; namespace WIDESEAWCS_Server.Controllers.AGV { @@ -7,5 +12,21 @@ [ApiController] public class KLSAGVController : ControllerBase { private readonly ITaskService _taskService; public KLSAGVController(ITaskService taskService) { _taskService = taskService; } /// <summary> /// ä»»å¡ç¶ææ´æ° /// </summary> /// <param name="taskDTOs"></param> /// <returns></returns> [HttpPost, Route("UpdateTaskStatus"), AllowAnonymous] public WebResponseContent UpdateTaskStatus(object TaskDTO) { return _taskService.UpdateTaskStatus(TaskDTO, DeviceTypeEnum.GALAXIS); } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs
@@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_Core; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_ITaskInfoService; namespace WIDESEAWCS_Server.Controllers.WMS ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs
@@ -5,7 +5,11 @@ using System.Threading.Tasks; using WIDESEAWCS_Model.Models; using WIDESEAWCS_Core; using WIDESEAWCS_DTO.TaskInfo; using SqlSugar.Extensions; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_Common.LocationEnum; using WIDESEAWCS_Common; using WIDESEAWCS_Common.TaskEnum; namespace WIDESEAWCS_TaskInfoService { @@ -16,17 +20,71 @@ /// </summary> /// <param name="taskDTO"></param> /// <returns></returns> public WebResponseContent CreateNewInTask(TaskDTO taskDTO) public WebResponseContent CreateKLSNewInTask(TaskDTO taskDTO, int taskType) { try { int containerType = taskDTO.containerCode.Contains("") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt(); //è·åè´§ä½ä¿¡æ¯ Dt_KLSLocationInfo? kLSLocationInfos = _kLSLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode); Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType); if (kLSLocationInfo == null) throw new Exception($"æªæ¾å°ç»ç¹åºåºã{taskDTO.toAreaCode}ãå¯ç¨ç©ºè´§ä½ï¼"); Dt_Task dt_Task = new Dt_Task() { TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), WMSTaskNum = taskDTO.taskCode, Grade = taskDTO.taskPriority, PalletCode = taskDTO.containerCode, TaskState = TaskInStatusEnum.InNew.ObjToInt(), TaskType = taskType, SourceAddress = taskDTO.fromLocationCode, CurrentAddress = taskDTO.fromLocationCode, NextAddress = kLSLocationInfo.LocationCode, TargetAddress = kLSLocationInfo.LocationCode, }; kLSLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt(); Db.Ado.BeginTran(); BaseDal.AddData(dt_Task); _kLSLocationInfoService.Repository.UpdateData(kLSLocationInfo); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } public WebResponseContent CreateKLSNewOutTask(TaskDTO taskDTO, int taskType) { try { Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode); if (kLSLocationInfo == null) throw new Exception($"æªæ¾å°èµ·ç¹åºä½ã{taskDTO.fromLocationCode}ãï¼"); if (kLSLocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) throw new Exception($"èµ·ç¹åºä½ã{taskDTO.fromLocationCode}ãå½ååºä½ç¶æä¸å¯åºåºï¼"); Dt_Task dt_Task = new Dt_Task() { TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), WMSTaskNum = taskDTO.taskCode, Grade = taskDTO.taskPriority, PalletCode = taskDTO.containerCode, TaskState = TaskOutStatusEnum.OutNew.ObjToInt(), TaskType = taskType, SourceAddress = taskDTO.fromLocationCode, CurrentAddress = taskDTO.fromLocationCode, NextAddress = taskDTO.toLocationCode, TargetAddress = taskDTO.toLocationCode, }; kLSLocationInfo.LocationStatus = LocationStatusEnum.OutLock.ObjToInt(); Db.Ado.BeginTran(); BaseDal.AddData(dt_Task); _kLSLocationInfoService.Repository.UpdateData(kLSLocationInfo); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskHelpMethods.cs
@@ -5,7 +5,7 @@ using System.Threading.Tasks; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_DTO.WMS; namespace WIDESEAWCS_TaskInfoService { ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Common; using WIDESEAWCS_Core; namespace WIDESEAWCS_TaskInfoService { public partial class TaskService { /// <summary> /// æ´æ°ä»»å¡ç¶æ /// </summary> /// <param name="TaskDTO"></param> /// <param name="deviceTypeEnum"></param> /// <returns></returns> /// <exception cref="NotImplementedException"></exception> public WebResponseContent UpdateTaskStatus(object TaskDTO, DeviceTypeEnum deviceTypeEnum) { try { if (deviceTypeEnum == DeviceTypeEnum.GALAXIS) { } else if (deviceTypeEnum == DeviceTypeEnum.HIKROBOT) { } else { } return WebResponseContent.Instance.OK(); } catch (Exception ex) { return WebResponseContent.Instance.Error(ex.Message); } } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -18,12 +18,14 @@ using AutoMapper; using SqlSugar; using System.Diagnostics.CodeAnalysis; using WIDESEAWCS_Common; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_IBasicInfoService; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; @@ -76,8 +78,6 @@ { foreach (var item in taskDTOs) { if (item.taskType == TaskTypeEnum.MLInbound.ObjToInt()) { foreach (var task in item.tasks) { content = TaskHelpMethods.isOkTaskInfo(task, true, true); @@ -86,8 +86,10 @@ { continue; } CreateNewInTask(task); } if (item.taskType == TaskTypeEnum.MLInbound.ObjToInt()) CreateKLSNewInTask(task, item.taskType); else if (item.taskType == TaskTypeEnum.MLOutbound.ObjToInt()) CreateKLSNewOutTask(task, item.taskType); } } } @@ -625,5 +627,14 @@ } return content; } static object lock_taskNum = new object(); public int GetTaskNum(string sequenceName) { lock (lock_taskNum) { return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt(); } } } }