zhangxiaofeng 6 months ago
commit d23ae35015

@ -25,6 +25,7 @@ using Myshipping.Core.Helper;
using Myshipping.Core.Service;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.PTG;
using RabbitMQ.Client;
using System;
using System.Collections.Generic;
@ -2139,6 +2140,8 @@ namespace Myshipping.Application
fr.Type = typeStr;
fr.Amount = total;
await _repFeeRecord.InsertAsync(fr);
SaveAuditLog($"扣费成功", model.Id, model.CreatedUserId.Value, model.TenantId.Value, "系统", remark: "");
}
else
{

@ -16,7 +16,7 @@ namespace Myshipping.Application
/// <summary>
/// 回执消息
/// </summary>
public string message { get; set; }
public string msg { get; set; }
/// <summary>
/// 查询详情列表

@ -318,9 +318,9 @@ namespace Myshipping.Application
}
else
{
_logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{queryRlt.message}");
_logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{queryRlt.msg}");
throw Oops.Oh(result.resultMessage.Contains("官网查询无数据") ? "无查询结果" : "查询失败");
throw Oops.Oh((result != null && result.resultMessage != null && result.resultMessage.Contains("官网查询无数据")) ? "无查询结果" : queryRlt.msg);
}
return result;

@ -2536,6 +2536,38 @@ namespace Myshipping.Application
if (bcOrder == null)
throw Oops.Oh($"BC任务获取失败不存在或已作废");
DjyTenantParamValueOutput paramConfig = null;
DjyTenantParamValueOutput dingdingConfig = null;
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_AMENDMENT_DEFAULT_PARAM,
CONST_CANCELLATION_DEFAULT_PARAM,
CONST_AMENDMENT_DING_DEFAULT_PARAM,
CONST_CANCELLATION_DING_DEFAULT_PARAM }).GetAwaiter().GetResult();
if (baseTask.TASK_TYPE == TaskBaseTypeEnum.BC_MODIFY.ToString())
{
if (paramList != null && paramList.Count > 0)
{
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
}
}
else if (baseTask.TASK_TYPE == TaskBaseTypeEnum.CANCELLATION.ToString())
{
if (paramList != null && paramList.Count > 0)
{
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
}
}
_logger.LogInformation($"taskPKId={taskPKId} 判断是否默认转发邮件 paramConfig={JSON.Serialize(paramConfig)}");
if (!bcOrder.BOOKING_SLOT_ID.HasValue || bcOrder.BOOKING_SLOT_ID.Value == 0)
{
var server = _namedBookingSlotServiceProvider.GetService<ITransient>(nameof(BookingSlotService));
@ -2603,6 +2635,8 @@ namespace Myshipping.Application
}
else
{
_logger.LogInformation($"taskPKId={taskPKId} 无法获取舱位信息");
throw Oops.Oh($"无法获取舱位信息");
}
}
@ -2632,6 +2666,7 @@ namespace Myshipping.Application
if (bcOrder.BOOKING_ORDER_ID != null && bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0)
{
/*
SaveBookingOrderInput bkModel = new SaveBookingOrderInput
{
MBLNO = bcOrder.MBL_NO.ToUpper().Trim(),
@ -2689,7 +2724,7 @@ namespace Myshipping.Application
else
{
_logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID");
}
}*/
}
else
{
@ -2697,35 +2732,7 @@ namespace Myshipping.Application
}
DjyTenantParamValueOutput paramConfig = null;
DjyTenantParamValueOutput dingdingConfig = null;
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_AMENDMENT_DEFAULT_PARAM,
CONST_CANCELLATION_DEFAULT_PARAM,
CONST_AMENDMENT_DING_DEFAULT_PARAM,
CONST_CANCELLATION_DING_DEFAULT_PARAM }).GetAwaiter().GetResult();
if (baseTask.TASK_TYPE == TaskBaseTypeEnum.BC_MODIFY.ToString())
{
if (paramList != null && paramList.Count > 0)
{
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_AMENDMENT_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
}
}
else if (baseTask.TASK_TYPE == TaskBaseTypeEnum.CANCELLATION.ToString())
{
if (paramList != null && paramList.Count > 0)
{
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
dingdingConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_CANCELLATION_DING_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
}
}
_logger.LogInformation($"taskPKId={taskPKId} 判断是否默认转发邮件 paramConfig={JSON.Serialize(paramConfig)}");
//如果值是ENABLE表示可以自动发送
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
@ -2764,6 +2771,9 @@ namespace Myshipping.Application
result.succ = false;
result.msg = $"处理异常,原因:{ex.Message}";
_logger.LogInformation($"taskPKId={taskPKId} 处理异常,原因:{ex.Message}");
//new EmailNoticeHelper().SendEmailNotice($"taskPKId={taskPKId} 转发通知邮件失败", $"taskPKId={taskPKId} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList());

@ -1120,6 +1120,23 @@ namespace Myshipping.Application
if (fromEntity.Count > 0)
model.From = fromEntity.Select(p => p.Adapt<TaskRollingNominationShipDto>()).ToList();
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
if (model.From != null && model.From.Count > 0)
{
var firstLoadDetail = model.LoadDetailList.FirstOrDefault();
if (model.From.Any(t => string.IsNullOrWhiteSpace(t.Port)))
{
model.From = model.From.Where(a => a.Terminal.Contains(firstLoadDetail.LoadPortName?.Trim())).ToList();
}
else
{
model.From = model.From.Where(a => a.Port.Equals(firstLoadDetail.LoadPortName?.Trim(),StringComparison.OrdinalIgnoreCase)).ToList();
}
}
var toEntity = shipList.Where(a => Regex.IsMatch(a.SHIP_TYPE, "To(\\s+[0-9]+)?"
, RegexOptions.IgnoreCase)).ToList();
@ -1180,8 +1197,6 @@ namespace Myshipping.Application
List<Tuple<string, int>> tuples = new List<Tuple<string, int>>();
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
model.FromToList = new List<TaskRollingNominationShipFromToDto>();
if (model.LoadDetailList.Count > 0)

Loading…
Cancel
Save