| | |
| | | String message = importResult.getMessage(); |
| | | if (message.contains("以下设备编码未找到:")) { |
| | | // 提取未找到的设备编码 |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到:") + 9); |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到") + 9); |
| | | allNotFoundCodes.addAll(Arrays.asList(notFoundPart.split(", "))); |
| | | |
| | | // 修改为部分成功消息 |
| | |
| | | |
| | | // 如果有未找到的设备编码,添加到最终结果 |
| | | if (!allNotFoundCodes.isEmpty()) { |
| | | String notFoundMsg = "以下设备编码未找到:" + String.join(", ", allNotFoundCodes); |
| | | String notFoundMsg = "以下设备编码未找到" + String.join(", ", allNotFoundCodes); |
| | | if (successCount > 0) { |
| | | // 部分成功 |
| | | return Result.ok("部分导入成功,成功文件数:" + successCount + |
| | |
| | | String message = importResult.getMessage(); |
| | | if (message.contains("以下设备编码未找到:")) { |
| | | // 提取未找到的设备编码 |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到:") + 9); |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到") + 9); |
| | | allNotFoundCodes.addAll(Arrays.asList(notFoundPart.split(", "))); |
| | | |
| | | // 修改为部分成功消息 |
| | |
| | | |
| | | // 如果有未找到的设备编码,添加到最终结果 |
| | | if (!allNotFoundCodes.isEmpty()) { |
| | | String notFoundMsg = "以下设备编码未找到:" + String.join(", ", allNotFoundCodes); |
| | | String notFoundMsg = "以下设备编码未找到" + String.join(", ", allNotFoundCodes); |
| | | if (successCount > 0) { |
| | | // 部分成功 |
| | | return Result.ok("部分导入成功,成功文件数:" + successCount + |
| | |
| | | String message = importResult.getMessage(); |
| | | if (message.contains("以下设备编码未找到:")) { |
| | | // 提取未找到的设备编码 |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到:") + 9); |
| | | String notFoundPart = message.substring(message.indexOf("以下设备编码未找到") + 9); |
| | | return Result.error("升版导入失败:" + notFoundPart); |
| | | } |
| | | return importResult; |