-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GRAD2-3176 - updates for new district report table
- Loading branch information
Showing
38 changed files
with
1,472 additions
and
827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
api/src/main/java/ca/bc/gov/educ/api/graduation/constants/AddressTypeCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ca.bc.gov.educ.api.graduation.constants; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum AddressTypeCodes { | ||
MAILING("MAILING"), | ||
PHYSICAL("PHYSICAL"); | ||
|
||
private final String code; | ||
|
||
AddressTypeCodes(String code) {this.code = code;} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
api/src/main/java/ca/bc/gov/educ/api/graduation/constants/DistrictContactTypeCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package ca.bc.gov.educ.api.graduation.constants; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum DistrictContactTypeCodes { | ||
OL_LEARN("OL_LEARN"), | ||
SUPER("SUPER"), | ||
CHAIR("CHAIR"), | ||
SECRETARY("SECRETARY"), | ||
ADMN_ASSIS("ADMN_ASSIS"), | ||
INDIGENOUS("INDIGENOUS"), | ||
CUSTORDER("CUSTORDER"), | ||
EARL_LEARN("EARL_LEARN"), | ||
FACILITIES("FACILITIES"), | ||
FINANCIAL("FINANCIAL"), | ||
FRENCH("FRENCH"), | ||
INTERNAT("INTERNAT"), | ||
LITERACY("LITERACY"), | ||
MYED("MYED"), | ||
INCLUSIVE("INCLUSIVE"), | ||
TRANSPORT("TRANSPORT"), | ||
DATA_COLLECTION_1701("1701"), | ||
STUDREGIS("STUDREGIS"); | ||
|
||
|
||
private final String code; | ||
|
||
DistrictContactTypeCodes(String code) {this.code = code;} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
api/src/main/java/ca/bc/gov/educ/api/graduation/constants/ReportTypeCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package ca.bc.gov.educ.api.graduation.constants; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum ReportTypeCodes { | ||
TVRGRAD("TVRGRAD"), | ||
TVRNONGRAD("TVRNONGRAD"), | ||
GRADREGARC("GRADREGARC"), | ||
NONGRADREGARC("NONGRADREGARC"), | ||
NONGRADPRJARC("NONGRADPRJARC"), | ||
NONGRADPRJ("NONGRADPRJ"), | ||
ACHV("ACHV"), | ||
GRADREG("GRADREG"), | ||
DISTREP_SC("DISTREP_SC"), | ||
DISTREP_YE_SC("DISTREP_YE_SC"), | ||
DISTREP_YE_SD("DISTREP_YE_SD"), | ||
NONGRADDISTREP_SC("NONGRADDISTREP_SC"), | ||
NONGRADDISTREP_SD("NONGRADDISTREP_SD"), | ||
GRADPRJ("GRADPRJ"), | ||
GRADPRJARC("GRADPRJARC"), | ||
ADDRESS_LABEL_SCHL("ADDRESS_LABEL_SCHL"), | ||
ADDRESS_LABEL_YE("ADDRESS_LABEL_YE"), | ||
ADDRESS_LABEL_PSI("ADDRESS_LABEL_PSI"), | ||
NONGRADREG("NONGRADREG"), | ||
DISTREP_SD("DISTREP_SD"); | ||
|
||
private final String code; | ||
|
||
ReportTypeCodes(String code) {this.code = code;} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/ca/bc/gov/educ/api/graduation/constants/SchoolCategoryCodes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ca.bc.gov.educ.api.graduation.constants; | ||
|
||
import lombok.Getter; | ||
|
||
/** | ||
* The enum for school category codes | ||
*/ | ||
@Getter | ||
public enum SchoolCategoryCodes { | ||
IMM_DATA("IMM_DATA"), | ||
CHILD_CARE("CHILD_CARE"), | ||
MISC("MISC"), | ||
PUBLIC("PUBLIC"), | ||
INDEPEND("INDEPEND"), | ||
FED_BAND("FED_BAND"), | ||
OFFSHORE("OFFSHORE"), | ||
EAR_LEARN("EAR_LEARN"), | ||
YUKON("YUKON"), | ||
POST_SEC("POST_SEC"), | ||
INDP_FNS("INDP_FNS"); | ||
|
||
private final String code; | ||
SchoolCategoryCodes(String code) { this.code = code; } | ||
} |
125 changes: 69 additions & 56 deletions
125
api/src/main/java/ca/bc/gov/educ/api/graduation/controller/GraduationController.java
Large diffs are not rendered by default.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
api/src/main/java/ca/bc/gov/educ/api/graduation/mapper/LocalDateTimeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package ca.bc.gov.educ.api.graduation.mapper; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
/** | ||
* The type Local date time mapper. | ||
*/ | ||
public class LocalDateTimeMapper { | ||
|
||
/** | ||
* Map string. | ||
* | ||
* @param dateTime the date time | ||
* @return the string | ||
*/ | ||
public String map(LocalDateTime dateTime) { | ||
if (dateTime == null) { | ||
return null; | ||
} | ||
return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(dateTime); | ||
} | ||
|
||
/** | ||
* Map local date time. | ||
* | ||
* @param dateTime the date time | ||
* @return the local date time | ||
*/ | ||
public LocalDateTime map(String dateTime) { | ||
if (dateTime == null) { | ||
return null; | ||
} | ||
return LocalDateTime.parse(dateTime); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
api/src/main/java/ca/bc/gov/educ/api/graduation/mapper/SchoolMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ca.bc.gov.educ.api.graduation.mapper; | ||
|
||
import ca.bc.gov.educ.api.graduation.model.dto.institute.School; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
@Mapper(uses = {UUIDMapper.class, LocalDateTimeMapper.class, StringMapper.class}) | ||
@SuppressWarnings("squid:S1214") | ||
public interface SchoolMapper { | ||
|
||
SchoolMapper mapper = Mappers.getMapper(SchoolMapper.class); | ||
|
||
@Mapping(target = "name", source = "displayName") | ||
ca.bc.gov.educ.api.graduation.model.report.School toSchoolReport(School entity); | ||
} |
22 changes: 22 additions & 0 deletions
22
api/src/main/java/ca/bc/gov/educ/api/graduation/mapper/StringMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ca.bc.gov.educ.api.graduation.mapper; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
/** | ||
* The type String mapper. | ||
*/ | ||
public class StringMapper { | ||
|
||
/** | ||
* Map string. | ||
* | ||
* @param value the value | ||
* @return the string | ||
*/ | ||
public String map(String value) { | ||
if (StringUtils.isNotEmpty(value)) { | ||
return value.trim(); | ||
} | ||
return value; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
api/src/main/java/ca/bc/gov/educ/api/graduation/mapper/UUIDMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ca.bc.gov.educ.api.graduation.mapper; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import java.util.UUID; | ||
|
||
public class UUIDMapper { | ||
|
||
public UUID map(String value) { | ||
if (StringUtils.isBlank(value)) { | ||
return null; | ||
} | ||
return UUID.fromString(value); | ||
} | ||
|
||
public String map(UUID value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
return value.toString(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
api/src/main/java/ca/bc/gov/educ/api/graduation/model/dto/DistrictReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ca.bc.gov.educ.api.graduation.model.dto; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.UUID; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class DistrictReport extends BaseModel { | ||
|
||
private UUID id; | ||
private String report; | ||
private String reportTypeCode; | ||
private String reportTypeLabel; | ||
private UUID districtId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
api/src/main/java/ca/bc/gov/educ/api/graduation/model/dto/ReportGradStudentData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
api/src/main/java/ca/bc/gov/educ/api/graduation/model/dto/institute/DistrictAddress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package ca.bc.gov.educ.api.graduation.model.dto.institute; | ||
|
||
import ca.bc.gov.educ.api.graduation.model.dto.BaseModel; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.io.Serializable; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class DistrictAddress extends BaseModel implements Serializable { | ||
/** | ||
* The constant serialVersionUID. | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
|
||
private String districtAddressId; | ||
private String districtId; | ||
private String addressTypeCode; | ||
private String addressLine1; | ||
private String addressLine2; | ||
private String city; | ||
private String postal; | ||
private String provinceCode; | ||
private String countryCode; | ||
} |
33 changes: 33 additions & 0 deletions
33
api/src/main/java/ca/bc/gov/educ/api/graduation/model/dto/institute/DistrictContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ca.bc.gov.educ.api.graduation.model.dto.institute; | ||
|
||
import ca.bc.gov.educ.api.graduation.model.dto.BaseModel; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.io.Serializable; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class DistrictContact extends BaseModel implements Serializable { | ||
|
||
/** | ||
* The constant serialVersionUID. | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
|
||
private String districtContactId; | ||
private String districtId; | ||
private String districtContactTypeCode; | ||
private String phoneNumber; | ||
private String jobTitle; | ||
private String phoneExtension; | ||
private String alternatePhoneNumber; | ||
private String alternatePhoneExtension; | ||
private String email; | ||
private String firstName; | ||
private String lastName; | ||
private String effectiveDate; | ||
private String expiryDate; | ||
} |
8 changes: 4 additions & 4 deletions
8
api/src/main/java/ca/bc/gov/educ/api/graduation/model/dto/institute/School.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.