diff --git a/Myshipping.Application/Entity/BookingLetteryard.cs b/Myshipping.Application/Entity/BookingLetteryard.cs
new file mode 100644
index 00000000..615cd72f
--- /dev/null
+++ b/Myshipping.Application/Entity/BookingLetteryard.cs
@@ -0,0 +1,67 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using Myshipping.Core.Entity;
+namespace Myshipping.Application.Entity
+{
+ ///
+ /// 下货纸
+ ///
+ [SugarTable("booking_letter_yard")]
+ [Description("下货纸")]
+ public class BookingLetteryard : DBEntityTenant
+ {
+ ///
+ /// 订舱ID
+ ///
+ public long? BookingId { get; set; }
+ ///
+ /// TO
+ ///
+ public string ToName { get; set; }
+ ///
+ /// ATTN
+ ///
+ public string Attn { get; set; }
+ ///
+ /// ATTN电话
+ ///
+ public string AttnTel { get; set; }
+ ///
+ /// ATTN邮箱
+ ///
+ public string AttnMail { get; set; }
+ ///
+ /// FROM
+ ///
+ public string FromName { get; set; }
+ ///
+ /// FROM电话
+ ///
+ public string FromTel { get; set; }
+ ///
+ /// FROM邮箱
+ ///
+ public string FromMail { get; set; }
+ ///
+ /// 描述
+ ///
+ public string Description { get; set; }
+ ///
+ /// 截单时间
+ ///
+ public DateTime? CloseDocTime { get; set; }
+ ///
+ /// 截港时间
+ ///
+ public DateTime? ClosingTime { get; set; }
+ ///
+ /// 截VGM时间
+ ///
+ public DateTime? VgmTime { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Myshipping.Application/Entity/BookingOrderUrl.cs b/Myshipping.Application/Entity/BookingOrderUrl.cs
new file mode 100644
index 00000000..1870faac
--- /dev/null
+++ b/Myshipping.Application/Entity/BookingOrderUrl.cs
@@ -0,0 +1,31 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using Myshipping.Core.Entity;
+namespace Myshipping.Application.Entity
+{
+ ///
+ /// 订舱链接
+ ///
+ [SugarTable("booking_order_url")]
+ [Description("订舱链接")]
+ public class BookingOrderUrl : DBEntityTenant
+ {
+ ///
+ /// 订舱ID
+ ///
+ public long? BookingId { get; set; }
+ ///
+ /// 提箱小票链接
+ ///
+ public string UrlTxxp { get; set; }
+ ///
+ /// VGM链接
+ ///
+ public string UrlVgm { get; set; }
+ ///
+ /// VGM&SI链接
+ ///
+ public string UrlVgmSi { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Myshipping.Application/Entity/BookingSampleBill.cs b/Myshipping.Application/Entity/BookingSampleBill.cs
new file mode 100644
index 00000000..9afa8c1f
--- /dev/null
+++ b/Myshipping.Application/Entity/BookingSampleBill.cs
@@ -0,0 +1,55 @@
+using System;
+using SqlSugar;
+using System.ComponentModel;
+using Myshipping.Core.Entity;
+namespace Myshipping.Application.Entity
+{
+ ///
+ /// 订舱样单
+ ///
+ [SugarTable("booking_sample_bill")]
+ [Description("订舱样单")]
+ public class BookingSampleBill : DBEntityTenant
+ {
+ ///
+ /// 订舱ID
+ ///
+ public long? BookingId { get; set; }
+ ///
+ /// TO
+ ///
+ public string ToName { get; set; }
+ ///
+ /// ATTN
+ ///
+ public string Attn { get; set; }
+ ///
+ /// ATTN电话
+ ///
+ public string AttnTel { get; set; }
+ ///
+ /// ATTN邮箱
+ ///
+ public string AttnMail { get; set; }
+ ///
+ /// FROM
+ ///
+ public string FromName { get; set; }
+ ///
+ /// FROM电话
+ ///
+ public string FromTel { get; set; }
+ ///
+ /// FROM邮箱
+ ///
+ public string FromMail { get; set; }
+ ///
+ /// 描述
+ ///
+ public string Description { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml
index 45c018fd..efdd6bec 100644
--- a/Myshipping.Application/Myshipping.Application.xml
+++ b/Myshipping.Application/Myshipping.Application.xml
@@ -1435,6 +1435,76 @@
租户
+
+
+ 下货纸
+
+
+
+
+ 订舱ID
+
+
+
+
+ TO
+
+
+
+
+ ATTN
+
+
+
+
+ ATTN电话
+
+
+
+
+ ATTN邮箱
+
+
+
+
+ FROM
+
+
+
+
+ FROM电话
+
+
+
+
+ FROM邮箱
+
+
+
+
+ 描述
+
+
+
+
+ 截单时间
+
+
+
+
+ 截港时间
+
+
+
+
+ 截VGM时间
+
+
+
+
+ 备注
+
+
舱单日志
@@ -2220,6 +2290,27 @@
主单ID
+
+
+ 订舱链接
+
+
+
+
+ 订舱ID
+
+
+
+
+ 提箱小票链接
+
+
+
+
+ VGM链接
+
+
+
订舱打印模板
@@ -2265,6 +2356,61 @@
订舱备注
+
+
+ 订舱样单
+
+
+
+
+ 订舱ID
+
+
+
+
+ TO
+
+
+
+
+ ATTN
+
+
+
+
+ ATTN电话
+
+
+
+
+ ATTN邮箱
+
+
+
+
+ FROM
+
+
+
+
+ FROM电话
+
+
+
+
+ FROM邮箱
+
+
+
+
+ 描述
+
+
+
+
+ 备注
+
+
货运跟踪
@@ -3166,11 +3312,21 @@
+
+
+ 获取货运动态
+
+
调用运踪接口
+
+
+ 插入货运动态
+
+
获取用户报表的json
@@ -3185,16 +3341,6 @@
类型,对应字典中的【订舱打印模板类型】
-
-
- 获取货运动态
-
-
-
-
- 插入货运动态
-
-
操作类型(新增,编辑)
diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index b180966c..3a1a085d 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -80,6 +80,7 @@ namespace Myshipping.Application
this._statuslogdetail = statuslogdetail;
}
+ #region 主表和箱信息
///
/// 分页查询订舱主表
///
@@ -402,7 +403,9 @@ namespace Myshipping.Application
}
return list;
}
+ #endregion
+ #region 日志、备注、附件、货运动态等
///
/// 获取日志明细
///
@@ -520,6 +523,27 @@ namespace Myshipping.Application
return list;
}
+
+ ///
+ /// 获取货运动态
+ ///
+ public async Task> GetBookingStatusLog(long Id)
+ {
+
+ var statuslog = await _statuslog.AsQueryable().Where(x => x.BookingId == Id).ToListAsync();
+ var dto = statuslog.Adapt>();
+ foreach (var item in dto)
+ {
+ var detail = await _statuslogdetail.AsQueryable().Where(x => x.PId == item.Id).ToListAsync();
+ item.detail = detail.Adapt>();
+ }
+
+ return dto;
+ }
+
+ #endregion
+
+ #region 运踪
///
/// 调用运踪接口
///
@@ -550,6 +574,60 @@ namespace Myshipping.Application
_logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口返回" + html.ToJsonString());
}
+ ///
+ /// 插入货运动态
+ ///
+ [AllowAnonymous]
+ [SqlSugarUnitOfWork]
+ public async Task AddBookingStatusLog(List all)
+ {
+
+ foreach (var item in all)
+ {
+ //清空原有数据
+ var old = await _statuslog.AsQueryable().Where(x => x.BookingId == item.BookingId && x.Gategory == "ship").ToListAsync();
+ await _statuslog.DeleteAsync(x => x.BookingId == item.BookingId && x.Gategory == "ship");
+ foreach (var ot in old)
+ {
+ await _statuslogdetail.DeleteAsync(x => x.PId == ot.Id);
+ }
+ //新增数据
+ var bookingStatusLog = new BookingStatusLog();
+ bookingStatusLog.BookingId = item.BookingId;
+ bookingStatusLog.Gategory = "ship";
+ bookingStatusLog.CreatedTime = DateTime.Now;
+ bookingStatusLog.Status = item.Status;
+ bookingStatusLog.OpTiem = item.OpTiem;
+ bookingStatusLog.MBLNO = item.MBLNO;
+ var id = await _statuslog.InsertReturnSnowflakeIdAsync(bookingStatusLog);
+ if (item.detail != null && item.detail.Count > 0)
+ {
+ foreach (var dt in item.detail)
+ {
+ var BookingStatusLogDetail = new BookingStatusLogDetail();
+ BookingStatusLogDetail.PId = id;
+ BookingStatusLogDetail.Status = dt.Status;
+ BookingStatusLogDetail.CNTRNO = dt.CNTRNO;
+ BookingStatusLogDetail.OPTime = dt.OPTime;
+ await _statuslogdetail.InsertAsync(BookingStatusLogDetail);
+
+
+ }
+ }
+
+ }
+ }
+ #endregion
+
+ #region 下货纸
+
+ #endregion
+
+ #region 样单
+
+ #endregion
+
+ #region 其他
///
/// 获取用户报表的json
///
@@ -645,71 +723,6 @@ namespace Myshipping.Application
}
}
-
- //[HttpGet("/BookingPrintTemplate/test")]
- //public async Task Test(long id)
- //{
- // var rtn = XiahuozhiHelpler.Send(id, "9", out string msg);
- // return $"{rtn} {msg}";
- //}
- ///
- /// 获取货运动态
- ///
- public async Task> GetBookingStatusLog(long Id)
- {
-
- var statuslog = await _statuslog.AsQueryable().Where(x => x.BookingId == Id).ToListAsync();
- var dto = statuslog.Adapt>();
- foreach (var item in dto)
- {
- var detail = await _statuslogdetail.AsQueryable().Where(x => x.PId == item.Id).ToListAsync();
- item.detail = detail.Adapt>();
- }
-
- return dto;
- }
- ///
- /// 插入货运动态
- ///
- [AllowAnonymous]
- [SqlSugarUnitOfWork]
- public async Task AddBookingStatusLog(List all)
- {
-
- foreach (var item in all)
- {
- //清空原有数据
- var old = await _statuslog.AsQueryable().Where(x => x.BookingId == item.BookingId && x.Gategory == "ship").ToListAsync();
- await _statuslog.DeleteAsync(x => x.BookingId == item.BookingId && x.Gategory == "ship");
- foreach (var ot in old)
- {
- await _statuslogdetail.DeleteAsync(x => x.PId == ot.Id);
- }
- //新增数据
- var bookingStatusLog = new BookingStatusLog();
- bookingStatusLog.BookingId = item.BookingId;
- bookingStatusLog.Gategory = "ship";
- bookingStatusLog.CreatedTime = DateTime.Now;
- bookingStatusLog.Status = item.Status;
- bookingStatusLog.OpTiem = item.OpTiem;
- bookingStatusLog.MBLNO = item.MBLNO;
- var id = await _statuslog.InsertReturnSnowflakeIdAsync(bookingStatusLog);
- if (item.detail != null && item.detail.Count > 0)
- {
- foreach (var dt in item.detail)
- {
- var BookingStatusLogDetail = new BookingStatusLogDetail();
- BookingStatusLogDetail.PId = id;
- BookingStatusLogDetail.Status = dt.Status;
- BookingStatusLogDetail.CNTRNO = dt.CNTRNO;
- BookingStatusLogDetail.OPTime = dt.OPTime;
- await _statuslogdetail.InsertAsync(BookingStatusLogDetail);
-
-
- }
- }
-
- }
- }
+ #endregion
}
}