增加预订舱的选择

usertest
jianghaiqing 4 months ago
parent f92358da60
commit 5f50087d22

@ -112,5 +112,11 @@ namespace DS.WMS.Core.Op.Interface
/// <returns>返回详情</returns>
Task<DataResult<MSKSPOTBookingInitDto>> GetInitInfo();
/// <summary>
/// 获取预订舱途径选择
/// </summary>
/// <returns>返回回执</returns>
Task<DataResult<List<string>>> GetBookingChannelSelectShow();
}
}

@ -30,6 +30,8 @@ using System.Text.Json.Nodes;
using LanguageExt.Pipes;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Map.Method;
using Microsoft.Owin.Security.Provider;
using LanguageExt;
namespace DS.WMS.Core.Op.Method
{
@ -54,6 +56,7 @@ namespace DS.WMS.Core.Op.Method
const string CONST_MSK_API_COMMODITY_URL = "MSKApiCommodity";
const string CONST_MSK_API_MAPPING_MODULE = "BOOK_MSK_API";
const string CONST_MSK_API_CHANNEL_SHOW = "BOOKING_CHANNEL_SELECT_SHOW";
const long CONST_ADMIN_TENANTID = 1288018625843826688;
@ -2166,5 +2169,27 @@ namespace DS.WMS.Core.Op.Method
return data;
}
#endregion
#region 获取预订舱途径选择
/// <summary>
/// 获取预订舱途径选择
/// </summary>
/// <returns>返回回执</returns>
public async Task<DataResult<List<string>>> GetBookingChannelSelectShow()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var rlt = await configService.GetConfig(CONST_MSK_API_CHANNEL_SHOW, long.Parse(user.TenantId), false);
if (rlt.Succeeded)
{
var list = rlt.Data.Value.Split(new char[] { ',' }).ToList();
return DataResult<List<string>>.Success(list);
}
return DataResult<List<string>>.FailedData(new List<string>());
}
#endregion
}
}

@ -106,7 +106,10 @@ public class ConfigService : IConfigService
var data = await db.Queryable<SysConfig>().Filter(null, true)
.Where(x => x.Code == code && x.TenantId == tenantId).Select<ConfigRes>().FirstAsync();
return DataResult<ConfigRes>.Success(data);
if(data != null)
DataResult<ConfigRes>.Success(data);
return DataResult<ConfigRes>.FailedData(data);
}
#endregion
}

@ -214,6 +214,17 @@ namespace DS.WMS.OpApi.Controllers
return await _spaceBookingMSKAPIService.GetInitInfo();
}
#endregion
/// <summary>
/// 获取预订舱途径选择
/// </summary>
/// <returns>返回结果</returns>
[HttpGet]
[Route("ChannelSelectShow")]
public async Task<DataResult<List<string>>> GetBookingChannelSelectShow()
{
return await _spaceBookingMSKAPIService.GetBookingChannelSelectShow();
}
}
}

@ -341,3 +341,10 @@
2024-07-17 13:35:24.6552 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-17 13:35:24.6552 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 13:35:24.6678 Info Configuration initialized.
2024-07-17 13:36:20.7200 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-07-17 13:36:20.7312 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-07-17 13:36:20.7312 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-07-17 13:36:20.7429 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-07-17 13:36:20.7429 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-07-17 13:36:20.7429 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-07-17 13:36:20.7553 Info Configuration initialized.

Loading…
Cancel
Save