14 changed files with 366 additions and 2 deletions
@ -0,0 +1,62 @@ |
|||
package com.zdxt.enforcementcode.controller.web.supervision.report; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.dashboard.DashboardEnterpriseCheckListBo; |
|||
import com.zdxt.enforcementcode.domain.vo.report.DashboardEnterpriseCheckListVo; |
|||
import com.zdxt.enforcementcode.service.IDashboardEnterpriseCheckService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 重点企业检测分析 |
|||
* |
|||
* @author zdxt |
|||
*/ |
|||
@Slf4j |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/web/supervision/report/keyEnterprises") |
|||
public class KeyEnterprisesController { |
|||
|
|||
private final IDashboardEnterpriseCheckService dashboardEnterpriseCheckService; |
|||
|
|||
/** |
|||
* 重点企业-分页列表查询 |
|||
*/ |
|||
@GetMapping("/list") |
|||
public TableDataInfo<DashboardEnterpriseCheckListVo> list(DashboardEnterpriseCheckListBo bo, PageQuery pageQuery) { |
|||
return dashboardEnterpriseCheckService.queryEnterpriseCheckPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 重点企业-导出Excel |
|||
*/ |
|||
@PostMapping("/export") |
|||
public void export(DashboardEnterpriseCheckListBo bo, HttpServletResponse response) { |
|||
try { |
|||
List<DashboardEnterpriseCheckListVo> list = dashboardEnterpriseCheckService.queryEnterpriseCheckList(bo); |
|||
ExcelUtil.exportExcel(list, "重点企业", DashboardEnterpriseCheckListVo.class, response); |
|||
} catch (Exception e) { |
|||
log.error("导出重点企业Excel异常", e); |
|||
response.reset(); |
|||
response.setContentType("application/json; charset=utf-8"); |
|||
try { |
|||
response.getWriter().write("{\"code\":500,\"msg\":\"导出失败: " + e.getMessage() + "\"}"); |
|||
} catch (Exception ignored) { |
|||
log.error("响应重置异常", ignored); |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.zdxt.enforcementcode.domain.bo.dashboard; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 大屏重点企业监测检查列表查询参数 |
|||
*/ |
|||
@Data |
|||
public class DashboardEnterpriseCheckListBo implements Serializable { |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 所属区 |
|||
*/ |
|||
private String districtName; |
|||
|
|||
/** |
|||
* 所属街道 |
|||
*/ |
|||
private String streetName; |
|||
|
|||
/** |
|||
* 统计年份 |
|||
*/ |
|||
private Integer statYear; |
|||
|
|||
/** |
|||
* 统计月份 |
|||
*/ |
|||
private Integer statMonth; |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.zdxt.enforcementcode.domain.vo.report; |
|||
|
|||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 大屏重点企业监测检查列表视图对象 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class DashboardEnterpriseCheckListVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 企业ID |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@ExcelProperty(value = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 所属区 |
|||
*/ |
|||
@ExcelProperty(value = "所属区") |
|||
private String districtName; |
|||
|
|||
/** |
|||
* 所属街道 |
|||
*/ |
|||
@ExcelProperty(value = "所属街道") |
|||
private String streetName; |
|||
|
|||
/** |
|||
* 行政执法总数 |
|||
*/ |
|||
@ExcelProperty(value = "行政执法总数") |
|||
private Long xzzfzs; |
|||
} |
|||
Loading…
Reference in new issue