任务台

usertest
zhangxiaofeng 4 months ago
parent bf02d31a56
commit 67b0cd9f29

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DS.WMS.Core.TaskPlat.Dtos namespace DS.Module.DjyServiceStatus
{ {
/// <summary> /// <summary>
/// 回执 /// 回执

@ -8,7 +8,7 @@ namespace DS.WMS.Core.TaskPlat.Entity
/// 任务BC的集装箱信息 /// 任务BC的集装箱信息
///</summary> ///</summary>
[SugarTable("task_bc_ctn_info", "任务BC的集装箱信息")] [SugarTable("task_bc_ctn_info", "任务BC的集装箱信息")]
public class TaskBcCtnInfo : BaseModel<long> public class TaskBCCTNInfo : BaseModel<long>
{ {
/// <summary> /// <summary>

@ -8,7 +8,7 @@ namespace DS.WMS.Core.TaskPlat.Entity
/// 任务BC详情表 /// 任务BC详情表
///</summary> ///</summary>
[SugarTable("task_bc_info", "任务BC详情表")] [SugarTable("task_bc_info", "任务BC详情表")]
public class TaskBcInfo : BaseModel<long> public class TaskBCInfo : BaseModel<long>
{ {
/// <summary> /// <summary>

@ -1,95 +0,0 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.TaskPlat.Entity
{
/// <summary>
/// 主要记录生成分享链接
///</summary>
[SugarTable("task_share_link", "主要记录生成分享链接")]
public class TaskSharkLink : BaseModel<long>
{
/// <summary>
/// 任务类型
/// </summary>
[SugarColumn(ColumnDescription = "任务类型", IsNullable = true, Length = 40)]
public string? TASK_TYPE { get; set; }
/// <summary>
/// 业务主键
/// </summary>
[SugarColumn(ColumnDescription = "业务主键", IsNullable = false)]
public long BUSI_ID { get; set; }
/// <summary>
/// 生成链接访问KEY
/// </summary>
[SugarColumn(ColumnDescription = "生成链接访问KEY", IsNullable = true, Length = 64)]
public string? SHARE_LINK_KEY { get; set; }
/// <summary>
/// 访问URL
/// </summary>
[SugarColumn(ColumnDescription = "访问URL", IsNullable = true, Length = 500)]
public string? URL { get; set; }
/// <summary>
/// 状态 ACTIVE-有效的EXPIRE-失效CANCEL-取消
/// </summary>
[SugarColumn(ColumnDescription = "状态 ACTIVE-有效的EXPIRE-失效CANCEL-取消", IsNullable = true, Length = 20)]
public string? STATUS { get; set; }
/// <summary>
/// 是否需要用户反馈意见 1-是 0-否
/// </summary>
[SugarColumn(ColumnDescription = "是否需要用户反馈意见 1-是 0-否", IsNullable = true, Length = 1)]
public UInt64? IS_USER_FEEDBACK { get; set; }
/// <summary>
/// 是否手工设定 1-是0-否
/// </summary>
[SugarColumn(ColumnDescription = "是否手工设定 1-是0-否", IsNullable = true, Length = 1)]
public UInt64? IS_MANUAL { get; set; }
/// <summary>
/// 失效时间
/// </summary>
[SugarColumn(ColumnDescription = "失效时间", IsNullable = true)]
public DateTime? EXPIRE_DATE { get; set; }
/// <summary>
/// 自增KEY计数
/// </summary>
[SugarColumn(ColumnDescription = "自增KEY计数", IsNullable = true)]
public long? INCREMENT_KEY { get; set; }
/// <summary>
/// 是否用户人工确认 1-人工确认(用户在访问链接上做了反馈) 0-不是人工确认
/// </summary>
[SugarColumn(ColumnDescription = "是否用户人工确认 1-人工确认(用户在访问链接上做了反馈) 0-不是人工确认", IsNullable = true, Length = 1)]
public UInt64? IS_USER_MANUAL { get; set; }
/// <summary>
/// 用户选择意见
/// </summary>
[SugarColumn(ColumnDescription = "用户选择意见", IsNullable = true, Length = 50)]
public string? USER_OPINION { get; set; }
/// <summary>
/// 用户意见内容
/// </summary>
[SugarColumn(ColumnDescription = "用户意见内容", IsNullable = true, Length = 500)]
public string? USER_OPINION_TXT { get; set; }
/// <summary>
/// 用户确认时间
/// </summary>
[SugarColumn(ColumnDescription = "用户确认时间", IsNullable = true)]
public DateTime? CONFIRM_DATE { get; set; }
}
}

@ -1,41 +0,0 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.TaskPlat.Entity
{
/// <summary>
/// 主要存储用分享数据填充预设模板后的数据或预设声明的内容
///</summary>
[SugarTable("task_share_link_dynamic_data", "主要存储用分享数据填充预设模板后的数据或预设声明的内容")]
public class TaskSharkLinkDynamicData : BaseModel<long>
{
/// <summary>
/// 分享主键
/// </summary>
[SugarColumn(ColumnDescription = "分享主键", IsNullable = true)]
public long? SHARE_ID { get; set; }
/// <summary>
/// 数据类型 DISCLAIMERS-免责声明
/// </summary>
[SugarColumn(ColumnDescription = "数据类型 DISCLAIMERS-免责声明", IsNullable = true, Length = 20)]
public string? DATA_TYPE { get; set; }
/// <summary>
/// 数据详情
/// </summary>
[SugarColumn(ColumnDescription = "数据详情", IsNullable = true)]
public string? DATA_MSG { get; set; }
/// <summary>
/// 数据报文类型 JSONHTML
/// </summary>
[SugarColumn(ColumnDescription = "数据报文类型 JSONHTML", IsNullable = true, Length = 20)]
public string? DATA_MSG_TYPE { get; set; }
}
}

@ -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

Loading…
Cancel
Save