|
|
@@ -210,6 +210,8 @@ public class HwRequirementServiceImpl extends ServiceImpl<HwRequirementMapper, H
|
|
|
Sheet sheet = wb.getSheetAt(0);
|
|
|
//获取总行数
|
|
|
int totalRows = sheet.getLastRowNum();
|
|
|
+ //excel数据已经报名数
|
|
|
+ int enrollNum=0;
|
|
|
//循环取出行放入hwEnrollmentExportList
|
|
|
for (int i = 8; i <= totalRows; i++) {
|
|
|
HwEnrollmentExport hwEnrollmentExport = new HwEnrollmentExport();
|
|
|
@@ -432,11 +434,7 @@ public class HwRequirementServiceImpl extends ServiceImpl<HwRequirementMapper, H
|
|
|
//查询此需求用户是否报名
|
|
|
List<HwEnrollment> hwEnrollmentList = hwEnrollmentService.findHwEnrollmentList(hwEnrollment);
|
|
|
if (hwEnrollmentList.size() > 0) {
|
|
|
- map.put("id", j + 9);
|
|
|
- map.put("phone", phone);
|
|
|
- map.put("reason", "用户已经报名");
|
|
|
- resultlist.add(map);
|
|
|
- continue;
|
|
|
+ enrollNum=enrollNum+1;
|
|
|
}
|
|
|
//存放用户id,说明此用户已存在数据库
|
|
|
HwUserExport hwUserExport=new HwUserExport();
|
|
|
@@ -461,6 +459,9 @@ public class HwRequirementServiceImpl extends ServiceImpl<HwRequirementMapper, H
|
|
|
hwUserIdList= this.saveUser(hwUserExportList);
|
|
|
saveEnrollment(hwRequirement, hwEnrollmentExportList, hwUserIdList);
|
|
|
}
|
|
|
+ Map map=new HashMap();
|
|
|
+ map.put("message","导入"+(totalRows-7)+"条,成功报名"+(totalRows-7-enrollNum)+"条,"+enrollNum+"条已存在");
|
|
|
+ resultlist.add(map);
|
|
|
}
|
|
|
return resultlist;
|
|
|
}
|