|
@@ -821,7 +821,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
}
|
|
|
if(modelName.equals("inchargerId")){
|
|
|
- if(!org.springframework.util.StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
+ if(null != cell && !org.springframework.util.StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
String userName = cell.getStringCellValue();
|
|
|
Optional<User> first;
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
@@ -838,7 +838,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
}
|
|
|
}else if(modelName.equals("customSourceId")){
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
+ if(null != cell && !StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
Optional<SysDict> first = sysSources.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
product.setCustomSourceId(first.get().getId());
|
|
@@ -848,7 +848,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
}
|
|
|
}else if(modelName.equals("customerIndustryId")){
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
+ if(null != cell && !StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
Optional<SysDict> first = sysIndutryId.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
product.setCustomerIndustryId(first.get().getId());
|
|
@@ -858,7 +858,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
}
|
|
|
}else if(modelName.equals("customerLevelId")){
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
+ if(null != cell && !StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
Optional<SysDict> first = levels.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
product.setCustomerLevelId(first.get().getId());
|
|
@@ -868,13 +868,16 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
- String stringCellValue = cell.getStringCellValue();
|
|
|
- System.out.println(stringCellValue+"=============");
|
|
|
- if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
- Class<Custom> productClass = Custom.class;
|
|
|
- Method method = productClass.getMethod(setter,String.class);
|
|
|
- method.invoke(product,cell.getStringCellValue());
|
|
|
+ if(null != cell){
|
|
|
+ String stringCellValue = cell.getStringCellValue();
|
|
|
+ System.out.println(stringCellValue+"=============");
|
|
|
+ if(!StringUtils.isEmpty(cell.getStringCellValue())){
|
|
|
+ Class<Custom> productClass = Custom.class;
|
|
|
+ Method method = productClass.getMethod(setter,String.class);
|
|
|
+ method.invoke(product,cell.getStringCellValue());
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|