|
@@ -37,6 +37,7 @@ import org.springframework.stereotype.Service;
|
|
import com.ruoyi.shipping.service.ITCntrnoService;
|
|
import com.ruoyi.shipping.service.ITCntrnoService;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import static com.ruoyi.common.utils.poi.Excel.filter;
|
|
import static com.ruoyi.common.utils.poi.Excel.filter;
|
|
@@ -411,7 +412,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
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){
|
|
if (cell == null){
|
|
continue;
|
|
continue;
|
|
@@ -518,12 +519,12 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
|
|
companyMsg.setfPactDealHorn(cell.getStringCellValue());
|
|
companyMsg.setfPactDealHorn(cell.getStringCellValue());
|
|
break;
|
|
break;
|
|
case "起租时间":
|
|
case "起租时间":
|
|
- cell.setCellType(CellType.STRING);
|
|
|
|
- if (StringUtils.isEmpty(cell.getStringCellValue())) {
|
|
|
|
|
|
+ cell.setCellType(CellType.NUMERIC);
|
|
|
|
+ if (ObjectUtils.isEmpty(cell.getDateCellValue())) {
|
|
/*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少起租时间");*/
|
|
/*return AjaxResult.error("Excel箱信息数据第" + line + "行数据缺少起租时间");*/
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- companyMsg.setOnHireStart(DateUtils.parseDate(cell.getStringCellValue()));
|
|
|
|
|
|
+ companyMsg.setOnHireStart(cell.getDateCellValue());
|
|
break;
|
|
break;
|
|
/*case "箱来源":
|
|
/*case "箱来源":
|
|
//设置单元格类型
|
|
//设置单元格类型
|