@@ -69,17 +69,16 @@ public <T extends Object> void processEvent(T request, Event event) {
6969
7070 public void processStudent (TraxGraduationUpdateDTO updateGrad , StudentGradDTO currentStudent , String accessToken ) {
7171 boolean isChanged = false ;
72-
7372 log .info (" Process Student : studentID = {}, pen = {}" , currentStudent .getStudentID (), updateGrad .getPen ());
7473 // Processing order is important for the first 3 fields below.
7574 // 1. School of Record Guid
76- if (updateGrad .getSchoolOfRecordId () != null && updateGrad . getSchoolOfRecordId () != currentStudent . getSchoolOfRecordId () ) {
75+ if (updateGrad .getSchoolOfRecordId () != null ) {
7776 isChanged = processSchoolOfRecordId (currentStudent , updateGrad .getSchoolOfRecordId ());
7877 log .info (" => school of record id : current = {}, request = {}" , currentStudent .getSchoolOfRecordId (), currentStudent .getNewSchoolOfRecordId ());
7978 }
8079 // 2. Grad Program
8180 String gradProgram = getGradProgram (updateGrad .getGraduationRequirementYear (), currentStudent .getUpToDateSchoolOfRecordId (), null );
82- if (! StringUtils . equals ( gradProgram , currentStudent . getProgram ()) ) {
81+ if (gradProgram != null ) {
8382 isChanged = processGraduationProgram (currentStudent , updateGrad .getPen (), gradProgram , accessToken );
8483 if (isChanged && StringUtils .isNotBlank (currentStudent .getNewProgram ())) {
8584 log .info (" => grad program : current = {}, request = {}" , currentStudent .getProgram (), currentStudent .getNewProgram ());
@@ -89,8 +88,7 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
8988 }
9089 // 3. SLP Date
9190 String slpDate = updateGrad .getSlpDateWithDefaultFormat ();
92- if (slpDate != null && "SCCP" .equalsIgnoreCase (currentStudent .getUpToDateGradProgram ())
93- && !StringUtils .equals (slpDate , currentStudent .getGradDate ())) {
91+ if (slpDate != null && "SCCP" .equalsIgnoreCase (currentStudent .getUpToDateGradProgram ())) {
9492 isChanged = processSlpDate (currentStudent , slpDate );
9593 if (isChanged ) {
9694 log .info (" => slp date : current = {}, request = {}" , currentStudent .getGradDate (), slpDate );
@@ -99,18 +97,18 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
9997 }
10098 }
10199 // 4. Student Grade
102- if (! StringUtils .equals (updateGrad . getStudentGrade (), currentStudent .getStudentGrade ())) {
100+ if (StringUtils .isNotBlank (updateGrad .getStudentGrade ())) {
103101 isChanged = processStudentGrade (currentStudent , updateGrad .getStudentGrade ());
104102 log .info (" => student grade : current = {}, request = {}" , currentStudent .getStudentGrade (), currentStudent .getNewStudentGrade ());
105103 }
106104 // 5. Citizenship
107- if (! StringUtils .equals (updateGrad . getCitizenship (), currentStudent .getCitizenship ())) {
105+ if (StringUtils .isNotBlank (updateGrad .getCitizenship ())) {
108106 isChanged = processCitizenship (currentStudent , updateGrad .getCitizenship ());
109107 log .info (" => student citizenship : current = {}, request = {}" , currentStudent .getCitizenship (), currentStudent .getNewCitizenship ());
110108 }
111109 String newStudentStatus = getGradStudentStatus (updateGrad .getStudentStatus (), updateGrad .getArchiveFlag ());
112110 // 6. Student Status
113- if (! StringUtils . equals ( newStudentStatus , currentStudent . getStudentStatus ()) ) {
111+ if (newStudentStatus != null ) {
114112 processStudentStatus (currentStudent , newStudentStatus );
115113 log .info (" => student status : current = {}, request = {}" , currentStudent .getStudentStatus (), currentStudent .getNewStudentStatus ());
116114 isChanged = true ;
0 commit comments