|
@@ -551,7 +551,7 @@ public class AuthServiceImpl implements AuthService {
|
|
String extName = originalFilename.substring(index);
|
|
String extName = originalFilename.substring(index);
|
|
String filePath = "/mnt/newdatadrive/data/runtime/jar-instance/zplma/tempFile/";
|
|
String filePath = "/mnt/newdatadrive/data/runtime/jar-instance/zplma/tempFile/";
|
|
if ("dev".equals(active)) {
|
|
if ("dev".equals(active)) {
|
|
- filePath = "D:\\WorkSpace\\file\\tempImport\\";
|
|
|
|
|
|
+ filePath = "D:\\WorkSpace\\file\\tempImport\\";
|
|
}
|
|
}
|
|
filePath += randomStr + extName;
|
|
filePath += randomStr + extName;
|
|
try {
|
|
try {
|
|
@@ -606,8 +606,11 @@ public class AuthServiceImpl implements AuthService {
|
|
Cell cell = null;
|
|
Cell cell = null;
|
|
// 校验机构名称
|
|
// 校验机构名称
|
|
cell = authPartyRow.getCell(0);
|
|
cell = authPartyRow.getCell(0);
|
|
- cell.setCellType(CellType.STRING);
|
|
|
|
- String authParty = cell.getStringCellValue();
|
|
|
|
|
|
+ String authParty = null;
|
|
|
|
+ if(null != cell){
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
|
|
+ authParty = cell.getStringCellValue();
|
|
|
|
+ }
|
|
if (StringUtils.isBlank(authParty)) {
|
|
if (StringUtils.isBlank(authParty)) {
|
|
return ResponseJson.error("第" + i + 1 + "行机构名称不能为空");
|
|
return ResponseJson.error("第" + i + 1 + "行机构名称不能为空");
|
|
}
|
|
}
|
|
@@ -697,13 +700,19 @@ public class AuthServiceImpl implements AuthService {
|
|
}
|
|
}
|
|
// 认证编号
|
|
// 认证编号
|
|
cell = authPartyRow.getCell(5);
|
|
cell = authPartyRow.getCell(5);
|
|
- cell.setCellType(CellType.STRING);
|
|
|
|
- String authCode = cell.getStringCellValue();
|
|
|
|
|
|
+ String authCode = null;
|
|
|
|
+ if(null != cell){
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
|
|
+ authCode = cell.getStringCellValue();
|
|
|
|
+ }
|
|
// 认证日期
|
|
// 认证日期
|
|
Date authDate = null;
|
|
Date authDate = null;
|
|
cell = authPartyRow.getCell(6);
|
|
cell = authPartyRow.getCell(6);
|
|
- cell.setCellType(CellType.STRING);
|
|
|
|
- String authDateStr = cell.getStringCellValue();
|
|
|
|
|
|
+ String authDateStr= null;
|
|
|
|
+ if(null != cell){
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
|
|
+ authCode = cell.getStringCellValue();
|
|
|
|
+ }
|
|
if (StringUtils.isNotBlank(authDateStr)) {
|
|
if (StringUtils.isNotBlank(authDateStr)) {
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
|
|
authDate = format.parse(authDateStr);
|
|
authDate = format.parse(authDateStr);
|
|
@@ -723,8 +732,11 @@ public class AuthServiceImpl implements AuthService {
|
|
}
|
|
}
|
|
// 校验店铺备注
|
|
// 校验店铺备注
|
|
cell = authPartyRow.getCell(8);
|
|
cell = authPartyRow.getCell(8);
|
|
- cell.setCellType(CellType.STRING);
|
|
|
|
- String remarks = cell.getStringCellValue();
|
|
|
|
|
|
+ String remarks =null;
|
|
|
|
+ if(null != cell){
|
|
|
|
+ cell.setCellType(CellType.STRING);
|
|
|
|
+ remarks = cell.getStringCellValue();
|
|
|
|
+ }
|
|
Integer customFlag = 0;
|
|
Integer customFlag = 0;
|
|
if (StringUtils.isNotEmpty(remarks)) {
|
|
if (StringUtils.isNotEmpty(remarks)) {
|
|
customFlag = 1;
|
|
customFlag = 1;
|