|
|
@ -10,6 +10,7 @@ using DS.WMS.Core.TaskPlat.Interface;
|
|
|
|
using LanguageExt;
|
|
|
|
using LanguageExt;
|
|
|
|
using LanguageExt.Common;
|
|
|
|
using LanguageExt.Common;
|
|
|
|
using LogicExtensions;
|
|
|
|
using LogicExtensions;
|
|
|
|
|
|
|
|
using Mapster;
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
@ -152,7 +153,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
taskInfo.NeedArriveTime = info.Main.TruckInfo.NeedArriveTime;
|
|
|
|
taskInfo.NeedArriveTime = info.Main.TruckInfo.NeedArriveTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable(taskInfo).ExecuteCommandIdentityIntoEntityAsync();
|
|
|
|
await tenantDb.Insertable(taskInfo).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(info.Main.FilePath))
|
|
|
|
if (!string.IsNullOrWhiteSpace(info.Main.FilePath))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -450,10 +451,76 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region BC 任务
|
|
|
|
#region BC 任务
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.BC || info.Main.TaskType == TaskBaseTypeEnum.BC_MODIFY
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.BC
|
|
|
|
|
|
|
|
|| info.Main.TaskType == TaskBaseTypeEnum.BC_MODIFY
|
|
|
|
|| info.Main.TaskType == TaskBaseTypeEnum.CANCELLATION)
|
|
|
|
|| info.Main.TaskType == TaskBaseTypeEnum.CANCELLATION)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//异步写入
|
|
|
|
|
|
|
|
var bcInfo = info.Main.BCInfo.Adapt<TaskBCInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bcInfo.Id = SnowFlakeSingle.Instance.NextId();
|
|
|
|
|
|
|
|
bcInfo.TASK_ID = taskInfo.Id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bcInfo.CreateBy = taskInfo.CreateBy;
|
|
|
|
|
|
|
|
bcInfo.CreateTime = taskInfo.CreateTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.BCInfo.BookingSlotId.HasValue && info.Main.BCInfo.BookingSlotId.Value > 0)
|
|
|
|
|
|
|
|
bcInfo.BOOKING_SLOT_ID = info.Main.BCInfo.BookingSlotId.Value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable(bcInfo).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//异步写入集装箱
|
|
|
|
|
|
|
|
info.Main.BCInfo.CtnList.ForEach(async ctn =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var bcCtnInfo = ctn.Adapt<TaskBCCTNInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bcCtnInfo.Id = SnowFlakeSingle.Instance.NextId();
|
|
|
|
|
|
|
|
bcCtnInfo.P_ID = bcInfo.Id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bcInfo.CreateBy = taskInfo.CreateBy;
|
|
|
|
|
|
|
|
bcInfo.CreateTime = taskInfo.CreateTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable(bcCtnInfo).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
BC_MODIFY
|
|
|
|
|
|
|
|
1、检索对应舱位,提取比对差异结果
|
|
|
|
|
|
|
|
2、检索舱位对应的订舱信息,如果有则生成用户通知邮件
|
|
|
|
|
|
|
|
3、推送钉钉消息@操作人 通知收到变更
|
|
|
|
|
|
|
|
CANCELLATION
|
|
|
|
|
|
|
|
1、检索舱位对应的订舱信息,如果有则生成用户通知邮件
|
|
|
|
|
|
|
|
2、推送钉钉消息@操作人 通知收到变更
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.BC)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//var list = await tenantDb.Queryable<TaskFlowConfig>()
|
|
|
|
|
|
|
|
// .LeftJoin<TaskFlowCondition>((t, c) => t.Id == c.ConfigId)
|
|
|
|
|
|
|
|
// .Where((t) => t.IsMain && t.TaskType == TaskBaseTypeEnum.BC.ToString())
|
|
|
|
|
|
|
|
// .OrderBy(t => t.Id)
|
|
|
|
|
|
|
|
// .Select((t, c) => new { config = t, condition = c })
|
|
|
|
|
|
|
|
// .ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var b = list.GroupBy(x => x.condition.ConfigId).ToList();
|
|
|
|
|
|
|
|
//foreach (var item in b)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// //item.Key.ToString();
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var configList = await tenantDb.Queryable<TaskFlowConfig>()
|
|
|
|
|
|
|
|
.Where(t => t.IsMain && t.TaskType == TaskBaseTypeEnum.BC.ToString())
|
|
|
|
|
|
|
|
.OrderBy(t => t.Id)
|
|
|
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (info.Main.TaskType == TaskBaseTypeEnum.CANCELLATION)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (info.Main.TaskType == TaskBaseTypeEnum.BC_MODIFY)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|