| | |
| | | /// </summary> |
| | | [Description("è¾
æAGVä»»å¡åé")] |
| | | Agv_FLSendTask, |
| | | /// <summary> |
| | | /// æåAGVä»»å¡åé |
| | | /// </summary> |
| | | [Description("æåAGVä»»å¡åé")] |
| | | Agv_CPSendTask, |
| | | |
| | | /// <summary> |
| | | /// PPAGVä»»å¡åé |
| | |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TestWCS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //è·¨å |
| | | "Cors": { |
| | | "PolicyName": "CorsIpAccess", //çç¥åç§° |
| | |
| | | if (taskTypeGroup == TaskTypeGroup.InboundGroup) |
| | | { |
| | | stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StationDeviceCode == item.SourceAddress); |
| | | if (stationManger==null && task.TaskType==TaskTypeEnum.InProduct.ObjToInt()) |
| | | { |
| | | stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode==task.SourceAddress); |
| | | //è½¬æ¢æåä»èµ·ç¹ç«å° |
| | | item.SourceAddress = stationManger.StationCode; |
| | | task.CurrentAddress = stationManger.StationCode; |
| | | task.SourceAddress = stationManger.StationCode; |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | else |
| | | { |
| | | task.NextAddress = taskTypeGroup == TaskTypeGroup.InboundGroup ? task.TargetAddress : router.NextPosi; |
| | | if (item.RoadWay.Contains("AGV")) |
| | | if (item.RoadWay.Contains("AGV_FL")) |
| | | { |
| | | task.DeviceCode = item.RoadWay; |
| | | task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | } |
| | | else if(item.RoadWay.Contains("AGV_FL")) |
| | | { |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | | task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | } |
| | | else |
| | | { |
| | | task.DeviceCode = stationManger.StationDeviceCode; |
| | |
| | | /// </summary> |
| | | public byte Undefined2 { get; set; } |
| | | } |
| | | public class R_ConveyorLineCPInfo : DeviceCommand |
| | | { |
| | | /// <summary> |
| | | /// å°ä½æä»¤ |
| | | /// </summary> |
| | | public short ConveyArrivaled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§å°å |
| | | /// </summary> |
| | | public short StartPos { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»ç¹å°å |
| | | /// </summary> |
| | | public short EndPos { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçå· |
| | | /// </summary> |
| | | /// <summary> |
| | | |
| | | [DataLength(20)] |
| | | public string Barcode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [DataLength(20)] |
| | | public string TaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç±»å |
| | | /// </summary> |
| | | public short WorkType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¨¡å¼ |
| | | /// </summary> |
| | | public short WorkMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ ¡éªä½ |
| | | /// </summary> |
| | | public short CheckPos { get; set; } |
| | | } |
| | | public class R_ConveyorLineStatus |
| | | { |
| | | /// <summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks.ConveyorLineJob |
| | | { |
| | | public enum R_ConveyorLineCPDB |
| | | { |
| | | /// <summary> |
| | | /// å°ä½æä»¤ |
| | | /// </summary> |
| | | ConveyArrivaled, |
| | | /// <summary> |
| | | /// èµ·å§å°å |
| | | /// </summary> |
| | | StartPos, |
| | | /// <summary> |
| | | /// ç»ç¹å°å |
| | | /// </summary> |
| | | EndPos, |
| | | /// <summary> |
| | | /// æçå· |
| | | /// </summary> |
| | | Barcode, |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | TaskNum, |
| | | /// <summary> |
| | | /// ç±»å |
| | | /// </summary> |
| | | WorkType, |
| | | /// <summary> |
| | | /// æ¨¡å¼ |
| | | /// 1å
¥åºæ¨¡å¼ |
| | | /// 2çäº§æ¨¡å¼ |
| | | /// </summary> |
| | | WorkMode, |
| | | /// <summary> |
| | | /// æ ¡éªä½ |
| | | /// </summary> |
| | | CheckPos |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks.ConveyorLineJob |
| | | { |
| | | public enum W_ConveyorLineCPDB |
| | | { |
| | | /// <summary> |
| | | /// ç§»å¨æä»¤ |
| | | /// </summary> |
| | | ConveyArrival, |
| | | /// <summary> |
| | | /// èµ·å§å°å |
| | | /// </summary> |
| | | StartPos, |
| | | /// <summary> |
| | | /// ç»ç¹å°å |
| | | /// </summary> |
| | | EndPos, |
| | | /// <summary> |
| | | /// æçå· |
| | | /// </summary> |
| | | Barcode, |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | TaskNum, |
| | | /// <summary> |
| | | /// ç±»å |
| | | /// </summary> |
| | | WorkType, |
| | | /// <summary> |
| | | /// åæç±»å |
| | | /// </summary> |
| | | WorkMode, |
| | | /// <summary> |
| | | /// æ ¡éªä½ |
| | | /// </summary> |
| | | CheckPos |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && nameof(AGV_FLJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); |
| | | var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt() && nameof(AGV_CPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); |
| | | foreach (var task in newTasks) |
| | | { |
| | | try |
| | | { |
| | | if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt()) |
| | | if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt()) |
| | | task.CurrentAddress = GetAGVAddress(task.CurrentAddress); |
| | | else |
| | | task.NextAddress = GetAGVAddress(task.NextAddress); |
| | |
| | | { |
| | | TaskCode = task.AgvTaskNum, |
| | | ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, |
| | | TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", |
| | | TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "CPC" : "CPR", |
| | | ctnrCode = task.PalletCode, |
| | | PositionCodePath = new List<CodePath>() |
| | | { |
| | |
| | | } |
| | | }, |
| | | }; |
| | | WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_FLSendTask); |
| | | WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_CPSendTask); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | |
| | | task.ExceptionMessage = ex.Message; |
| | | } |
| | | } |
| | | if (newTasks.Count>0) |
| | | { |
| | | _taskService.UpdateData(newTasks); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(AGV_FLJob), ex.Message, ex); |
| | | WriteError(nameof(AGV_CPJob), ex.Message, ex); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | | using ICacheService = WIDESEAWCS_Core.Caches.ICacheService; |
| | | |
| | | namespace WIDESEAWCS_Tasks.æåä» |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class ConveyorLineJob_CP : JobBase, IJob |
| | |
| | | WriteError(device.DeviceName, $"请é
ç½®ä»åºè®¾å¤ä¿¡æ¯"); |
| | | return Task.CompletedTask; |
| | | } |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList(); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (item.StationType==StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProWrite!=null) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId); |
| | | if (task!=null) |
| | | { |
| | | //è·åç«å° |
| | | Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode); |
| | | if (stationManger == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | //æ¥è¯¢è·¯ç± |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == task.CurrentAddress); |
| | | if (router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°è·¯ç±é
置信æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, nextAddress: router.NextPosi, targetAddress: router.NextPosi); |
| | | device.SetValue(W_ConveyorLineCPDB.StartPos, task.CurrentAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.EndPos, router.NextPosi, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.Barcode, task.PalletCode, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.TaskNum, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.WorkType, task.PalletType, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.WorkMode, 1, item.StationCode); |
| | | //å¯å¨æä»¤ |
| | | device.SetValue(W_ConveyorLineCPDB.ConveyArrival, 1, item.StationCode); |
| | | |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null) |
| | | { |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.EndPos.ToString()==item.StationCode) |
| | | { |
| | | short isCanTake = device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_IsCanTake, item.StationCode); |
| | | if (conveyorLineInfoRead.ConveyArrivaled==1 && isCanTake==1) |
| | | { |
| | | //è·åä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt()); |
| | | //è·åç«å° |
| | | if (task!=null) |
| | | { |
| | | Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode); |
| | | if (stationManger == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | //æ¥è¯¢è·¯ç± |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == task.NextAddress); |
| | | if (router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°è·¯ç±é
置信æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode); |
| | | if (string.IsNullOrEmpty(locationCode)) |
| | | { |
| | | WriteError(item.StationName, $"请æ±åé
è´§ä½è¿åä¿¡æ¯é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Execute,deviceCode: router.ChildPosiDeviceCode, nextAddress: locationCode, targetAddress: locationCode, currentAddress: router.StartPosi); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æååºåºè¯¦æ
å |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_OutProStockInfo), "æååºåºè¯¦æ
å")] |
| | | public class Dt_OutProStockInfo : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æç»ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æç»ä¸»é®")] |
| | | public int OrderDetailId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å")] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "éå®è®¢åå·")] |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// å®¢æ· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "客æ·")] |
| | | public string Customer { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åç¼ç ")] |
| | | public string PCode { get; set; } |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åçæ¬")] |
| | | public string PVer { get; set; } |
| | | /// <summary> |
| | | /// 产å卿 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "产å卿")] |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// åºåä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºå主é®")] |
| | | public int StockId { get; set; } |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | /// <summary> |
| | | /// åå§åºåé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå§åºåé")] |
| | | public float OriginalQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åé
åºåºé |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åé
åºåºé")] |
| | | public float AssignQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¶æ¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è¶æ¡å·")] |
| | | public string PalletCode { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»»å¡å·")] |
| | | public int? TaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¶æ")] |
| | | public int Status { get; set; } |
| | | } |
| | | } |
| | |
| | | StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(), |
| | | proStockInfoDetails = proStockInfoDetails |
| | | }; |
| | | //åé
è´§ä½ |
| | | locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfo.RoadwayNo, ((PalletTypeEnum)proStockInfo.PalletType).ObjToInt(), proStockInfo.WarehouseId); |
| | | Dt_Task newTask = new Dt_Task() |
| | | { |
| | | CurrentAddress = bagInfoModel.WorkCenter, |
| | | Grade = 0, |
| | | NextAddress = locationInfo.LocationCode, |
| | | NextAddress = "", |
| | | PalletCode = proStockInfo.PalletCode, |
| | | Roadway = locationInfo.RoadwayNo, |
| | | SourceAddress = bagInfoModel.WorkCenter, |
| | | TargetAddress = locationInfo.LocationCode, |
| | | TargetAddress = "", |
| | | TaskType = TaskTypeEnum.InProduct.ObjToInt(), |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | WarehouseId = warehouse.WarehouseId, |
| | | PalletType = proStockInfo.PalletType |
| | | }; |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | _basicRepository.LocationInfoRepository.UpdateData(locationInfo); |
| | | Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand(); |
| | | Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand(); |
| | | _unitOfWorkManage.CommitTran(); |
| | |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// çææååºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="Id">åºåºè®¢åID</param> |
| | | /// <param name="StationCode">ç«å°å°å</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent OutProductTask(int Id,string StationCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | (List<Dt_Task>, List<Dt_ProStockInfo>?, List<Dt_ProOutOrderDetail>?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>?) result = |
| | | OutProductTaskDataHandle(Id, StationCode); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// å¤çæååºåºæ°æ® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public (List<Dt_Task>, List<Dt_ProStockInfo>?, List<Dt_ProOutOrderDetail>?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>?) OutProductTaskDataHandle(int Id, string StationCode) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_ProStockInfo> proStockInfos = new List<Dt_ProStockInfo>(); |
| | | List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>(); |
| | | List<Dt_OutProStockInfo> outProStockInfos=new List<Dt_OutProStockInfo>(); |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | |
| | | return (tasks, proStockInfos, proOutOrderDetails, outProStockInfos, locationInfos); |
| | | } |
| | | /// <summary> |
| | | /// åºåæ°æ®è½¬åºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="stockInfos"></param> |
| | |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //æ§WMSæ°æ®åºè¿æ¥ |
| | | //"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //è·¨å |