diff --git a/Myshipping.Application/Entity/BookingCtnVGM.cs b/Myshipping.Application/Entity/BookingCtnVGM.cs
new file mode 100644
index 00000000..519c10f8
--- /dev/null
+++ b/Myshipping.Application/Entity/BookingCtnVGM.cs
@@ -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
+{
+ ///
+ /// 订舱箱VGM信息
+ ///
+ [SugarTable("booking_ctn_vgm")]
+ [Description("订舱箱VGM信息")]
+ public class BookingCtnVGM : DBEntityTenant
+ {
+ ///
+ /// 订舱ID
+ ///
+
+ public Nullable BILLID { get; set; }
+
+ ///
+ /// 箱号
+ ///
+ public string CNTRNO { get; set; }
+
+ ///
+ /// VGM重量
+ ///
+ public Nullable VGM_WEIGHT { get; set; }
+
+ ///
+ /// VGM重量单位
+ ///
+ public string VGM_WEIGHT_UNIT { get; set; }
+
+ ///
+ /// VGM称重方式
+ ///
+ public string VGM_METHOD { get; set; }
+
+ ///
+ /// 是否箱号已匹配
+ ///
+ public bool IS_MATCH { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskVGMCtnInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskVGMCtnInfo.cs
new file mode 100644
index 00000000..945f2814
--- /dev/null
+++ b/Myshipping.Application/Entity/TaskManagePlat/TaskVGMCtnInfo.cs
@@ -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
+{
+ ///
+ /// 任务VGM详情表
+ ///
+ [SugarTable("task_vgm_ctn_info")]
+ [Description("任务VGM集装箱")]
+ public class TaskVGMCtnInfo : TaskManageDbEntity
+ {
+ ///
+ /// VGM任务主键
+ ///
+ public string P_ID { get; set; }
+
+ ///
+ /// 箱号
+ ///
+ public string CNTRNO { get; set; }
+
+ ///
+ /// VGM重量
+ ///
+ public Nullable VGM_WEIGHT { get; set; }
+
+ ///
+ /// VGM重量单位
+ ///
+ public string VGM_WEIGHT_UNIT { get; set; }
+
+ ///
+ /// VGM称重方式
+ ///
+ public string VGM_METHOD { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskVGMFeedBackInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskVGMFeedBackInfo.cs
deleted file mode 100644
index 969ea4fb..00000000
--- a/Myshipping.Application/Entity/TaskManagePlat/TaskVGMFeedBackInfo.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 任务VGM比对回执详情表
- ///
- [SugarTable("task_vgm_feedback")]
- [Description("任务VGM比对回执详情表")]
- public class TaskVGMFeedBackInfo : TaskManageDbEntity
- {
- ///
- /// 任务主键(父主键)
- ///
- public string TASK_PKID { get; set; }
-
- ///
- /// 集装箱号
- ///
- public string CONTA_NO { get; set; }
-
- ///
- /// 铅封号
- ///
- public string SEAL_NO { get; set; }
-
- ///
- /// 箱型代码
- ///
- public string CONTA_TYPE { get; set; }
-
- ///
- /// 箱型
- ///
- public string CONTA_TYPE_NAME { get; set; }
-
- ///
- /// 重量
- ///
- public decimal? KGS { get; set; }
-
- ///
- /// 皮重
- ///
- public decimal? TAREWEIGHT { get; set; }
-
- ///
- /// 称重重量
- ///
- public decimal? WEIGHKGS { get; set; }
-
- ///
- /// 称重方式
- ///
- public string WEIGHTYPE { get; set; }
-
- ///
- /// 主单号
- ///
- public string MBL_NO { get; set; }
- }
-}
diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskVGMInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskVGMInfo.cs
new file mode 100644
index 00000000..550e4d2d
--- /dev/null
+++ b/Myshipping.Application/Entity/TaskManagePlat/TaskVGMInfo.cs
@@ -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
+{
+ ///
+ /// 任务VGM详情表
+ ///
+ [SugarTable("task_vgm_info")]
+ [Description("任务VGM详情表")]
+ public class TaskVGMInfo : TaskManageDbEntity
+ {
+ ///
+ /// 任务主键
+ ///
+ public string TASK_ID { get; set; }
+
+ ///
+ /// 主单号
+ ///
+ public string MBL_NO { get; set; }
+
+ ///
+ /// 船公司
+ ///
+ public string CARRIER { get; set; }
+
+ ///
+ /// 船名
+ ///
+ public string VESSEL { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string VOYNO { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string PORTLOAD { get; set; }
+
+ ///
+ /// VGM最晚提交时间
+ ///
+ public Nullable VGM_SUBMISSION_DEADLINE { get; set; }
+
+ ///
+ /// 参考号
+ ///
+ public string BOOKED_BY_REFERENCE { get; set; }
+
+ ///
+ /// 箱型箱量
+ ///
+ public string CTN_STAT { get; set; }
+
+ ///
+ /// 通知接收时间
+ ///
+ public Nullable NOTICE_DATE { get; set; }
+
+ ///
+ /// 订舱ID
+ ///
+ public Nullable BOOKING_ID { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Enum/TaskBaseTypeEnum.cs b/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
index 9d6a0a00..eabaed0c 100644
--- a/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
+++ b/Myshipping.Application/Enum/TaskBaseTypeEnum.cs
@@ -151,6 +151,10 @@ namespace Myshipping.Application
///
[Description("VGM回执")]
VGM_FEEDBACK,
-
+ ///
+ /// VGM未提交
+ ///
+ [Description("VGM未提交")]
+ VGM_MISSING,
}
}
diff --git a/Myshipping.Application/Myshipping.Application.csproj b/Myshipping.Application/Myshipping.Application.csproj
index ad6828fd..7d74091e 100644
--- a/Myshipping.Application/Myshipping.Application.csproj
+++ b/Myshipping.Application/Myshipping.Application.csproj
@@ -25,6 +25,7 @@
+
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
index a7a63411..f0ec2e9c 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
@@ -64,16 +64,22 @@ namespace Myshipping.Application
.Map(dest => dest.IS_DONGSHENG, src => src.IsDongSheng)
.Map(dest => dest.IS_TOTAL, src => src.IsTotal);
- config.ForType()
- .Map(dest => dest.CONTA_NO, src => src.ContaNo)
- .Map(dest => dest.SEAL_NO, src => src.SealNo)
- .Map(dest => dest.CONTA_TYPE, src => src.ContaType)
- .Map(dest => dest.CONTA_TYPE_NAME, src => src.ContaTypeName)
- .Map(dest => dest.KGS, src => src.KGS)
- .Map(dest => dest.TAREWEIGHT, src => src.TAREWEIGHT)
- .Map(dest => dest.WEIGHKGS, src => src.WEIGHKGS)
- .Map(dest => dest.WEIGHTYPE, src => src.WEIGHTYPE)
- .Map(dest => dest.MBL_NO, src => src.MBLNo);
+ config.ForType()
+ .Map(dest => dest.MBL_NO, src => src.MBlNo)
+ .Map(dest => dest.CARRIER, src => src.Carrier)
+ .Map(dest => dest.VESSEL, src => src.Vessel)
+ .Map(dest => dest.VOYNO, src => src.Voyno)
+ .Map(dest => dest.PORTLOAD, src => src.PortLoad)
+ .Map(dest => dest.VGM_SUBMISSION_DEADLINE, src => src.VGMSubmissionDeadLine)
+ .Map(dest => dest.BOOKED_BY_REFERENCE, src => src.BookedByReference)
+ .Map(dest => dest.CTN_STAT, src => src.CtnStat)
+ .Map(dest => dest.NOTICE_DATE, src => src.NoticeDate);
+
+ config.ForType()
+ .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()
@@ -419,28 +425,27 @@ namespace Myshipping.Application
.Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME);
- config.ForType()
- .Map(dest => dest.ContaNo, src => src.CONTA_NO)
- .Map(dest => dest.SealNo, src => src.SEAL_NO)
- .Map(dest => dest.ContaType, src => src.CONTA_TYPE)
- .Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME)
- .Map(dest => dest.KGS, src => src.KGS)
- .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()
+ .Map(dest => dest.PKId, src => src.PK_ID)
+ .Map(dest => dest.TaskId, src => src.TASK_ID)
+ .Map(dest => dest.MBlNo, src => src.MBL_NO)
+ .Map(dest => dest.Carrier, src => src.CARRIER)
+ .Map(dest => dest.Vessel, src => src.VESSEL)
+ .Map(dest => dest.Voyno, src => src.VOYNO)
+ .Map(dest => dest.PortLoad, src => src.PORTLOAD)
+ .Map(dest => dest.VGMSubmissionDeadLine, src => src.VGM_SUBMISSION_DEADLINE)
+ .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()
- .Map(dest => dest.ContaNo, src => src.CONTA_NO)
- .Map(dest => dest.SealNo, src => src.SEAL_NO)
- .Map(dest => dest.ContaType, src => src.CONTA_TYPE)
- .Map(dest => dest.ContaTypeName, src => src.CONTA_TYPE_NAME)
- .Map(dest => dest.KGS, src => src.KGS)
- .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()
+ .Map(dest => dest.PKId, src => src.PK_ID)
+ .Map(dest => dest.CntrNo, src => src.CNTRNO)
+ .Map(dest => dest.VGMWeight, src => src.VGM_WEIGHT)
+ .Map(dest => dest.VGMWeightUnit, src => src.VGM_WEIGHT_UNIT)
+ .Map(dest => dest.VGMWeightMethod, src => src.VGM_METHOD);
config.ForType()
@@ -605,16 +610,6 @@ namespace Myshipping.Application
.Map(dest => dest.FREIGHTPAYER, src => src.FreightPayer);
- config.ForType()
- .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()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.TaskId, src => src.TASK_ID)
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
index fdf7d4f3..9b5e7763 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
@@ -175,11 +175,6 @@ namespace Myshipping.Application
///
public List SIDraftCompareList { get; set; }
- ///
- /// VGM反馈详情列表
- ///
- public List VGMFeedBackList { get; set; }
-
///
/// 附件列表
///
@@ -219,5 +214,10 @@ namespace Myshipping.Application
/// 截止时间变更通知
///
public TaskCutDateChangeDto CutDateChange { get; set; }
+
+ ///
+ /// VGM回执
+ ///
+ public List VGMFeedBack { get; set; }
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderVGMInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderVGMInfo.cs
new file mode 100644
index 00000000..07c085ee
--- /dev/null
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderVGMInfo.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// VGM回执
+ ///
+ public class TaskManageOrderVGMInfo
+ {
+ ///
+ /// 主单号
+ ///
+ public string MBlNo { get; set; }
+
+ ///
+ /// 船公司
+ ///
+ public string Carrier { get; set; }
+
+ ///
+ /// 船名
+ ///
+ public string Vessel { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string Voyno { get; set; }
+
+ ///
+ /// 装货港
+ ///
+ public string PortLoad { get; set; }
+
+ ///
+ /// VGM最晚提交时间
+ ///
+ public Nullable VGMSubmissionDeadLine { get; set; }
+
+ ///
+ /// 参考号
+ ///
+ public string BookedByReference { get; set; }
+
+ ///
+ /// 箱型箱量
+ ///
+ public string CtnStat { get; set; }
+
+ ///
+ /// 通知接收时间
+ ///
+ public Nullable NoticeDate { get; set; }
+
+ ///
+ /// 集装箱明细
+ ///
+
+ public List CtnList { get; set; }
+ }
+
+ ///
+ /// VGM回执箱信息
+ ///
+ public class TaskManageOrderVGMCtnInfo
+ {
+ ///
+ /// 箱号
+ ///
+ public string CntrNo { get; set; }
+
+ ///
+ /// VGM重量
+ ///
+ public Nullable VGMWeight { get; set; }
+
+ ///
+ /// VGM重量单位
+ ///
+ public string VGMWeightUnit { get; set; }
+
+ ///
+ /// VGM称重方式
+ ///
+ public string VGMWeightMethod { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMCtnDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMCtnDto.cs
new file mode 100644
index 00000000..2c688d21
--- /dev/null
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMCtnDto.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// 任务VGM集装箱
+ ///
+ public class TaskVGMCtnDto
+ {
+ ///
+ /// 主键
+ ///
+ public string PKId { get; set; }
+
+ ///
+ /// VGM任务主键
+ ///
+ public string PId { get; set; }
+
+ ///
+ /// 箱号
+ ///
+ public string CntrNo { get; set; }
+
+ ///
+ /// VGM重量
+ ///
+ public Nullable VGMWeight { get; set; }
+
+ ///
+ /// VGM重量单位
+ ///
+ public string VGMWeightUnit { get; set; }
+
+ ///
+ /// VGM称重方式
+ ///
+ public string VGMWeightMethod { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMDto.cs
new file mode 100644
index 00000000..08cfec71
--- /dev/null
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/VGM/TaskVGMDto.cs
@@ -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
+{
+ ///
+ /// VGM任务详情
+ ///
+ public class TaskVGMDto
+ {
+ ///
+ /// 主键
+ ///
+ public string PKId { get; set; }
+
+ ///
+ /// 任务主键
+ ///
+ public string TaskId { get; set; }
+
+ ///
+ /// 主单号
+ ///
+ public string MBlNo { get; set; }
+
+ ///
+ /// 船公司
+ ///
+ public string Carrier { get; set; }
+
+ ///
+ /// 船名
+ ///
+ public string Vessel { get; set; }
+
+ ///
+ /// 航次
+ ///
+ public string Voyno { get; set; }
+
+ ///
+ /// 装货港
+ ///
+ public string PortLoad { get; set; }
+
+ ///
+ /// VGM最晚提交时间
+ ///
+ public Nullable VGMSubmissionDeadLine { get; set; }
+
+ ///
+ /// 参考号
+ ///
+ public string BookedByReference { get; set; }
+
+ ///
+ /// 箱型箱量
+ ///
+ public string CtnStat { get; set; }
+
+ ///
+ /// 通知接收时间
+ ///
+ public Nullable NoticeDate { get; set; }
+
+ ///
+ /// 订舱ID
+ ///
+ public Nullable BookingId { get; set; }
+
+ }
+}
diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
index dc9e0e41..df5cab3a 100644
--- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
@@ -78,7 +78,9 @@ namespace Myshipping.Application
private readonly SqlSugarRepository _taskBillFeeDetailInfoRepository;
private readonly SqlSugarRepository _taskFileInfoRepository;
private readonly SqlSugarRepository _taskEmailInfoRepository;
- private readonly SqlSugarRepository _taskVGMFeedBackInfoRepository;
+ private readonly SqlSugarRepository _taskVGMInfoRepository;
+ private readonly SqlSugarRepository _taskVGMCtnInfoRepository;
+ private readonly SqlSugarRepository _bookingCtnVGMRepository;
private readonly SqlSugarRepository _sysUserRepository;
private readonly SqlSugarRepository _taskStatManageInfoRepository;
private readonly SqlSugarRepository _taskOriginalDownloadHisInfoRepository;
@@ -113,6 +115,7 @@ namespace Myshipping.Application
private readonly INamedServiceProvider _namedBookingOrderServiceProvider;
private readonly INamedServiceProvider _namedRollingNominationServiceProvider;
+ private readonly IBookingValueAddedService _bookingValueAddedService;
const string CONST_WEB_ACCOUNT_TYPE = "CmaWeb";
const string CONST_BOOK_ORIGINAL_DOWN_URL_CODE = "bookOriginalDownUrl";
@@ -131,7 +134,8 @@ namespace Myshipping.Application
SqlSugarRepository taskBillFeeDetailInfoRepository,
SqlSugarRepository taskFileInfoRepository,
SqlSugarRepository taskEmailInfoRepository,
- SqlSugarRepository taskVGMFeedBackInfoRepository,
+ SqlSugarRepository taskVGMInfoRepository,
+ SqlSugarRepository taskVGMCtnInfoRepository,
SqlSugarRepository sysUserRepository,
SqlSugarRepository taskStatManageInfoRepository,
SqlSugarRepository taskOriginalDownloadHisInfoRepository,
@@ -154,11 +158,13 @@ namespace Myshipping.Application
SqlSugarRepository taskRollingNominationInfoRepository,
SqlSugarRepository taskRollingNominationShipInfoRepository,
SqlSugarRepository taskRollingNominationDetailInfoRepository,
+ SqlSugarRepository bookingCtnVGMRepository,
INamedServiceProvider namedBookingOrderServiceProvider,
IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache,
ISysDataUserMenu sysDataUserMenuService,
INamedServiceProvider namedRollingNominationServiceProvider,
+ IBookingValueAddedService bookingValueAddedService,
ILogger logger)
{
_taskBaseInfoRepository = taskBaseInfoRepository;
@@ -167,7 +173,8 @@ namespace Myshipping.Application
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
_taskFileInfoRepository = taskFileInfoRepository;
_taskEmailInfoRepository = taskEmailInfoRepository;
- _taskVGMFeedBackInfoRepository = taskVGMFeedBackInfoRepository;
+ _taskVGMInfoRepository = taskVGMInfoRepository;
+ _taskVGMCtnInfoRepository = taskVGMCtnInfoRepository;
_sysUserRepository = sysUserRepository;
_taskStatManageInfoRepository = taskStatManageInfoRepository;
_taskOriginalDownloadHisInfoRepository = taskOriginalDownloadHisInfoRepository;
@@ -190,9 +197,11 @@ namespace Myshipping.Application
_taskRollingNominationInfoRepository = taskRollingNominationInfoRepository;
_taskRollingNominationShipInfoRepository = taskRollingNominationShipInfoRepository;
_taskRollingNominationDetailInfoRepository = taskRollingNominationDetailInfoRepository;
+ _bookingCtnVGMRepository = bookingCtnVGMRepository;
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
_namedRollingNominationServiceProvider = namedRollingNominationServiceProvider;
+ _bookingValueAddedService = bookingValueAddedService;
_sysDataUserMenuService = sysDataUserMenuService;
@@ -642,29 +651,7 @@ namespace Myshipping.Application
}
#endregion
- #region VGM反馈入库
- //VGM反馈入库
- if (info.Main.VGMFeedBackList != null && info.Main.VGMFeedBackList.Count > 0)
- {
- info.Main.VGMFeedBackList.ForEach(async vgm =>
- {
- var vgmInfo = vgm.Adapt();
-
- 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 派车任务
if (info.Main.TaskType == TaskBaseTypeEnum.TRUCK_DISPATCH)
@@ -763,6 +750,149 @@ namespace Myshipping.Application
#endregion
+ #region VGM回执或VGM未提交提醒
+ if (info.Main.TaskType == TaskBaseTypeEnum.VGM_FEEDBACK
+ || info.Main.TaskType == TaskBaseTypeEnum.VGM_MISSING)
+ {
+ List vgmList = new List();
+
+ info.Main.VGMFeedBack.ForEach(p =>
+ {
+ //异步写入
+ var vgmInfo = p.Adapt();
+
+ 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();
+
+ 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 {
+ 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(预甩货通知)
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())
throw Oops.Oh($"当前任务类型不是{TaskBusiTypeEnum.VGM_COMPARE.GetDescription()}");
-
+ /*
var vgmList = _taskVGMFeedBackInfoRepository.AsQueryable().Where(t => t.TASK_PKID == taskInfo.PK_ID)
.ToList();
@@ -4189,7 +4319,7 @@ namespace Myshipping.Application
}).ToList();
model.vgmCompareList = list2;
-
+ */
}
catch (Exception ex)
{
@@ -4238,6 +4368,7 @@ namespace Myshipping.Application
if (bookOrderList.Any(t => t.ctn.Id > 0))
orderCtnList = bookOrderList.Select(t => t.ctn).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) => {
@@ -4320,7 +4451,7 @@ namespace Myshipping.Application
}
});
}
-
+ */
result.succ = true;
result.msg = "更新订舱成功";
}
diff --git a/Myshipping.Web.Core/Handlers/JwtHandler.cs b/Myshipping.Web.Core/Handlers/JwtHandler.cs
index 46fa88ba..a766b0d9 100644
--- a/Myshipping.Web.Core/Handlers/JwtHandler.cs
+++ b/Myshipping.Web.Core/Handlers/JwtHandler.cs
@@ -13,12 +13,21 @@ namespace Myshipping.Web.Core;
public class JwtHandler : AppAuthorizeHandler
{
+#if DEBUG
+ public JwtHandler()
+ {
+
+ }
+#else
private ISysMenuService _sysMenuService;
public JwtHandler(ISysMenuService sysMenuService)
{
+
_sysMenuService = sysMenuService;
+
}
+#endif
///
@@ -71,8 +80,12 @@ public class JwtHandler : AppAuthorizeHandler
if (routeName == "sysUser:updatePwd") return true;
Stopwatch sw = Stopwatch.StartNew();
- //var _sysMenuService = App.GetService();
+#if DEBUG
+ var _sysMenuService = App.GetService();
+ var allPermission = await _sysMenuService.GetAllPermission();
+#else
var allPermission = await _sysMenuService.GetAllPermission();
+#endif
httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString();
if (!allPermission.Contains(routeName))
{