init
This commit is contained in:
commit
9851a98065
25
.dockerignore
Normal file
25
.dockerignore
Normal file
@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
37
.gitignore
vendored
Normal file
37
.gitignore
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
*.swp
|
||||
*.*~
|
||||
project.lock.json
|
||||
.DS_Store
|
||||
*.pyc
|
||||
nupkg/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
|
||||
# Rider
|
||||
.idea
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
msbuild.log
|
||||
msbuild.err
|
||||
msbuild.wrn
|
||||
|
||||
# Visual Studio 2015
|
||||
.vs/
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
|
||||
"Version": "15.0.40203.910",
|
||||
"GettingStartedDocument": {
|
||||
"Uri": "https://go.microsoft.com/fwlink/?linkid=858517"
|
||||
},
|
||||
"ExtendedData": {
|
||||
"inputs": [
|
||||
"http://1c-dev.evoleasing.ru/1c_leasing_trial/ws/wsmd_exch.1cws?wsdl"
|
||||
],
|
||||
"collectionTypes": [
|
||||
"System.Array",
|
||||
"System.Collections.Generic.Dictionary`2"
|
||||
],
|
||||
"messageContract": true,
|
||||
"namespaceMappings": [
|
||||
"*, LeasingTrial"
|
||||
],
|
||||
"sync": true,
|
||||
"targetFramework": "netcoreapp3.1",
|
||||
"typeReuseMode": "All"
|
||||
}
|
||||
}
|
||||
2904
_1C.Gateway.Managers/Connected Services/LeasingTrial/Reference.cs
Normal file
2904
_1C.Gateway.Managers/Connected Services/LeasingTrial/Reference.cs
Normal file
File diff suppressed because it is too large
Load Diff
35
_1C.Gateway.Managers/LeasingTrialManager.cs
Normal file
35
_1C.Gateway.Managers/LeasingTrialManager.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using LeasingTrial;
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace _1C.Gateway.Managers
|
||||
{
|
||||
public class LeasingTrialManager
|
||||
{
|
||||
private readonly md_exchPortTypeClient _mdExchPortTypeClient;
|
||||
|
||||
public LeasingTrialManager()
|
||||
{
|
||||
var binding = new BasicHttpBinding
|
||||
{
|
||||
MaxReceivedMessageSize = int.MaxValue,
|
||||
Security =
|
||||
{
|
||||
Mode = BasicHttpSecurityMode.TransportCredentialOnly,
|
||||
Transport = {ClientCredentialType = HttpClientCredentialType.Basic}
|
||||
}
|
||||
};
|
||||
|
||||
var address = new EndpointAddress("http://1c-dev.evoleasing.ru/1c_leasing_trial/ws/wsmd_exch.1cws");
|
||||
|
||||
_mdExchPortTypeClient = new md_exchPortTypeClient(binding, address);
|
||||
_mdExchPortTypeClient.ClientCredentials.UserName.UserName = "ws";
|
||||
_mdExchPortTypeClient.ClientCredentials.UserName.Password = "123";
|
||||
}
|
||||
|
||||
public TransTaxResponse TransTax(TransTaxRequest transTaxRequest)
|
||||
{
|
||||
var res = _mdExchPortTypeClient.TransTax(transTaxRequest);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
_1C.Gateway.Managers/_1C.Gateway.Managers.csproj
Normal file
19
_1C.Gateway.Managers/_1C.Gateway.Managers.csproj
Normal file
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.15" />
|
||||
<PackageReference Include="System.ServiceModel.Duplex" Version="4.4.*" />
|
||||
<PackageReference Include="System.ServiceModel.Http" Version="4.4.*" />
|
||||
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.4.*" />
|
||||
<PackageReference Include="System.ServiceModel.Security" Version="4.4.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
31
_1C.Gateway.sln
Normal file
31
_1C.Gateway.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31229.75
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_1C.Gateway", "_1C.Gateway\_1C.Gateway.csproj", "{0D296610-1E78-4CC9-8199-75F75C03B021}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_1C.Gateway.Managers", "_1C.Gateway.Managers\_1C.Gateway.Managers.csproj", "{83412C70-4360-41BC-836D-788BCB76F551}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0D296610-1E78-4CC9-8199-75F75C03B021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0D296610-1E78-4CC9-8199-75F75C03B021}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0D296610-1E78-4CC9-8199-75F75C03B021}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0D296610-1E78-4CC9-8199-75F75C03B021}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{83412C70-4360-41BC-836D-788BCB76F551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{83412C70-4360-41BC-836D-788BCB76F551}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{83412C70-4360-41BC-836D-788BCB76F551}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{83412C70-4360-41BC-836D-788BCB76F551}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A34563C0-6B48-45FE-BBCC-E755351B3E14}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
18
_1C.Gateway/Controllers/LeasingTrialController.cs
Normal file
18
_1C.Gateway/Controllers/LeasingTrialController.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using _1C.Gateway.Managers;
|
||||
using LeasingTrial;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace _1C.Gateway.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class LeasingTrialController : ControllerBase
|
||||
{
|
||||
[HttpPost("[action]")]
|
||||
public ActionResult<TransTaxResponse> TransTax(TransTaxRequest transTaxRequest)
|
||||
{
|
||||
var res = new LeasingTrialManager().TransTax(transTaxRequest);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
_1C.Gateway/Dockerfile
Normal file
21
_1C.Gateway/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
|
||||
WORKDIR /src
|
||||
COPY ["_1C.Gateway/_1C.Gateway.csproj", "_1C.Gateway/"]
|
||||
RUN dotnet restore "_1C.Gateway/_1C.Gateway.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/_1C.Gateway"
|
||||
RUN dotnet build "_1C.Gateway.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "_1C.Gateway.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "_1C.Gateway.dll"]
|
||||
26
_1C.Gateway/Program.cs
Normal file
26
_1C.Gateway/Program.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _1C.Gateway
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
36
_1C.Gateway/Properties/launchSettings.json
Normal file
36
_1C.Gateway/Properties/launchSettings.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:61784",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "weatherforecast",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"_1C.Gateway": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "weatherforecast",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:5000"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/weatherforecast",
|
||||
"publishAllPorts": true
|
||||
}
|
||||
}
|
||||
}
|
||||
48
_1C.Gateway/Startup.cs
Normal file
48
_1C.Gateway/Startup.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _1C.Gateway
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers().AddNewtonsoftJson();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
18
_1C.Gateway/_1C.Gateway.csproj
Normal file
18
_1C.Gateway/_1C.Gateway.csproj
Normal file
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.15" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\_1C.Gateway.Managers\_1C.Gateway.Managers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
9
_1C.Gateway/appsettings.Development.json
Normal file
9
_1C.Gateway/appsettings.Development.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
_1C.Gateway/appsettings.json
Normal file
10
_1C.Gateway/appsettings.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user