12 changed files with 451 additions and 199 deletions
@ -1,99 +0,0 @@ |
|||
package com.zdxt.enforcementcode.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseCheckVo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardEnterpriseCheckBo; |
|||
import com.zdxt.enforcementcode.service.IDashboardEnterpriseCheckService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 大屏重点企业监测检查(按月统计) |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-30 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/enforcementcode/enterpriseCheck") |
|||
public class DashboardEnterpriseCheckController extends BaseController { |
|||
|
|||
private final IDashboardEnterpriseCheckService dashboardEnterpriseCheckService; |
|||
|
|||
/** |
|||
* 查询大屏重点企业监测检查(按月统计)列表 |
|||
*/ |
|||
@GetMapping("/list") |
|||
public TableDataInfo<DashboardEnterpriseCheckVo> list(DashboardEnterpriseCheckBo bo, PageQuery pageQuery) { |
|||
return dashboardEnterpriseCheckService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出大屏重点企业监测检查(按月统计)列表 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测检查(按月统计)", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(DashboardEnterpriseCheckBo bo, HttpServletResponse response) { |
|||
List<DashboardEnterpriseCheckVo> list = dashboardEnterpriseCheckService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "大屏重点企业监测检查(按月统计)", DashboardEnterpriseCheckVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取大屏重点企业监测检查(按月统计)详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@GetMapping("/getInfo") |
|||
public R<DashboardEnterpriseCheckVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable Long id) { |
|||
return R.ok(dashboardEnterpriseCheckService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增大屏重点企业监测检查(按月统计) |
|||
*/ |
|||
@Log(title = "大屏重点企业监测检查(按月统计)", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody DashboardEnterpriseCheckBo bo) { |
|||
return toAjax(dashboardEnterpriseCheckService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改大屏重点企业监测检查(按月统计) |
|||
*/ |
|||
@Log(title = "大屏重点企业监测检查(按月统计)", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DashboardEnterpriseCheckBo bo) { |
|||
return toAjax(dashboardEnterpriseCheckService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除大屏重点企业监测检查(按月统计) |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测检查(按月统计)", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable Long[] ids) { |
|||
return toAjax(dashboardEnterpriseCheckService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
|||
@ -1,99 +0,0 @@ |
|||
package com.zdxt.enforcementcode.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseMonitorVo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardEnterpriseMonitorBo; |
|||
import com.zdxt.enforcementcode.service.IDashboardEnterpriseMonitorService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 大屏重点企业监测 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-30 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/enforcementcode/enterpriseMonitor") |
|||
public class DashboardEnterpriseMonitorController extends BaseController { |
|||
|
|||
private final IDashboardEnterpriseMonitorService dashboardEnterpriseMonitorService; |
|||
|
|||
/** |
|||
* 查询大屏重点企业监测列表 |
|||
*/ |
|||
@GetMapping("/list") |
|||
public TableDataInfo<DashboardEnterpriseMonitorVo> list(DashboardEnterpriseMonitorBo bo, PageQuery pageQuery) { |
|||
return dashboardEnterpriseMonitorService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出大屏重点企业监测列表 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(DashboardEnterpriseMonitorBo bo, HttpServletResponse response) { |
|||
List<DashboardEnterpriseMonitorVo> list = dashboardEnterpriseMonitorService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "大屏重点企业监测", DashboardEnterpriseMonitorVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取大屏重点企业监测详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@GetMapping("/getInfo") |
|||
public R<DashboardEnterpriseMonitorVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable Long id) { |
|||
return R.ok(dashboardEnterpriseMonitorService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增大屏重点企业监测 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody DashboardEnterpriseMonitorBo bo) { |
|||
return toAjax(dashboardEnterpriseMonitorService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改大屏重点企业监测 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DashboardEnterpriseMonitorBo bo) { |
|||
return toAjax(dashboardEnterpriseMonitorService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除大屏重点企业监测 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@Log(title = "大屏重点企业监测", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable Long[] ids) { |
|||
return toAjax(dashboardEnterpriseMonitorService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
|||
@ -0,0 +1,79 @@ |
|||
package com.zdxt.enforcementcode.controller.web.supervision; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardEnterpriseCheckQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardEnterpriseMonitorBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnforcementRegistrationInfoVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseCheckInfoVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseCheckVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseMonitorVo; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.EnforcementRegistrationListVo; |
|||
import com.zdxt.enforcementcode.service.IDashboardEnterpriseCheckService; |
|||
import com.zdxt.enforcementcode.service.IDashboardEnterpriseMonitorService; |
|||
import com.zdxt.enforcementcode.service.IEnforcementRegistrationService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 大屏-重点企业监测检查(按月统计) |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-30 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/web/dashboard/enterpriseCheck") |
|||
public class DashboardEnterpriseCheckController extends BaseController { |
|||
|
|||
private final IDashboardEnterpriseCheckService dashboardEnterpriseCheckService; |
|||
private final IDashboardEnterpriseMonitorService dashboardEnterpriseMonitorService; |
|||
private final IEnforcementRegistrationService enforcementRegistrationService; |
|||
/** |
|||
* 大屏-重点企业监测检查列表 |
|||
* 1、查询企业基础信息 |
|||
* 2、查询最近六个月的数据,不包含当月数据 |
|||
*/ |
|||
@GetMapping("/getEnterpriseCheckInfo") |
|||
public DashboardEnterpriseCheckInfoVo getEnterpriseCheckInfo(DashboardEnterpriseCheckQueryBo bo) { |
|||
DashboardEnterpriseCheckInfoVo result = new DashboardEnterpriseCheckInfoVo(); |
|||
|
|||
// 1. 查询企业基础信息
|
|||
if (StringUtils.isNotBlank(bo.getEnterpriseNumber())) { |
|||
DashboardEnterpriseMonitorBo monitorBo = new DashboardEnterpriseMonitorBo(); |
|||
monitorBo.setEnterpriseNumber(bo.getEnterpriseNumber()); |
|||
List<DashboardEnterpriseMonitorVo> monitorList = dashboardEnterpriseMonitorService.queryList(monitorBo); |
|||
if (CollUtil.isNotEmpty(monitorList)) { |
|||
result.setEnterpriseMonitorVo(monitorList.get(0)); |
|||
} |
|||
} |
|||
|
|||
// 2. 查询最近六个月的数据,不包含当月数据
|
|||
if (StringUtils.isNotBlank(bo.getEnterpriseNumber())) { |
|||
List<DashboardEnterpriseCheckVo> checkVoList = dashboardEnterpriseCheckService |
|||
.queryRecentSixMonths(bo.getEnterpriseNumber(), bo.getStatYear(), bo.getStatMonth()); |
|||
result.setCheckVoList(checkVoList); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* 大屏-重点企业监测检查详情 |
|||
* |
|||
*/ |
|||
@GetMapping("/getEnterpriseCheckDetail") |
|||
public TableDataInfo<DashboardEnforcementRegistrationInfoVo> getEnterpriseCheckDetail(DashboardEnterpriseCheckQueryBo bo, PageQuery pageQuery) { |
|||
return enforcementRegistrationService.getEnterpriseCheckDetail(bo,pageQuery); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 大屏重点企业监测检查(按月统计)业务对象 dashboard_enterprise_check |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-30 |
|||
*/ |
|||
@Data |
|||
public class DashboardEnterpriseCheckQueryBo implements Serializable { |
|||
|
|||
/** |
|||
* 统计年份 |
|||
*/ |
|||
|
|||
private Long statYear; |
|||
|
|||
/** |
|||
* 统计月份 |
|||
*/ |
|||
private Long statMonth; |
|||
|
|||
/** |
|||
* 企业ID |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
private String enterpriseNumber; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.zdxt.enforcementcode.domain.EnforcementRegistration; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import org.dromara.common.core.utils.DateUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.concurrent.TimeUnit; |
|||
|
|||
|
|||
/** |
|||
* 企业端-执法登记记录视图对象 enforcement_registration |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-04-17 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = EnforcementRegistration.class) |
|||
public class DashboardEnforcementRegistrationInfoVo implements Serializable { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法部门 |
|||
*/ |
|||
private String lawEnforcement; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
private String lawEnforcementItemText; |
|||
|
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
private String lawEnforcementId; |
|||
|
|||
/** |
|||
* 被执法企业ID |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 被执法企业 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 被执法企业税号 |
|||
*/ |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 执法人员姓名 |
|||
*/ |
|||
private String lawEnforcer; |
|||
|
|||
/** |
|||
* 执法人员ID |
|||
*/ |
|||
private String lawEnforcerId; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
private String lawEnforcerTel; |
|||
|
|||
/** |
|||
* 其他执法人员 |
|||
*/ |
|||
private String lawEnforcerTwo; |
|||
|
|||
/** |
|||
* 其他执法人员ID |
|||
*/ |
|||
private String lawEnforcerIdTwo; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
private String lawEnforcerTelTwo; |
|||
|
|||
/** |
|||
* 辅助人员姓名 |
|||
*/ |
|||
private String subsidiaryer; |
|||
|
|||
/** |
|||
* 辅助人员id |
|||
*/ |
|||
private String subsidiaryerId; |
|||
|
|||
/** |
|||
* 辅助人员联系方式 |
|||
*/ |
|||
private String subsidiaryerTel; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
private String lawEnforcementItem; |
|||
|
|||
/** |
|||
* 执法人员1展示文本(姓名+执法证号) |
|||
*/ |
|||
private String lawEnforcerDisplay; |
|||
|
|||
|
|||
public String getLawEnforcerDisplay() { |
|||
lawEnforcerDisplay = lawEnforcer; |
|||
if(StringUtils.isNotBlank(lawEnforcerTwo)){ |
|||
lawEnforcerDisplay += "、" + lawEnforcerTwo; |
|||
} |
|||
return lawEnforcerDisplay; |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.zdxt.enforcementcode.domain.bean.DashboardEnterpriseCheck; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 大屏重点企业监测检查(按月统计)视图对象 dashboard_enterprise_check |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-30 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = DashboardEnterpriseCheck.class) |
|||
public class DashboardEnterpriseCheckInfoVo implements Serializable { |
|||
|
|||
/** |
|||
* 企业基本信息 |
|||
*/ |
|||
DashboardEnterpriseMonitorVo enterpriseMonitorVo; |
|||
|
|||
|
|||
/** |
|||
* 最近6个月的统计数据,不含当月 |
|||
*/ |
|||
List<DashboardEnterpriseCheckVo> checkVoList; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.zdxt.enforcementcode.mapper.DashboardEnterpriseCheckMapper"> |
|||
|
|||
<!-- 查询指定企业最近六个月的监测检查数据(不包含当月,按年月升序) --> |
|||
<select id="selectRecentSixMonths" resultType="com.zdxt.enforcementcode.domain.vo.DashboardEnterpriseCheckVo"> |
|||
SELECT |
|||
a.* |
|||
FROM dashboard_enterprise_check a |
|||
WHERE a.enterprise_number = #{enterpriseNumber} |
|||
AND IFNULL(a.is_delete, '0') = '0' |
|||
AND (a.stat_year > #{startYear} OR (a.stat_year = #{startYear} AND a.stat_month >= #{startMonth})) |
|||
AND (a.stat_year < #{endYear} OR (a.stat_year = #{endYear} AND a.stat_month <= #{endMonth})) |
|||
ORDER BY |
|||
a.stat_year, |
|||
a.stat_month |
|||
</select> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue