Browse Source

监督端-领域执法人员接口,执法反馈接口

dev-V1.10.0^2
niujiyi 47 minutes ago
parent
commit
04021c8867
  1. 51
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/LawEnfOfficerController.java
  2. 106
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/LawFeedbackController.java
  3. 5
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java
  4. 121
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/LawFeedbackBo.java
  5. 4
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/LawEnfOfficerVo.java
  6. 112
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/LawFeedbackVo.java
  7. 13
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/ScanDataSituationVo.java
  8. 9
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/LawEnfOfficerMapper.java
  9. 24
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/LawFeedbackMapper.java
  10. 13
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/ILawEnfOfficerService.java
  11. 37
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/ILawFeedbackService.java
  12. 19
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/LawEnfOfficerSericeImpl.java
  13. 70
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/LawFeedbackSericeImpl.java
  14. 113
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/LawEnfOfficerMapper.xml
  15. 132
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/LawFeedbackMapper.xml
  16. 100
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/ScanDataSituationMapper.xml

51
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/LawEnfOfficerController.java

@ -1,9 +1,6 @@
package com.zdxt.enforcementcode.controller.web.supervision.report; package com.zdxt.enforcementcode.controller.web.supervision.report;
import cn.dev33.satoken.annotation.SaIgnore;
import com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo; import com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo;
import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo;
import com.zdxt.enforcementcode.domain.vo.LawEnfOfficerVo; import com.zdxt.enforcementcode.domain.vo.LawEnfOfficerVo;
import com.zdxt.enforcementcode.report.ILawEnfOfficerService; import com.zdxt.enforcementcode.report.ILawEnfOfficerService;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
@ -73,4 +70,52 @@ public class LawEnfOfficerController {
} }
} }
} }
/**
* 领域执法人员执法次数
* @param bo
* @param pageQuery
* @return
*/
@GetMapping("/listDomain")
public TableDataInfo<LawEnfOfficerVo> listDomain(EnforcementRegistrationBo bo, PageQuery pageQuery) {
return lawEnfOfficerService.selectDomainLawEnfOfficerPageList(pageQuery,bo);
}
/**
* 领域执法人员-查询详情
* @param bo
* @param pageQuery
* @return
*/
@GetMapping("/detatilsDomain")
public TableDataInfo<LawEnfOfficerVo> detatilsDomain(EnforcementRegistrationBo bo, PageQuery pageQuery){
TableDataInfo<LawEnfOfficerVo> list=lawEnfOfficerService.selectDomainLawEnfOfficerDetailsPageList(pageQuery,bo);
return list;
}
/**
* 领域执法人员-导出Excel
*/
@PostMapping("/exportDomain")
public void exportDomain(EnforcementRegistrationBo bo, HttpServletResponse response) {
try {
List<LawEnfOfficerVo> list = lawEnfOfficerService.selectDomainLawEnfOfficerList(bo);
ExcelUtil.exportExcel(list, "执法人员", LawEnfOfficerVo.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);
}
}
}
} }

106
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/LawFeedbackController.java

@ -0,0 +1,106 @@
package com.zdxt.enforcementcode.controller.web.supervision.report;
import com.zdxt.enforcementcode.domain.bo.LawFeedbackBo;
import com.zdxt.enforcementcode.domain.vo.EnterpriseEvaluateVo;
import com.zdxt.enforcementcode.domain.vo.LawFeedbackVo;
import com.zdxt.enforcementcode.report.ILawFeedbackService;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.domain.R;
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.*;
import java.util.List;
/**
*执法反馈
*
* @author Lion Li
* @date 2023-05-07
*/
@Slf4j
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/web/supervision/report/LawFeedback")
public class LawFeedbackController {
private final ILawFeedbackService lawFeedbackService;
/**
* 执法反馈-分页列表查询
*/
@GetMapping("/list")
public TableDataInfo<LawFeedbackVo> list(LawFeedbackBo bo, PageQuery pageQuery) {
return lawFeedbackService.selectLawFeedbackPageList(pageQuery,bo);
}
/**
* 执法反馈-查询详情
* @param bo
* @param
* @return
*/
@GetMapping("/details")
public R<EnterpriseEvaluateVo> detatils(LawFeedbackBo bo){
EnterpriseEvaluateVo vo=lawFeedbackService.selectLawFeedbackDetailsPageList(bo);
return R.ok(vo);
}
/**
* 执法反馈-导出Excel
*/
@PostMapping("/export")
public void export(LawFeedbackBo bo, HttpServletResponse response) {
try {
List<LawFeedbackVo> list = lawFeedbackService.selectLawFeedbackList(bo);
ExcelUtil.exportExcel(list, "行政执法反馈", LawFeedbackVo.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);
}
}
}
/**
* 执法反馈-分页列表查询
*/
@GetMapping("/nonList")
public TableDataInfo<LawFeedbackVo> nonList(LawFeedbackBo bo, PageQuery pageQuery) {
return lawFeedbackService.selectNonLawFeedbackPageList(pageQuery,bo);
}
/**
* 执法反馈-导出Excel
*/
@PostMapping("/nonExport")
public void nonExport(LawFeedbackBo bo, HttpServletResponse response) {
try {
List<LawFeedbackVo> list = lawFeedbackService.selectNonLawFeedbackList(bo);
ExcelUtil.exportExcel(list, "非行政执法反馈", LawFeedbackVo.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);
}
}
}
}

5
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java

@ -413,4 +413,9 @@ public class EnforcementRegistrationBo extends BaseEntity {
*/ */
private String numMax; private String numMax;
/**
* 领域名称
*/
private String domainName;
} }

121
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/LawFeedbackBo.java

@ -0,0 +1,121 @@
package com.zdxt.enforcementcode.domain.bo;
import lombok.Data;
import java.util.Date;
/**
* 执法反馈VO
*
* @author Lion Li
* @date 2023-05-07
*/
@Data
public class LawFeedbackBo {
/**
* 主键
*/
private String id;
/**
* 编码
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 部门id
*/
private String bureauDeptId;
/**
* 部门名称
*/
private String bureauDeptName;
/**
* 执法人员
*/
private String lawEnforcer;
/**
* 执法人员id
*/
private String lawEnforcerId;
/**
* 执法人员2
*/
private String lawEnforcerTwo;
/**
* 执法人员2id
*/
private String lawEnforcerIdTwo;
/**
* 执法时间
*/
private Date lawEnforcementTime;
/**
* 企业编码
*/
private String enterpriseNumber;
/**
* 企业名称
*/
private String enterpriseName;
/**
* 执法项目
*/
private String lawEnforcementItemText;
/**
* 是否评价
*/
private int hasEvaluate;
/**
* 创建时间
*/
private Date createTime;
/**
* 其他执法人员id
*/
private String lawEnforcerIdOther;
/**
* 其他执法人员
*/
private String lawEnforcerOther;
/**
* 执法开始时间
*/
private Date lawBeginTime;
/**
* 执法结束时间
*/
private Date lawEndTime;
/**
* 反馈开始时间
*/
private Date feedbackBeginTime;
/**
* 反馈结束时间
*/
private Date feedbackEndTime;
}

4
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/LawEnfOfficerVo.java

@ -95,6 +95,10 @@ public class LawEnfOfficerVo implements Serializable {
*/ */
private String lawEnforcerIdTwo; private String lawEnforcerIdTwo;
/**
* 领域名称
*/
private String domainName;
} }

112
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/LawFeedbackVo.java

@ -0,0 +1,112 @@
package com.zdxt.enforcementcode.domain.vo;
import cn.idev.excel.annotation.ExcelProperty;
import lombok.Data;
import java.util.Date;
/**
* 执法反馈VO
*
* @author Lion Li
* @date 2023-05-07
*/
@Data
public class LawFeedbackVo {
/**
* 主键
*/
private String id;
/**
* 编码
*/
private String code;
/**
* 名称
*/
@ExcelProperty(value = "区名称")
private String name;
/**
* 部门id
*/
private String bureauDeptId;
/**
* 部门名称
*/
@ExcelProperty(value = "部门名称")
private String bureauDeptName;
/**
* 执法人员
*/
@ExcelProperty(value = "行政执法人员")
private String lawEnforcer;
/**
* 执法人员id
*/
private String lawEnforcerId;
/**
* 执法人员2
*/
@ExcelProperty(value = "行政其他执法人员")
private String lawEnforcerTwo;
/**
* 执法人员2id
*/
private String lawEnforcerIdTwo;
/**
* 执法时间
*/
@ExcelProperty(value = "执法时间")
private Date enforcementTime;
/**
* 企业编码
*/
@ExcelProperty(value = "统一社会信用代码")
private String enterpriseNumber;
/**
* 企业名称
*/
@ExcelProperty(value = "企业名称")
private String enterpriseName;
/**
* 执法项目
*/
@ExcelProperty(value = "执法事项")
private String lawEnforcementItemText;
/**
* 是否评价
*/
private int hasEvaluate;
/**
* 创建时间
*/
@ExcelProperty(value = "反馈时间")
private Date createTime;
/**
* 其他执法人员id
*/
private String lawEnforcerIdOther;
/**
* 其他执法人员
*/
@ExcelProperty(value = "非行政其他执法人员")
private String lawEnforcerOther;
}

13
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/ScanDataSituationVo.java

@ -28,7 +28,7 @@ public class ScanDataSituationVo {
/** /**
* 领域名称 * 领域名称
*/ */
@ExcelProperty(value = "所属领域")
private String domainName; private String domainName;
/** /**
@ -88,4 +88,15 @@ public class ScanDataSituationVo {
*/ */
private Long totalCount; private Long totalCount;
/**
* 执法部门id
*/
private String deptId;
/**
* 执法部门名称
*/
@ExcelProperty(value = "所属领域")
private String deptName;
} }

9
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/LawEnfOfficerMapper.java

@ -19,4 +19,13 @@ public interface LawEnfOfficerMapper {
Page<LawEnfOfficerVo> selectLawEnfOfficerDetailsPageList(@Param("page") Page<EnforcementRegistrationVo> page, Page<LawEnfOfficerVo> selectLawEnfOfficerDetailsPageList(@Param("page") Page<EnforcementRegistrationVo> page,
@Param("bo") EnforcementRegistrationBo bo); @Param("bo") EnforcementRegistrationBo bo);
Page<LawEnfOfficerVo> selectDomainLawEnfOfficerPageList(@Param("page") Page<EnforcementRegistrationVo> page,
@Param("bo") EnforcementRegistrationBo bo);
List<LawEnfOfficerVo> selectDomainLawEnfOfficerList(@Param("bo") EnforcementRegistrationBo bo);
Page<LawEnfOfficerVo> selectDomainLawEnfOfficerDetailsPageList(@Param("page") Page<EnforcementRegistrationVo> page,
@Param("bo") EnforcementRegistrationBo bo);
} }

24
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/LawFeedbackMapper.java

@ -0,0 +1,24 @@
package com.zdxt.enforcementcode.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zdxt.enforcementcode.domain.bo.LawFeedbackBo;
import com.zdxt.enforcementcode.domain.vo.LawFeedbackVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface LawFeedbackMapper {
Page<LawFeedbackVo> selectLawFeedbackPageList(@Param("page") Page<LawFeedbackVo> page,
@Param("bo") LawFeedbackBo bo);
List<LawFeedbackVo> selectLawFeedbackList(@Param("bo") LawFeedbackBo bo);
Page<LawFeedbackVo> selectNonLawFeedbackPageList(@Param("page") Page<LawFeedbackVo> page,
@Param("bo") LawFeedbackBo bo);
List<LawFeedbackVo> selectNonLawFeedbackList(@Param("bo") LawFeedbackBo bo);
}

13
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/ILawEnfOfficerService.java

@ -16,4 +16,17 @@ public interface ILawEnfOfficerService {
List<LawEnfOfficerVo> selectLawEnfOfficerList(EnforcementRegistrationBo bo); List<LawEnfOfficerVo> selectLawEnfOfficerList(EnforcementRegistrationBo bo);
TableDataInfo<LawEnfOfficerVo> selectLawEnfOfficerDetailsPageList(PageQuery pageQuery,EnforcementRegistrationBo bo); TableDataInfo<LawEnfOfficerVo> selectLawEnfOfficerDetailsPageList(PageQuery pageQuery,EnforcementRegistrationBo bo);
/**
* 领域查询执法人员
* @param pageQuery
* @param bo
* @return
*/
TableDataInfo<LawEnfOfficerVo> selectDomainLawEnfOfficerPageList(PageQuery pageQuery, EnforcementRegistrationBo bo);
List<LawEnfOfficerVo> selectDomainLawEnfOfficerList(EnforcementRegistrationBo bo);
TableDataInfo<LawEnfOfficerVo> selectDomainLawEnfOfficerDetailsPageList(PageQuery pageQuery,EnforcementRegistrationBo bo);
} }

37
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/ILawFeedbackService.java

@ -0,0 +1,37 @@
package com.zdxt.enforcementcode.report;
import com.zdxt.enforcementcode.domain.bo.LawFeedbackBo;
import com.zdxt.enforcementcode.domain.vo.EnterpriseEvaluateVo;
import com.zdxt.enforcementcode.domain.vo.LawFeedbackVo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import java.util.List;
public interface ILawFeedbackService {
/**
* 行政执法反馈
* @param pageQuery
* @param bo
* @return
*/
TableDataInfo<LawFeedbackVo> selectLawFeedbackPageList(PageQuery pageQuery, LawFeedbackBo bo);
List<LawFeedbackVo> selectLawFeedbackList(LawFeedbackBo bo);
EnterpriseEvaluateVo selectLawFeedbackDetailsPageList(LawFeedbackBo bo);
/**
* 非行政执法反馈
* @param pageQuery
* @param bo
* @return
*/
TableDataInfo<LawFeedbackVo> selectNonLawFeedbackPageList(PageQuery pageQuery, LawFeedbackBo bo);
List<LawFeedbackVo> selectNonLawFeedbackList(LawFeedbackBo bo);
}

19
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/LawEnfOfficerSericeImpl.java

@ -51,6 +51,22 @@ public class LawEnfOfficerSericeImpl implements ILawEnfOfficerService {
return TableDataInfo.build(list); return TableDataInfo.build(list);
} }
@Override
public TableDataInfo<LawEnfOfficerVo> selectDomainLawEnfOfficerPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) {
Page<LawEnfOfficerVo> list=lawEnfOfficerMapper.selectDomainLawEnfOfficerPageList(buildPage(pageQuery),bo);
return TableDataInfo.build(list);
}
@Override
public List<LawEnfOfficerVo> selectDomainLawEnfOfficerList(EnforcementRegistrationBo bo) {
return lawEnfOfficerMapper.selectDomainLawEnfOfficerList(bo);
}
@Override
public TableDataInfo<LawEnfOfficerVo> selectDomainLawEnfOfficerDetailsPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) {
Page<LawEnfOfficerVo> list=lawEnfOfficerMapper.selectDomainLawEnfOfficerDetailsPageList(buildPage(pageQuery),bo);
return TableDataInfo.build(list);
}
/** /**
@ -70,4 +86,7 @@ public class LawEnfOfficerSericeImpl implements ILawEnfOfficerService {
String entrustFilter = DataFilterUtil.buildFilterSql(tableAlias, "entrust_dept_id", true, true); String entrustFilter = DataFilterUtil.buildFilterSql(tableAlias, "entrust_dept_id", true, true);
return "AND (" + bureauFilter + " OR " + entrustFilter + ")"; return "AND (" + bureauFilter + " OR " + entrustFilter + ")";
} }
} }

70
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/LawFeedbackSericeImpl.java

@ -0,0 +1,70 @@
package com.zdxt.enforcementcode.report.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zdxt.enforcementcode.domain.EnterpriseEvaluate;
import com.zdxt.enforcementcode.domain.bo.LawFeedbackBo;
import com.zdxt.enforcementcode.domain.vo.EnterpriseEvaluateVo;
import com.zdxt.enforcementcode.domain.vo.LawFeedbackVo;
import com.zdxt.enforcementcode.mapper.EnterpriseEvaluateMapper;
import com.zdxt.enforcementcode.mapper.LawFeedbackMapper;
import com.zdxt.enforcementcode.report.ILawFeedbackService;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@RequiredArgsConstructor
public class LawFeedbackSericeImpl implements ILawFeedbackService {
private final LawFeedbackMapper lawFeedbackMapper;
private final EnterpriseEvaluateMapper enterpriseEvaluateMapper;
/**
* 构建分页对象:排序统一由 XML 中的 orderByColumn 白名单控制。
* 清空 MyBatis-Plus 的 OrderItem,避免 PageQuery 把驼峰列名转成下划线列名后,
* 在 SQL 里再追加一个排序字段(如 order by xzzf_count asc, xzzfCount asc)。
*/
private <T> Page<T> buildPage(PageQuery pageQuery) {
Page<T> page = pageQuery.build();
// 排序只由 XML 中的 orderByColumn 白名单决定,清空 MP 的 OrderItem
page.setOrders(new ArrayList<>());
return page;
}
@Override
public TableDataInfo<LawFeedbackVo> selectLawFeedbackPageList(PageQuery pageQuery, LawFeedbackBo bo) {
Page<LawFeedbackVo> list=lawFeedbackMapper.selectLawFeedbackPageList(buildPage(pageQuery),bo);
return TableDataInfo.build(list);
}
@Override
public List<LawFeedbackVo> selectLawFeedbackList(LawFeedbackBo bo) {
return lawFeedbackMapper.selectLawFeedbackList(bo);
}
@Override
public EnterpriseEvaluateVo selectLawFeedbackDetailsPageList(LawFeedbackBo bo) {
LambdaQueryWrapper<EnterpriseEvaluate> lqw = new LambdaQueryWrapper<>();
lqw.eq(EnterpriseEvaluate::getEnforcementId,bo.getId());
EnterpriseEvaluateVo vo=enterpriseEvaluateMapper.selectVoOne(lqw);
return vo;
}
@Override
public TableDataInfo<LawFeedbackVo> selectNonLawFeedbackPageList(PageQuery pageQuery, LawFeedbackBo bo) {
Page<LawFeedbackVo> list=lawFeedbackMapper.selectNonLawFeedbackPageList(buildPage(pageQuery),bo);
return TableDataInfo.build(list);
}
@Override
public List<LawFeedbackVo> selectNonLawFeedbackList(LawFeedbackBo bo) {
return lawFeedbackMapper.selectNonLawFeedbackList(bo);
}
}

113
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/LawEnfOfficerMapper.xml

@ -118,4 +118,117 @@
and t1.enterprise_number is not null and t1.enterprise_number is not null
order by t1.enforcement_time desc order by t1.enforcement_time desc
</select> </select>
<select id="selectDomainLawEnfOfficerPageList" resultType="com.zdxt.enforcementcode.domain.vo.LawEnfOfficerVo">
<include refid="selectDomainLawEnfOfficerSql"/>
</select>
<select id="selectDomainLawEnfOfficerList" resultType="com.zdxt.enforcementcode.domain.vo.LawEnfOfficerVo">
<include refid="selectDomainLawEnfOfficerSql"/>
</select>
<sql id="selectDomainLawEnfOfficerSql">
select
t1.lawEnforcerId,
t1.lawEnforcer,
t1.bureauDeptId,
t1.bureauDeptName,
t1.zfcs,
t4.dept_name as domainName
from
(
select
law_enforcer_id as lawEnforcerId,
law_enforcer as lawEnforcer,
bureau_dept_id as bureauDeptId,
bureau_dept_name as bureauDeptName,
count(1) as zfcs
from
enforcement_registration t1
<where>
t1.is_submit = 1
and t1.is_delete = 0
and t1.enterprise_name is not null
and t1.enterprise_number is not null
<if test="bo.lawEnforcer !=null and bo.lawEnforcer !=''">
and t1.law_enforcer LIKE CONCAT('%', #{bo.lawEnforcer}, '%')
</if>
<if test="bo.enforcementTime!=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{bo.enforcementTime},'%Y-%m')
</if>
<if test="bo.beginTime !=null and bo.beginTime !=''">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{bo.beginTime},'%Y-%m-%d')
</if>
<if test="bo.endTime !=null and bo.endTime !=''">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%Y-%m-%d')
</if>
</where>
group by
lawEnforcerId,
lawEnforcer,
bureauDeptId,
bureauDeptName) t1
inner join sys_user t2 on
t1.lawEnforcerId = t2.user_id
inner join sys_dept t3 on
t2.dept_id = t3.dept_id
inner join dashboard_domain_dept t4 on
t3.dept_id = t4.dept_id
<where>
<if test="bo.domainName!=null and bo.domainName !=''">
and t4.dept_name like CONCAT('%', #{bo.domainName}, '%')
</if>
<if test="bo.bureauDeptName!=null and bo.bureauDeptName !=''">
and t1.bureauDeptName like CONCAT('%', #{bo.bureauDeptName}, '%')
</if>
</where>
<!-- 默认按执法次数(zfcs)倒序;传 isAsc=asc 时改为升序 -->
order by zfcs
<choose>
<when test="bo.isAsc == 'asc'">asc</when>
<otherwise>desc</otherwise>
</choose>
</sql>
<select id="selectDomainLawEnfOfficerDetailsPageList" resultType="com.zdxt.enforcementcode.domain.vo.LawEnfOfficerVo">
select
t1.bureau_dept_id as bureauDeptId,
t1.bureau_dept_name as bureauDeptName,
t1.law_enforcer_id as lawEnforcerId,
t1.law_enforcer as lawEnforcer,
t1.law_enforcer_id_two as lawEnforcerIdTwo,
t1.law_enforcer_two as lawEnforcerTwo,
t1.enforcement_time as enforcementTime,
t1.enterprise_number as enterpriseNumber,
t1.enterprise_name as enterpriseName,
t1.law_enforcement_item_text as lawEnforcementItemText
from enforcement_registration t1
inner join sys_user t2 on
t1.law_enforcer_id = t2.user_id
inner join sys_dept t3 on
t2.dept_id = t3.dept_id
inner join dashboard_domain_dept t4 on
t3.dept_id = t4.dept_id
<where>
<if test="bo.lawEnforcerId !=null and bo.lawEnforcerId!=''">
and t1.law_enforcer_id=#{bo.lawEnforcerId}
</if>
<if test="bo.domainName!=null and bo.domainName !=''">
and t4.dept_name like CONCAT('%', #{bo.domainName}, '%')
</if>
<if test="bo.enforcementTime!=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{bo.enforcementTime},'%Y-%m')
</if>
<if test="bo.beginTime !=null and bo.beginTime !=''">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{bo.beginTime},'%Y-%m-%d')
</if>
<if test="bo.endTime !=null and bo.endTime !=''">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%Y-%m-%d')
</if>
</where>
and t1.is_submit =1
and t1.is_delete = 0
and t1.enterprise_name is not null
and t1.enterprise_number is not null
order by t1.enforcement_time desc
</select>
</mapper> </mapper>

132
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/LawFeedbackMapper.xml

@ -0,0 +1,132 @@
<?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.LawFeedbackMapper">
<!-- 行政执法反馈 -->
<sql id="selectLawFeedbackSql">
select
t1.id as id,
t3.code as code,
t3.name as name,
t1.bureau_dept_id as bureau_dept_id,
t1.bureau_dept_name as bureau_dept_name,
t1.law_enforcer as lawEnforcer,
t1.law_enforcer_id as lawEnforcerId,
t1.law_enforcer_two as lawEnforcerTwo,
t1.law_enforcer_id_two as lawEnforcerIdTwo,
t1.enforcement_time as enforcementTime,
t1.enterprise_number as enterpriseNumber,
t1.enterprise_name as enterpriseName,
t1.law_enforcement_item_text as lawEnforcementItemText,
t1.has_evaluate as hasEvaluate,
t4.create_time as createTime
from enforcement_registration t1
inner join sys_dept t2 on t1.bureau_dept_id =t2.dept_id
inner join dashboard_area_info t3 on t2.area_node =t3.code and t3.`level` =3
inner join enterprise_evaluate t4 on t1.id =t4.enforcement_id
<where>
t1.has_evaluate =1
<if test="bo.code !=null and bo.code !=''">
and t3.code=#{bo.code}
</if>
<if test="bo.lawEnforcer !=null and bo.lawEnforcer!=''">
and (t1.law_enforcer like CONCAT('%',#{bo.lawEnforcer},'%') or t1.law_enforcer_two like CONCAT('%',#{bo.lawEnforcer},'%'))
</if>
<if test="bo.enterpriseName !=null and bo.enterpriseName !=''">
and t1.enterprise_name like CONCAT('%',#{bo.enterpriseName},'%')
</if>
<if test="bo.bureauDeptName !=null and bo.bureauDeptName !=''">
and t1.bureau_dept_name like CONCAT('%',#{bo.bureauDeptName},'%')
</if>
<if test="bo.lawEnforcementItemText !=null and bo.lawEnforcementItemText !=''">
and t1.law_enforcement_item_text like CONCAT('%',#{bo.lawEnforcementItemText},'%')
</if>
<if test="bo.lawBeginTime !=null">
and t1.enforcement_time &gt;= #{bo.lawBeginTime}
</if>
<if test="bo.lawEndTime !=null">
and t1.enforcement_time &lt;= #{bo.lawEndTime}
</if>
<if test="bo.feedbackBeginTime !=null">
and t4.create_time &gt;= #{bo.feedbackBeginTime}
</if>
<if test="bo.feedbackEndTime !=null">
and t4.create_time &lt;= #{bo.feedbackEndTime}
</if>
</where>
order by t1.enforcement_time desc
</sql>
<select id="selectLawFeedbackPageList" resultType="com.zdxt.enforcementcode.domain.vo.LawFeedbackVo">
<include refid="selectLawFeedbackSql"/>
</select>
<select id="selectLawFeedbackList" resultType="com.zdxt.enforcementcode.domain.vo.LawFeedbackVo">
<include refid="selectLawFeedbackSql"/>
</select>
<!-- 非行政执法反馈 -->
<sql id="selectNonLawFeedbackSql">
select
t1.id as id,
t3.code as code,
t3.name as name,
t1.bureau_dept_id as bureau_dept_id,
t1.bureau_dept_name as bureau_dept_name,
t1.law_enforcer as lawEnforcer,
t1.law_enforcer_id as lawEnforcerId,
t1.law_enforcer_other as lawEnforcerOther,
t1.law_enforcer_id_other as lawEnforcerIdOther,
t1.enforcement_time as enforcementTime,
t1.enterprise_number as enterpriseNumber,
t1.enterprise_name as enterpriseName,
t1.law_enforcement_item_text as lawEnforcementItemText,
t1.has_evaluate as hasEvaluate,
t4.create_time as createTime
from non_enforcement_registration t1
inner join sys_dept t2 on t1.bureau_dept_id =t2.dept_id
inner join dashboard_area_info t3 on t2.area_node =t3.code and t3.`level` =3
inner join enterprise_evaluate t4 on t1.id =t4.enforcement_id
<where>
t1.has_evaluate =1
<if test="bo.code !=null and bo.code !=''">
and t3.code=#{bo.code}
</if>
<if test="bo.lawEnforcer !=null and bo.lawEnforcer!=''">
and (t1.law_enforcer like CONCAT('%',#{bo.lawEnforcer},'%') or t1.law_enforcer_other like CONCAT('%',#{bo.lawEnforcer},'%'))
</if>
<if test="bo.enterpriseName !=null and bo.enterpriseName !=''">
and t1.enterprise_name like CONCAT('%',#{bo.enterpriseName},'%')
</if>
<if test="bo.bureauDeptName !=null and bo.bureauDeptName !=''">
and t1.bureau_dept_name like CONCAT('%',#{bo.bureauDeptName},'%')
</if>
<if test="bo.lawEnforcementItemText !=null and bo.lawEnforcementItemText !=''">
and t1.law_enforcement_item_text like CONCAT('%',#{bo.lawEnforcementItemText},'%')
</if>
<if test="bo.lawBeginTime !=null">
and t1.enforcement_time &gt;= #{bo.lawBeginTime}
</if>
<if test="bo.lawEndTime !=null">
and t1.enforcement_time &lt;= #{bo.lawEndTime}
</if>
<if test="bo.feedbackBeginTime !=null">
and t4.create_time &gt;= #{bo.feedbackBeginTime}
</if>
<if test="bo.feedbackEndTime !=null">
and t4.create_time &lt;= #{bo.feedbackEndTime}
</if>
</where>
order by t1.enforcement_time desc
</sql>
<select id="selectNonLawFeedbackPageList" resultType="com.zdxt.enforcementcode.domain.vo.LawFeedbackVo">
<include refid="selectNonLawFeedbackSql"/>
</select>
<select id="selectNonLawFeedbackList" resultType="com.zdxt.enforcementcode.domain.vo.LawFeedbackVo">
<include refid="selectNonLawFeedbackSql"/>
</select>
</mapper>

100
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/ScanDataSituationMapper.xml

@ -391,52 +391,36 @@
<select id="selectScanDataSituationDomainDetailsPageList" resultType="com.zdxt.enforcementcode.domain.vo.ScanDataSituationVo"> <select id="selectScanDataSituationDomainDetailsPageList" resultType="com.zdxt.enforcementcode.domain.vo.ScanDataSituationVo">
select select
domain_id as domainId, domain_id as domainId,
domain_name as domainName, domain_name as domainName,
district_code as districtCode, dept_id as deptId,
district_name as districtName, dept_name as deptName,
xzzf_count as xzzfCount, xzzf_count as xzzfCount,
rank () over (order by xzzf_count desc ) as xzzfslpm, rank() over (order by xzzf_count desc ) as xzzfslpm,
ROUND(xzzf_count * 100.0 / nullif(SUM(xzzf_count)over(), 0), 2) as xzzfslzb, ROUND(xzzf_count * 100.0 / nullif(SUM(xzzf_count)over(), 0), 2) as xzzfslzb,
fxzzf_count as fxzzfsl, fxzzf_count as fxzzfsl,
rank() over (order by fxzzf_count desc ) as fxzzfslpm, rank() over (order by fxzzf_count desc ) as fxzzfslpm,
ROUND(fxzzf_count * 100.0 / nullif(SUM(fxzzf_count)over(), 0), 2) as fxzzfslzb, ROUND(fxzzf_count * 100.0 / nullif(SUM(fxzzf_count)over(), 0), 2) as fxzzfslzb,
(xzzf_count + fxzzf_count) as totalCount (xzzf_count + fxzzf_count) as totalCount
from from
( (
select select
<if test="bo.domainId!=null and bo.domainId!=''"> t1.domain_id,
#{bo.domainId} AS domain_id, t1.domain_name,
</if> t1.dept_id,
( t1.dept_name,
select coalesce(xz.xz_cnt, 0) as xzzf_count,
t9.domain_name coalesce(fxz.fxz_cnt, 0) as fxzzf_count
from
dashboard_domain_dept t9
<where>
<if test="bo.domainId!=null and bo.domainId!=''">
t9.domain_id =#{bo.domainId}
</if>
</where>
limit 1 ) as domain_name,
t1.code as district_code,
t1.name as district_name,
coalesce(xz.xz_cnt, 0) as xzzf_count,
coalesce(fxz.fxz_cnt, 0) as fxzzf_count
from from
dashboard_area_info t1 dashboard_domain_dept t1
<!-- 1) 行政执法数量:固定领域,按区聚合--> <!-- 1) 行政执法数量:按子领域(bureau_dept_id)聚合-->
left join ( left join (
select select
t3.area_node as code, t2.bureau_dept_id as dept_id,
COUNT(1) as xz_cnt COUNT(1) as xz_cnt
from from
enforcement_registration t2 enforcement_registration t2
inner join dashboard_domain_dept t4 on <where>
t2.bureau_dept_id = t4.dept_id
inner join sys_dept t3 on
t2.bureau_dept_id = t3.dept_id
where
t2.is_delete = 0 t2.is_delete = 0
and t2.is_submit = 1 and t2.is_submit = 1
and t2.enterprise_name is not null and t2.enterprise_name is not null
@ -456,26 +440,18 @@
<if test = "bo.endTime != null"> <if test = "bo.endTime != null">
AND DATE_FORMAT(t2.enforcement_time,'%y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%y-%m-%d') AND DATE_FORMAT(t2.enforcement_time,'%y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%y-%m-%d')
</if> </if>
<if test="bo.domainId !=null and bo.domainId!=''"> </where>
and t4.domain_id =#{bo.domainId}
</if>
and t3.area_node is not null
group by group by
t3.area_node t2.bureau_dept_id
) xz on ) xz on t1.dept_id = xz.dept_id
t1.code = xz.code <!-- 2) 非行政执法数量:按子领域(bureau_dept_id)聚合-->
<!--2) 非行政执法数量:固定领域,按区聚合-->
left join ( left join (
select select
t3.area_node as code, t2.bureau_dept_id as dept_id,
COUNT(1) as fxz_cnt COUNT(1) as fxz_cnt
from from
non_enforcement_registration t2 non_enforcement_registration t2
inner join dashboard_domain_dept t4 on <where>
t2.bureau_dept_id = t4.dept_id
inner join sys_dept t3 on
t2.bureau_dept_id = t3.dept_id
where
t2.has_delete = 0 t2.has_delete = 0
<if test = "bo.year != null"> <if test = "bo.year != null">
AND YEAR(t2.enforcement_time) = #{bo.year} AND YEAR(t2.enforcement_time) = #{bo.year}
@ -492,22 +468,16 @@
<if test = "bo.endTime != null"> <if test = "bo.endTime != null">
AND DATE_FORMAT(t2.enforcement_time,'%y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%y-%m-%d') AND DATE_FORMAT(t2.enforcement_time,'%y-%m-%d') &lt;= DATE_FORMAT(#{bo.endTime},'%y-%m-%d')
</if> </if>
</where>
group by
t2.bureau_dept_id
) fxz on t1.dept_id = fxz.dept_id
<where>
<if test="bo.domainId !=null and bo.domainId!=''"> <if test="bo.domainId !=null and bo.domainId!=''">
and t4.domain_id =#{bo.domainId} and t1.domain_id = #{bo.domainId}
</if> </if>
and t3.area_node is not null </where>
group by ) base
t3.area_node
) fxz on
t1.code = fxz.code
where
t1.level = 3
and t1.is_delete = '0'
<if test="bo.districtCode != null and bo.districtCode !=null">
and t1.code = #{bo.districtCode}
</if>
) base
<!-- 排序:与领域列表一致,走白名单,避免 MyBatis-Plus 再追加排序字段 -->
order by order by
<choose> <choose>
<when test="bo.orderByColumn == 'xzzfCount'">xzzfCount</when> <when test="bo.orderByColumn == 'xzzfCount'">xzzfCount</when>

Loading…
Cancel
Save