result type

This commit is contained in:
Chika 2021-02-20 16:07:30 +03:00
parent c958a75ebd
commit 5413b4a100
4 changed files with 5031 additions and 6 deletions

View File

@ -0,0 +1,30 @@
{
"ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
"Version": "15.0.40203.910",
"GettingStartedDocument": {
"Uri": "https://go.microsoft.com/fwlink/?linkid=858517"
},
"ExtendedData": {
"inputs": [
"http://evolucia.elt-poisk.com/soaposago.php?wsdl"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, ELTOsago"
],
"references": [
"System.ServiceModel, {System.ServiceModel.Primitives, 4.4.4}",
"System.ServiceModel.Duplex, {System.ServiceModel.Duplex, 4.4.4}",
"System.ServiceModel.Http, {System.ServiceModel.Http, 4.4.4}",
"System.ServiceModel.NetTcp, {System.ServiceModel.NetTcp, 4.4.4}",
"System.ServiceModel.Primitives, {System.ServiceModel.Primitives, 4.4.4}",
"System.ServiceModel.Security, {System.ServiceModel.Security, 4.4.4}"
],
"sync": true,
"targetFramework": "netcoreapp3.1",
"typeReuseMode": "All"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ namespace ELT.Client.Kasko
_eltKaskoSoap = new EltSoapClient();
}
public Dictionary<string, object> CalculateKasko(CalculateKaskoRequest calculateKaskoRequest)
public Dictionary<string, KASKOCalculationResult> CalculateKasko(CalculateKaskoRequest calculateKaskoRequest)
{
var authInfo = new AuthInfo
{
@ -63,7 +63,7 @@ namespace ELT.Client.Kasko
//CAR
var result = new Dictionary<string, object>();
var result = new Dictionary<string, KASKOCalculationResult>();
foreach (var companyId in calculateKaskoRequest.CompanyIds)
try
{
@ -74,6 +74,7 @@ namespace ELT.Client.Kasko
}
catch (Exception e)
{
throw e;
}
return result;

View File

@ -1,5 +1,7 @@
using ELT.Client.Kasko;
using System.Collections.Generic;
using ELT.Client.Kasko;
using ELT.Models;
using ELTKasko;
using Microsoft.AspNetCore.Mvc;
namespace ELT.Controllers
@ -9,11 +11,11 @@ namespace ELT.Controllers
public class KaskoController : ControllerBase
{
[HttpPost("[action]")]
public ActionResult<object> CalculateKasko([FromBody] CalculateKaskoRequest calculateKaskoRequest)
public ActionResult<Dictionary<string, KASKOCalculationResult>> CalculateKasko(
[FromBody] CalculateKaskoRequest calculateKaskoRequest)
{
var kaskoManager = new KaskoManager();
var res = kaskoManager.CalculateKasko(calculateKaskoRequest);
return res;
return kaskoManager.CalculateKasko(calculateKaskoRequest);
}
}
}