zhangxiaofeng 10 months ago
commit 6651a928e0

@ -31,6 +31,21 @@ namespace Myshipping.Application
/// </summary> /// </summary>
public string NOM_STATUS_NOTE { get; set; } public string NOM_STATUS_NOTE { get; set; }
/// <summary>
/// 委托客户ID
/// </summary>
public Nullable<long> CUSTOMERID { get; set; }
/// <summary>
/// 委托单位名称
/// </summary>
public string CUSTOMERNAME { get; set; }
/// <summary>
/// 订舱ID
/// </summary>
public Nullable<long> BOOKING_ID { get; set; }
/// <summary> /// <summary>
/// 订舱抬头 /// 订舱抬头
/// </summary> /// </summary>

@ -0,0 +1,90 @@
using Myshipping.Application.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务预甩货调度
/// </summary>
[SugarTable("task_rolling_nomination_dispatch")]
[Description("任务预甩货调度")]
public class TaskRollingNominationDispatchInfo : TaskManageDbEntity
{
/// <summary>
/// 任务主键
/// </summary>
public string TASK_ID { get; set; }
/// <summary>
/// 预甩货主键
/// </summary>
public string NOM_ID { get; set; }
/// <summary>
/// 预甩船主键
/// </summary>
public string NOM_SHIP_ID { get; set; }
/// <summary>
/// 预甩明细主键
/// </summary>
public string DETAIL_ID { get; set; }
/// <summary>
/// 批次ID
/// </summary>
public string BATCH_ID { get; set; }
/// <summary>
/// 是否用户人工确认 1-人工确认(用户在访问链接上做了反馈) 0-不是人工确认
/// </summary>
public bool IS_USER_MANUAL { get; set; }
/// <summary>
/// 是否已通知用户 1-已通知 0-未通知
/// </summary>
public bool IS_SEND { get; set; }
/// <summary>
/// 最后确认期限日期
/// </summary>
public Nullable<DateTime> CONFIRM_DEAD_LINE { get; set; }
/// <summary>
/// 状态 WAIT-待确认COMPLETE-已完成CANCEL-已取消,EXPIRE-失效
/// </summary>
public string STATUS { get; set; }
/// <summary>
/// 用户选择意见
/// </summary>
public string USER_OPINION { get; set; }
/// <summary>
/// 用户意见内容
/// </summary>
public string USER_OPINION_TXT { get; set; }
/// <summary>
/// 用户确认时间
/// </summary>
public Nullable<DateTime> CONFIRM_DATE { get; set; }
/// <summary>
/// 生成链接时间
/// </summary>
public Nullable<DateTime> CREATE_SHARE_LINK_DATE { get; set; }
/// <summary>
/// 生成链接访问KEY
/// </summary>
public string SHARE_LINK_KEY { get; set; }
}
}

@ -51,6 +51,16 @@ namespace Myshipping.Application
/// </summary> /// </summary>
public Nullable<DateTime> READ_CREATE_TIME { get; set; } public Nullable<DateTime> READ_CREATE_TIME { get; set; }
/// <summary>
/// 含有二甩声明备注
/// </summary>
public string ROLL_DOUBLE_REMARK { get; set; }
/// <summary>
/// 预甩计划详情
/// </summary>
public string PLAN_TXT { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>

@ -0,0 +1,46 @@
using Myshipping.Application.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务分享链接
/// </summary>
[SugarTable("task_share_link")]
[Description("任务分享链接")]
public class TaskShareLinkInfo : TaskManageDbEntity
{
/// <summary>
/// 任务类型
/// </summary>
public string TASK_TYPE { get; set; }
/// <summary>
/// 业务主键
/// </summary>
public string BUSI_ID { get; set; }
/// <summary>
/// 生成链接访问KEY
/// </summary>
public string SHARE_LINK_KEY { get; set; }
/// <summary>
/// 访问URL
/// </summary>
public string URL { get; set; }
/// <summary>
/// 失效时间
/// </summary>
public DateTime EXPIRE_DATE { get; set; }
}
}

@ -159,6 +159,21 @@ namespace Myshipping.Application
/// Booking Amendment /// Booking Amendment
/// </summary> /// </summary>
[Description("Amendment")] [Description("Amendment")]
BC_MODIFY BC_MODIFY,
/// <summary>
/// 截止时间变更通知
/// </summary>
[Description("截止时间变更")]
CUT_MODIFY,
/// <summary>
/// Rolling Nomination(预甩货通知)
/// </summary>
[Description("RollingNomination")]
ROLLING_NOMINATION,
/// <summary>
/// Transfer Nomination(预甩货通知)
/// </summary>
[Description("TransferNomination")]
TRANSFER_NOMINATION
} }
} }

@ -0,0 +1,120 @@
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class SuperShortLinkHelper
{
private readonly string _base62CharSet;
private readonly int _codeLength;
public SuperShortLinkHelper(IOptionsSnapshot<ShortLinkOptions> option)
{
_base62CharSet = option.Value.Secrect;
_codeLength = option.Value.CodeLength;
}
/// <summary>
/// 补充0的长度
/// </summary>
private int ZeroLength
{
get
{
return MaxValue.ToString().Length;
}
}
/// <summary>
/// Code长度位数下能达到的最大值
/// </summary>
private long MaxValue
{
get
{
var max = (long)Math.Pow(62, _codeLength) - 1;
return (long)Math.Pow(10, max.ToString().Length - 1) - 1;
}
}
/// <summary>
/// 【混淆加密】转短码
/// 1、根据自增主键id前面补000000123
/// 2、倒转32100000
/// 3、把倒转后的十进制转六十二进制乱序后
/// </summary>
public string Confuse(long id)
{
if (id > MaxValue)
{
throw new Exception($"转换值不能超过最大值{MaxValue}");
}
var idChars = id.ToString()
.PadLeft(ZeroLength, '0')
.ToCharArray()
.Reverse();
var confuseId = long.Parse(string.Join("", idChars));
var base62Str = Encode(confuseId);
return base62Str.PadLeft(_codeLength, _base62CharSet.First());
}
/// <summary>
/// 十进制 -> 62进制
/// </summary>
public string Encode(long value)
{
if (value < 0)
throw new ArgumentOutOfRangeException("value", "value must be greater or equal to zero");
var sb = new StringBuilder();
do
{
sb.Insert(0, _base62CharSet[(int)(value % 62)]);
value /= 62;
} while (value > 0);
return sb.ToString();
}
}
public class ShortLinkOptions
{
public const string SectionName = "ShortShareLink";
/// <summary>
/// 短码长度
/// </summary>
[Range(1, int.MaxValue)]
public int CodeLength { get; set; }
/// <summary>
/// 62位加密秘钥
/// </summary>
[Required]
public string Secrect { get; set; }
/// <summary>
/// 缓存数量限制
/// </summary>
public int? CacheCountLimit { get; set; }
/// <summary>
/// 生成默认数据
/// </summary>
public static ShortLinkOptions GenDefault()
{
return new ShortLinkOptions()
{
CacheCountLimit = 10000
};
}
}
}

@ -37,19 +37,24 @@ namespace Myshipping.Application
public Nullable<DateTime> ConfirmDeadLine { get; set; } public Nullable<DateTime> ConfirmDeadLine { get; set; }
/// <summary> /// <summary>
/// 原船记录 /// 含有二甩声明备注
/// </summary> /// </summary>
public TaskRollingNominationShipDto From { get; set; } public string RollingTouchDoubleRollRemark { get; set; }
/// <summary> /// <summary>
/// 换船记录 /// 预甩计划详情列表
/// </summary> /// </summary>
public List<TaskRollingNominationShipDto> ToDetail { get; set; } public List<string> RollingPlanList { get; set; }
/// <summary> /// <summary>
/// 换船明细 /// 原船记录
/// </summary> /// </summary>
public List<TaskRollingNominationShipDetailDto> NominationList { get; set; } public List<TaskRollingNominationShipDto> From { get; set; }
/// <summary>
/// 换船记录
/// </summary>
public List<TaskRollingNominationShipDto> ToDetail { get; set; }
/// <summary> /// <summary>
/// 生成时间 /// 生成时间
@ -60,7 +65,15 @@ namespace Myshipping.Application
public class TaskRollingNominationShipDto : TaskRollingNominationShipBaseDto public class TaskRollingNominationShipDto : TaskRollingNominationShipBaseDto
{ {
/// <summary>
/// 换船记录
/// </summary>
public List<TaskRollingNominationShipDto> ToDetail { get; set; }
/// <summary>
/// 换船明细
/// </summary>
public List<TaskRollingNominationShipDetailDto> NominationList { get; set; }
} }
/// <summary> /// <summary>

@ -855,6 +855,49 @@ namespace Myshipping.Application
.Map(dest => dest.FileName, src => src.FILE_NAME) .Map(dest => dest.FileName, src => src.FILE_NAME)
.Map(dest => dest.FileCategory, src => src.FILE_CATEGORY) .Map(dest => dest.FileCategory, src => src.FILE_CATEGORY)
.Map(dest => dest.FileCategoryName, src => src.FILE_CATEGORY_NAME); .Map(dest => dest.FileCategoryName, src => src.FILE_CATEGORY_NAME);
config.ForType<TaskRollingNominationDto, TaskRollingNominationInfo>()
.Map(dest => dest.PLAN_TYPE, src => src.PlanType)
.Map(dest => dest.BATCH_NO, src => src.BatchNo)
.Map(dest => dest.CARRIERID, src => src.CarrierId)
.Map(dest => dest.CARRIER, src => src.Carrier)
.Map(dest => dest.CONFIRM_DEAD_LINE, src => src.ConfirmDeadLine)
.Map(dest => dest.READ_CREATE_TIME, src => src.CreateTime)
.Map(dest => dest.ROLL_DOUBLE_REMARK, src => src.RollingTouchDoubleRollRemark);
config.ForType<TaskRollingNominationShipDto, TaskRollingNominationShipInfo>()
.Map(dest => dest.SHIP_TYPE, src => src.ShipType)
.Map(dest => dest.SHIP_STRING, src => src.ShipString)
.Map(dest => dest.VSL_CODE, src => src.VslCode)
.Map(dest => dest.VESSEL, src => src.Vessel)
.Map(dest => dest.VOYNO, src => src.VoyNo)
.Map(dest => dest.PORT, src => src.Port)
.Map(dest => dest.TERMINAL, src => src.Terminal)
.Map(dest => dest.ETD, src => src.ETD)
.Map(dest => dest.SI_CUT_DATE, src => src.SICutDate)
.Map(dest => dest.CY_CUTOFF_TIME, src => src.CYCutoffTime)
.Map(dest => dest.VOUCHER_CUT_DATE, src => src.VoucherCutDate)
.Map(dest => dest.VGM_CUTOFF_TIME, src => src.VGMCutoffTime)
.Map(dest => dest.CLOSING_DATE, src => src.CLPNCLCutDate);
config.ForType<TaskRollingNominationShipDetailDto, TaskRollingNominationDetailInfo>()
.Map(dest => dest.NOM_STATUS_NOTE, src => src.Status)
.Map(dest => dest.BOOKED_BY, src => src.Bookedby)
.Map(dest => dest.CONTRACTUAL_NAME, src => src.ContractualName)
.Map(dest => dest.SHIPMENT, src => src.Shipment)
.Map(dest => dest.EQUIPMENT_NUMBER, src => src.EquipmentNumber)
.Map(dest => dest.EQU_SIZE, src => src.EquSize)
.Map(dest => dest.CONTAINER_TYPE, src => src.ContainerType)
.Map(dest => dest.CONTAINER_HEIGHT, src => src.ContainerHeight)
.Map(dest => dest.FEE, src => src.FFE)
.Map(dest => dest.WEIGHT, src => src.Weight)
.Map(dest => dest.PLACEOF_RECEIPT, src => src.PlaceOfReceipt)
.Map(dest => dest.LOADPORT_NAME, src => src.LoadPortName)
.Map(dest => dest.DISCHARGEPORT_NAME, src => src.DischargePortName)
.Map(dest => dest.PLACEOF_DELIVERY, src => src.PlaceOfDelivery)
.Map(dest => dest.BBYMAIL, src => src.BBYMAIL);
} }
} }

@ -1,4 +1,5 @@
using System; using Myshipping.Application.Service.TaskManagePlat.Dtos;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
@ -208,5 +209,15 @@ namespace Myshipping.Application
/// BC信息 /// BC信息
/// </summary> /// </summary>
public TaskManageOrderBCInfo BCInfo { get; set; } public TaskManageOrderBCInfo BCInfo { get; set; }
/// <summary>
/// 预甩货通知
/// </summary>
public TaskRollingNominationDto RollingNomination { get; set; }
/// <summary>
/// 截止时间变更通知
/// </summary>
public TaskCutDateChangeDto CutDateChange { get; set; }
} }
} }

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public interface ITaskManageCutDateChangeService
{
}
}

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 预甩货通知
/// </summary>
public interface ITaskManageRollingNominationService
{
/// <summary>
/// 获取预甩详情
/// </summary>
/// <param name="pkId">预甩主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetInfo(string pkId);
/// <summary>
/// 通过任务主键获取预甩详情
/// </summary>
/// <param name="taskPkId">预甩任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetInfoByTaskId(string taskPkId);
/// <summary>
/// 生成预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CreateShareLink(string[] taskPkIds);
/// <summary>
/// 取消预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CancelShareLink(string[] taskPkIds);
/// <summary>
/// 推送预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> PushShareLink(string[] taskPkIds);
/// <summary>
/// 生成预甩货调度
/// </summary>
/// <param name="nominationShipId">预甩货船信息主键</param>
/// <param name="loadDetailIds">预甩货可Load明细信息主键组</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> DispatchRollingNomination(string nominationShipId, string[] loadDetailIds);
/// <summary>
/// 查看分享链接
/// </summary>
/// <param name="batchId">预甩任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetUrl(string batchId);
/// <summary>
/// 获取Status是load的可配载的列表
/// </summary>
/// <param name="taskPkId">预甩货任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetLoadStatusDetailList(string taskPkId);
}
}

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务分享链接服务
/// </summary>
public interface ITaskManageShareLinkService
{
/// <summary>
/// 生成访问链接
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="taskType">任务类型</param>
/// <param name="expireDate">失效时间</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CreateShareLink(string businessId, string taskType, DateTime expireDate);
/// <summary>
/// 取消访问链接
/// </summary>
/// <param name="pkId">访问链接主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CancelShareLink(string pkId);
/// <summary>
/// 校验成访问链接
/// </summary>
/// <param name="Url">请求链接</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> ValidateShareLink(string Url);
/// <summary>
/// 访问链接
/// </summary>
/// <param name="Url">请求链接</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> QueryShareLink(string Url);
}
}

@ -0,0 +1,119 @@
using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Myshipping.Core.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 预甩货通知
/// </summary>
[ApiDescriptionSettings("Application", Name = "TaskManageRollingNomination", Order = 10)]
public class TaskManageRollingNominationService : ITaskManageRollingNominationService, IDynamicApiController
{
private readonly ISysCacheService _cache;
private readonly ILogger<TaskManageRollingNominationService> _logger;
/// <summary>
/// 获取预甩详情
/// </summary>
/// <param name="pkId">预甩主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetInfo(string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 通过任务主键获取预甩详情
/// </summary>
/// <param name="taskPkId">预甩任务主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetInfoByTaskId(string taskPkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 生成预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> CreateShareLink(string[] taskPkIds)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 取消预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> CancelShareLink(string[] taskPkIds)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 推送预甩货客户访问链接
/// </summary>
/// <param name="taskPkIds">预甩货任务主键组</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> PushShareLink(string[] taskPkIds)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 生成预甩货调度
/// </summary>
/// <param name="nominationShipId">预甩货船信息主键</param>
/// <param name="loadDetailIds">预甩货可Load明细信息主键组</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> DispatchRollingNomination(string nominationShipId, string[] loadDetailIds)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 查看分享链接
/// </summary>
/// <param name="batchId">预甩任务主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetUrl(string batchId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 获取Status是load的可配载的列表
/// </summary>
/// <param name="taskPkId">预甩货任务主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetLoadStatusDetailList(string taskPkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
}
}

@ -101,6 +101,11 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskTruckInfo> _taskTruckInfoRepository; private readonly SqlSugarRepository<TaskTruckInfo> _taskTruckInfoRepository;
private readonly SqlSugarRepository<TaskTruckCtn> _taskTruckCtnRepository; private readonly SqlSugarRepository<TaskTruckCtn> _taskTruckCtnRepository;
private readonly SqlSugarRepository<TaskCutDateChangeInfo> _taskCutDateChangeInfoRepository;
private readonly SqlSugarRepository<TaskRollingNominationInfo> _taskRollingNominationInfoRepository;
private readonly SqlSugarRepository<TaskRollingNominationShipInfo> _taskRollingNominationShipInfoRepository;
private readonly SqlSugarRepository<TaskRollingNominationDetailInfo> _taskRollingNominationDetailInfoRepository;
private readonly IDjyWebsiteAccountConfigService _webAccountConfig; private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly ISysCacheService _cache; private readonly ISysCacheService _cache;
private readonly ILogger<BookingOrderService> _logger; private readonly ILogger<BookingOrderService> _logger;
@ -144,6 +149,10 @@ namespace Myshipping.Application
SqlSugarRepository<TaskTruckCtn> taskTruckCtnRepository, SqlSugarRepository<TaskTruckCtn> taskTruckCtnRepository,
SqlSugarRepository<TaskBCInfo> taskBCInfoRepository, SqlSugarRepository<TaskBCInfo> taskBCInfoRepository,
SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository, SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository,
SqlSugarRepository<TaskCutDateChangeInfo> taskCutDateChangeInfoRepository,
SqlSugarRepository<TaskRollingNominationInfo> taskRollingNominationInfoRepository,
SqlSugarRepository<TaskRollingNominationShipInfo> taskRollingNominationShipInfoRepository,
SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository,
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider, INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
IDjyWebsiteAccountConfigService webAccountConfig, IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache, ISysCacheService cache,
@ -175,6 +184,10 @@ namespace Myshipping.Application
_taskTruckCtnRepository = taskTruckCtnRepository; _taskTruckCtnRepository = taskTruckCtnRepository;
_taskBCInfoRepository = taskBCInfoRepository; _taskBCInfoRepository = taskBCInfoRepository;
_taskBCCTNInfoRepository = taskBCCTNInfoRepository; _taskBCCTNInfoRepository = taskBCCTNInfoRepository;
_taskCutDateChangeInfoRepository = taskCutDateChangeInfoRepository;
_taskRollingNominationInfoRepository = taskRollingNominationInfoRepository;
_taskRollingNominationShipInfoRepository = taskRollingNominationShipInfoRepository;
_taskRollingNominationDetailInfoRepository = taskRollingNominationDetailInfoRepository;
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider; _namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
@ -743,6 +756,107 @@ namespace Myshipping.Application
} }
#endregion #endregion
#region 截止时间变更通知
#endregion
#region Rolling Nomination(预甩货通知)
if (info.Main.TaskType == TaskBaseTypeEnum.ROLLING_NOMINATION || info.Main.TaskType == TaskBaseTypeEnum.TRANSFER_NOMINATION)
{
var rollingNomination = info.Main.RollingNomination.Adapt<TaskRollingNominationInfo>();
rollingNomination.PK_ID = IDGen.NextID().ToString();
rollingNomination.TASK_ID = taskInfo.PK_ID;
rollingNomination.CreatedTime = taskInfo.CreatedTime;
rollingNomination.UpdatedTime = taskInfo.CreatedTime;
rollingNomination.CreatedUserId = taskInfo.CreatedUserId;
rollingNomination.CreatedUserName = taskInfo.CreatedUserName;
rollingNomination.TenantId = taskInfo.TenantId;
rollingNomination.TenantName = taskInfo.TenantName;
//这里把多条的预甩计划列表合并保存,展示时只需要用\n拆分返回给前端
if (info.Main.RollingNomination.RollingPlanList != null && info.Main.RollingNomination.RollingPlanList.Count > 0)
{
rollingNomination.PLAN_TXT = string.Join("\\n", info.Main.RollingNomination.RollingPlanList.ToArray());
}
await _taskRollingNominationInfoRepository.InsertAsync(rollingNomination);
if (info.Main.RollingNomination.From != null && info.Main.RollingNomination.From.Count > 0)
{
info.Main.RollingNomination.From.ForEach(k =>
{
var rollingNominationShip = k.Adapt<TaskRollingNominationShipInfo>();
rollingNominationShip.PK_ID = IDGen.NextID().ToString();
rollingNominationShip.TASK_ID = taskInfo.PK_ID;
rollingNominationShip.NOM_ID = rollingNomination.PK_ID;
rollingNominationShip.CreatedTime = taskInfo.CreatedTime;
rollingNominationShip.UpdatedTime = taskInfo.CreatedTime;
rollingNominationShip.CreatedUserId = taskInfo.CreatedUserId;
rollingNominationShip.CreatedUserName = taskInfo.CreatedUserName;
rollingNominationShip.TenantId = taskInfo.TenantId;
rollingNominationShip.TenantName = taskInfo.TenantName;
_taskRollingNominationShipInfoRepository.Insert(rollingNominationShip);
});
}
if (info.Main.RollingNomination.ToDetail != null && info.Main.RollingNomination.ToDetail.Count > 0)
{
info.Main.RollingNomination.ToDetail.ForEach(t =>
{
var rollingNominationShip = t.Adapt<TaskRollingNominationShipInfo>();
rollingNominationShip.PK_ID = IDGen.NextID().ToString();
rollingNominationShip.TASK_ID = taskInfo.PK_ID;
rollingNominationShip.NOM_ID = rollingNomination.PK_ID;
rollingNominationShip.CreatedTime = taskInfo.CreatedTime;
rollingNominationShip.UpdatedTime = taskInfo.CreatedTime;
rollingNominationShip.CreatedUserId = taskInfo.CreatedUserId;
rollingNominationShip.CreatedUserName = taskInfo.CreatedUserName;
rollingNominationShip.TenantId = taskInfo.TenantId;
rollingNominationShip.TenantName = taskInfo.TenantName;
_taskRollingNominationShipInfoRepository.Insert(rollingNominationShip);
if (t.NominationList != null && t.NominationList.Count > 0)
{
t.NominationList.ForEach(x =>
{
var rollingNominationDetail = x.Adapt<TaskRollingNominationDetailInfo>();
rollingNominationDetail.PK_ID = IDGen.NextID().ToString();
rollingNominationDetail.NOM_SHIP_ID = rollingNominationShip.PK_ID;
rollingNominationDetail.NOM_ID = rollingNomination.PK_ID;
rollingNominationDetail.CreatedTime = taskInfo.CreatedTime;
rollingNominationDetail.UpdatedTime = taskInfo.CreatedTime;
rollingNominationDetail.CreatedUserId = taskInfo.CreatedUserId;
rollingNominationDetail.CreatedUserName = taskInfo.CreatedUserName;
rollingNominationDetail.TenantId = taskInfo.TenantId;
rollingNominationDetail.TenantName = taskInfo.TenantName;
_taskRollingNominationDetailInfoRepository.Insert(rollingNominationDetail);
});
}
});
}
}
#endregion
if (info.Main.SerialMsgInfo != null) if (info.Main.SerialMsgInfo != null)
{ {
var storeInfo = new TaskStoreMsgInfo var storeInfo = new TaskStoreMsgInfo

@ -0,0 +1,69 @@
using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application.Service.TaskManagePlat
{
/// <summary>
/// 任务分享链接服务
/// </summary>
[ApiDescriptionSettings("Application", Name = "TaskManageShareLink", Order = 10)]
public class TaskManageShareLinkService : ITaskManageShareLinkService, IDynamicApiController
{
/// <summary>
/// 生成访问链接
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="taskType">任务类型</param>
/// <param name="expireDate">失效时间</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> CreateShareLink(string businessId, string taskType, DateTime expireDate)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 取消访问链接
/// </summary>
/// <param name="pkId">访问链接主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> CancelShareLink(string pkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 校验成访问链接
/// </summary>
/// <param name="Url">请求链接</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> ValidateShareLink(string Url)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
/// <summary>
/// 访问链接
/// </summary>
/// <param name="Url">请求链接</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> QueryShareLink(string Url)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
return result;
}
}
}
Loading…
Cancel
Save