xiaojiao
2 天以前 4a6319fa5be9ef5f9741c3507825667f523d9b2b
ÏîÄ¿´úÂë/WIDESEA_WCSServer/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -15,6 +15,7 @@
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.StationEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
@@ -462,6 +463,17 @@
                    //任务完成逻辑
                    _unitOfWorkManage.BeginTran();
                    // æŠŠå½“前任务查出来 ç„¶åŽæ¯ä¸€ä¸ªå­—段赋值给历史任务 ç„¶åŽåˆ é™¤å½“前任务 æ·»åŠ ä¸€æ¡åŽ†å²ä»»åŠ¡ // ç„¶åŽæŠŠè¿™ä¸ªä»»åŠ¡çš„ç»ˆç‚¹çš„å¯¹åº”ç«™å°çš„çŠ¶æ€è®¾ç½®ä¸ºå¯ç”¨
                    Dt_Task_Hty dt_Task_Hty = _mapper.Map<Dt_Task_Hty>(task);
                    dt_Task_Hty.TaskNum = task.TaskId;
                    Dt_StationManager dt_StationManager = _stationManagerRepository.QueryFirst(x => x.StationLocation == task.TargetAddress);
                    if(dt_StationManager == null) return content.Error($"任务{taskNum}的当前站台不存在");
                    dt_StationManager.StationStatus = ((int)StationEnum.Enable).ToString();
                    _taskHtyRepository.AddData(dt_Task_Hty);
                    BaseDal.DeleteData(task);
                    _stationManagerRepository.UpdateData(dt_StationManager);
                    _unitOfWorkManage.CommitTran();
                    content.OK("任务完成");