liujie
2025-11-05 31aef93abd0595cdcc210296a37a78f501e7d550
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/ImportExcelUtil.java
@@ -14,26 +14,5 @@
@Slf4j
public class ImportExcelUtil {
    /**
     * @param errorLines   错误行数
     * @param successLines 成功行数
     * @param errorMessage 错误信息
     * @return
     * @throws IOException
     */
    public static R<String> importReturnMsg(int errorLines, int successLines, List<String> errorMessage) throws IOException {
        if (errorLines == 0) {
            return R.ok("共" + successLines + "行数据全部导入成功!");
        } else {
            JSONObject result = new JSONObject(5);
            int totalCount = successLines + errorLines;
            result.put("totalCount", totalCount);
            result.put("errorCount", errorLines);
            result.put("errorMessage", errorMessage);
            result.put("successCount", successLines);
            result.put("msg", "总上传行数:" + totalCount + ",已导入行数:" + successLines + ",错误行数:" + errorLines);
            return R.ok(JSON.toJSONString(result));
        }
    }
}