陈勇
2 天以前 6b74e1dcf5642c8f56975471e27780d695953989
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageTaskServices/AutoTask/BackgroundJob.cs
@@ -1,12 +1,6 @@
using Masuit.Tools;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Const;
using WIDESEA_DTO.WMS;
using WIDESEA_IServices;
@@ -42,7 +36,6 @@
            _unitOfWorkManage = unitOfWorkManage;
            _MESLockInfoRepository = mESLockInfoRepository;
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
@@ -51,7 +44,7 @@
                var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == "5");
                if (area.AreaStatus != 1l) { return Task.CompletedTask; }
                var lockInfo = _palletStockInfoRepository.Db.Queryable<Dt_MESLockInfo>()
                var lockInfo = _MESLockInfoRepository.Db.Queryable<Dt_MESLockInfo>()
                    //.Where(x => x.LockStatue == 0)
                    .Includes(x => x.CarBodyInfo)
                    .OrderBy(x => x.sequenceNo) // æŽ’序
@@ -78,10 +71,6 @@
                {
                    stationLists = _stationManagerRepository.QueryData(x => x.RoadwayNo == lockCar.TCLine && x.stationType == 2 && x.stationStatus == "1" && x.stationArea == "4");
                }
                //else if (item.CarBodyInfo.CarType == 3)
                //{
                //    stationLists = _stationManagerRepository.QueryData(x => x.RoadwayNo == item.TCLine && x.stationType == 7 && x.stationStatus == "1" && x.stationArea == "3");
                //}
                var stock = _VVStockInfoRepository.QueryFirst(x => x.carBodyID == lockCar.carBodyID);
                var lockStock = _palletStockInfoRepository.QueryFirst(x => x.carBodyID == lockCar.carBodyID);
@@ -108,7 +97,7 @@
                // åˆ›å»ºå¹¶æ·»åŠ ä»»åŠ¡åˆ°æ•°æ®åº“
                hasTask = new Dt_Task
                {
                    Grade = 1,
                    Grade = 3,
                    Roadway = Outstation.Roadway,
                    TargetAddress = "RB043",
                    Dispatchertime = DateTime.Now,
@@ -125,6 +114,7 @@
                    CreateDate = DateTime.Now,
                    TaskId = 0,
                    CarType = stock.CarType,
                    RoadwayNo = stock.RoadwayNo,
                };
                // åˆ›å»ºä»»åŠ¡ä¼ è¾“ç”¨çš„DTO对象
@@ -278,7 +268,8 @@
                TaskType = task.TaskType,
                pvi = task.PVI,
                NextAddress = task.NextAddress,
                CarType = task.CarType
                CarType = task.CarType,
                RoadwayNo = task.RoadwayNo,
            };
        }