From 547436626cfe9cb01ae95b0bde9886b9cf46a9f2 Mon Sep 17 00:00:00 2001 From: qinchulong <qinchulong@hnkhzn.com> Date: 星期日, 02 三月 2025 23:51:05 +0800 Subject: [PATCH] 第一版完成 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index b317044..1fbfd07 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -19,6 +19,7 @@ using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; using SqlSugar; using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; using WIDESEAWCS_Common.LocationEnum; using WIDESEAWCS_Common.StockEnum; using WIDESEAWCS_Common.TaskEnum; @@ -46,6 +47,8 @@ private readonly IRepository<dt_batchInfo> _batchinfoRepository; private readonly IRepository<Dt_Task_hty> _taskhtyRepository; private readonly IUnitOfWorkManage _unitOfWorkManage; + private readonly IRepository<dt_errormsgInfo> _errorinfoRepository; + private readonly Idt_ErrormsginfoService _ErrormsginfoService; private readonly IMapper _mapper; private Dictionary<string, OrderByType> _taskOrderBy = new() @@ -74,6 +77,8 @@ IRepository<Dt_LocationInfo> locationRepository, IRepository<dt_batchInfo> batchRepository, IRepository<Dt_Task_hty> taskhtyRepository, + IRepository<dt_errormsgInfo> errorinfoRepository, + Idt_ErrormsginfoService errormsginfoService, IUnitOfWorkManage unitOfWorkManage, IMapper mapper) : base(BaseDal) { @@ -85,6 +90,8 @@ _batchinfoRepository = batchRepository; _taskhtyRepository = taskhtyRepository; _unitOfWorkManage = unitOfWorkManage; + _errorinfoRepository = errorinfoRepository; + _ErrormsginfoService = errormsginfoService; _mapper = mapper; } @@ -253,7 +260,7 @@ } if (workTpe.Equals("In")) { - task = BaseDal.QueryData(v=>v.TaskType==(int)TaskInboundTypeEnum.Inbound && v.TaskState==(int)TaskInStatusEnum.InNew).OrderBy(v=>v.CreateDate).First(); + task = BaseDal.QueryData(v=>v.TaskType==(int)TaskInboundTypeEnum.Inbound && v.TaskState==(int)TaskInStatusEnum.InNew).OrderByDescending(v=>v.Grade) .OrderBy(v=>v.CreateDate).First(); } else if (workTpe.Equals("Out")) { @@ -322,6 +329,7 @@ catch (Exception ex) { content = WebResponseContent.Instance.Error(ex.Message); + UpdateTaskExceptionMessage(task.TaskNum, ex.Message); } return content; } @@ -342,6 +350,7 @@ catch (Exception ex) { content = WebResponseContent.Instance.Error(ex.Message); + UpdateTaskExceptionMessage(task.TaskNum, ex.Message); } return content; } @@ -423,7 +432,7 @@ } catch (Exception ex) { - + UpdateTaskExceptionMessage(taskNum, ex.Message); } } @@ -570,7 +579,15 @@ stock.LocationCode = nawtask.TargetAddress; stock.Weight = (decimal)weight; stock.StockStatus = (int)stockEnum.Lock; - stock.BatchNo = batck.Batch; + stock.BatchNo = batck.InBatch; + if (nawtask.Remark== (int)MateTypeEnum.ZiChan) + { + stock.Remark = (int)MateTypeEnum.ZiChan; + } + else + { + stock.Remark = (int)MateTypeEnum.WaiGou; + } //淇敼璐т綅淇℃伅 var location = _locationRepository.QueryFirst(v=>v.LocationCode==nawtask.TargetAddress); location.LocationStatus = (int)LocationStatusEnum.InStock; -- Gitblit v1.9.3