| | |
| | | *.2 |
| | | /代ç 管ç/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/config/applicationhost.config |
| | | |
| | | /代ç 管ç/WCS/WIDESEAWCS_Client/package.json |
| | | /代ç 管ç/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json |
| | |
| | | using System; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | } |
| | | |
| | | public IRepository<Dt_KLSLocationInfo> Repository => BaseDal; |
| | | /// <summary> |
| | | /// è·åå¯ç¨ç©ºè´§ä½ |
| | | /// </summary> |
| | | /// <param name="AreaCode"></param> |
| | | /// <param name="containerType"></param> |
| | | /// <returns></returns> |
| | | public Dt_KLSLocationInfo GetFreeLocationInfo(string AreaCode, int containerType) |
| | | { |
| | | Dt_KLSLocationInfo? kLSLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == AreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType); |
| | | return kLSLocationInfo; |
| | | } |
| | | |
| | | public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | try |
| | | { |
| | | (bool, string, object?) result = ModelValidate.ValidateModelData(initializationLocationDTO); |
| | | if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2); |
| | | |
| | | List<Dt_KLSLocationInfo> locationInfos = new List<Dt_KLSLocationInfo>(); |
| | | for (int i = 9; i < initializationLocationDTO.MaxRow; i++) |
| | | { |
| | | for (int j = 0; j < initializationLocationDTO.MaxColumn; j++) |
| | | { |
| | | for (int k = 0; k < initializationLocationDTO.MaxLayer; k++) |
| | | { |
| | | Dt_KLSLocationInfo locationInfo = new Dt_KLSLocationInfo() |
| | | { |
| | | Column = j + 1, |
| | | EnableStatus = EnableStatusEnum.Normal.ObjToInt(), |
| | | Layer = k + 1, |
| | | LocationStatus = LocationStatusEnum.Free.ObjToInt(), |
| | | RoadwayNo = $"{initializationLocationDTO.Roadway}", |
| | | Row = i + 1, |
| | | LocationType = LocationTypeEnum.SmallPallet.ObjToInt(), |
| | | Depth = initializationLocationDTO.Depth, |
| | | }; |
| | | locationInfo.LocationCode = $"{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}"; |
| | | locationInfo.LocationName = $"{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±"; |
| | | locationInfos.Add(locationInfo); |
| | | } |
| | | } |
| | | } |
| | | BaseDal.AddData(locationInfos); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.Basic |
| | | { |
| | | [ModelValidate] |
| | | public class InitializationLocationDTO |
| | | { |
| | | /// <summary> |
| | | /// å··éå· |
| | | /// </summary> |
| | | [PropertyValidate("å··éå·", NotNullAndEmpty = true)] |
| | | public string Roadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¡ |
| | | /// </summary> |
| | | [PropertyValidate("è¡", MinValue = 1, IsContainMinValue = false)] |
| | | public int MaxRow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | [PropertyValidate("å", MinValue = 1, IsContainMinValue = false)] |
| | | public int MaxColumn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | [PropertyValidate("å±", MinValue = 1, IsContainMinValue = false)] |
| | | public int MaxLayer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åæ·±è´§ä½ |
| | | /// </summary> |
| | | [PropertyValidate("深度", MinValue = 1, NotNullAndEmpty = true, IsContainMinValue = true)] |
| | | public int Depth { get; set; } |
| | | } |
| | | } |
| | |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="BasicInfo\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | public interface IKLSLocationInfoService : IService<Dt_KLSLocationInfo> |
| | | { |
| | | public IRepository<Dt_KLSLocationInfo> Repository { get; } |
| | | |
| | | WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO); |
| | | /// <summary> |
| | | /// è·åå¯ç¨ç©ºè´§ä½ |
| | | /// </summary> |
| | | /// <param name="AreaCode"></param> |
| | | /// <returns></returns> |
| | | Dt_KLSLocationInfo GetFreeLocationInfo(string AreaCode, int containerType); |
| | | } |
| | | } |
| | |
| | | public int StationType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 对åºå åæºæ-å-å± |
| | | /// 对åºåå车ç¹ID |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "对åºå åæºæ-å-å±")] |
| | | public string StackerCraneStationCode { get; set; } |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "对åºåå车ç¹ID")] |
| | | public string RGVStationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç«å°è®¾å¤ç¼å· |
| | |
| | | public string StationDeviceCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å åæºç¼å· |
| | | /// RGVç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å åæºç¼å·")] |
| | | public string StackerCraneCode { get; set; } |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "RGVç¼å·")] |
| | | public string RGVCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// AGVç«å°ç¼å· |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// åå§åè´§ä½ |
| | | /// </summary> |
| | | /// <param name="initializationLocationDTO"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("InitializationLocation"), AllowAnonymous] |
| | | public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | return Service.InitializationLocation(initializationLocationDTO); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="AreaCode">åºåå·</param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("LocationInquiry"), AllowAnonymous] |
| | | public object LocationInquiry(string AreaCode) |
| | | { |
| | | WebResponseContent content = _taskService.LocationInquiry(AreaCode); |
| | |
| | | { |
| | | int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt(); |
| | | //è·åè´§ä½ä¿¡æ¯ |
| | | 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() |
| | | Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"æªæ¾å°ç»ç¹åºåºã{taskDTO.toAreaCode}ãå¯ç¨ç©ºè´§ä½ï¼"); |
| | | Dt_Task dt_Task = new() |
| | | { |
| | | TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | WMSTaskNum = taskDTO.taskCode, |
| | | WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | Grade = taskDTO.taskPriority, |
| | | PalletCode = taskDTO.containerCode, |
| | | Roadway = kLSLocationInfo.RoadwayNo, |
| | |
| | | { |
| | | try |
| | | { |
| | | List<Dt_RGVLocationInfo>? rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | if (rGVLocationInfos.Count < 1) throw new Exception($"æªæ¾å°ç»ç¹åºåºã{taskDTO.toAreaCode}ãå¯ç¨ç©ºè´§ä½ï¼"); |
| | | var rGVLocationInfo = rGVLocationInfos.OrderBy(x => x.Depth).First(); |
| | | Dt_Task dt_Task = new Dt_Task() |
| | | { |
| | | TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | WMSTaskNum = taskDTO.taskCode, |
| | | WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | Grade = taskDTO.taskPriority, |
| | | PalletCode = taskDTO.containerCode, |
| | | Roadway = rGVLocationInfo.RoadwayNo, |
| | | TaskState = TaskStatusEnum.New.ObjToInt(), |
| | | TaskType = taskType, |
| | | SourceAddress = taskDTO.fromLocationCode, |
| | | CurrentAddress = taskDTO.fromLocationCode, |
| | | NextAddress = rGVLocationInfo.LocationCode,//æ¾å
¥åºç«å°å¯¹åºçå¤å½¢æ£æµç¼å· |
| | | TargetAddress = rGVLocationInfo.LocationCode, |
| | | Creater = "WMS", |
| | | }; |
| | | rGVLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt(); |
| | | Db.Ado.BeginTran(); |
| | | |
| | | BaseDal.AddData(dt_Task); |
| | | _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo); |
| | | Db.Ado.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | { |
| | | gALAXISTaskInfo.groupId = DateTime.Now.ToString("yyMMddHHmmss"); |
| | | gALAXISTaskInfo.msgTime = DateTime.Now.ToString(); |
| | | gALAXISTaskInfo.tasks = new List<GALAXISTask>(); |
| | | foreach (var task in tasks) |
| | | { |
| | | GALAXISTask gALAXISTask = new GALAXISTask() |