Commit 410f4b5
feat: ESPI 4.0 Schema Compliance - Phase 21: ServiceSupplier Complete Implementation (#96)
This phase implements full ESPI 4.0 compliance for ServiceSupplier and refactors
all Organisation phone number handling from PhoneNumberEntity table to embedded
TelephoneNumber fields.
Key Changes:
- Created ServiceSupplierDto, OrganisationDto, TelephoneNumberDto with JAXB annotations
- Implemented ServiceSupplierMapper, OrganisationMapper, TelephoneNumberMapper
- Fixed SupplierKind enum to match XSD (6 values: UTILITY, RETAILER, OTHER, LSE, MDMA, MSP)
- Refactored Organisation to use embedded phone1/phone2 (TelephoneNumber)
- Deleted PhoneNumberEntity, OrganisationRole, PhoneNumberService (no longer needed)
- Updated ServiceSupplierEntity and CustomerEntity with phone @AttributeOverride
- Optimized TelephoneNumber column sizes to prevent MySQL row size limit
- Updated V3 Flyway migration with embedded phone columns
- Resolved Spring bean conflicts (removed BaseMapperUtils inheritance)
- Removed legacy usagePointId field from ElectricPowerQualitySummaryDto
- Added 24 new DTO tests (ServiceSupplierDtoTest, OrganisationDtoTest, TelephoneNumberDtoTest)
Test Results:
- Total: 760 tests (all passing)
- Integration: PostgreSQL (2/2), H2 (3/3), MySQL (2/2)
Related Issue: #28 (Phase 21)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 4e48626 commit 410f4b5
File tree
34 files changed
+2136
-787
lines changed- openespi-common
- src
- main
- java/org/greenbuttonalliance/espi/common
- domain/customer
- common
- entity
- enums
- dto
- atom
- customer
- usage
- mapper
- customer
- usage
- service
- impl
- resources/db/migration
- test/java/org/greenbuttonalliance/espi/common
- dto/customer
- repositories/customer
34 files changed
+2136
-787
lines changedLines changed: 669 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| |||
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
| |||
158 | 173 | | |
159 | 174 | | |
160 | 175 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 0 additions & 164 deletions
This file was deleted.
0 commit comments