/**
* 导出自由裁量库(左)列表
*/
@PreAuthorize("@ss.hasPermi('enforceLaw:basePunishType:export')")
@Log(title = "自由裁量库(左)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, LawBasePunishType lawBasePunishType)
{
List<LawBasePunishType> list = lawBasePunishTypeService.selectLawBasePunishTypeList(lawBasePunishType);
List<LawBasePunishType> resultList = new ArrayList<>(); // 创建用于存储查询结果的集合
for(LawBasePunishType item : list){
LawBasePunishType result = lawBasePunishTypeService.selectLawBasePunishTypeById(item.getId());
result.setLawBasePunishDataList(result.getLawBasePunishDataList()); // 设置查询到的子表数据到主表对象中
resultList.add(result); // 将查询结果添加到结果集合中
}
ExcelUtil<LawBasePunishType> util = new ExcelUtil<LawBasePunishType>(LawBasePunishType.class);
util.exportExcel(response, resultList, "自由裁量库(左)数据");
}
/** 自由裁量库种类(右)信息 */
@Excel(name = "子表数据")
private List<LawBasePunishData> lawBasePunishDataList;