Skip to content

Commit 8c5cd48

Browse files
committed
Merge branch 'goonj-feb-2025-phase1'
2 parents 43064f5 + 035e5f3 commit 8c5cd48

File tree

5 files changed

+65
-2
lines changed

5 files changed

+65
-2
lines changed

goonj/src/main/java/org/avni_integration_service/goonj/domain/ActivityConstants.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@ public interface ActivityConstants {
4444
String FORM_CROSS_CHECKED ="Form Cross Checked?";
4545
String REMARKS ="Remarks";
4646
String OTHER_ACTIVITY = "Specify other activity";
47+
String EDUCATION_AND_HEALTH = "Education And Health";
48+
String MALE_STUDENT = "Number of students (Male)";
49+
String FEMALE_STUDENT = "Number of students (Female)";
50+
String YES = "Yes";
4751
}

goonj/src/main/java/org/avni_integration_service/goonj/domain/DistributionConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ public interface DistributionConstants {
7272
String RECEIVER_LIST_PHOTOGRAPHS = "Receiver List Photographs";
7373
String TYPE_OF_COMMUNITY = "Type Of Community";
7474
String ANY_OTHER_MATERIAL_GIVEN = "Details for Any other (SI)";
75+
String EDUCTION_AND_HEALTH = "Education and Health";
7576
}

goonj/src/main/java/org/avni_integration_service/goonj/dto/ActivityDTO.java

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ public class ActivityDTO {
152152
private String remarks;
153153
@JsonProperty("OtherDetails")
154154
private String otherDetails;
155+
@JsonProperty("EducationandHealth")
156+
private boolean isEducationAndHealth;
157+
@JsonProperty("NumberOfStudentsMale")
158+
private int maleStudent;
159+
@JsonProperty("NumberOfStudentsFemale")
160+
private int femaleStudent;
155161
/**
156162
* No args constructor for use in serialization
157163
*/
@@ -171,6 +177,9 @@ public ActivityDTO() {
171177
* @param noofparticipantsS2S
172178
* @param nos
173179
* @param typeofInitiative
180+
* @param isEducationAndHealth
181+
* @param maleStudent
182+
* @param femaleStudent
174183
* @param diameter
175184
* @param activityEndDate
176185
* @param measurementType
@@ -217,7 +226,7 @@ public ActivityDTO(String sourceId, String nameOfAccount, String activityCategor
217226
int noofparticipantsMaleCFW, int noofparticipantsMaleNJPC, int noofparticipantsNJPCOther,
218227
int noofparticipantsCFWOther, Long noofparticipantsS2S,
219228
Long noofWorkingDays, Integer nos, String objectiveofCFWwork, String schoolAanganwadiLearningCenterName,
220-
String state, String typeofInitiative, String otherObjective, String otherSubType,
229+
String state, String typeofInitiative, boolean isEducationAndHealth,int maleStudent,int femaleStudent, String otherObjective, String otherSubType,
221230
String createdBy, String modifiedBy, String beforeImplementationPhotograph, String duringImplementationPhotograph,
222231
String afterImplementationPhotograph, String wasUndertakingFormFilled, String formCrossChecked, String remarks,
223232
String otherDetails) {
@@ -261,6 +270,9 @@ public ActivityDTO(String sourceId, String nameOfAccount, String activityCategor
261270
this.schoolAanganwadiLearningCenterName = schoolAanganwadiLearningCenterName;
262271
this.state = state;
263272
this.typeofInitiative = typeofInitiative;
273+
this.isEducationAndHealth = isEducationAndHealth;
274+
this.maleStudent = maleStudent;
275+
this.femaleStudent = femaleStudent;
264276
this.createdBy = createdBy;
265277
this.modifiedBy = modifiedBy;
266278
this.beforeImplementationPhotograph = beforeImplementationPhotograph;
@@ -742,4 +754,34 @@ public String getOtherDetails() {
742754
public void setOtherDetails(String otherDetails) {
743755
this.otherDetails = otherDetails;
744756
}
757+
758+
@JsonProperty("EducationandHealth")
759+
public boolean isEducationAndHealth() {
760+
return isEducationAndHealth;
761+
}
762+
763+
@JsonProperty("EducationandHealth")
764+
public void setEducationAndHealth(boolean educationAndHealth) {
765+
isEducationAndHealth = educationAndHealth;
766+
}
767+
768+
@JsonProperty("NumberOfStudentsMale")
769+
public int getMaleStudent() {
770+
return maleStudent;
771+
}
772+
773+
@JsonProperty("NumberOfStudentsMale")
774+
public void setMaleStudent(int maleStudent) {
775+
this.maleStudent = maleStudent;
776+
}
777+
778+
@JsonProperty("NumberOfStudentsFemale")
779+
public int getFemaleStudent() {
780+
return femaleStudent;
781+
}
782+
783+
@JsonProperty("NumberOfStudentsFemale")
784+
public void setFemaleStudent(int femaleStudent) {
785+
this.femaleStudent = femaleStudent;
786+
}
745787
}

goonj/src/main/java/org/avni_integration_service/goonj/repository/ActivityRepository.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,17 @@ private ActivityDTO createActivityRequest(Subject subject) {
156156
activityDTO.setNoofparticipantsNJPCOther((Integer) subject.getObservation(NUMBER_OF_PARTICIPANTS_OTHER));
157157
/* Photograph fields */
158158
activityDTO.setNjpcPhotograph(getPhotographStrings(PHOTOGRAPH, subject));
159+
/*Education fields*/
160+
String educationAndHealth = (String) subject.getObservation(EDUCATION_AND_HEALTH);
161+
if(educationAndHealth!=null && educationAndHealth.equals(YES)){
162+
activityDTO.setEducationAndHealth(true);
163+
activityDTO.setMaleStudent((int)subject.getObservation(MALE_STUDENT));
164+
activityDTO.setFemaleStudent((int)subject.getObservation(FEMALE_STUDENT));
165+
activityDTO.setSchoolAanganwadiLearningCenterName((String)subject.getObservation(SCHOOL_AANGANWADI_LEARNINGCENTER_NAME));
166+
}
167+
else{
168+
activityDTO.setEducationAndHealth(false);
169+
}
159170
}
160171
activityDTO.setWasUndertakingFormFilled((String) subject.getObservation(WAS_DISCLAIMER_FORM_FILLED));
161172
activityDTO.setRemarks((String) subject.getObservation(REMARKS));

goonj/src/main/java/org/avni_integration_service/goonj/repository/DistributionRepository.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@ else if (subject.getObservation(TYPE_OF_INITIATIVE).equals(VAAPSI)) {
162162
distributionDTO.setNoOfFamiliesReached((Integer) subject.getObservation(NUMBER_OF_FAMILIES_REACHED));
163163
distributionDTO.setNoOfIndividualReached((Integer) subject.getObservation(NUMBER_OF_INDIVIDUALS_REACHED));
164164

165-
} else {
165+
} else if(subject.getObservation(TYPE_OF_INITIATIVE).equals(EDUCTION_AND_HEALTH)){
166+
distributionDTO.setTypeOfInitiative((String) subject.getObservation(TYPE_OF_INITIATIVE));
167+
distributionDTO.setSchoolAanganwadiLearningCenterName((String) subject.getObservation(SCHOOL_ANGANWADI_NAME));
168+
distributionDTO.setTypeOfSchool((String) subject.getObservation(TYPE_OF_SCHOOL));
169+
}
170+
else {
166171
distributionDTO.setTypeOfInitiative((String) subject.getObservation(TYPE_OF_INITIATIVE));
167172
}
168173
distributionDTO.setReportsCrosschecked((String) subject.getObservation(REPORTS_CROSS_CHECKED));

0 commit comments

Comments
 (0)