|
|
|
@ -17,6 +17,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Myshipping.Application.EDI;
|
|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
|
using Myshipping.Application.Entity.TaskManagePlat;
|
|
|
|
|
using Myshipping.Application.Helper;
|
|
|
|
|
using Myshipping.Application.Service.BookingOrder;
|
|
|
|
|
using Myshipping.Application.Service.BookingSlot.Dto;
|
|
|
|
@ -76,7 +77,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskSISubmitted> _taskSISubmittedRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskSISubmittedCtn> _taskSISubmittedCtnRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<TaskEmailInfo> _taskEmailInfoRepository;
|
|
|
|
@ -140,7 +141,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskSISubmitted> taskSISubmittedRepository,
|
|
|
|
|
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskSISubmittedCtn> taskSISubmittedCtnRepository,
|
|
|
|
|
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskEmailInfo> taskEmailInfoRepository,
|
|
|
|
@ -186,7 +187,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
_taskBaseInfoRepository = taskBaseInfoRepository;
|
|
|
|
|
_taskSISubmittedRepository = taskSISubmittedRepository;
|
|
|
|
|
_taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository;
|
|
|
|
|
_taskSISubmittedCtnRepository = taskSISubmittedCtnRepository;
|
|
|
|
|
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
|
|
|
|
|
_taskFileInfoRepository = taskFileInfoRepository;
|
|
|
|
|
_taskEmailInfoRepository = taskEmailInfoRepository;
|
|
|
|
@ -339,26 +340,37 @@ namespace Myshipping.Application
|
|
|
|
|
//如果大简云用户ID不为空,接收人为空时,通过大简云用户ID关联订舱人ID
|
|
|
|
|
if (UserManager.UserId != null)
|
|
|
|
|
{
|
|
|
|
|
userTendInfo = new UserTendDto
|
|
|
|
|
//这里只有派车不是公共任务,其他基本都是公共任务
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.TRUCK_DISPATCH)
|
|
|
|
|
{
|
|
|
|
|
userId = UserManager.UserId,
|
|
|
|
|
userName = UserManager.Name,
|
|
|
|
|
tendId = UserManager.TENANT_ID,
|
|
|
|
|
tenantName = UserManager.TENANT_NAME
|
|
|
|
|
};
|
|
|
|
|
userTendInfo = GetUserTendInfo(info.Main.RecvUserId);
|
|
|
|
|
|
|
|
|
|
taskInfo.IS_PUBLIC = 1;
|
|
|
|
|
taskInfo.IS_PUBLIC = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
userTendInfo = new UserTendDto
|
|
|
|
|
{
|
|
|
|
|
userId = UserManager.UserId,
|
|
|
|
|
userName = UserManager.Name,
|
|
|
|
|
tendId = UserManager.TENANT_ID,
|
|
|
|
|
tenantName = UserManager.TENANT_NAME
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
taskInfo.IS_PUBLIC = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (!string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId))
|
|
|
|
|
{
|
|
|
|
|
userTendInfo = GetUserTendInfoByDJYUserId(info.Main.DJYRecvUserId, info.Main.DJYRecvUserEmail);
|
|
|
|
|
|
|
|
|
|
if(userTendInfo != null)
|
|
|
|
|
if (userTendInfo != null)
|
|
|
|
|
{
|
|
|
|
|
taskInfo.IS_PUBLIC = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId) &&
|
|
|
|
|
else if (string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId) &&
|
|
|
|
|
!string.IsNullOrWhiteSpace(info.Main.TaskRecvEmail) && info.Main.TaskTenatId.HasValue && info.Main.TaskTenatId.Value > 0)
|
|
|
|
|
{
|
|
|
|
|
userTendInfo = GetUserTendInfoByEmail(info.Main.TaskTenatId.Value, info.Main.TaskRecvEmail);
|
|
|
|
@ -435,6 +447,12 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
|
|
|
|
|
}
|
|
|
|
|
else if (TaskBaseTypeEnum.SI_FEEDBACK.ToString() == taskInfo.TASK_BASE_TYPE)
|
|
|
|
|
{
|
|
|
|
|
attachFileType = "sisubmittedfiles";
|
|
|
|
|
|
|
|
|
|
fileCategory = TaskFileCategoryEnum.SI_SUBMITTED.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName);
|
|
|
|
|
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
|
|
|
|
@ -618,18 +636,18 @@ namespace Myshipping.Application
|
|
|
|
|
taskSISubmitted.TenantId = taskInfo.TenantId;
|
|
|
|
|
taskSISubmitted.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
await _taskSISubmittedRepository.InsertAsync(taskSISubmitted);
|
|
|
|
|
_taskSISubmittedRepository.Insert(taskSISubmitted);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
//SI反馈箱信息入库
|
|
|
|
|
if (info.Main.SIFeedBack.ContaList != null && info.Main.SIFeedBack.ContaList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
info.Main.SIFeedBack.ContaList.ForEach(async ctn =>
|
|
|
|
|
{
|
|
|
|
|
var contaInfo = ctn.Adapt<TaskSIFeedBackContaInfo>();
|
|
|
|
|
var contaInfo = ctn.Adapt<TaskSISubmittedCtn>();
|
|
|
|
|
|
|
|
|
|
contaInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
contaInfo.P_PKID = taskSIFeedBackInfo.PK_ID;
|
|
|
|
|
contaInfo.P_PKID = taskSISubmitted.PK_ID;
|
|
|
|
|
|
|
|
|
|
contaInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
contaInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
@ -639,9 +657,11 @@ namespace Myshipping.Application
|
|
|
|
|
contaInfo.TenantId = taskInfo.TenantId;
|
|
|
|
|
contaInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
await _taskSIFeedBackContaInfoRepository.InsertAsync(contaInfo);
|
|
|
|
|
_taskSISubmittedCtnRepository.Insert(contaInfo);
|
|
|
|
|
});
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//这里入库完成后执行SI的处理
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|