huanghongfeng
3 天以前 5ffc36a1db18d3112a9b50a9cf3953d7fcf21bae
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1,6 +1,7 @@
锘縰sing log4net.Core;
using Masuit.Tools;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using WIDESEA_Common;
using WIDESEA_Core.Const;
@@ -266,12 +267,19 @@
            if(cacheinfo.Towhereabouts =="" && cacheinfo.Towhereabouts == null) throw new Exception($"{input.PalletCode}杩愯緭鐩爣鍦板潃涓虹┖");
            return content.OK(data: cacheinfo.Towhereabouts);*/
            var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode);
            if (task == null) throw new Exception($"鏈壘鍒皗input.PalletCode}鎵樼洏淇℃伅");
            if (task.Towhereabouts == "" && task.Towhereabouts == null) throw new Exception($"{input.PalletCode}杩愯緭鐩爣鍦板潃涓虹┖");
            var task = await BaseDal.QueryFirstAsync(x => input.PalletCode.Contains(x.PalletCode));
            if (task != null)
            {
                if (task.Towhereabouts == "" && task.Towhereabouts == null) return content.Error($"{input.PalletCode}杩愯緭鐩爣鍦板潃涓虹┖");
            return content.OK(data: task.Towhereabouts);
            }
            else
            {
                Dt_Task_Hty dt_Task_Hty = _task_HtyRepository.QueryFirst(x => input.PalletCode.Contains(x.PalletCode) && x.CreateDate >= DateTime.Now.AddHours(-2));
                if (dt_Task_Hty == null) return content.Error($"鏈壘鍒皗input.PalletCode}鎵樼洏鍘嗗彶淇℃伅");
                if (dt_Task_Hty.Towhereabouts == null && dt_Task_Hty.Towhereabouts == "") return content.Error($"{input.PalletCode}鎵樼洏鍘嗗彶淇℃伅娌℃湁璁板綍鐩爣鍦板潃");
                return content.OK(data: dt_Task_Hty.Towhereabouts);
            }
        }
        catch (Exception err)
        {