夏文涛 11 months ago
parent
commit
64ef91c62a

+ 5 - 5
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -119,7 +119,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
             return CommonResult.fail(st);
         }
 
-        if (!isr.equals("本科") || !isr.equals("专升本") || !isr.equals("专科")) {
+        if (!isr.equals("本科") && !isr.equals("专升本") && !isr.equals("专科")) {
             return CommonResult.fail("批次为本科或专升本或专科");
         }
         int existCount = welcomeStudentService.existStudentInfo(isr.getAdmissNum(), isr.getCardId());
@@ -299,7 +299,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         if (student == null) {
             return CommonResult.fail("学生数据已失效,编辑失败!");
         }
-        if (!usr.getBatchValue().equals("本科") || !usr.getBatchValue().equals("专升本") || !usr.getBatchValue().equals("专科")) {
+        if (!usr.getBatchValue().equals("本科") && !usr.getBatchValue().equals("专升本") && !usr.getBatchValue().equals("专科")) {
             return CommonResult.fail("批次为本科或专升本或专科");
         }
         //region 学生信息
@@ -630,7 +630,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
             return CommonResult.fail(st);
         }
 
-        if (!icr.getBatchValue().equals("本科") || !icr.getBatchValue().equals("专升本") || !icr.getBatchValue().equals("专科")) {
+        if (!icr.getBatchValue().equals("本科") && !icr.getBatchValue().equals("专升本") && !icr.getBatchValue().equals("专科")) {
             return CommonResult.fail("批次为本科或专升本或专科");
         }
         WelcomeStudent ws = welcomeStudentService.getDataByIdcardOrNum(icr.getAdmissNum(), icr.getCardId());
@@ -1120,7 +1120,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
                         studentData.setGraduationSchool(graSchool);
 
                         String batchValue = dataFormatter.formatCellValue(row.getCell(11));//批次
-                        if (!batchValue.equals("本科") || !batchValue.equals("专升本") || !batchValue.equals("专科")) {
+                        if (!batchValue.equals("本科") && !batchValue.equals("专升本") && !batchValue.equals("专科")) {
                             return CommonResult.fail("批次为本科或专升本或专科");
                         }
                         studentData.setBatchValue(batchValue);
@@ -1401,7 +1401,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
                         studentData.setGraduationSchool(graSchool);
 
                         String batchValue = dataFormatter.formatCellValue(row.getCell(11));//批次
-                        if (!batchValue.equals("本科") || !batchValue.equals("专升本") || !batchValue.equals("专科")) {
+                        if (!batchValue.equals("本科") && !batchValue.equals("专升本") && !batchValue.equals("专科")) {
                             return CommonResult.fail("批次为本科或专升本或专科");
                         }
                         studentData.setBatchValue(batchValue);