|
|
|
@ -3,6 +3,7 @@ using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.Module.PrintModule;
|
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos.TaskInteraction;
|
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
|
using DS.WMS.Core.Op.Entity.TaskInteraction;
|
|
|
|
@ -77,22 +78,34 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
if (model.Primary == null)
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
|
|
IDictionary<string, object>? dic = model.Primary as IDictionary<string, object>;
|
|
|
|
|
if (dic == null)
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
|
|
List<Tuple<long, string>> list = [];
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.SaleId), out object? sale))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)sale, nameof(sale)));
|
|
|
|
|
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.OperatorId), out object? op))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)op, nameof(op)));
|
|
|
|
|
var order = model.Primary as SeaExportRes;
|
|
|
|
|
if (order != null)
|
|
|
|
|
{
|
|
|
|
|
list.Add(new Tuple<long, string>(order.SaleId, "sale"));
|
|
|
|
|
list.Add(new Tuple<long, string>(order.OperatorId, "op"));
|
|
|
|
|
list.Add(new Tuple<long, string>(order.CustomerService, "cs"));
|
|
|
|
|
list.Add(new Tuple<long, string>(order.Doc, "doc"));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
IDictionary<string, object>? dic = model.Primary as IDictionary<string, object>;
|
|
|
|
|
if (dic == null)
|
|
|
|
|
return model;
|
|
|
|
|
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.SaleId), out object? sale))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)sale, nameof(sale)));
|
|
|
|
|
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.CustomerService), out object? cs))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)cs, nameof(cs)));
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.OperatorId), out object? op))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)op, nameof(op)));
|
|
|
|
|
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.Doc), out object? doc))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)doc, nameof(doc)));
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.CustomerService), out object? cs))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)cs, nameof(cs)));
|
|
|
|
|
|
|
|
|
|
if (dic.TryGetValue(nameof(SeaExport.Doc), out object? doc))
|
|
|
|
|
list.Add(new Tuple<long, string>((long)doc, nameof(doc)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -107,16 +120,16 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
//QQ = x
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
long saleId = list.Find(x => x.Item2 == nameof(sale))!.Item1;
|
|
|
|
|
long saleId = list.Find(x => x.Item2 == "sale")!.Item1;
|
|
|
|
|
model.Sales = userList.Find(x => x.Id == saleId);
|
|
|
|
|
|
|
|
|
|
long opId = list.Find(x => x.Item2 == nameof(op))!.Item1;
|
|
|
|
|
long opId = list.Find(x => x.Item2 == "op")!.Item1;
|
|
|
|
|
model.Operator = userList.Find(x => x.Id == opId);
|
|
|
|
|
|
|
|
|
|
long csId = list.Find(x => x.Item2 == nameof(cs))!.Item1;
|
|
|
|
|
long csId = list.Find(x => x.Item2 == "cs")!.Item1;
|
|
|
|
|
model.CustomerService = userList.Find(x => x.Id == csId);
|
|
|
|
|
|
|
|
|
|
long docId = list.Find(x => x.Item2 == nameof(doc))!.Item1;
|
|
|
|
|
long docId = list.Find(x => x.Item2 == "doc")!.Item1;
|
|
|
|
|
model.Document = userList.Find(x => x.Id == docId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|