feature/split-up-postalAddress #118
@ -50,7 +50,7 @@ components:
|
|||||||
anyOf:
|
anyOf:
|
||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
firma:
|
firm:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
name:
|
name:
|
||||||
|
@ -1140,8 +1140,10 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
|
|||||||
rec.getString("last_name"));
|
rec.getString("last_name"));
|
||||||
if (isNotBlank(name))
|
if (isNotBlank(name))
|
||||||
result.put("name", name);
|
result.put("name", name);
|
||||||
|
if (isNotBlank(rec.getString("firma")))
|
||||||
|
result.put("firm", name);
|
||||||
|
|
||||||
List.of("firma", "co", "street", "zipcode", "city", "country").forEach(key -> {
|
List.of("co", "street", "zipcode", "city", "country").forEach(key -> {
|
||||||
if (isNotBlank(rec.getString(key)))
|
if (isNotBlank(rec.getString(key)))
|
||||||
result.put(key, rec.getString(key));
|
result.put(key, rec.getString(key));
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
.given("tradeName", "Test AG")
|
.given("tradeName", "Test AG")
|
||||||
.given("contactCaption", "Test AG - Hamburg")
|
.given("contactCaption", "Test AG - Hamburg")
|
||||||
.given("postalAddress", """
|
.given("postalAddress", """
|
||||||
"firma": "Test AG",
|
"firm": "Test AG",
|
||||||
"street": "Shanghai-Allee 1",
|
"street": "Shanghai-Allee 1",
|
||||||
"zipcode": "20123",
|
"zipcode": "20123",
|
||||||
"city": "Hamburg",
|
"city": "Hamburg",
|
||||||
@ -183,7 +183,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
|
|||||||
.given("partnerName", "Test AG")
|
.given("partnerName", "Test AG")
|
||||||
.given("newContactCaption", "Test AG - China")
|
.given("newContactCaption", "Test AG - China")
|
||||||
.given("newPostalAddress", """
|
.given("newPostalAddress", """
|
||||||
"firma": "Test AG",
|
"firm": "Test AG",
|
||||||
"name": "Fi Zhong-Kha",
|
"name": "Fi Zhong-Kha",
|
||||||
"building": "Thi Chi Koh Building",
|
"building": "Thi Chi Koh Building",
|
||||||
"street": "No.2 Commercial Second Street",
|
"street": "No.2 Commercial Second Street",
|
||||||
|
Loading…
Reference in New Issue
Block a user