<configuration>
<configSections>
<section name="ics" type="Ics.OpenApi.ConfigurationSection.IcsConfigurationSection, Ics.OpenApi"/>
</configSections>
<ics environment="Test" tokenStorageIn="Redis">
<account
user=""
password="" />
<redisOptions connectionString="192.168.1.223:6379" />
</ics>
</configuration>
using var icsService = IcsServiceFactory.CreateIcsService();
With DI (IServiceCollection)
- in startup ConfigureServices
{
"Ics": {
"Environment": "Test", // 连接ICS的环境 Test OR Production
"Account": { // ICS提供的账号信息
"User": "",
"Password": ""
},
"TokenStorageIn": "Redis", // Token存储位置 Redis OR InMemory
"InMemoryOptions": { // see also Microsoft.Extensions.Caching.Memory.MemoryCacheOptions
"ExpirationScanFrequency": "",
"SizeLimit": "",
"CompactionPercentage":
},
"RedisOptions": { // see also Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions
"Configuration": "192.168.1.223:6379",
"InstanceName": ""
}
}
}
接口文档 |
DI |
NonDI |
实现版本 |
1.2 api获取令牌(token) |
- |
- |
1.10.28-dev.1 |
2.1 获取报关单及制单明细 |
IIcsDeclareService
.GetDelegateAsync |
IIcsService
.IcsDeclareService
.GetDelegateAsync |
1.10.28-dev.1 |
2.2 发送报关单及申报明细 |
IIcsDeclareService
.TransferDelegateAsync |
IIcsService
.IcsDeclareService
.TransferDelegateAsync |
1.10.28-dev.2 |
2.4 发送审核状态 |
IIcsDeclareService
.TransferStatusAsync |
IIcsService
.IcsDeclareService
.TransferStatusAsync |
1.10.28-dev.2 |
2.5 获取报关单集装箱明细 |
IIcsDeclareService
.GetDelegateBoxAsync |
IIcsService
.IcsDeclareService
.GetDelegateBoxAsync |
1.10.28-dev.2 |
2.6 发送报关单集装箱明细 |
IIcsDeclareService
.TransferDelegateBoxAsync |
IIcsService
.IcsDeclareService
.TransferDelegateBoxAsync |
1.10.28-dev.2 |
2.7 获取随附单证 |
IIcsDeclareService
.GetBFSCicAsync |
IIcsService
.IcsDeclareService
.GetBFSCicAsync |
1.10.28-dev.2 |
2.8 发送随附单证 |
IIcsDeclareService
.TransferBFSCicAsync |
IIcsService
.IcsDeclareService
.TransferBFSCicAsync |
1.10.28-dev.2 |