Просмотр исходного кода

1.查看报名详情接口修改。

zhengqiang 5 лет назад
Родитель
Сommit
61ebab951e

+ 27 - 22
web/src/main/java/com/jpsoft/campus/modules/mobile/controller/PrimarySchoolApiController.java

@@ -506,31 +506,36 @@ public class PrimarySchoolApiController {
 
             ApplicationPrimaryDTO applicationPrimaryDTO = new ApplicationPrimaryDTO();
 
-            applicationPrimaryDTO.setApplicationId(applicationId);
-            applicationPrimaryDTO.setName(studentInfo.getName());
-            applicationPrimaryDTO.setOldName(studentInfo.getOldName());
-            applicationPrimaryDTO.setCardType(studentInfo.getCardType());
-            applicationPrimaryDTO.setIdCard(studentInfo.getIdCard());
-            applicationPrimaryDTO.setDocumentUrl(studentInfo.getDocumentUrl());
-            applicationPrimaryDTO.setSex(studentInfo.getSex());
-            applicationPrimaryDTO.setBirthday(studentInfo.getBirthday());
-            applicationPrimaryDTO.setNation(studentInfo.getNation());
-            applicationPrimaryDTO.setAddress(studentInfo.getAddress());
-
-            applicationPrimaryDTO.setType(applicationPrimary.getType());
-            applicationPrimaryDTO.setCategoryId(applicationPrimary.getCategoryId());
-
-            applicationPrimaryDTO.setStreetId(applicationPrimary.getStreetId());
-            applicationPrimaryDTO.setCommunityId(applicationPrimary.getCommunityId());
-            applicationPrimaryDTO.setSchoolId(applicationPrimary.getSchoolId());
-
-            applicationPrimaryDTO.setStudentId(applicationPrimary.getStudentId());
+            if(applicationPrimary!=null) {
+                applicationPrimaryDTO.setApplicationId(applicationId);
+                applicationPrimaryDTO.setType(applicationPrimary.getType());
+                applicationPrimaryDTO.setCategoryId(applicationPrimary.getCategoryId());
+                applicationPrimaryDTO.setStreetId(applicationPrimary.getStreetId());
+                applicationPrimaryDTO.setCommunityId(applicationPrimary.getCommunityId());
+                applicationPrimaryDTO.setSchoolId(applicationPrimary.getSchoolId());
+                applicationPrimaryDTO.setStudentId(applicationPrimary.getStudentId());
+                applicationPrimaryDTO.setStatus(applicationPrimary.getStatus());
+            }
 
-            applicationPrimaryDTO.setStatus(applicationPrimary.getStatus());
+            if(studentInfo!=null){
+                applicationPrimaryDTO.setName(studentInfo.getName());
+                applicationPrimaryDTO.setOldName(studentInfo.getOldName());
+                applicationPrimaryDTO.setCardType(studentInfo.getCardType());
+                applicationPrimaryDTO.setIdCard(studentInfo.getIdCard());
+                applicationPrimaryDTO.setDocumentUrl(studentInfo.getDocumentUrl());
+                applicationPrimaryDTO.setSex(studentInfo.getSex());
+                applicationPrimaryDTO.setBirthday(studentInfo.getBirthday());
+                applicationPrimaryDTO.setNation(studentInfo.getNation());
+                applicationPrimaryDTO.setAddress(studentInfo.getAddress());
+            }
 
-            applicationPrimaryDTO.setRelationship(personStudent.getRelationship());
+            if (personStudent!=null) {
+                applicationPrimaryDTO.setRelationship(personStudent.getRelationship());
+            }
 
-            applicationPrimaryDTO.setSchoolName(schoolInfo.getName());
+            if(schoolInfo!=null) {
+                applicationPrimaryDTO.setSchoolName(schoolInfo.getName());
+            }
 
             //房产证明异步读取