| | |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public partial class ScheduledTaskJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | |
| | | var tasknum = _taskService.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)); |
| | | Dt_Task dt_Task = new Dt_Task() |
| | | { |
| | | |
| | | TaskNum = tasknum, |
| | | WMSTaskNum = "GP" + tasknum, |
| | | Grade = 60, |
| | |
| | | #endregion |
| | | |
| | | #region 4F |
| | | List<string> stationCodes = new() { "0319882DD0313240", "0319882DD0313750" }; |
| | | List<string> stationCodes = new() { "0319882DD0313240", "0319882DD0313750"}; |
| | | var Stations = _StationInfoService.Repository.QueryData(x => stationCodes.Contains(x.StationCode)); |
| | | #region 鍏ユ彁鍗囨満浠诲姟 |
| | | var Station = Stations.FirstOrDefault(x => x.StationStatus == (int)LocationStatusEnum.InStock && x.IsOccupied == 0); |
| | |
| | | device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice; |
| | | if (device != null && device.IsConnected) |
| | | { |
| | | var reslur = device.GetValue<HoistEnum, short>(HoistEnum.FOutboundmaterialbox, "TSJC4F"); |
| | | if (device.GetValue<HoistEnum, short>(HoistEnum.FOutboundmaterialbox, "TSJC4F") == 1) |
| | | { |
| | | Dt_Task dt_Task = _taskService.Repository.QueryFirst(x => x.SourceAddress == "TSJC4F" /*&& x.TaskState < TaskStatusEnum.TakeFinish.ObjToInt()*/); |