zhangxiaofeng 8 months ago
commit ac9f48d10b

@ -283,6 +283,11 @@ namespace Myshipping.Application.Entity
/// 目的地
/// </summary>
public string DESTINATION { get; set; }
/// <summary>
/// 附加数据
/// </summary>
public string ExtendData { get; set; }
}
/// <summary>

@ -10,10 +10,10 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务目的港未提货未返箱
/// 任务格式单
/// </summary>
[SugarTable("task_pod_discharge_gateout_full")]
[Description("任务目的港未提货未返箱")]
[SugarTable("task_draft_info")]
[Description("任务格式单")]
public class TaskDraftInfo : TaskManageDbEntity
{
/// <summary>

@ -43,6 +43,16 @@ namespace Myshipping.Application
[Description("Booking Cancellation Notice")]
BC_CANCEL_NOTICE,
/// <summary>
/// Booking Cancellation
/// </summary>
[Description("Draft")]
DRAFT,
/// <summary>
/// Booking Cancellation Notice
/// </summary>
[Description("Draft Notice")]
DRAFT_NOTICE,
/// <summary>
/// 空
/// </summary>
[Description("NONE")]

@ -386,6 +386,7 @@ namespace Myshipping.Application
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).OrderByDescending(x => x.OpTime).ToList().Adapt<List<BookingCustomerLogDto>>();
outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingServiceItemCustomerDto>>();
return outModel;
}
@ -1908,6 +1909,19 @@ namespace Myshipping.Application
ins = true;
}
//订舱账号、密码
var jobj = new JObject();
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
jobj = JObject.Parse(custOrder.ExtendData);
}
var jobjBookAcc=new JObject();
jobjBookAcc["Account"] = input.BOOKINGACCOUNT;
jobjBookAcc["Password"] = input.BOOKINGPASSWORD;
jobj["BookingAccount"] = jobjBookAcc;
custOrder.ExtendData = jobjBookAcc.ToJsonString();
var ctns = input.CtnList.Adapt<List<BookingCtn>>();
var servList = input.ServiceItemList.Adapt<List<BookingServiceItem>>();

@ -397,6 +397,11 @@ namespace Myshipping.Application
/// </summary>
public string UpdatedTime { get; set; }
/// <summary>
/// 附加数据
/// </summary>
public string ExtendData { get; set; }
/// <summary>
/// 文件列表
/// </summary>
@ -553,6 +558,11 @@ namespace Myshipping.Application
/// 回推接口秘钥
/// </summary>
public string FeedbackSecret { get; set; }
/// <summary>
/// 附加数据
/// </summary>
public string ExtendData { get; set; }
}
@ -889,13 +899,15 @@ namespace Myshipping.Application
/// 服务项目
/// </summary>
public List<BookingServiceItemCustomerDto> ServiceItemList { get; set; }
///// <summary>
///// 订舱账号
///// </summary>
//public string BOOKINGACCOUNT { get; set; }
///// <summary>
///// 订舱密码
///// </summary>
//public string BOOKINGPASSWORD { get; set; }
/// <summary>
/// 订舱账号
/// </summary>
public string BOOKINGACCOUNT { get; set; }
/// <summary>
/// 订舱密码
/// </summary>
public string BOOKINGPASSWORD { get; set; }
}
}

@ -33,6 +33,7 @@ namespace Myshipping.Application.Service.BookingOrder
private readonly ISysCacheService _cache;
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly ILogger<BookingMSKAPIService> _logger;
private readonly ISysDataUserMenu _sysDataUserMenuService;
const string CONST_MSK_API_COMMODITY_URL = "MSKApiCommodity";
const string CONST_MSK_API_BOOKING_URL = "MSKApiBooking";
@ -41,6 +42,7 @@ namespace Myshipping.Application.Service.BookingOrder
public BookingMSKAPIService(ILogger<BookingMSKAPIService> logger, ISysCacheService cache,
IDjyWebsiteAccountConfigService webAccountConfig, SqlSugarRepository<BookingDeliveryRecord> bookingDeliveryRecordRep,
ISysDataUserMenu sysDataUserMenuService,
SqlSugarRepository<BookingDeliveryRecordCtn> bookingDeliveryRecordCtnRep)
{
_logger = logger;
@ -48,7 +50,7 @@ namespace Myshipping.Application.Service.BookingOrder
_webAccountConfig = webAccountConfig;
_bookingDeliveryRecordRep = bookingDeliveryRecordRep;
_bookingDeliveryRecordCtnRep = bookingDeliveryRecordCtnRep;
_sysDataUserMenuService = sysDataUserMenuService;
}
#region 检索海运船期详情
@ -984,20 +986,27 @@ namespace Myshipping.Application.Service.BookingOrder
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingDeliveryRecordDto, BookingDeliveryRecord>(QuerySearch.SortField);
/*
//菜单375504048771141=我的任务台账
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuTaskManage);
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
if (userlist == null)
userlist = new List<long> { UserManager.UserId };
bool isAdmin = false;
if (userlist.Count > 0)
if(userlist == null)
{
isAdmin = true;
userlist = new List<long>();
}
else if (userlist != null && userlist.Count > 0)
{
userlist.Add(UserManager.UserId);
userlist = userlist.Distinct().ToList();
}
_logger.LogInformation("任务台账权限范围 {list}", userlist);
*/
var entities = await _bookingDeliveryRecordRep.AsQueryable()
.Where(t => isAdmin || userlist.Contains(t.CreatedUserId.Value))
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
.WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd)
.WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)
@ -1293,6 +1302,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="ids">马士基API订舱ID组</param>
/// <returns>返回执行结果消息</returns>
[HttpPost("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchSend(long[] ids)
{
var list = await _bookingDeliveryRecordRep.AsQueryable()
@ -1313,6 +1323,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="id">马士基API订舱ID</param>
/// <param name="copyNum">需要复制生成记录</param>
/// <returns>返回执行结果消息</returns>
[HttpGet("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchCopy(long id, int copyNum)
{

@ -1487,7 +1487,7 @@ namespace Myshipping.Application
if (input.ctnInputs != null)
{
var groupList = input.ctnInputs.Where(x => x.CTNNUM > 0).GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}");
var groupList = input.ctnInputs.GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}");
input.CNTRTOTAL = string.Join(" / ", groupList);
}
//条件限制 重复限制

@ -433,7 +433,7 @@ namespace Myshipping.Application
/// <summary>
/// 最后BC接收时间
/// </summary>
public bool LstRecvBCDate { get; set; }
public Nullable<DateTime> LstRecvBCDate { get; set; }
/// <summary>
/// 是否已有BookingCancellation
@ -443,7 +443,7 @@ namespace Myshipping.Application
/// <summary>
/// 最后BookingCancellation接收时间
/// </summary>
public bool LstRecvBKCancelDate { get; set; }
public Nullable<DateTime> LstRecvBKCancelDate { get; set; }
/// <summary>
/// 预计航行天数

@ -134,6 +134,26 @@ namespace Myshipping.Application
/// </summary>
public string ThirdPayAddr { get; set; }
/// <summary>
/// 截单上传时间
/// </summary>
public string SubmittedDate { get; set; }
/// <summary>
/// 签单方式(seaway、original、telex)
/// </summary>
public string DocumentType { get; set; }
/// <summary>
/// 提单份数
/// </summary>
public string BillOfNum { get; set; }
/// <summary>
/// 放单方式
/// </summary>
public string ReleaseInstruction { get; set; }
/// <summary>
/// 箱信息
/// </summary>

@ -417,6 +417,12 @@ namespace Myshipping.Application
fileCategory = TaskFileCategoryEnum.BC_CANCEL.ToString();
}
else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE)
{
attachFileType = "draftfiles";
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
}
var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName);
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
@ -466,6 +472,12 @@ namespace Myshipping.Application
fileCategory = TaskFileCategoryEnum.BC_CANCEL_NOTICE.ToString();
}
else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE)
{
attachFileType = "draftnoticefiles";
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
}
var noExtensionFileName = Path.GetFileNameWithoutExtension(modifyFile.FileName);
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
@ -1290,7 +1302,7 @@ namespace Myshipping.Application
#endregion
#region 任务目的港未提货/任务目的港提货未返空
if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL)
if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL || info.Main.TaskType == TaskBaseTypeEnum.POD_GATEOUT_FULL)
{
TaskPODDischargeGateoutFullInfo dischargeGateout = info.Main.PODDischargeGateoutFull.Adapt<TaskPODDischargeGateoutFullInfo>();

@ -16,5 +16,10 @@ namespace Myshipping.Core.Const
/// 我的任务台账
/// </summary>
public const long MenuTaskManage = 375504048771141;
/// <summary>
/// 马士基API订舱
/// </summary>
public const long MenuMSKApi = 526643045195845;
}
}

@ -842,6 +842,11 @@
我的任务台账
</summary>
</member>
<member name="F:Myshipping.Core.Const.MenuConst.MenuMSKApi">
<summary>
马士基API订舱
</summary>
</member>
<member name="T:Myshipping.Core.Const.TenantParamCode">
<summary>
租户参数Code常量

Loading…
Cancel
Save