|  |  |  | 
|---|
|  |  |  | using AutoMapper; | 
|---|
|  |  |  | using HslCommunication; | 
|---|
|  |  |  | using Mapster; | 
|---|
|  |  |  | using Microsoft.AspNetCore.Components.Routing; | 
|---|
|  |  |  | using Newtonsoft.Json; | 
|---|
|  |  |  | using SqlSugar; | 
|---|
|  |  |  | using System.Diagnostics.CodeAnalysis; | 
|---|
|  |  |  | using System.Threading.Tasks; | 
|---|
|  |  |  | using WIDESEAWCS_BasicInfoRepository; | 
|---|
|  |  |  | using WIDESEAWCS_BasicInfoService; | 
|---|
|  |  |  | using WIDESEAWCS_Common; | 
|---|
|  |  |  | 
|---|
|  |  |  | using WIDESEAWCS_ITaskInfoRepository; | 
|---|
|  |  |  | using WIDESEAWCS_ITaskInfoService; | 
|---|
|  |  |  | using WIDESEAWCS_Model.Models; | 
|---|
|  |  |  | using WIDESEAWCS_QuartzJob; | 
|---|
|  |  |  | using WIDESEAWCS_QuartzJob.DeviceBase; | 
|---|
|  |  |  | using WIDESEAWCS_QuartzJob.Models; | 
|---|
|  |  |  | using WIDESEAWCS_QuartzJob.Repository; | 
|---|
|  |  |  | using WIDESEAWCS_QuartzJob.Service; | 
|---|
|  |  |  | using WIDESEAWCS_TaskInfoRepository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | namespace WIDESEAWCS_TaskInfoService | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | wmsIpAddrss = GetIpAddress(SysConfigKeyConst.WMSIP_BASE, SysConfigKeyConst.RequestTask); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var result = await HttpHelper.PostAsync(wmsIpAddrss, new { Position = sourceAddress, PalletCode = palletCode }.ToJsonString()); | 
|---|
|  |  |  | var result = await HttpHelper.PostAsync(wmsIpAddrss, new { Position = sourceAddress, PalletCode = palletCode, stationManager.productLine }.ToJsonString()); | 
|---|
|  |  |  | content = JsonConvert.DeserializeObject<WebResponseContent>(result); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!content.Status) | 
|---|
|  |  |  | 
|---|
|  |  |  | _taskHtyRepository.AddData(task_Hty); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (task.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | content = StackCraneTaskCompleted(task.TaskNum); | 
|---|
|  |  |  | return content; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | content = StackCraneTaskCompleted(task.TaskNum); | 
|---|
|  |  |  | return content; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | task.ModifyDate = DateTime.Now; | 
|---|
|  |  |  | task.Modifier = "System"; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return wcsBasez + address; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region 重写方法 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public override WebResponseContent DeleteData(object[] key) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | foreach (var item in key) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | var task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(item)); | 
|---|
|  |  |  | var taskHty = task.Adapt<Dt_Task_Hty>(); | 
|---|
|  |  |  | taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System"; | 
|---|
|  |  |  | _taskHtyRepository.AddData(taskHty); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return base.DeleteData(key); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #endregion 重写方法 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|