|
@@ -16,6 +16,7 @@ import com.taobao.api.internal.util.StringUtils;
|
|
|
import org.apache.poi.EncryptedDocumentException;
|
|
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
+import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
@@ -190,7 +191,9 @@ public class ProjectPercentageServiceImpl extends ServiceImpl<ProjectPercentageM
|
|
|
msg.setError(MessageUtils.message("staff.nameNullByRow",rowIndex));
|
|
|
return msg;
|
|
|
}
|
|
|
- String username = row.getCell(0).getStringCellValue().trim();
|
|
|
+ Cell userNameCell = row.getCell(0);
|
|
|
+ if (userNameCell!=null)userNameCell.setCellType(CellType.STRING);
|
|
|
+ String username = userNameCell.getStringCellValue().trim();
|
|
|
if(!userNameList.contains(username)&&!StringUtils.isEmpty(username)){
|
|
|
userNameList.add(username);
|
|
|
}
|
|
@@ -252,7 +255,9 @@ public class ProjectPercentageServiceImpl extends ServiceImpl<ProjectPercentageM
|
|
|
msg.setError(MessageUtils.message("staff.nameNullByRow",dataCount));
|
|
|
return msg;
|
|
|
}
|
|
|
- String username = row.getCell(0).getStringCellValue().trim();
|
|
|
+ Cell userNameCell = row.getCell(0);
|
|
|
+ if (userNameCell!=null)userNameCell.setCellType(CellType.STRING);
|
|
|
+ String username = userNameCell.getStringCellValue().trim();
|
|
|
//检查人员是否存在
|
|
|
Optional<User> userOp;
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|