| | |
| | | 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; |
| | |
| | | //ä»»å¡å®æé»è¾ |
| | | _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("ä»»å¡å®æ"); |