| | |
| | | // 创建项目详情 |
| | | EamMaintenanceStandardDetail detail = new EamMaintenanceStandardDetail(); |
| | | detail.setStandardId(standard.getId()); |
| | | detail.setItemCode(Integer.parseInt(getCellStringValue(row.getCell(0)))); |
| | | detail.setItemName(getCellStringValue(row.getCell(1))); |
| | | detail.setItemCategory(itemCategory); |
| | | |
| | |
| | | if (!items.isEmpty()) { |
| | | items.remove(0); |
| | | } |
| | | |
| | | // 2. 为缺失部位的数据填充前一条的保养部位 |
| | | String lastPart = ""; |
| | | int i =1; |
| | | for (EamMaintenanceStandardDetail item : items) { |
| | | item.setItemCode(i); |
| | | if (item.getItemPart() != null && !item.getItemPart().isEmpty()) { |
| | | lastPart = item.getItemPart(); |
| | | } else if (!lastPart.isEmpty()) { |
| | | item.setItemPart(lastPart); |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | } |