客户订舱台账

optimize
wanghaomei 1 year ago
parent 5182403d69
commit b5c5781c33

@ -65,6 +65,7 @@ namespace Myshipping.Application
public async Task<SqlSugarPagedList<BookingCustomerOrderListOutput>> PageData(BookingCustomerOrderQueryInput input)
{
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID)
.Where(x => !x.IsDeleted)
.WhereIF(!string.IsNullOrEmpty(input.BOOKINGNO), x => x.BOOKINGNO.Contains(input.BOOKINGNO))
.WhereIF(!string.IsNullOrEmpty(input.VESSEL), x => x.VESSEL.Contains(input.VESSEL))
.WhereIF(!string.IsNullOrEmpty(input.VOYNO), x => x.VOYNO.Contains(input.VOYNO))
@ -395,9 +396,9 @@ namespace Myshipping.Application
throw Oops.Bah("大简云接收订舱URL地址未配置请联系管理员");
}
var userId = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "DjyBookingReceiveUserId");
var userSecret = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "DjyBookingReceiveUserSecret");
if (userId == null || string.IsNullOrEmpty(userId.ItemCode) || userSecret == null || string.IsNullOrEmpty(userSecret.ItemCode))
var userId = _cache.GetAllSysConfig().Result.FirstOrDefault(x => x.Code == "DjyBookingReceiveUserId");
var userSecret = _cache.GetAllSysConfig().Result.FirstOrDefault(x => x.Code == "DjyBookingReceiveUserSecret");
if (userId == null || string.IsNullOrEmpty(userId.Value) || userSecret == null || string.IsNullOrEmpty(userSecret.Value))
{
throw Oops.Bah("大简云接收订舱用户key和秘钥未配置请联系管理员");
}
@ -456,12 +457,12 @@ namespace Myshipping.Application
submitUrl += "BookingCustomerOrder/ReceiveBooking";
_logger.LogInformation($"提交订舱数据({submitUrl}{userId.ItemCode}{userSecret.ItemCode}{JsonConvert.SerializeObject(sendList)}");
_logger.LogInformation($"提交订舱数据({submitUrl}{userId.Value}{userSecret.Value}{JsonConvert.SerializeObject(sendList)}");
var rtn = await submitUrl
.SetHeaders(new Dictionary<string, object> {
{ CommonConst.API_USER_HEADER_KEY, userId.ItemCode},
{ CommonConst.API_USER_HEADER_SECRET, userSecret.ItemCode}
{ CommonConst.API_USER_HEADER_KEY, userId.Value},
{ CommonConst.API_USER_HEADER_SECRET, userSecret.Value}
})
.SetBody(sendList)
.PostAsStringAsync();
@ -532,9 +533,9 @@ namespace Myshipping.Application
throw Oops.Bah("大简云接收订舱URL地址未配置请联系管理员");
}
var userId = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "DjyBookingReceiveUserId");
var userSecret = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "DjyBookingReceiveUserSecret");
if (userId == null || string.IsNullOrEmpty(userId.ItemCode) || userSecret == null || string.IsNullOrEmpty(userSecret.ItemCode))
var userId = _cache.GetAllSysConfig().Result.FirstOrDefault(x => x.Code == "DjyBookingReceiveUserId");
var userSecret = _cache.GetAllSysConfig().Result.FirstOrDefault(x => x.Code == "DjyBookingReceiveUserSecret");
if (userId == null || string.IsNullOrEmpty(userId.Value) || userSecret == null || string.IsNullOrEmpty(userSecret.Value))
{
throw Oops.Bah("大简云接收订舱用户key和秘钥未配置请联系管理员");
}
@ -561,12 +562,12 @@ namespace Myshipping.Application
submitUrl += "BookingCustomerOrder/CancelBooking";
_logger.LogInformation($"取消提交订舱数据({submitUrl}{userId.ItemCode}{userSecret.ItemCode}{JsonConvert.SerializeObject(sendList)}");
_logger.LogInformation($"取消提交订舱数据({submitUrl}{userId.Value}{userSecret.Value}{JsonConvert.SerializeObject(sendList)}");
var rtn = await submitUrl
.SetHeaders(new Dictionary<string, object> {
{ CommonConst.API_USER_HEADER_KEY, userId.ItemCode},
{ CommonConst.API_USER_HEADER_SECRET, userSecret.ItemCode}
{ CommonConst.API_USER_HEADER_KEY, userId.Value},
{ CommonConst.API_USER_HEADER_SECRET, userSecret.Value}
})
.SetBody(sendList)
.PostAsStringAsync();

Loading…
Cancel
Save