|
|
@ -74,7 +74,7 @@ namespace Myshipping.Application
|
|
|
|
public class TaskManageService : ITaskManageService, IDynamicApiController, ITransient
|
|
|
|
public class TaskManageService : ITaskManageService, IDynamicApiController, ITransient
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskSIFeedBackInfo> _taskSIFeedBackInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskSISubmitted> _taskSISubmittedRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
|
|
|
@ -109,6 +109,10 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationInfo> _taskRollingNominationInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationInfo> _taskRollingNominationInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationShipInfo> _taskRollingNominationShipInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationShipInfo> _taskRollingNominationShipInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationDetailInfo> _taskRollingNominationDetailInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationDetailInfo> _taskRollingNominationDetailInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskDraftInfo> _taskDraftInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullInfo> _taskPODDischargeGateoutFullInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> _taskPODDischargeGateoutFullDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
@ -132,7 +136,7 @@ namespace Myshipping.Application
|
|
|
|
const int LARA_PARER_DRAFT_VAR = 3;
|
|
|
|
const int LARA_PARER_DRAFT_VAR = 3;
|
|
|
|
|
|
|
|
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository,
|
|
|
|
SqlSugarRepository<TaskSISubmitted> taskSISubmittedRepository,
|
|
|
|
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
|
|
|
|
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
|
|
|
|
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
|
|
|
|
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
|
|
|
|
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
|
|
|
|
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
|
|
|
@ -164,6 +168,9 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository,
|
|
|
|
SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository,
|
|
|
|
SqlSugarRepository<BookingCtnVGM> bookingCtnVGMRepository,
|
|
|
|
SqlSugarRepository<BookingCtnVGM> bookingCtnVGMRepository,
|
|
|
|
SqlSugarRepository<BookingSlotBase> bookingSlotBaseRepository,
|
|
|
|
SqlSugarRepository<BookingSlotBase> bookingSlotBaseRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskDraftInfo> taskDraftInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskPODDischargeGateoutFullInfo> taskPODDischargeGateoutFullInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> taskPODDischargeGateoutFullDetailInfoRepository,
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
ISysCacheService cache,
|
|
|
|
ISysCacheService cache,
|
|
|
@ -174,7 +181,7 @@ namespace Myshipping.Application
|
|
|
|
ILogger<BookingOrderService> logger)
|
|
|
|
ILogger<BookingOrderService> logger)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_taskBaseInfoRepository = taskBaseInfoRepository;
|
|
|
|
_taskBaseInfoRepository = taskBaseInfoRepository;
|
|
|
|
_taskSIFeedBackInfoRepository = taskSIFeedBackInfoRepository;
|
|
|
|
_taskSISubmittedRepository = taskSISubmittedRepository;
|
|
|
|
_taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository;
|
|
|
|
_taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository;
|
|
|
|
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
|
|
|
|
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
|
|
|
|
_taskFileInfoRepository = taskFileInfoRepository;
|
|
|
|
_taskFileInfoRepository = taskFileInfoRepository;
|
|
|
@ -219,6 +226,9 @@ namespace Myshipping.Application
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
|
|
|
|
|
|
|
|
_bookingSlotBaseRepository = bookingSlotBaseRepository;
|
|
|
|
_bookingSlotBaseRepository = bookingSlotBaseRepository;
|
|
|
|
|
|
|
|
_taskDraftInfoRepository = taskDraftInfoRepository;
|
|
|
|
|
|
|
|
_taskPODDischargeGateoutFullInfoRepository = taskPODDischargeGateoutFullInfoRepository;
|
|
|
|
|
|
|
|
_taskPODDischargeGateoutFullDetailInfoRepository = taskPODDischargeGateoutFullDetailInfoRepository;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 创建任务
|
|
|
|
#region 创建任务
|
|
|
@ -565,21 +575,22 @@ namespace Myshipping.Application
|
|
|
|
if (info.Main.SIFeedBack == null)
|
|
|
|
if (info.Main.SIFeedBack == null)
|
|
|
|
throw Oops.Oh($"任务类型={info.Main.TaskType.ToString()} SIFeedBack信息必传");
|
|
|
|
throw Oops.Oh($"任务类型={info.Main.TaskType.ToString()} SIFeedBack信息必传");
|
|
|
|
|
|
|
|
|
|
|
|
TaskSIFeedBackInfo taskSIFeedBackInfo = info.Main.SIFeedBack.Adapt<TaskSIFeedBackInfo>();
|
|
|
|
TaskSISubmitted taskSISubmitted = info.Main.SIFeedBack.Adapt<TaskSISubmitted>();
|
|
|
|
|
|
|
|
|
|
|
|
taskSIFeedBackInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
taskSISubmitted.PK_ID = IDGen.NextID().ToString();
|
|
|
|
taskSIFeedBackInfo.TASK_PKID = taskInfo.PK_ID;
|
|
|
|
taskSISubmitted.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
taskSIFeedBackInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
taskSISubmitted.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
taskSIFeedBackInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
taskSISubmitted.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
taskSIFeedBackInfo.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
taskSISubmitted.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
taskSIFeedBackInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
taskSISubmitted.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
taskSIFeedBackInfo.TenantId = taskInfo.TenantId;
|
|
|
|
taskSISubmitted.TenantId = taskInfo.TenantId;
|
|
|
|
taskSIFeedBackInfo.TenantName = taskInfo.TenantName;
|
|
|
|
taskSISubmitted.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
await _taskSIFeedBackInfoRepository.InsertAsync(taskSIFeedBackInfo);
|
|
|
|
await _taskSISubmittedRepository.InsertAsync(taskSISubmitted);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
//SI反馈箱信息入库
|
|
|
|
//SI反馈箱信息入库
|
|
|
|
if (info.Main.SIFeedBack.ContaList != null && info.Main.SIFeedBack.ContaList.Count > 0)
|
|
|
|
if (info.Main.SIFeedBack.ContaList != null && info.Main.SIFeedBack.ContaList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -600,7 +611,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
await _taskSIFeedBackContaInfoRepository.InsertAsync(contaInfo);
|
|
|
|
await _taskSIFeedBackContaInfoRepository.InsertAsync(contaInfo);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
@ -1234,7 +1245,66 @@ namespace Myshipping.Application
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region DRAFT转发客户
|
|
|
|
#region DRAFT转发客户
|
|
|
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.DRAFT)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TaskDraftInfo taskDraftInfo = info.Main.DraftInfo.Adapt<TaskDraftInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskDraftInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
taskDraftInfo.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskDraftInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
taskDraftInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskDraftInfo.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
taskDraftInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
taskDraftInfo.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
taskDraftInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _taskDraftInfoRepository.InsertAsync(taskDraftInfo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 任务目的港未提货/任务目的港提货未返空
|
|
|
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TaskPODDischargeGateoutFullInfo dischargeGateout = info.Main.PODDischargeGateoutFull.Adapt<TaskPODDischargeGateoutFullInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dischargeGateout.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
dischargeGateout.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dischargeGateout.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
dischargeGateout.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dischargeGateout.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
dischargeGateout.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
dischargeGateout.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
dischargeGateout.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _taskPODDischargeGateoutFullInfoRepository.InsertAsync(dischargeGateout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//明细入库
|
|
|
|
|
|
|
|
if (info.Main.PODDischargeGateoutFull.DetailList != null
|
|
|
|
|
|
|
|
&& info.Main.PODDischargeGateoutFull.DetailList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
info.Main.PODDischargeGateoutFull.DetailList.ForEach(async ctn =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var detailInfo = ctn.Adapt<TaskPODDischargeGateoutFullDetailInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detailInfo.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
detailInfo.P_ID = dischargeGateout.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detailInfo.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
detailInfo.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detailInfo.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
detailInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
detailInfo.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
detailInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _taskPODDischargeGateoutFullDetailInfoRepository.InsertAsync(detailInfo);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.SerialMsgInfo != null)
|
|
|
|
if (info.Main.SerialMsgInfo != null)
|
|
|
@ -4162,7 +4232,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
model.TaskId = taskInfo.PK_ID;
|
|
|
|
model.TaskId = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
var siFeedBackList = _taskSIFeedBackInfoRepository.EntityContext.Queryable<TaskSIFeedBackInfo>()
|
|
|
|
var siFeedBackList = _taskSISubmittedRepository.EntityContext.Queryable<TaskSIFeedBackInfo>()
|
|
|
|
.InnerJoin<TaskSIFeedBackContaInfo>((si, ctn) => si.PK_ID == ctn.P_PKID)
|
|
|
|
.InnerJoin<TaskSIFeedBackContaInfo>((si, ctn) => si.PK_ID == ctn.P_PKID)
|
|
|
|
.Where((si, ctn) => si.TASK_PKID == model.TaskId && si.TenantId == UserManager.TENANT_ID)
|
|
|
|
.Where((si, ctn) => si.TASK_PKID == model.TaskId && si.TenantId == UserManager.TENANT_ID)
|
|
|
|
.Select((si, ctn) => new { si = si, ctn = ctn }).ToList();
|
|
|
|
.Select((si, ctn) => new { si = si, ctn = ctn }).ToList();
|
|
|
|