|
@@ -329,13 +329,17 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
TCntrnoExcel companyMsg = new TCntrnoExcel();
|
|
TCntrnoExcel companyMsg = new TCntrnoExcel();
|
|
for (int a = 0; a < rows.getPhysicalNumberOfCells(); a++) {
|
|
for (int a = 0; a < rows.getPhysicalNumberOfCells(); a++) {
|
|
Cell cell = rows.getCell(a);
|
|
Cell cell = rows.getCell(a);
|
|
|
|
+ if (cell == null){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
String value = filter(sheet.getRow(0), CellReference.convertNumToColString(cell.getColumnIndex()));
|
|
String value = filter(sheet.getRow(0), CellReference.convertNumToColString(cell.getColumnIndex()));
|
|
switch (value) {
|
|
switch (value) {
|
|
case "箱号":
|
|
case "箱号":
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱号");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱号");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setfNo(cell.getStringCellValue());
|
|
companyMsg.setfNo(cell.getStringCellValue());
|
|
break;
|
|
break;
|
|
@@ -343,7 +347,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "箱类型");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "箱类型");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setTypeidName(cell.getStringCellValue());
|
|
companyMsg.setTypeidName(cell.getStringCellValue());
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
@@ -355,7 +360,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少最新地点");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少最新地点");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setAddressName((cell.getStringCellValue()));
|
|
companyMsg.setAddressName((cell.getStringCellValue()));
|
|
break;
|
|
break;
|
|
@@ -363,7 +369,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少货名");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少货名");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setOwnerName(cell.getStringCellValue());
|
|
companyMsg.setOwnerName(cell.getStringCellValue());
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
@@ -377,7 +384,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱状态");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱状态");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setCntrstatusName(cell.getStringCellValue());
|
|
companyMsg.setCntrstatusName(cell.getStringCellValue());
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
@@ -391,7 +399,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱型");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少箱型");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setUpdateEFName(cell.getStringCellValue());
|
|
companyMsg.setUpdateEFName(cell.getStringCellValue());
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
@@ -405,7 +414,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
//设置单元格类型
|
|
//设置单元格类型
|
|
cell.setCellType(CellType.STRING);
|
|
cell.setCellType(CellType.STRING);
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
- return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少地点类型");
|
|
|
|
|
|
+ /*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少地点类型");*/
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
companyMsg.setAddressType(cell.getStringCellValue());
|
|
companyMsg.setAddressType(cell.getStringCellValue());
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|
|
if (StringUtils.isNotEmpty(cell.getStringCellValue())) {
|