huangxiaoqiang
2025-07-16 c3ed42924f19d383dd643814b754d60b392496d3
添加常温直接出库功能,增加实框入库存在任务发往异常口
已修改12个文件
309 ■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/api/buttons.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Location/ILocationInfoService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,7 +12,7 @@
    "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
    //连接字符串
    //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WCSDBB2F;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    //跨域
    "Cors": {
        "PolicyName": "CorsIpAccess", //策略名称
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -443,12 +443,24 @@
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
                    task.TaskState = (int)TaskOutStatusEnum.OutNew;
                    task.CurrentAddress = taskDTO.RoadWay;
                    task.NextAddress = stationinfo.stationChildCode;
                    task.SourceAddress = taskDTO.SourceAddress;
                    task.TargetAddress = taskDTO.TargetAddress;
                    if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                    {
                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1017" && x.stationType == 10&&x.Roadway==taskDTO.RoadWay);
                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
                        task.CurrentAddress = taskDTO.SourceAddress;
                        task.NextAddress = stationinfo.stationChildCode;
                        task.SourceAddress = taskDTO.SourceAddress;
                        task.TargetAddress = taskDTO.TargetAddress;
                    }
                    else
                    {
                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
                        task.CurrentAddress = taskDTO.RoadWay;
                        task.NextAddress = stationinfo.stationChildCode;
                        task.SourceAddress = taskDTO.SourceAddress;
                        task.TargetAddress = taskDTO.TargetAddress;
                    }
                }
                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                {
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -24,6 +24,7 @@
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_TaskInfoRepository;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
namespace WIDESEAWCS_TaskInfoService
@@ -204,7 +205,15 @@
                var hasTask = await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode);
                if (hasTask != null)
                {
                    return content.OK("当前托盘存在任务");
                    var taskExecuting = BaseDal.QueryFirst(x => x.PalletCode == palletCode && x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting);
                    if (taskExecuting != null)
                    {
                        taskExecuting.ExceptionMessage = "未接收到线体完成信号系统内部自动完成";
                        Delete(taskExecuting);
                    }
                    ConsoleHelper.WriteErrorLine($"当前托盘存在任务:【{palletCode}】");
                    QuartzLogger.WriteLogToFile($"任务异常未完成", $"当前托盘存在任务:【{palletCode}】{Environment.NewLine}");
                }
                var wmsIpAddrss = string.Empty;
@@ -764,7 +773,7 @@
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
                {
                    if (!task.Roadway.Contains("GW"))
                    if (!task.Roadway.Contains("GW") && task.TaskType != (int)TaskOutboundTypeEnum.InToOut)
                    {
                        var routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress);
                        if (!routers.Any()) return WebResponseContent.Instance.Error($"未找到设备路由信息");
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -344,7 +344,7 @@
                }
                else
                {
                    if (content.Message != "请求过于频繁,请稍后再试" || content.Message != "无法获取目标地址")
                    if (content.Message != "请求过于频繁,请稍后再试" && content.Message != "无法获取目标地址")
                    {
                        WriteInfo(conveyorLine.DeviceName, content.Message);
                        conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode);
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -102,7 +102,17 @@
                                            builder.AppendLine();
                                            ConsoleHelper.WriteColorLine(builder, ConsoleColor.Blue);
                                            commonStackerCrane.LastTaskType = task.TaskType;
                                            _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                            if(task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                                            {
                                                task.TaskState = (int)TaskOutStatusEnum.SC_OutExecuting;
                                                _taskRepository.AddData(task);
                                                _taskService.StackCraneTaskCompleted(task.TaskNum);
                                            }
                                            else
                                            {
                                                _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                            }
                                        }
                                    }
                                    else
@@ -496,7 +506,18 @@
                }
                else
                {
                    if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ")) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                    if ( task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                    {
                        string[] endCodes = task.TargetAddress.Split("-");
                        stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
                        stackerCraneTaskCommand.EndColumn = Convert.ToInt16(endCodes[1]);
                        stackerCraneTaskCommand.EndLayer = Convert.ToInt16(endCodes[2]);
                        string[] sourceCodes = task.SourceAddress.Split("-");
                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]) % 2 != 0 ? (short)1 : (short)2;
                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                    }
                    else if (((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ")) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                    {
                        string[] endCodes = task.NextAddress.Split("-");
                        stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
Code Management/WMS/WIDESEA_WMSClient/src/api/buttons.js
@@ -140,7 +140,16 @@
    onClick: function () {
      
    }
  }
  },{
    name: '手动出库',
    type: 'primary',
    // color: '#529b2e',
    value: 'HandOutTask',
    onClick: function () {
    }
  },
]
export default buttons
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx
@@ -33,6 +33,27 @@
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        var HandOutTask = this.buttons.find(x => x.value == "HandOutTask");
        if (HandOutTask != null) {
          HandOutTask.onClick = () => {
                let rows = this.$refs.table.getSelected();
                if (rows.length == 0) return this.$error("请选择数据!");
                this.http
                    .post("api/LocationInfo/HandOutTask?locationID="+rows[0].id, "","数据处理中...")
                    .then((x) => {
                        if (x.status) {
                            this.$Message.success('成功.');
                            this.refresh();
                        } else {
                            return this.$error(x.message);
                        }
                    });
            }
        }
        var btninitializeLocation = this.buttons.find(x => x.value == "initializeLocation");
        if (btninitializeLocation != null) {
            btninitializeLocation.onClick = () => {
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Location/ILocationInfoService.cs
@@ -14,4 +14,6 @@
    Task<WebResponseContent> initializeLocation(int locationID);
    WebResponseContent CreateLocation(int x, int y, int z, int locType, int areaId);
    WebResponseContent HandOutTask(int locationID);
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -3,7 +3,10 @@
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Core;
using WIDESEA_Core.Const;
using WIDESEA_DTO;
using WIDESEA_DTO.WMS;
using WIDESEA_IServices;
using WIDESEA_Model.Models;
namespace WIDESEA_StorageBasicService;
@@ -19,7 +22,9 @@
    private readonly IDt_WareAreaInfoRepository _wareAreaInfoRepository;
    private readonly IPointStackerRelationRepository _pointStackerRelationRepository;
    private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository;
    private readonly IDt_AreaInfoRepository _AreaInfoRepository;
    private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
    private readonly ISys_ConfigService _configService;
    private readonly IMapper _mapper;
    public LocationInfoService(ILocationInfoRepository BaseDal,
@@ -32,7 +37,9 @@
                                    ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository,
                                    IStockInfoDetailRepository stockInfoDetailRepository,
                                    IMapper mapper,
                                    IDt_TaskService taskService) : base(BaseDal)
                                    IDt_TaskService taskService,
                                    IDt_AreaInfoRepository AreaInfoRepository,
                                    ISys_ConfigService configService) : base(BaseDal)
    {
        _unitOfWorkManage = unitOfWorkManage;
        _taskRepository = taskRepository;
@@ -44,6 +51,8 @@
        _stockInfoDetailRepository = stockInfoDetailRepository;
        _mapper = mapper;
        _taskService = taskService;
        _AreaInfoRepository = AreaInfoRepository;
        _configService= configService;
    }
    /// <summary>
@@ -117,6 +126,94 @@
        return base.UpdateData(saveModel);
    }
    public WebResponseContent HandOutTask(int locationID)
    {
        LogFactory.GetLog("手动出库任务").InfoFormat(true, "手动出库任务", JsonConvert.SerializeObject(locationID), App.User.UserName);
        WebResponseContent content=new WebResponseContent();
        try
        {
            Dt_AreaInfo areaInfo = _AreaInfoRepository.QueryFirst(x => x.AreaCode == "CWSC1");
            DtLocationInfo location = BaseDal.QueryFirst(x => x.Id == locationID);
            DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationId == location.Id && x.LocationCode == location.LocationCode);
            if (location.AreaId == areaInfo.AreaID)
            {
                Dt_Task task = new Dt_Task
                {
                    Grade = 1,
                    Roadway = location.RoadwayNo,
                    TargetAddress = "001-035-001",
                    Dispatchertime = DateTime.Now,
                    MaterialNo = "",
                    NextAddress = "001-035-001",
                    OrderNo = null,
                    PalletCode = stock == null ? "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000) : stock.PalletCode,
                    SourceAddress = location.LocationCode,
                    CurrentAddress = location.LocationCode,
                    TaskState = (int)TaskOutStatusEnum.OutNew,
                    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                    TaskNum = _taskRepository.GetTaskNo().Result,
                    Creater = "System", // 修正拼写错误
                    CreateDate = DateTime.Now,
                    TaskId = 0,
                    ProductionLine = stock == null ? "" : stock.ProductionLine,
                    ProcessCode = stock == null ? "" : stock.ProcessCode,
                };
                var taskDTO = new WMSTaskDTO
                {
                    TaskNum = task.TaskNum.Value,
                    Grade = task.Grade.Value,
                    PalletCode = task.PalletCode,
                    RoadWay = task.Roadway,
                    SourceAddress = task.SourceAddress,
                    TargetAddress = task.TargetAddress,
                    TaskState = task.TaskState.Value,
                    Id = 0,
                    TaskType = task.TaskType,
                    ProductionLine = task.ProductionLine,
                };
                var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
                var ReceiveByWMSTask = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveByWMSTask)?.ConfigValue;
                if (ReceiveByWMSTask == null || ipAddress == null)
                {
                    throw new Exception("WMS IP 未配置");
                }
                var wmsIpAddrss = ipAddress + ReceiveByWMSTask;
                var respon = HttpHelper.Post(wmsIpAddrss, JsonConvert.SerializeObject(taskDTO));   //http://localhost:9291/api/Task/ReceiveTask,
                if (respon != null)
                {
                    WebResponseContent respone = JsonConvert.DeserializeObject<WebResponseContent>(respon.ToString());
                    if (respone.Status)
                    {
                        var taskId = _taskRepository.AddData(task);
                        location.LocationStatus = (int)LocationEnum.InStockDisable;
                        BaseDal.UpdateData(location);
                    }
                    else
                    {
                        throw new Exception("WCS处理失败:" + respone.Message);
                    }
                }
                else
                {
                    throw new Exception("WCS处理失败");
                }
                return content.OK("任务添加成功!");
            }
            else
            {
                return content.Error("不是常温货位,不允许出库!!");
            }
        }
        catch (Exception ex)
        {
            return content.Error(ex.Message);
        }
    }
    #region 初始化库位
    public async Task<WebResponseContent> initializeLocation(int locationID)
    {
@@ -132,7 +229,7 @@
            DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationId == location.Id);
            if(stock == null)
            {
                location.LocationStatus= (int)LocationEnum.Lock;
                location.LocationStatus= (int)LocationEnum.Free;
                BaseDal.UpdateData(location);
            }
            else
@@ -151,7 +248,7 @@
                await AddStockInfoHtyAsync(stockInfo_Hty);
                
                location.LocationStatus = (int)LocationEnum.Lock;
                location.LocationStatus = (int)LocationEnum.Free;
                BaseDal.UpdateData(location);
                _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, LastStatus, (int)StatusChangeTypeEnum.ManualOperation, 0);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -617,13 +617,13 @@
        }
        LogFactory.GetLog("任务完成").InfoFormat(true, "验证任务是否存在", JsonConvert.SerializeObject(task));
        if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
        {
            return await CompleteInToOutTaskAsync(task);
        }
        // 验证库存是否存在
        var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode);
        if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
        {
            return await CompleteInToOutTaskAsync(task,stock);
        }
        // 根据任务类型调用相应的完成任务方法
        switch (task.TaskType)
        {
@@ -648,7 +648,6 @@
            case (int)TaskRelocationTypeEnum.Relocation:
                return await CompleteTransferTaskAsync(task, stock);
            default:
                return content.Error("任务类型不存在");
        }
@@ -675,6 +674,11 @@
            var stock = await QueryStockInfo(input.PalletCode);
            if (stock != null)
            {
                List<string> strings = new List<string>() { "GW","CW","FR"};
                if (stock.AreaCode.Contains(strings))
                {
                    return content.Error($"托盘【{stock.PalletCode}】存在库存不允许入库");
                }
                Dt_Task taskNew = new Dt_Task
                {
                    Grade = 1,
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1,4 +1,5 @@
using Masuit.Tools;
using Mapster;
using Masuit.Tools;
using SqlSugar;
using WIDESEA_Common.CustomModels;
using WIDESEA_Core.Const;
@@ -183,26 +184,28 @@
            if (!result.Success)
            {
                var taskNG = new Dt_Task
                {
                    CurrentAddress = input.Position,
                    Grade = 1,
                    Roadway = input.Roadways,
                    TargetAddress = stationManager.stationNGLocation,
                    Dispatchertime = DateTime.Now,
                    MaterialNo = "",
                    NextAddress = stationManager.stationNGChildCode,
                    OrderNo = null,
                    PalletCode = input.PalletCode,
                    SourceAddress = stationManager.stationLocation,
                    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                    TaskNum = await BaseDal.GetTaskNo(),
                    Creater = "System",
                    ProductionLine = result.ProductionLine,
                    ProcessCode = result.ProcessCode,
                };
                return taskNG;
                //var taskNG = new Dt_Task
                //{
                //    CurrentAddress = input.Position,
                //    Grade = 1,
                //    Roadway = input.Roadways,
                //    TargetAddress = stationManager.stationNGLocation,
                //    Dispatchertime = DateTime.Now,
                //    MaterialNo = "",
                //    NextAddress = stationManager.stationNGChildCode,
                //    OrderNo = null,
                //    PalletCode = input.PalletCode,
                //    SourceAddress = stationManager.stationLocation,
                //    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                //    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                //    TaskNum = await BaseDal.GetTaskNo(),
                //    Creater = "System",
                //    ProductionLine = result.ProductionLine,
                //    ProcessCode = result.ProcessCode,
                //};
                //return taskNG;
                Console.WriteLine($"{result.MOMMessage}");
                return null;
            }
            if (result.SerialNos.Count <= 0)
@@ -586,17 +589,42 @@
    #region 直接出库任务完成
    public async Task<WebResponseContent> CompleteInToOutTaskAsync(Dt_Task task)
    public async Task<WebResponseContent> CompleteInToOutTaskAsync(Dt_Task task,DtStockInfo stock)
    {
        WebResponseContent content = new WebResponseContent();
        try
        {
            //添加历史
            var taskHty = CreateHistoricalTask(task);
            // 添加历史任务
            var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
            //删除任务
            BaseDal.DeleteData(task);
            DtStockInfo_Hty stockInfo_Hty = null;
            if (stock != null)
            {
                stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>();
                stockInfo_Hty.ModifyDate = DateTime.Now;
            }
            var taskHty = task.Adapt<Dt_Task_Hty>();
            taskHty.FinishTime = DateTime.Now;
            taskHty.OperateType = App.User.UserName != null ? (int)OperateTypeEnum.人工完成 : (int)OperateTypeEnum.自动完成;
            taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System";
            var location = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
            int lastStatus = location.LocationStatus;
            location.LocationStatus = (int)LocationEnum.Free;
            task.TaskState = (int)TaskOutStatusEnum.OutFinish;
            _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, lastStatus, (int)StatusChangeTypeEnum.AutomaticDelivery, task.TaskNum);
            // 事务处理
            await _unitOfWorkManage.UseTranAsync(async () =>
            {
                if (stockInfo_Hty != null)
                {
                    await DeleteStockInfoAsync(stock.Id);
                    await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
                    await AddStockInfoHtyAsync(stockInfo_Hty);
                }
                await UpdateLocationAsync(location);
                await DeleteTaskAsync(task.TaskId);
                await AddTaskHtyAsync(taskHty);
            });
            return content.OK();
        }
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
@@ -30,4 +30,10 @@
    {
        return await Service.initializeLocation(locationID);
    }
    [HttpPost, AllowAnonymous, Route("HandOutTask")]
    public WebResponseContent HandOutTask(int locationID)
    {
        return Service.HandOutTask(locationID);
    }
}