|  |  |  | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  | import java.util.stream.Collectors; | 
|---|
|  |  |  | 
|---|
|  |  |  | .eq(Member::getStatus,Constants.ZERO) | 
|---|
|  |  |  | .eq(Member::getWorkStatus,Constants.ZERO) | 
|---|
|  |  |  | .eq(Member::getCanVisit,Constants.ONE) | 
|---|
|  |  |  | .eq(Member::getType,Constants.memberType.internal) | 
|---|
|  |  |  | .eq(Company::getType,Constants.ONE) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | List<MemberVO> memberVOList = new ArrayList<>(); | 
|---|
|  |  |  | if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | ExcelImporter ie = null; | 
|---|
|  |  |  | List<MemberImport> dataList =null; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | ie = new ExcelImporter(file,1,0); | 
|---|
|  |  |  | ie = new ExcelImporter(file,2,0); | 
|---|
|  |  |  | dataList = ie.getDataList(MemberImport.class,null); | 
|---|
|  |  |  | }  catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (!PhoneUtil.isPhone(model.getPhone())){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+(index+3)+"行手机号【"+model.getPhone()+"】格式不正确,请检查表格内容!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(model.getPhone().indexOf(".")>=Constants.ZERO){ | 
|---|
|  |  |  | model.setPhone( | 
|---|
|  |  |  | String.valueOf(new BigDecimal(model.getPhone()).intValue()) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(StringUtils.isNotBlank(model.getIdcardNo())){ | 
|---|
|  |  |  | if ( !isDebug && !IdcardUtil.isValidCard(model.getIdcardNo())){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+(index+3)+"行身份证号【"+model.getIdcardNo()+"】格式不正确,请检查表格内容!"); | 
|---|