This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
@@ -194,9 +194,9 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
return Ok(ApiOkResponse.Response(new
|
||||
{
|
||||
customerpost = new PostalAddressRecord(cust.PostAddress, cust.PostCity, cust.PostRegion, cust.PostCountry, cust.PostCode),
|
||||
customerphys = new AddressRecord(cust.Address, cust.City, cust.Region, cust.Country, cust.Latitude, cust.Longitude),
|
||||
headofficepost = (head != null ? new PostalAddressRecord(head.PostAddress, head.PostCity, head.PostRegion, head.PostCountry, head.PostCode) : new PostalAddressRecord("", "", "", "", ""))
|
||||
customerpost = new PostalAddressRecord(cust.Name, cust.PostAddress, cust.PostCity, cust.PostRegion, cust.PostCountry, cust.PostCode),
|
||||
customerphys = new AddressRecord(cust.Name, cust.Address, cust.City, cust.Region, cust.Country, cust.Latitude, cust.Longitude),
|
||||
headofficepost = (head != null ? new PostalAddressRecord(head.Name, head.PostAddress, head.PostCity, head.PostRegion, head.PostCountry, head.PostCode) : new PostalAddressRecord("", "", "", "", "", ""))
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -152,11 +152,11 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get service (physical) address for this Unit
|
||||
/// Get service address for this Unit
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Service address</returns>
|
||||
[HttpGet("service-address/{id}")]
|
||||
[HttpGet("address/{id}")]
|
||||
public async Task<IActionResult> GetUnitServiceAddress([FromRoute] long id)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
@@ -171,7 +171,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
return Ok(ApiOkResponse.Response(new
|
||||
{
|
||||
unit = new AddressRecord(unt.Address, unt.City, unt.Region, unt.Country, unt.Latitude, unt.Longitude)
|
||||
unit = new AddressRecord(unt.Serial, unt.Address, unt.City, unt.Region, unt.Country, unt.Latitude, unt.Longitude)
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
//physical
|
||||
public record AddressRecord(string Address, string City, string Region, string Country, decimal? Latitude, decimal? Longitude);
|
||||
public record AddressRecord(string Name, string Address, string City, string Region, string Country, decimal? Latitude, decimal? Longitude);
|
||||
//postal
|
||||
public record PostalAddressRecord(string PostAddress, string PostCity, string PostRegion, string PostCountry, string PostCode);
|
||||
public record PostalAddressRecord(string Name, string PostAddress, string PostCity, string PostRegion, string PostCountry, string PostCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user