memberNumber as partnerNumber+memberNumberSuffix #13

Merged
hsh-michaelhoennig merged 78 commits from memberNumberSuffix-and-partnerNumber into master 2024-01-24 15:57:16 +01:00
2 changed files with 20 additions and 12 deletions
Showing only changes of commit 033a86f10d - Show all commits

View File

@ -170,7 +170,7 @@ public class ImportOfficeTables extends ContextBasedTest {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if ( !"admin".equals(System.getenv("ADMIN_USER") )) { if ( !"admin".equals(System.getenv("HSADMINNG_POSTGRES_ADMIN_USERNAME") )) {
return; return;
} }
@ -184,8 +184,9 @@ public class ImportOfficeTables extends ContextBasedTest {
assertThat(contacts.toString()).isEqualToIgnoringWhitespace(""" assertThat(contacts.toString()).isEqualToIgnoringWhitespace("""
{ {
71=contact(label='Herr Michael Mellies ', emailAddresses='mih@example.org'), 71=contact(label='Herr Michael Mellies ', emailAddresses='mih@example.org'),
101=contact(label='Frau Dr. Jenny Meyer , JM e.K.', emailAddresses='jm@example.org'), 101=contact(label='Frau Dr. Jenny Meyer , JM e.K.', emailAddresses='jm-billing@example.org'),
102=contact(label='Herr Andrew Meyer , JM e.K.', emailAddresses='am@example.org'), 102=contact(label='Herr Andrew Meyer , JM e.K.', emailAddresses='am-operation@example.org'),
103=contact(label='Herr Philip Meyer , JM e.K.', emailAddresses='pm-contractual@example.org'),
121=contact(label='Petra Schmidt , Test PS', emailAddresses='ps@example.com') 121=contact(label='Petra Schmidt , Test PS', emailAddresses='ps@example.com')
} }
"""); """);
@ -223,7 +224,7 @@ public class ImportOfficeTables extends ContextBasedTest {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if ( !"admin".equals(System.getenv("ADMIN_USER") )) { if ( !"admin".equals(System.getenv("HSADMINNG_POSTGRES_ADMIN_USERNAME") )) {
return; return;
} }
@ -252,7 +253,7 @@ public class ImportOfficeTables extends ContextBasedTest {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if ( !"admin".equals(System.getenv("ADMIN_USER") )) { if ( !"admin".equals(System.getenv("HSADMINNG_POSTGRES_ADMIN_USERNAME") )) {
return; return;
} }
@ -619,6 +620,7 @@ public class ImportOfficeTables extends ContextBasedTest {
if (isNotBlank(rec.getString("roles")) && rec.getString("roles").contains("billing")) { if (isNotBlank(rec.getString("roles")) && rec.getString("roles").contains("billing")) {
final var partner = partners.get(rec.getInteger("bp_id")); final var partner = partners.get(rec.getInteger("bp_id"));
final var debitor = debitors.get(rec.getInteger("bp_id"));
final var person = partner.getPerson(); final var person = partner.getPerson();
person.setTradeName(rec.getString("firma")); person.setTradeName(rec.getString("firma"));
@ -626,7 +628,13 @@ public class ImportOfficeTables extends ContextBasedTest {
person.setGivenName(rec.getString("first_name")); person.setGivenName(rec.getString("first_name"));
person.setFamilyName(rec.getString("last_name")); person.setFamilyName(rec.getString("last_name"));
if (rec.getString("roles").contains("contractual")) {
initContact(partner.getContact(), rec); initContact(partner.getContact(), rec);
} else if (rec.getString("roles").contains("billing")) {
initContact(debitor.getBillingContact(), rec);
} else if (rec.getString("roles").contains("operation")) {
// TODO: technical contact initContact(debitor.getBillingContact(), rec);
}
} else { } else {
initContact(new HsOfficeContactEntity(), rec); initContact(new HsOfficeContactEntity(), rec);

View File

@ -1,6 +1,6 @@
contact_id; bp_id; salut; first_name; last_name; title; firma; co; street; zipcode;city; country; phone_private; phone_office; phone_mobile; fax; email; roles contact_id; bp_id; salut; first_name; last_name; title; firma; co; street; zipcode;city; country; phone_private; phone_office; phone_mobile; fax; email; roles
71; 7; Herr; Michael; Mellies; ; ; ; Kleine Freiheit 50; 26524; Hage; DE; ; +49 4931 123456; +49 1522 123456;; mih@example.org; contractual,billing,operation 71; 7; Herr; Michael; Mellies; ; ; ; Kleine Freiheit 50; 26524; Hage; DE; ; +49 4931 123456; +49 1522 123456;; mih@example.org; contractual,billing,operation
101; 10; Frau; Jenny; Meyer; Dr.; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 7777777; +49 30 1111111; ; +49 30 2222222; jm@example.org; billing 101; 10; Frau; Jenny; Meyer; Dr.; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 7777777; +49 30 1111111; ; +49 30 2222222; jm-billing@example.org; billing
102; 10; Herr; Andrew; Meyer; ; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 6666666; +49 30 3333333; ; +49 30 4444444; am@example.org; operation 102; 10; Herr; Andrew; Meyer; ; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 6666666; +49 30 3333333; ; +49 30 4444444; am-operation@example.org; operation
102; 10; Herr; Philip; Meyer; ; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 6666666; +49 30 5555555; ; +49 30 6666666; pm@example.org; contractual 103; 10; Herr; Philip; Meyer; ; JM e.K.;; Waldweg 5; 11001; Berlin; DE; +49 30 6666666; +49 30 5555555; ; +49 30 6666666; pm-contractual@example.org; contractual
121; 12; ; Petra; Schmidt; ; Test PS;; ; ; ; ; ; ; ; ; ps@example.com; billing,contractual,operation 121; 12; ; Petra; Schmidt; ; Test PS;; ; ; ; ; ; ; ; ; ps@example.com; billing,contractual,operation

1 contact_id; bp_id; salut; first_name; last_name; title; firma; co; street; zipcode;city; country; phone_private; phone_office; phone_mobile; fax; email; roles contact_id bp_id salut first_name last_name title firma co street zipcode city country phone_private phone_office phone_mobile fax email roles
2 # eine natürliche Person, implizites contractual 71 7 Herr Michael Mellies Kleine Freiheit 50 26524 Hage DE +49 4931 123456 +49 1522 123456 mih@example.org contractual,billing,operation
3 1101; 17; Herr; Michael; Mellies; ; ; ; Kleine Freiheit 50; 26524; Hage; DE; ; +49 4931 123456; +49 1522 123456;; mih@example.org; partner,billing,operation 101 10 Frau Jenny Meyer Dr. JM e.K. Waldweg 5 11001 Berlin DE +49 30 7777777 +49 30 1111111 +49 30 2222222 jm-billing@example.org billing
4 # eine juristische Person mit drei separaten Ansprechpartnern, vip-contact und ex-partner 102 10 Herr Andrew Meyer JM e.K. Waldweg 5 11001 Berlin DE +49 30 6666666 +49 30 3333333 +49 30 4444444 am-operation@example.org operation
5 1200; 20;; ; ; ; JM e.K.;; Wiesenweg 15; 12335; Berlin; DE; +49 30 6666666; +49 30 5555555; ; +49 30 6666666; jm-ex-partner@example.org; ex-partner 103 10 Herr Philip Meyer JM e.K. Waldweg 5 11001 Berlin DE +49 30 6666666 +49 30 5555555 +49 30 6666666 pm-contractual@example.org contractual
6 1201; 20; Frau; Jenny; Meyer-Billing; Dr.; JM GmbH;; Waldweg 5; 11001; Berlin; DE; +49 30 7777777; +49 30 1111111; ; +49 30 2222222; jm-billing@example.org; billing 121 12 Petra Schmidt Test PS ps@example.com billing,contractual,operation