|
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.system.domain.UserInfo;
|
|
|
import com.ruoyi.system.domain.UserInfoOne;
|
|
|
import com.ruoyi.system.service.IUserInfoService;
|
|
@@ -105,6 +106,23 @@ public class UserInfoController extends BaseController {
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
//String operName = getUsername();
|
|
|
userInfoService.importUser(userList, jobStyle, focusCrowdStyle, detectionNumber, detectionScope, startTime, endTime, user);
|
|
|
+
|
|
|
+ if (userList == null) {
|
|
|
+ AjaxResult.error("表格格式错误,请按照表格模板格式上传人员名单");
|
|
|
+ }
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ for (UserInfo userInfo : userList) {
|
|
|
+ if (userInfo == null) {
|
|
|
+ AjaxResult.error("表格格式错误,请按照表格模板格式上传人员名单");
|
|
|
+ }
|
|
|
+ if (userInfo.getIdCard().length() != 18) {
|
|
|
+ sb.append(userInfo.getName()).append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(sb.toString())) {
|
|
|
+ AjaxResult.error("操作失败,以下人员身份证格式错误【" + sb.toString() + "】");
|
|
|
+ }
|
|
|
+
|
|
|
return AjaxResult.success("正在处理中,请稍后刷新页面");
|
|
|
}
|
|
|
|