liu hace 1 año
padre
commit
592165af04

+ 25 - 13
src/main/java/com/template/controller/WelcomeBedController.java

@@ -474,23 +474,31 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
                         }
                         }
                         String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
                         String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
                         if (!classstr.equals("所属班级")) {
                         if (!classstr.equals("所属班级")) {
-                            return CommonResult.fail("导入数据第列为所属班级");
+                            return CommonResult.fail("导入数据第列为所属班级");
                         }
                         }
-                        String isCheck = dataFormatter.formatCellValue(row.getCell(9));//备注
+                        String instructor = dataFormatter.formatCellValue(row.getCell(9));//备注
+                        if (!instructor.equals("辅导员")) {
+                            return CommonResult.fail("导入数据第九列为辅导员");
+                        }
+                        String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
                         if (!isCheck.equals("是否入住")) {
                         if (!isCheck.equals("是否入住")) {
-                            return CommonResult.fail("导入数据第七列为是否入住");
+                            return CommonResult.fail("导入数据第列为是否入住");
                         }
                         }
-                        String admissNum = dataFormatter.formatCellValue(row.getCell(10));//备注
+                        String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
                         if (!admissNum.equals("录取号")) {
                         if (!admissNum.equals("录取号")) {
-                            return CommonResult.fail("导入数据第列为录取号");
+                            return CommonResult.fail("导入数据第十一列为录取号");
                         }
                         }
-                        String name = dataFormatter.formatCellValue(row.getCell(11));//备注
+                        String name = dataFormatter.formatCellValue(row.getCell(12));//备注
                         if (!name.equals("姓名")) {
                         if (!name.equals("姓名")) {
-                            return CommonResult.fail("导入数据第列为姓名");
+                            return CommonResult.fail("导入数据第十二列为姓名");
                         }
                         }
-                        String remark = dataFormatter.formatCellValue(row.getCell(12));//备注
+                        String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
                         if (!remark.equals("备注")) {
                         if (!remark.equals("备注")) {
-                            return CommonResult.fail("导入数据第七列为备注");
+                            return CommonResult.fail("导入数据第十三列为备注");
+                        }
+                        String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
+                        if (!retentionState.equals("是否保留")) {
+                            return CommonResult.fail("导入数据第十四列为是否保留");
                         }
                         }
                     } else {
                     } else {
                         WelcomeBed bedData = new WelcomeBed();
                         WelcomeBed bedData = new WelcomeBed();
@@ -509,10 +517,12 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
                         String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
                         String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
                         String major = dataFormatter.formatCellValue(row.getCell(7));//备注
                         String major = dataFormatter.formatCellValue(row.getCell(7));//备注
                         String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
                         String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
-                        String isCheck = dataFormatter.formatCellValue(row.getCell(9));//备注
-                        String admissNum = dataFormatter.formatCellValue(row.getCell(10));//备注
-                        String name = dataFormatter.formatCellValue(row.getCell(11));//备注
-                        String remark = dataFormatter.formatCellValue(row.getCell(12));//备注
+                        String instructor = dataFormatter.formatCellValue(row.getCell(9));//辅导员
+                        String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
+                        String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
+                        String name = dataFormatter.formatCellValue(row.getCell(12));//备注
+                        String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
+                        String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
 
 
                         bedData.setSchool(school);
                         bedData.setSchool(school);
 
 
@@ -561,6 +571,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
                         bedData.setCardNum(admissNum);
                         bedData.setCardNum(admissNum);
                         bedData.setName(name);
                         bedData.setName(name);
                         bedData.setRemark(remark);
                         bedData.setRemark(remark);
+                        bedData.setRetentionState(Integer.valueOf(retentionState));
+                        bedData.setInstructor(instructor);
                         result.add(bedData);
                         result.add(bedData);
                     }
                     }
                 }
                 }

+ 10 - 4
src/main/java/com/template/controller/WelcomeDormitoryController.java

@@ -520,19 +520,23 @@ public class WelcomeDormitoryController implements WelcomeDormitoryControllerAPI
                         }
                         }
                         String bedNum = dataFormatter.formatCellValue(row.getCell(7));//床位数
                         String bedNum = dataFormatter.formatCellValue(row.getCell(7));//床位数
                         if (!bedNum.equals("床位数")) {
                         if (!bedNum.equals("床位数")) {
-                            return CommonResult.fail("导入数据第列为床位数");
+                            return CommonResult.fail("导入数据第列为床位数");
                         }
                         }
                         String freeBedNumber = dataFormatter.formatCellValue(row.getCell(8));//空闲床位数
                         String freeBedNumber = dataFormatter.formatCellValue(row.getCell(8));//空闲床位数
                         if (!freeBedNumber.equals("空闲床位数")) {
                         if (!freeBedNumber.equals("空闲床位数")) {
-                            return CommonResult.fail("导入数据第列为空闲床位数");
+                            return CommonResult.fail("导入数据第列为空闲床位数");
                         }
                         }
                         String status = dataFormatter.formatCellValue(row.getCell(9));//入住情况
                         String status = dataFormatter.formatCellValue(row.getCell(9));//入住情况
                         if (!status.equals("入住情况")) {
                         if (!status.equals("入住情况")) {
-                            return CommonResult.fail("导入数据第列为入住情况");
+                            return CommonResult.fail("导入数据第列为入住情况");
                         }
                         }
                         String remark = dataFormatter.formatCellValue(row.getCell(10));//备注
                         String remark = dataFormatter.formatCellValue(row.getCell(10));//备注
                         if (!remark.equals("备注")) {
                         if (!remark.equals("备注")) {
-                            return CommonResult.fail("导入数据第七列为备注");
+                            return CommonResult.fail("导入数据第十一列为备注");
+                        }
+                        String retentionState = dataFormatter.formatCellValue(row.getCell(11));//是否保留
+                        if (!retentionState.equals("是否保留")) {
+                            return CommonResult.fail("导入数据第十二列为是否保留");
                         }
                         }
 
 
                     } else {
                     } else {
@@ -552,6 +556,7 @@ public class WelcomeDormitoryController implements WelcomeDormitoryControllerAPI
                         String freeBedNumber = dataFormatter.formatCellValue(row.getCell(8));//空闲床位数
                         String freeBedNumber = dataFormatter.formatCellValue(row.getCell(8));//空闲床位数
                         String status = dataFormatter.formatCellValue(row.getCell(9));//入住情况
                         String status = dataFormatter.formatCellValue(row.getCell(9));//入住情况
                         String remark = dataFormatter.formatCellValue(row.getCell(10));//备注
                         String remark = dataFormatter.formatCellValue(row.getCell(10));//备注
+                        String retentionState = dataFormatter.formatCellValue(row.getCell(11));//是否保留
 
 
 
 
                         wd.setSchool(school);
                         wd.setSchool(school);
@@ -579,6 +584,7 @@ public class WelcomeDormitoryController implements WelcomeDormitoryControllerAPI
                         wd.setFreeBedNumber(Integer.valueOf(freeBedNumber));
                         wd.setFreeBedNumber(Integer.valueOf(freeBedNumber));
                         wd.setStatus(Integer.valueOf(status));
                         wd.setStatus(Integer.valueOf(status));
                         wd.setRemark(remark);
                         wd.setRemark(remark);
+                        wd.setRetentionState(Integer.valueOf(retentionState));
 
 
                         result.add(wd);
                         result.add(wd);
                     }
                     }