2 次代码提交 6d4bf83ca6 ... 2bc5653b59

作者 SHA1 备注 提交日期
  wutt 2bc5653b59 Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper 5 年之前
  wutt a4a85bc7aa 增强人员导入逻辑 5 年之前

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -128,5 +128,6 @@ public class UserController {
     public HttpRespMsg switchPermission(@RequestParam String id) {
         return userService.switchPermission(id, request);
     }
+
 }
 

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -270,7 +270,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
             //要插入的账号列表
             List<User> userList = new ArrayList<>();
             //由于第一行需要指明列对应的标题
-            for (int rowIndex = 1; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
+            for (int rowIndex = 0; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
                 XSSFRow row = sheet.getRow(rowIndex);
                 if (row == null) {
                     continue;
@@ -281,6 +281,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 XSSFCell phoneCell = row.getCell(1);
                 nameCell.setCellType(CellType.STRING);
                 phoneCell.setCellType(CellType.STRING);
+                if("姓名".equals(nameCell.getStringCellValue()) && "手机号".equals(phoneCell.getStringCellValue()) && rowIndex==0){
+                    continue;
+                }
                 String name = nameCell.getStringCellValue();
                 String phone = phoneCell.getStringCellValue();
                 phoneList.add(phone);