|
|
@ -56,8 +56,21 @@ public class ContractualProductInfoController extends BaseController { |
|
|
|
@Log(title = "合同产品信息", businessType = BusinessType.EXPORT) |
|
|
|
@PostMapping("/export") |
|
|
|
public void export(ContractualProductInfoBo bo, HttpServletResponse response) { |
|
|
|
List<ContractualProductInfoVo> list = contractualProductInfoService.queryList(bo); |
|
|
|
ExcelUtil.exportExcel(list, "合同产品信息", ContractualProductInfoVo.class, response); |
|
|
|
// 设置响应头
|
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
response.setCharacterEncoding("utf-8"); |
|
|
|
String fileName = "合同产品信息_" + System.currentTimeMillis() + ".xlsx"; |
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName); |
|
|
|
PageQuery pageQuery = new PageQuery(); |
|
|
|
pageQuery.setPageNum(1); |
|
|
|
pageQuery.setPageSize(Integer.MAX_VALUE); |
|
|
|
// 获取数据
|
|
|
|
TableDataInfo<ContractualProductInfoVo> tableDataInfo = contractualProductInfoService.queryPageList(bo, pageQuery); |
|
|
|
List<ContractualProductInfoVo> list = tableDataInfo.getRows(); |
|
|
|
|
|
|
|
// 导出Excel
|
|
|
|
ExcelUtil.exportExcel(list, "合同产品信息", ContractualProductInfoVo.class, response); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -129,7 +142,7 @@ public class ContractualProductInfoController extends BaseController { |
|
|
|
/** |
|
|
|
* 获取产品统计数据 |
|
|
|
* |
|
|
|
* @param type 设备类型(终端、服务器、数据库) |
|
|
|
* @param bo 设备类型(终端、服务器、数据库) |
|
|
|
*/ |
|
|
|
@GetMapping("/getProductStatistics") |
|
|
|
public R<ProductStatisticsData> getProductStatistics(ContractualProductInfoBo bo) { |
|
|
|