zhangxiaofeng 9 months ago
commit 6257808fab

@ -0,0 +1,50 @@
using Myshipping.Core.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.Entity
{
/// <summary>
/// 订舱箱VGM信息
/// </summary>
[SugarTable("booking_ctn_vgm")]
[Description("订舱箱VGM信息")]
public class BookingCtnVGM : DBEntityTenant
{
/// <summary>
/// 订舱ID
/// </summary>
public Nullable<long> BILLID { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// VGM重量
/// </summary>
public Nullable<decimal> VGM_WEIGHT { get; set; }
/// <summary>
/// VGM重量单位
/// </summary>
public string VGM_WEIGHT_UNIT { get; set; }
/// <summary>
/// VGM称重方式
/// </summary>
public string VGM_METHOD { get; set; }
/// <summary>
/// 是否箱号已匹配
/// </summary>
public bool IS_MATCH { get; set; }
}
}

@ -0,0 +1,44 @@
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>
/// 任务VGM详情表
/// </summary>
[SugarTable("task_vgm_ctn_info")]
[Description("任务VGM集装箱")]
public class TaskVGMCtnInfo : TaskManageDbEntity
{
/// <summary>
/// VGM任务主键
/// </summary>
public string P_ID { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// VGM重量
/// </summary>
public Nullable<decimal> VGM_WEIGHT { get; set; }
/// <summary>
/// VGM重量单位
/// </summary>
public string VGM_WEIGHT_UNIT { get; set; }
/// <summary>
/// VGM称重方式
/// </summary>
public string VGM_METHOD { get; set; }
}
}

@ -1,68 +0,0 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application.Entity
{
/// <summary>
/// 任务VGM比对回执详情表
/// </summary>
[SugarTable("task_vgm_feedback")]
[Description("任务VGM比对回执详情表")]
public class TaskVGMFeedBackInfo : TaskManageDbEntity
{
/// <summary>
/// 任务主键(父主键)
/// </summary>
public string TASK_PKID { get; set; }
/// <summary>
/// 集装箱号
/// </summary>
public string CONTA_NO { get; set; }
/// <summary>
/// 铅封号
/// </summary>
public string SEAL_NO { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CONTA_TYPE { get; set; }
/// <summary>
/// 箱型
/// </summary>
public string CONTA_TYPE_NAME { get; set; }
/// <summary>
/// 重量
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
/// 皮重
/// </summary>
public decimal? TAREWEIGHT { get; set; }
/// <summary>
/// 称重重量
/// </summary>
public decimal? WEIGHKGS { get; set; }
/// <summary>
/// 称重方式
/// </summary>
public string WEIGHTYPE { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBL_NO { get; set; }
}
}

@ -0,0 +1,76 @@
using Myshipping.Application.Entity;
using NPOI.SS.Formula.Functions;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务VGM详情表
/// </summary>
[SugarTable("task_vgm_info")]
[Description("任务VGM详情表")]
public class TaskVGMInfo : TaskManageDbEntity
{
/// <summary>
/// 任务主键
/// </summary>
public string TASK_ID { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBL_NO { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string CARRIER { get; set; }
/// <summary>
/// 船名
/// </summary>
public string VESSEL { get; set; }
/// <summary>
/// 航次
/// </summary>
public string VOYNO { get; set; }
/// <summary>
/// 航次
/// </summary>
public string PORTLOAD { get; set; }
/// <summary>
/// VGM最晚提交时间
/// </summary>
public Nullable<DateTime> VGM_SUBMISSION_DEADLINE { get; set; }
/// <summary>
/// 参考号
/// </summary>
public string BOOKED_BY_REFERENCE { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string CTN_STAT { get; set; }
/// <summary>
/// 通知接收时间
/// </summary>
public Nullable<DateTime> NOTICE_DATE { get; set; }
/// <summary>
/// 订舱ID
/// </summary>
public Nullable<long> BOOKING_ID { get; set; }
}
}

@ -151,6 +151,10 @@ namespace Myshipping.Application
/// </summary> /// </summary>
[Description("VGM回执")] [Description("VGM回执")]
VGM_FEEDBACK, VGM_FEEDBACK,
/// <summary>
/// VGM未提交
/// </summary>
[Description("VGM未提交")]
VGM_MISSING,
} }
} }

@ -25,6 +25,7 @@
<Compile Remove="Service\BookingCtnDetail\IBookingCtnDetailService.cs" /> <Compile Remove="Service\BookingCtnDetail\IBookingCtnDetailService.cs" />
<Compile Remove="Service\BookingCtn\BookingCtnService.cs" /> <Compile Remove="Service\BookingCtn\BookingCtnService.cs" />
<Compile Remove="Service\BookingCtn\IBookingCtnService.cs" /> <Compile Remove="Service\BookingCtn\IBookingCtnService.cs" />
<Compile Remove="Service\TaskManagePlat\Dtos\TaskManageOrderVGMFeedBackInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -64,16 +64,22 @@ namespace Myshipping.Application
.Map(dest => dest.IS_DONGSHENG, src => src.IsDongSheng) .Map(dest => dest.IS_DONGSHENG, src => src.IsDongSheng)
.Map(dest => dest.IS_TOTAL, src => src.IsTotal); .Map(dest => dest.IS_TOTAL, src => src.IsTotal);
config.ForType<TaskManageOrderVGMFeedBackInfo, TaskVGMFeedBackInfo>() config.ForType<TaskManageOrderVGMInfo, TaskVGMInfo>()
.Map(dest => dest.CONTA_NO, src => src.ContaNo) .Map(dest => dest.MBL_NO, src => src.MBlNo)
.Map(dest => dest.SEAL_NO, src => src.SealNo) .Map(dest => dest.CARRIER, src => src.Carrier)
.Map(dest => dest.CONTA_TYPE, src => src.ContaType) .Map(dest => dest.VESSEL, src => src.Vessel)
.Map(dest => dest.CONTA_TYPE_NAME, src => src.ContaTypeName) .Map(dest => dest.VOYNO, src => src.Voyno)
.Map(dest => dest.KGS, src => src.KGS) .Map(dest => dest.PORTLOAD, src => src.PortLoad)
.Map(dest => dest.TAREWEIGHT, src => src.TAREWEIGHT) .Map(dest => dest.VGM_SUBMISSION_DEADLINE, src => src.VGMSubmissionDeadLine)
.Map(dest => dest.WEIGHKGS, src => src.WEIGHKGS) .Map(dest => dest.BOOKED_BY_REFERENCE, src => src.BookedByReference)
.Map(dest => dest.WEIGHTYPE, src => src.WEIGHTYPE) .Map(dest => dest.CTN_STAT, src => src.CtnStat)
.Map(dest => dest.MBL_NO, src => src.MBLNo); .Map(dest => dest.NOTICE_DATE, src => src.NoticeDate);
config.ForType<TaskManageOrderVGMCtnInfo, TaskVGMCtnInfo>()
.Map(dest => dest.CNTRNO, src => src.CntrNo)
.Map(dest => dest.VGM_WEIGHT, src => src.VGMWeight)
.Map(dest => dest.VGM_WEIGHT_UNIT, src => src.VGMWeightUnit)
.Map(dest => dest.VGM_METHOD, src => src.VGMWeightMethod);
config.ForType<TaskBaseInfo, TaskBaseInfoDto>() config.ForType<TaskBaseInfo, TaskBaseInfoDto>()
@ -419,28 +425,27 @@ namespace Myshipping.Application
.Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME); .Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME);
config.ForType<TaskVGMFeedBackInfo, TaskVGMFeedBackDto>() config.ForType<TaskVGMInfo, TaskVGMDto>()
.Map(dest => dest.ContaNo, src => src.CONTA_NO) .Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.SealNo, src => src.SEAL_NO) .Map(dest => dest.TaskId, src => src.TASK_ID)
.Map(dest => dest.ContaType, src => src.CONTA_TYPE) .Map(dest => dest.MBlNo, src => src.MBL_NO)
.Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME) .Map(dest => dest.Carrier, src => src.CARRIER)
.Map(dest => dest.KGS, src => src.KGS) .Map(dest => dest.Vessel, src => src.VESSEL)
.Map(dest => dest.TareWeight, src => src.TAREWEIGHT) .Map(dest => dest.Voyno, src => src.VOYNO)
.Map(dest => dest.WeighKGs, src => src.WEIGHKGS) .Map(dest => dest.PortLoad, src => src.PORTLOAD)
.Map(dest => dest.WeighType, src => src.WEIGHTYPE) .Map(dest => dest.VGMSubmissionDeadLine, src => src.VGM_SUBMISSION_DEADLINE)
.Map(dest => dest.MBLNo, src => src.MBL_NO); .Map(dest => dest.BookedByReference, src => src.BOOKED_BY_REFERENCE)
.Map(dest => dest.CtnStat, src => src.CTN_STAT)
.Map(dest => dest.NoticeDate, src => src.NOTICE_DATE)
.Map(dest => dest.BookingId, src => src.BOOKING_ID);
config.ForType<TaskVGMFeedBackInfo, TaskVgmCompareDto>() config.ForType<TaskVGMCtnInfo, TaskVGMCtnDto>()
.Map(dest => dest.ContaNo, src => src.CONTA_NO) .Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.SealNo, src => src.SEAL_NO) .Map(dest => dest.CntrNo, src => src.CNTRNO)
.Map(dest => dest.ContaType, src => src.CONTA_TYPE) .Map(dest => dest.VGMWeight, src => src.VGM_WEIGHT)
.Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME) .Map(dest => dest.VGMWeightUnit, src => src.VGM_WEIGHT_UNIT)
.Map(dest => dest.KGS, src => src.KGS) .Map(dest => dest.VGMWeightMethod, src => src.VGM_METHOD);
.Map(dest => dest.TareWeight, src => src.TAREWEIGHT)
.Map(dest => dest.WeighKGs, src => src.WEIGHKGS)
.Map(dest => dest.WeighType, src => src.WEIGHTYPE)
.Map(dest => dest.MBLNo, src => src.MBL_NO);
config.ForType<BookingCtn, TaskVgmCompareDto>() config.ForType<BookingCtn, TaskVgmCompareDto>()
@ -605,16 +610,6 @@ namespace Myshipping.Application
.Map(dest => dest.FREIGHTPAYER, src => src.FreightPayer); .Map(dest => dest.FREIGHTPAYER, src => src.FreightPayer);
config.ForType<TaskVGMFeedBackInfo, BookingCtn>()
.Map(dest => dest.CTNCODE, src => src.CONTA_TYPE)
.Map(dest => dest.CTNALL, src => src.CONTA_TYPE_NAME)
.Map(dest => dest.CNTRNO, src => src.CONTA_NO)
.Map(dest => dest.SEALNO, src => src.SEAL_NO)
.Map(dest => dest.KGS, src => src.KGS)
.Map(dest => dest.TAREWEIGHT, src => src.TAREWEIGHT)
.Map(dest => dest.WEIGHTYPE, src => src.WEIGHTYPE)
.Map(dest => dest.WEIGHKGS, src => src.WEIGHKGS);
config.ForType<TaskBCInfo, TaskBCInfoDto>() config.ForType<TaskBCInfo, TaskBCInfoDto>()
.Map(dest => dest.PKId, src => src.PK_ID) .Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.TaskId, src => src.TASK_ID) .Map(dest => dest.TaskId, src => src.TASK_ID)

@ -175,11 +175,6 @@ namespace Myshipping.Application
/// </summary> /// </summary>
public List<TaskManageOrderSIDraftCompareInfo> SIDraftCompareList { get; set; } public List<TaskManageOrderSIDraftCompareInfo> SIDraftCompareList { get; set; }
/// <summary>
/// VGM反馈详情列表
/// </summary>
public List<TaskManageOrderVGMFeedBackInfo> VGMFeedBackList { get; set; }
/// <summary> /// <summary>
/// 附件列表 /// 附件列表
/// </summary> /// </summary>
@ -219,5 +214,10 @@ namespace Myshipping.Application
/// 截止时间变更通知 /// 截止时间变更通知
/// </summary> /// </summary>
public TaskCutDateChangeDto CutDateChange { get; set; } public TaskCutDateChangeDto CutDateChange { get; set; }
/// <summary>
/// VGM回执
/// </summary>
public List<TaskManageOrderVGMInfo> VGMFeedBack { get; set; }
} }
} }

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// VGM回执
/// </summary>
public class TaskManageOrderVGMInfo
{
/// <summary>
/// 主单号
/// </summary>
public string MBlNo { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string Voyno { get; set; }
/// <summary>
/// 装货港
/// </summary>
public string PortLoad { get; set; }
/// <summary>
/// VGM最晚提交时间
/// </summary>
public Nullable<DateTime> VGMSubmissionDeadLine { get; set; }
/// <summary>
/// 参考号
/// </summary>
public string BookedByReference { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string CtnStat { get; set; }
/// <summary>
/// 通知接收时间
/// </summary>
public Nullable<DateTime> NoticeDate { get; set; }
/// <summary>
/// 集装箱明细
/// </summary>
public List<TaskManageOrderVGMCtnInfo> CtnList { get; set; }
}
/// <summary>
/// VGM回执箱信息
/// </summary>
public class TaskManageOrderVGMCtnInfo
{
/// <summary>
/// 箱号
/// </summary>
public string CntrNo { get; set; }
/// <summary>
/// VGM重量
/// </summary>
public Nullable<decimal> VGMWeight { get; set; }
/// <summary>
/// VGM重量单位
/// </summary>
public string VGMWeightUnit { get; set; }
/// <summary>
/// VGM称重方式
/// </summary>
public string VGMWeightMethod { get; set; }
}
}

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务VGM集装箱
/// </summary>
public class TaskVGMCtnDto
{
/// <summary>
/// 主键
/// </summary>
public string PKId { get; set; }
/// <summary>
/// VGM任务主键
/// </summary>
public string PId { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string CntrNo { get; set; }
/// <summary>
/// VGM重量
/// </summary>
public Nullable<decimal> VGMWeight { get; set; }
/// <summary>
/// VGM重量单位
/// </summary>
public string VGMWeightUnit { get; set; }
/// <summary>
/// VGM称重方式
/// </summary>
public string VGMWeightMethod { get; set; }
}
}

@ -0,0 +1,77 @@
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// VGM任务详情
/// </summary>
public class TaskVGMDto
{
/// <summary>
/// 主键
/// </summary>
public string PKId { get; set; }
/// <summary>
/// 任务主键
/// </summary>
public string TaskId { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBlNo { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string Voyno { get; set; }
/// <summary>
/// 装货港
/// </summary>
public string PortLoad { get; set; }
/// <summary>
/// VGM最晚提交时间
/// </summary>
public Nullable<DateTime> VGMSubmissionDeadLine { get; set; }
/// <summary>
/// 参考号
/// </summary>
public string BookedByReference { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string CtnStat { get; set; }
/// <summary>
/// 通知接收时间
/// </summary>
public Nullable<DateTime> NoticeDate { get; set; }
/// <summary>
/// 订舱ID
/// </summary>
public Nullable<long> BookingId { get; set; }
}
}

@ -78,7 +78,9 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository; private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository; private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
private readonly SqlSugarRepository<TaskEmailInfo> _taskEmailInfoRepository; private readonly SqlSugarRepository<TaskEmailInfo> _taskEmailInfoRepository;
private readonly SqlSugarRepository<TaskVGMFeedBackInfo> _taskVGMFeedBackInfoRepository; private readonly SqlSugarRepository<TaskVGMInfo> _taskVGMInfoRepository;
private readonly SqlSugarRepository<TaskVGMCtnInfo> _taskVGMCtnInfoRepository;
private readonly SqlSugarRepository<BookingCtnVGM> _bookingCtnVGMRepository;
private readonly SqlSugarRepository<SysUser> _sysUserRepository; private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly SqlSugarRepository<TaskStatManageInfo> _taskStatManageInfoRepository; private readonly SqlSugarRepository<TaskStatManageInfo> _taskStatManageInfoRepository;
private readonly SqlSugarRepository<TaskOriginalDownloadHisInfo> _taskOriginalDownloadHisInfoRepository; private readonly SqlSugarRepository<TaskOriginalDownloadHisInfo> _taskOriginalDownloadHisInfoRepository;
@ -113,6 +115,7 @@ namespace Myshipping.Application
private readonly INamedServiceProvider<IBookingOrderService> _namedBookingOrderServiceProvider; private readonly INamedServiceProvider<IBookingOrderService> _namedBookingOrderServiceProvider;
private readonly INamedServiceProvider<ITaskManageRollingNominationService> _namedRollingNominationServiceProvider; private readonly INamedServiceProvider<ITaskManageRollingNominationService> _namedRollingNominationServiceProvider;
private readonly IBookingValueAddedService _bookingValueAddedService;
const string CONST_WEB_ACCOUNT_TYPE = "CmaWeb"; const string CONST_WEB_ACCOUNT_TYPE = "CmaWeb";
const string CONST_BOOK_ORIGINAL_DOWN_URL_CODE = "bookOriginalDownUrl"; const string CONST_BOOK_ORIGINAL_DOWN_URL_CODE = "bookOriginalDownUrl";
@ -131,7 +134,8 @@ namespace Myshipping.Application
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository, SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository, SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
SqlSugarRepository<TaskEmailInfo> taskEmailInfoRepository, SqlSugarRepository<TaskEmailInfo> taskEmailInfoRepository,
SqlSugarRepository<TaskVGMFeedBackInfo> taskVGMFeedBackInfoRepository, SqlSugarRepository<TaskVGMInfo> taskVGMInfoRepository,
SqlSugarRepository<TaskVGMCtnInfo> taskVGMCtnInfoRepository,
SqlSugarRepository<SysUser> sysUserRepository, SqlSugarRepository<SysUser> sysUserRepository,
SqlSugarRepository<TaskStatManageInfo> taskStatManageInfoRepository, SqlSugarRepository<TaskStatManageInfo> taskStatManageInfoRepository,
SqlSugarRepository<TaskOriginalDownloadHisInfo> taskOriginalDownloadHisInfoRepository, SqlSugarRepository<TaskOriginalDownloadHisInfo> taskOriginalDownloadHisInfoRepository,
@ -154,11 +158,13 @@ namespace Myshipping.Application
SqlSugarRepository<TaskRollingNominationInfo> taskRollingNominationInfoRepository, SqlSugarRepository<TaskRollingNominationInfo> taskRollingNominationInfoRepository,
SqlSugarRepository<TaskRollingNominationShipInfo> taskRollingNominationShipInfoRepository, SqlSugarRepository<TaskRollingNominationShipInfo> taskRollingNominationShipInfoRepository,
SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository, SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository,
SqlSugarRepository<BookingCtnVGM> bookingCtnVGMRepository,
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider, INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
IDjyWebsiteAccountConfigService webAccountConfig, IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache, ISysCacheService cache,
ISysDataUserMenu sysDataUserMenuService, ISysDataUserMenu sysDataUserMenuService,
INamedServiceProvider<ITaskManageRollingNominationService> namedRollingNominationServiceProvider, INamedServiceProvider<ITaskManageRollingNominationService> namedRollingNominationServiceProvider,
IBookingValueAddedService bookingValueAddedService,
ILogger<BookingOrderService> logger) ILogger<BookingOrderService> logger)
{ {
_taskBaseInfoRepository = taskBaseInfoRepository; _taskBaseInfoRepository = taskBaseInfoRepository;
@ -167,7 +173,8 @@ namespace Myshipping.Application
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository; _taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
_taskFileInfoRepository = taskFileInfoRepository; _taskFileInfoRepository = taskFileInfoRepository;
_taskEmailInfoRepository = taskEmailInfoRepository; _taskEmailInfoRepository = taskEmailInfoRepository;
_taskVGMFeedBackInfoRepository = taskVGMFeedBackInfoRepository; _taskVGMInfoRepository = taskVGMInfoRepository;
_taskVGMCtnInfoRepository = taskVGMCtnInfoRepository;
_sysUserRepository = sysUserRepository; _sysUserRepository = sysUserRepository;
_taskStatManageInfoRepository = taskStatManageInfoRepository; _taskStatManageInfoRepository = taskStatManageInfoRepository;
_taskOriginalDownloadHisInfoRepository = taskOriginalDownloadHisInfoRepository; _taskOriginalDownloadHisInfoRepository = taskOriginalDownloadHisInfoRepository;
@ -190,9 +197,11 @@ namespace Myshipping.Application
_taskRollingNominationInfoRepository = taskRollingNominationInfoRepository; _taskRollingNominationInfoRepository = taskRollingNominationInfoRepository;
_taskRollingNominationShipInfoRepository = taskRollingNominationShipInfoRepository; _taskRollingNominationShipInfoRepository = taskRollingNominationShipInfoRepository;
_taskRollingNominationDetailInfoRepository = taskRollingNominationDetailInfoRepository; _taskRollingNominationDetailInfoRepository = taskRollingNominationDetailInfoRepository;
_bookingCtnVGMRepository = bookingCtnVGMRepository;
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider; _namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
_namedRollingNominationServiceProvider = namedRollingNominationServiceProvider; _namedRollingNominationServiceProvider = namedRollingNominationServiceProvider;
_bookingValueAddedService = bookingValueAddedService;
_sysDataUserMenuService = sysDataUserMenuService; _sysDataUserMenuService = sysDataUserMenuService;
@ -642,29 +651,7 @@ namespace Myshipping.Application
} }
#endregion #endregion
#region VGM反馈入库
//VGM反馈入库
if (info.Main.VGMFeedBackList != null && info.Main.VGMFeedBackList.Count > 0)
{
info.Main.VGMFeedBackList.ForEach(async vgm =>
{
var vgmInfo = vgm.Adapt<TaskVGMFeedBackInfo>();
vgmInfo.PK_ID = IDGen.NextID().ToString();
vgmInfo.TASK_PKID = taskInfo.PK_ID;
vgmInfo.CreatedTime = taskInfo.CreatedTime;
vgmInfo.UpdatedTime = taskInfo.CreatedTime;
vgmInfo.CreatedUserId = taskInfo.CreatedUserId;
vgmInfo.CreatedUserName = taskInfo.CreatedUserName;
vgmInfo.TenantId = taskInfo.TenantId;
vgmInfo.TenantName = taskInfo.TenantName;
await _taskVGMFeedBackInfoRepository.InsertAsync(vgmInfo);
});
}
#endregion
#region 派车任务 #region 派车任务
if (info.Main.TaskType == TaskBaseTypeEnum.TRUCK_DISPATCH) if (info.Main.TaskType == TaskBaseTypeEnum.TRUCK_DISPATCH)
@ -763,6 +750,149 @@ namespace Myshipping.Application
#endregion #endregion
#region VGM回执或VGM未提交提醒
if (info.Main.TaskType == TaskBaseTypeEnum.VGM_FEEDBACK
|| info.Main.TaskType == TaskBaseTypeEnum.VGM_MISSING)
{
List<TaskVGMInfo> vgmList = new List<TaskVGMInfo>();
info.Main.VGMFeedBack.ForEach(p =>
{
//异步写入
var vgmInfo = p.Adapt<TaskVGMInfo>();
vgmInfo.PK_ID = IDGen.NextID().ToString();
vgmInfo.TASK_ID = taskInfo.PK_ID;
vgmInfo.CreatedTime = taskInfo.CreatedTime;
vgmInfo.UpdatedTime = taskInfo.CreatedTime;
vgmInfo.CreatedUserId = taskInfo.CreatedUserId;
vgmInfo.CreatedUserName = taskInfo.CreatedUserName;
vgmInfo.TenantId = taskInfo.TenantId;
vgmInfo.TenantName = taskInfo.TenantName;
_taskVGMInfoRepository.InsertAsync(vgmInfo);
vgmList.Add(vgmInfo);
if (p.CtnList != null && p.CtnList.Count > 0)
{
//异步写入集装箱
p.CtnList.ForEach(ctn =>
{
var vgmCtnInfo = ctn.Adapt<TaskVGMCtnInfo>();
vgmCtnInfo.PK_ID = IDGen.NextID().ToString();
vgmCtnInfo.P_ID = vgmInfo.PK_ID;
vgmCtnInfo.CreatedTime = taskInfo.CreatedTime;
vgmCtnInfo.UpdatedTime = taskInfo.CreatedTime;
vgmCtnInfo.CreatedUserId = taskInfo.CreatedUserId;
vgmCtnInfo.CreatedUserName = taskInfo.CreatedUserName;
vgmCtnInfo.TenantId = taskInfo.TenantId;
vgmCtnInfo.TenantName = taskInfo.TenantName;
_taskVGMCtnInfoRepository.InsertAsync(vgmCtnInfo);
});
}
});
var mblNoList = info.Main.VGMFeedBack.Select(p => p.MBlNo).Distinct().ToList();
/*
1
2
*/
var bookingList = _bookingOrderRepository.AsQueryable().Filter(null, true)
.Where(x => mblNoList.Contains(x.MBLNO) && (x.ParentId.HasValue == false || x.ParentId.Value < 1)
&& x.IsDeleted == false && x.TenantId == taskInfo.TenantId).ToList();
if (bookingList.Count > 0)
{
vgmList.ForEach(vgmInfo =>
{
var bookingInfo = bookingList.FirstOrDefault(a =>
a.MBLNO.Equals(vgmInfo.MBL_NO, StringComparison.OrdinalIgnoreCase));
//推送状态
var pushModel = new ModifyServiceProjectStatusDto
{
BookingId = bookingInfo.Id,
SourceType = TrackingSourceTypeEnum.AUTO,
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
new ModifyServiceProjectStatusDetailDto { StatusCode = "VGMCG" } }
};
var saveStatusRlt = _bookingValueAddedService.SaveServiceStatus(pushModel).GetAwaiter().GetResult();
_logger.LogInformation("请求JSON={json} 异步推送服务状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
var vgmEntity = _taskVGMInfoRepository.AsQueryable()
.First(x => x.PK_ID == vgmInfo.PK_ID);
vgmEntity.BOOKING_ID = bookingInfo.Id;
_taskVGMInfoRepository.AsUpdateable(vgmEntity)
.UpdateColumns(x => x.BOOKING_ID).ExecuteCommandAsync();
var ctnVGMList = _bookingCtnVGMRepository.AsQueryable().Filter(null, true)
.Where(x => x.BILLID == bookingInfo.Id && x.IsDeleted == false && x.TenantId == taskInfo.TenantId).ToList();
var bookCtnList = _bookingOrderContaRepository.AsQueryable().Filter(null, true)
.Where(x => x.BILLID == bookingInfo.Id && x.IsDeleted == false && x.TenantId == taskInfo.TenantId).ToList();
/*
foreach (var ctn in info.Main.VGMFeedBack.CtnList)
{
var bookCtnVGM = ctnVGMList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
var bookCtn = bookCtnList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
if (bookCtnVGM != null)
{
//更新
bookCtnVGM.UpdatedTime = taskInfo.CreatedTime;
bookCtnVGM.UpdatedUserId = taskInfo.CreatedUserId;
bookCtnVGM.UpdatedUserName = taskInfo.CreatedUserName;
await _bookingCtnVGMRepository.AsUpdateable(bookCtnVGM).UpdateColumns(x => new
{
x.VGM_WEIGHT,
x.VGM_WEIGHT_UNIT,
x.VGM_METHOD,
x.IS_MATCH,
x.UpdatedTime,
x.UpdatedUserId,
x.UpdatedUserName
}).ExecuteCommandAsync();
}
else
{
//写入
var bookingCtnVGM = new BookingCtnVGM
{
CNTRNO = ctn.CntrNo,
VGM_WEIGHT = ctn.VGMWeight,
VGM_WEIGHT_UNIT = ctn.VGMWeightUnit,
VGM_METHOD = ctn.VGMWeightMethod,
IS_MATCH = bookCtn != null,
CreatedTime = taskInfo.CreatedTime,
UpdatedTime = taskInfo.CreatedTime,
CreatedUserId = taskInfo.CreatedUserId,
CreatedUserName = taskInfo.CreatedUserName,
TenantId = taskInfo.TenantId,
};
await _bookingCtnVGMRepository.InsertAsync(bookingCtnVGM);
}
}
*/
});
}
}
#endregion
#region Rolling Nomination(预甩货通知) #region Rolling Nomination(预甩货通知)
if (info.Main.TaskType == TaskBaseTypeEnum.ROLLING_NOMINATION || info.Main.TaskType == TaskBaseTypeEnum.TRANSFER_NOMINATION) if (info.Main.TaskType == TaskBaseTypeEnum.ROLLING_NOMINATION || info.Main.TaskType == TaskBaseTypeEnum.TRANSFER_NOMINATION)
{ {
@ -4069,7 +4199,7 @@ namespace Myshipping.Application
if (taskInfo.TASK_TYPE != TaskBusiTypeEnum.VGM_COMPARE.ToString()) if (taskInfo.TASK_TYPE != TaskBusiTypeEnum.VGM_COMPARE.ToString())
throw Oops.Oh($"当前任务类型不是{TaskBusiTypeEnum.VGM_COMPARE.GetDescription()}"); throw Oops.Oh($"当前任务类型不是{TaskBusiTypeEnum.VGM_COMPARE.GetDescription()}");
/*
var vgmList = _taskVGMFeedBackInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskInfo.PK_ID) var vgmList = _taskVGMFeedBackInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskInfo.PK_ID)
.ToList(); .ToList();
@ -4189,7 +4319,7 @@ namespace Myshipping.Application
}).ToList(); }).ToList();
model.vgmCompareList = list2; model.vgmCompareList = list2;
*/
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -4238,6 +4368,7 @@ namespace Myshipping.Application
if (bookOrderList.Any(t => t.ctn.Id > 0)) if (bookOrderList.Any(t => t.ctn.Id > 0))
orderCtnList = bookOrderList.Select(t => t.ctn).ToList(); orderCtnList = bookOrderList.Select(t => t.ctn).ToList();
/*
var contaList = _taskVGMFeedBackInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskInfo.PK_ID).ToList(); var contaList = _taskVGMFeedBackInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskInfo.PK_ID).ToList();
var si2orderCtnList = contaList.GroupJoin(orderCtnList, l => l.CONTA_NO?.Trim(), r => r.CNTRNO?.Trim(), (l, r) => { var si2orderCtnList = contaList.GroupJoin(orderCtnList, l => l.CONTA_NO?.Trim(), r => r.CNTRNO?.Trim(), (l, r) => {
@ -4320,7 +4451,7 @@ namespace Myshipping.Application
} }
}); });
} }
*/
result.succ = true; result.succ = true;
result.msg = "更新订舱成功"; result.msg = "更新订舱成功";
} }

@ -13,12 +13,21 @@ namespace Myshipping.Web.Core;
public class JwtHandler : AppAuthorizeHandler public class JwtHandler : AppAuthorizeHandler
{ {
#if DEBUG
public JwtHandler()
{
}
#else
private ISysMenuService _sysMenuService; private ISysMenuService _sysMenuService;
public JwtHandler(ISysMenuService sysMenuService) public JwtHandler(ISysMenuService sysMenuService)
{ {
_sysMenuService = sysMenuService; _sysMenuService = sysMenuService;
} }
#endif
/// <summary> /// <summary>
@ -71,8 +80,12 @@ public class JwtHandler : AppAuthorizeHandler
if (routeName == "sysUser:updatePwd") return true; if (routeName == "sysUser:updatePwd") return true;
Stopwatch sw = Stopwatch.StartNew(); Stopwatch sw = Stopwatch.StartNew();
//var _sysMenuService = App.GetService<ISysMenuService>(); #if DEBUG
var _sysMenuService = App.GetService<ISysMenuService>();
var allPermission = await _sysMenuService.GetAllPermission();
#else
var allPermission = await _sysMenuService.GetAllPermission(); var allPermission = await _sysMenuService.GetAllPermission();
#endif
httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString(); httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString();
if (!allPermission.Contains(routeName)) if (!allPermission.Contains(routeName))
{ {

Loading…
Cancel
Save