|
@@ -1,10 +1,7 @@
|
|
|
-using Newtonsoft.Json;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.Diagnostics;
|
|
|
+using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using WCS.Service.Entity;
|
|
|
using WCS.Service.Extensions;
|
|
|
-using WCS.Service.Log;
|
|
|
|
|
|
namespace WCS.Service.Helpers
|
|
|
{
|
|
@@ -48,16 +45,12 @@ namespace WCS.Service.Helpers
|
|
|
{
|
|
|
if (!finishes.Any()) throw new DoException("没有任务");
|
|
|
var items = finishes.ToArray();
|
|
|
- var timer = new Stopwatch();
|
|
|
- timer.Start();
|
|
|
var infos = items.Length switch
|
|
|
{
|
|
|
1 => WMS.I_WCS_GetInTask(items[0].FinishCode, items[0].Station.Entity.CODE),
|
|
|
2 => WMS.I_WCS_GetInTask(items[0].FinishCode, items[0].Station.Entity.CODE, items[1].FinishCode, items[1].Station.Entity.CODE),
|
|
|
_ => throw new WarnException($"一组任务数量最大为2,当前{items.Length}"),
|
|
|
};
|
|
|
- timer.Stop();
|
|
|
- InfoLog.INFO_TIMING($"扫码入库接口调用,耗时{timer.ElapsedMilliseconds}---------{JsonConvert.SerializeObject(infos)}");
|
|
|
return infos;
|
|
|
}
|
|
|
}
|