Compare commits
1 Commits
master
...
refactor/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
706665dd4f |
@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"providerId": "Microsoft.Tools.ServiceModel.Svcutil",
|
|
||||||
"version": "2.1.0",
|
|
||||||
"ExtendedData": {
|
"ExtendedData": {
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"https://evolucia.elt-poisk.com/soap.php?wsdl"
|
"http://evolucia.elt-poisk.com/soap.php?wsdl"
|
||||||
],
|
],
|
||||||
"collectionTypes": [
|
"collectionTypes": [
|
||||||
"System.Array",
|
"System.Array",
|
||||||
@ -12,7 +10,6 @@
|
|||||||
"namespaceMappings": [
|
"namespaceMappings": [
|
||||||
"*, ELTKasko"
|
"*, ELTKasko"
|
||||||
],
|
],
|
||||||
"outputFile": "Reference",
|
|
||||||
"sync": true,
|
"sync": true,
|
||||||
"targetFramework": "netcoreapp3.1",
|
"targetFramework": "netcoreapp3.1",
|
||||||
"typeReuseMode": "All"
|
"typeReuseMode": "All"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
"Version": "15.0.40203.910",
|
"Version": "15.0.40203.910",
|
||||||
"ExtendedData": {
|
"ExtendedData": {
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"https://evolucia.elt-poisk.com/soaposago.php?wsdl"
|
"http://evolucia.elt-poisk.com/soaposago.php?wsdl"
|
||||||
],
|
],
|
||||||
"collectionTypes": [
|
"collectionTypes": [
|
||||||
"System.Array",
|
"System.Array",
|
||||||
|
|||||||
@ -6792,7 +6792,6 @@ namespace ELTOsago
|
|||||||
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
|
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
|
||||||
result.MaxReceivedMessageSize = int.MaxValue;
|
result.MaxReceivedMessageSize = int.MaxValue;
|
||||||
result.AllowCookies = true;
|
result.AllowCookies = true;
|
||||||
result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
||||||
@ -6802,7 +6801,7 @@ namespace ELTOsago
|
|||||||
{
|
{
|
||||||
if ((endpointConfiguration == EndpointConfiguration.EltSoap))
|
if ((endpointConfiguration == EndpointConfiguration.EltSoap))
|
||||||
{
|
{
|
||||||
return new System.ServiceModel.EndpointAddress("https://evolucia.elt-poisk.com/soaposago.php");
|
return new System.ServiceModel.EndpointAddress("http://evolucia.elt-poisk.com/soaposago.php");
|
||||||
}
|
}
|
||||||
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
namespace ELT.Client.Models.Common;
|
|
||||||
|
|
||||||
public class ErrorResponse
|
|
||||||
{
|
|
||||||
public string Error { get; set; }
|
|
||||||
}
|
|
||||||
@ -3,7 +3,6 @@ using ELT.Client.Models.Common;
|
|||||||
using ELTKasko;
|
using ELTKasko;
|
||||||
using ELTOsago;
|
using ELTOsago;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using AuthInfo = ELTOsago.AuthInfo;
|
|
||||||
using EltKaskoSoap = ELTKasko.EltSoap;
|
using EltKaskoSoap = ELTKasko.EltSoap;
|
||||||
using ELTOsagoSoap = ELTOsago.EltSoap;
|
using ELTOsagoSoap = ELTOsago.EltSoap;
|
||||||
|
|
||||||
@ -38,88 +37,74 @@ public class CommonController : ControllerBase
|
|||||||
[HttpPost("get-kasko-calculation")]
|
[HttpPost("get-kasko-calculation")]
|
||||||
public ActionResult<KASKOCalculationResult> GetKaskoCalculation([FromBody] GetKaskoCalculationInput data)
|
public ActionResult<KASKOCalculationResult> GetKaskoCalculation([FromBody] GetKaskoCalculationInput data)
|
||||||
{
|
{
|
||||||
try
|
var preRequestData = this.GetPreRequestData(data.Preparams);
|
||||||
{
|
|
||||||
var preRequestData = this.GetPreRequestData(data.Preparams);
|
|
||||||
|
|
||||||
var request = data.Params;
|
var request = data.Params;
|
||||||
request.UsageCityKLADR = preRequestData.Kladr;
|
request.UsageCityKLADR = preRequestData.Kladr;
|
||||||
request.Mark = preRequestData.Brand;
|
request.Mark = preRequestData.Brand;
|
||||||
request.Model = preRequestData.Model;
|
request.Model = preRequestData.Model;
|
||||||
|
|
||||||
if (request.Modification != null)
|
if (request.Modification != null)
|
||||||
request.Modification.Name = preRequestData.Modification;
|
request.Modification.Name = preRequestData.Modification;
|
||||||
|
|
||||||
var specialMachinery = data.Preparams.SpecialMachinery;
|
var specialMachinery = data.Preparams.SpecialMachinery;
|
||||||
specialMachinery.SpecialMachineryMark = preRequestData.Brand;
|
specialMachinery.SpecialMachineryMark = preRequestData.Brand;
|
||||||
specialMachinery.SpecialMachineryModel = preRequestData.Model;
|
specialMachinery.SpecialMachineryModel = preRequestData.Model;
|
||||||
request.SpecialMachinery = specialMachinery;
|
request.SpecialMachinery = specialMachinery;
|
||||||
|
|
||||||
var res = _eltKaskoClient.PreliminaryKASKOCalculation(
|
var res = _eltKaskoClient.PreliminaryKASKOCalculation(
|
||||||
new ELTKasko.AuthInfo
|
new ELTKasko.AuthInfo
|
||||||
{
|
|
||||||
Login = _login,
|
|
||||||
Password = _password
|
|
||||||
}
|
|
||||||
, null
|
|
||||||
, data.CompanyId
|
|
||||||
, 0
|
|
||||||
, 0
|
|
||||||
, null
|
|
||||||
, null
|
|
||||||
, null
|
|
||||||
, "13"
|
|
||||||
, null
|
|
||||||
, false
|
|
||||||
, null
|
|
||||||
, null
|
|
||||||
, request);
|
|
||||||
|
|
||||||
if (res?.Error is { Length: > 0 })
|
|
||||||
{
|
{
|
||||||
return BadRequest(res);
|
Login = _login,
|
||||||
|
Password = _password
|
||||||
}
|
}
|
||||||
|
, null
|
||||||
|
, data.CompanyId
|
||||||
|
, 0
|
||||||
|
, 0
|
||||||
|
, null
|
||||||
|
, null
|
||||||
|
, null
|
||||||
|
, "13"
|
||||||
|
, null
|
||||||
|
, false
|
||||||
|
, null
|
||||||
|
, null
|
||||||
|
, request);
|
||||||
|
|
||||||
return Ok(res);
|
if (res?.Error is { Length: > 0 })
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
{
|
||||||
return StatusCode(500, new ErrorResponse { Error = e.Message });
|
return BadRequest(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Ok(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("get-osago-calculation")]
|
[HttpPost("get-osago-calculation")]
|
||||||
public ActionResult<OSAGOFullCalculationResponse> GetOsagoCalculation([FromBody] GetOsagoCalculationInput data)
|
public ActionResult<OSAGOFullCalculationResponse> GetOsagoCalculation([FromBody] GetOsagoCalculationInput data)
|
||||||
{
|
{
|
||||||
try
|
var prerequestData = this.GetPreRequestData(data.Preparams);
|
||||||
|
|
||||||
|
var request = data.Params;
|
||||||
|
request.UsagePlace = prerequestData.Kladr;
|
||||||
|
request.CarInfo.Mark = prerequestData.Brand;
|
||||||
|
request.CarInfo.Model = prerequestData.Model;
|
||||||
|
|
||||||
|
request.AuthInfo = new ELTOsago.AuthInfo
|
||||||
{
|
{
|
||||||
var prerequestData = this.GetPreRequestData(data.Preparams);
|
Login = _login,
|
||||||
|
Password = _password
|
||||||
|
};
|
||||||
|
|
||||||
var request = data.Params;
|
request.InsuranceCompany ??= data.CompanyId;
|
||||||
request.UsagePlace = prerequestData.Kladr;
|
|
||||||
request.CarInfo.Mark = prerequestData.Brand;
|
|
||||||
request.CarInfo.Model = prerequestData.Model;
|
|
||||||
|
|
||||||
request.AuthInfo = new AuthInfo
|
var res = _eltOsagoClient.OSAGOFullCalculation(data.Params);
|
||||||
{
|
|
||||||
Login = _login,
|
|
||||||
Password = _password
|
|
||||||
};
|
|
||||||
|
|
||||||
request.InsuranceCompany ??= data.CompanyId;
|
if (res?.Error is { Length: > 0 })
|
||||||
|
|
||||||
var res = _eltOsagoClient.OSAGOFullCalculation(data.Params);
|
|
||||||
|
|
||||||
if (res?.Error is { Length: > 0 })
|
|
||||||
{
|
|
||||||
return BadRequest(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Ok(res);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
{
|
||||||
return StatusCode(500, new ErrorResponse { Error = e.Message });
|
return BadRequest(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Ok(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,17 +0,0 @@
|
|||||||
version: '3.3'
|
|
||||||
services:
|
|
||||||
elt:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./Dockerfile
|
|
||||||
environment:
|
|
||||||
- eltLogin=${ELT_LOGIN}
|
|
||||||
- eltPassword=${ELT_PASSWORD}
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
- calc_network
|
|
||||||
|
|
||||||
networks:
|
|
||||||
calc_network:
|
|
||||||
external:
|
|
||||||
name: calc_network
|
|
||||||
Loading…
x
Reference in New Issue
Block a user