1、调整导入失败,导出excel功能

2、调整规范
This commit is contained in:
2026-07-27 14:36:45 +08:00
parent f0b515c2e0
commit 4b6908d3bf
3 changed files with 47 additions and 11 deletions

View File

@@ -45,6 +45,7 @@ import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.common.excel.ImportFailureExcelUtil;
import org.springblade.system.excel.CargoTypeExcel;
import org.springblade.system.excel.CargoTypeExportExcel;
import org.springblade.system.excel.CargoTypeImportFailureExcel;
@@ -158,7 +159,7 @@ public class CargoTypeController extends BladeController {
List<CargoTypeExcel> data = ExcelUtil.read(file, CargoTypeExcel.class);
List<CargoTypeImportFailureExcel> failureList = cargoTypeService.importCargoType(data);
if (Func.isNotEmpty(failureList)) {
ExcelUtil.export(response, "货物类型导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CargoTypeImportFailureExcel.class);
ImportFailureExcelUtil.export(response, "货物类型导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CargoTypeExcel.class);
return null;
}
return R.success("导入数据成功");