| | |
| | | 锘縰sing log4net.Core; |
| | | using Masuit.Tools; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core.Const; |
| | |
| | | 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}杩愯緭鐩爣鍦板潃涓虹┖"); |
| | | return content.OK(data: task.Towhereabouts); |
| | | |
| | | |
| | | 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) |
| | | { |