|
@@ -75,12 +75,14 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
|
|
// 故从第二行开始遍历拿数据(如果有标题的话,则从第三行开始拿数据)
|
|
// 故从第二行开始遍历拿数据(如果有标题的话,则从第三行开始拿数据)
|
|
for (int j = 1; j < sheet.getLastRowNum() + 1; j++) {
|
|
for (int j = 1; j < sheet.getLastRowNum() + 1; j++) {
|
|
XSSFRow row = sheet.getRow(j);
|
|
XSSFRow row = sheet.getRow(j);
|
|
|
|
+ System.out.println("row====>"+row);
|
|
//新建零件
|
|
//新建零件
|
|
Part part = new Part();
|
|
Part part = new Part();
|
|
part.setMouldId(mould.getId());
|
|
part.setMouldId(mould.getId());
|
|
// 遍历所有的列,下面的10是excle表格里共有10列即对应了10个字段
|
|
// 遍历所有的列,下面的10是excle表格里共有10列即对应了10个字段
|
|
for (int y = 0; y < 2; y++) {
|
|
for (int y = 0; y < 2; y++) {
|
|
XSSFCell cell = row.getCell(y);
|
|
XSSFCell cell = row.getCell(y);
|
|
|
|
+ System.out.println("cell====>"+row);
|
|
cell.setCellType(Cell.CELL_TYPE_STRING);
|
|
cell.setCellType(Cell.CELL_TYPE_STRING);
|
|
//取出当前列的值
|
|
//取出当前列的值
|
|
String value = cell.getStringCellValue();
|
|
String value = cell.getStringCellValue();
|