Browse Source

监督端-联合查询

dev-V1.10.2-temp
niujiyi 2 months ago
parent
commit
c8db2d94fb
  1. 15
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppNonEnforcementRegistrationController.java
  2. 54
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enterprise/AppEntNonEnforcementRegistrationController.java
  3. 21
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/RegistrationController.java
  4. 33
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java
  5. 3
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/NonEnforcementRegistrationBo.java
  6. 3
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/EnforcementRegistrationMapper.java
  7. 3
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/IEnforcementRegistrationReportReport.java
  8. 12
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/EnforcementRegistrationReportImpl.java
  9. 96
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/report/EnforcementRegistrationEINOFTReportMapper.xml
  10. 5
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/report/EnforcementRegistrationReportMapper.xml

15
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppNonEnforcementRegistrationController.java

@ -7,6 +7,7 @@ import com.zdxt.enforcementcode.service.INonEnforcementRegistrationService;
import org.dromara.common.core.domain.R;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.web.core.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -43,6 +44,20 @@ public class AppNonEnforcementRegistrationController extends BaseController {
return enforcementRegistrationService.queryPageList(bo, pageQuery);
}
/**
* 执法端-非行政查询执法登记列表
* @param bo
* @param pageQuery
* @return
*/
@SaIgnore
@GetMapping("/list")
public TableDataInfo<NonEnforcementRegistrationVo> List(NonEnforcementRegistrationBo bo, PageQuery pageQuery)
{
bo.setLawEnforcerId(LoginHelper.getDeptId());
return enforcementRegistrationService.queryPageList(bo, pageQuery);
}
/**
* 执法端-非行政查询执法登记列表
*/

54
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enterprise/AppEntNonEnforcementRegistrationController.java

@ -0,0 +1,54 @@
package com.zdxt.enforcementcode.controller.app.enterprise;
import cn.dev33.satoken.annotation.SaIgnore;
import com.zdxt.enforcementcode.domain.bo.NonEnforcementRegistrationBo;
import com.zdxt.enforcementcode.domain.vo.NonEnforcementRegistrationVo;
import com.zdxt.enforcementcode.service.INonEnforcementRegistrationService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.domain.R;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 企业端-非行政历史执法记录
*/
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/app-ent/NonEnfRegistraionInfo")
public class AppEntNonEnforcementRegistrationController {
@Autowired
private INonEnforcementRegistrationService enforcementRegistrationService;
/**
* 企业端-查询企业非行政历史执法记录
* @param bo
* @param pageQuery
* @return
*/
@SaIgnore
@GetMapping("/queryList")
public TableDataInfo<NonEnforcementRegistrationVo> queryList(NonEnforcementRegistrationBo bo, PageQuery pageQuery)
{
return enforcementRegistrationService.queryPageList(bo, pageQuery);
}
/**
* 企业端-非行政查询执法登记明细
*/
@SaIgnore
@GetMapping("/queryById")
public R<NonEnforcementRegistrationVo> queryById(String id)
{
NonEnforcementRegistrationVo registrations = enforcementRegistrationService.selectNonEnforcementRegistrationById(id);
return R.ok(registrations);
}
}

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

@ -1,5 +1,6 @@
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.vo.EnforcementRegistrationVo;
import com.zdxt.enforcementcode.domain.vo.report.ChartDataVo;
@ -16,10 +17,7 @@ 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 org.springframework.web.bind.annotation.*;
import java.util.List;
@ -56,6 +54,7 @@ public class RegistrationController {
/**
* 接口2-V2:涉企执法统计列表(SQL JOIN字典表排序 + 服务端分页,当前使用)
*/
@SaIgnore
@GetMapping("/list")
public TableDataInfo<EnforcementRegistrationVo> list(EnforcementRegistrationBo bo, PageQuery pageQuery) {
return registrationReport.listForV2(bo, pageQuery);
@ -149,4 +148,18 @@ public class RegistrationController {
}
}
}
/**
* 监督端-联合查询
* @param bo
* @return
*/
@SaIgnore
@GetMapping("/unionList")
public R<List<EnforcementRegistrationVo>> unionList(EnforcementRegistrationBo bo)
{
List<EnforcementRegistrationVo> returnList = registrationReport.selectEnforcementRegistrationAndAddressList(bo);
return R.ok(returnList);
}
}

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

@ -339,4 +339,37 @@ public class EnforcementRegistrationBo extends BaseEntity {
* 预告id
*/
private String noticeId;
/** 临时用 */
private String qy;
private String jd;
private String lawCertificateNum;
private String lawCertificateNumText;
private String lawCertificateNumTwoText;
private String subsidiaryerText;
private int comOrOpi;
private List fileListObj;
//部门权限
private String deptQx;
/** 是否牵头单位 */
private int uniteType;
/**
* 开始时间
*/
private String beginEnforcementTime;
/**
* 结束时间
*/
private String endEnforcementTime;
private String year;
private String quarter;
private String month;
}

3
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/NonEnforcementRegistrationBo.java

@ -32,6 +32,9 @@ public class NonEnforcementRegistrationBo extends BaseEntity {
*/
private String enterpriseName;
/**
* 被执法企业统一信用代码
*/
/**
*
*/

3
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/EnforcementRegistrationMapper.java

@ -199,4 +199,7 @@ public interface EnforcementRegistrationMapper extends BaseMapperPlus<Enforcemen
List<EINOFTDetailVo> selectEINOFTDetail(@Param("bo") EnforcementRegistrationBo bo,
@Param("dataFilter") String dataFilter);
List<EnforcementRegistrationVo> selectEnforcementRegistrationAndAddressList(@Param("bo")EnforcementRegistrationBo bo);
}

3
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/IEnforcementRegistrationReportReport.java

@ -73,4 +73,7 @@ public interface IEnforcementRegistrationReportReport {
* 执法分析全量(用于导出)
*/
List<RegistrationAnalysisVo> analysisAll(EnforcementRegistrationBo bo);
List<EnforcementRegistrationVo> selectEnforcementRegistrationAndAddressList(EnforcementRegistrationBo bo);
}

12
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/report/impl/EnforcementRegistrationReportImpl.java

@ -87,8 +87,8 @@ public class EnforcementRegistrationReportImpl implements IEnforcementRegistrati
// V2:SQL层JOIN字典表排序 + 服务端分页(依赖district/street已回填)
// 手动构建双列权限过滤(bureau_dept_id OR entrust_dept_id),表别名 er
Page<EnforcementRegistrationVo> page = pageQuery.build();
String dataFilter = buildDualColumnFilter("er");
IPage<EnforcementRegistrationVo> result = registrationMapper.selectReportPageV2(page, bo, dataFilter);
//String dataFilter = buildDualColumnFilter("er");
IPage<EnforcementRegistrationVo> result = registrationMapper.selectReportPageV2(page, bo, null);
return TableDataInfo.build(result);
}
@ -371,4 +371,12 @@ public class EnforcementRegistrationReportImpl implements IEnforcementRegistrati
String entrustFilter = DataFilterUtil.buildFilterSql(tableAlias, "entrust_dept_id", true, true);
return "AND (" + bureauFilter + " OR " + entrustFilter + ")";
}
@Override
public List<EnforcementRegistrationVo> selectEnforcementRegistrationAndAddressList(EnforcementRegistrationBo bo) {
List<EnforcementRegistrationVo> enforcementRegistrations =
registrationMapper.selectEnforcementRegistrationAndAddressList(bo);
return enforcementRegistrations;
}
}

96
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/report/EnforcementRegistrationEINOFTReportMapper.xml

@ -96,4 +96,100 @@
ORDER BY er.enforcement_time DESC
</select>
<select id="selectEnforcementRegistrationAndAddressList" parameterType="com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo" resultType="com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo">
select r.id as id,
r.bureau_dept_name as bureauDeptName,
r.bureau_dept_id as bureauDeptId,
r.law_enforcer as lawEnforcer,
r.law_enforcer_two as lawEnforcerTwo,
r.enterprise_name as enterpriseName,
r.enterprise_number as enterpriseNumber,
r.enterprise_address as enterpriseAddress,
r.law_enforcement_item_text as lawEnforcementItemText,
r.unite_check as uniteCheck,
r.check_category as checkCategory,
r.check_css as checkCss,
r.is_complaint as isComplaint,
r.create_time as createTime,
r.law_id as lawId,
r.enforcement_time as enforcementTime,
r.law_enforce_category as lawEnforceCategory,
r.entrust_dept_name as entrustDeptName,
r.has_auto as hasAuto,
r.has_union as hasUnion,
r.union_no as unionNo
from enforcement_registration r
<where>
and r.bureau_dept_name is not null
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer is not null
and r.law_enforcer_two is not null
and r.is_complaint is not null
and r.check_category is not null
and r.bureau_dept_id is not null
and is_submit=1
<if test="bo.qy != null and bo.qy != ''">
and (r.enterprise_address like concat('深圳市',substring_index(#{bo.qy}, "区",1), '区%')or r.enterprise_address like concat('深圳市',substring_index(#{bo.qy}, "区",1), '新区%'))
<if test="bo.jd != null and bo.jd != ''">
and (r.enterprise_address like concat('深圳市',substring_index(#{bo.qy}, "区",1), '区',#{jd},'%')or r.enterprise_address like concat('深圳市',substring_index(#{bo.qy}, "区",1), '新区',#{bo.jd},'%'))
</if>
</if>
<if test="bo.deptQx != null and bo.deptQx != ''">and r.bureau_dept_id =#{bo.deptQx}</if>
<if test="bo.lawEnforcement != null and bo.lawEnforcement != ''"> and r.law_enforcement like concat('%', #{bo.lawEnforcement}, '%')</if>
<if test="bo.bureauDeptName != null and bo.bureauDeptName != ''"> and r.bureau_dept_name like concat('%', #{bo.bureauDeptName}, '%')</if>
<if test="bo.enterpriseName != null and bo.enterpriseName != ''"> and r.enterprise_name like concat('%', #{bo.enterpriseName}, '%')</if>
<if test="bo.enterpriseNumber != null and bo.enterpriseNumber != ''"> and r.enterprise_number like concat('%', #{bo.enterpriseNumber}, '%')</if>
<if test="bo.entrustDeptName != null and bo.entrustDeptName != ''"> and r.entrust_dept_name like concat('%', #{bo.entrustDeptName}, '%')</if>
<if test="bo.lawEnforcer != null and bo.lawEnforcer != ''"> and (r.law_enforcer like concat('%',#{bo.lawEnforcer} ,'%') or r.law_enforcer_two like concat('%',#{bo.lawEnforcer} ,'%'))</if>
<if test="bo.isComplaint != null "> and r.is_complaint = #{bo.isComplaint}</if>
<if test="bo.uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="bo.uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="bo.enforce == '0'.toString()"> and r.check_css is null</if>
<if test="bo.enforce == '1'.toString()"> and r.check_css is not null</if>
<if test="bo.unionNo != null and bo.unionNo != ''"> and union_no = #{bo.unionNo}</if>
<if test="bo.hasUnion != null"> and has_union = #{bo.hasUnion}</if>
<if test="bo.isRealUnion != null"> and is_real_union = #{bo.isRealUnion}</if>
<if test="bo.hasAuto != null"> and has_auto = #{bo.hasAuto}</if>
<if test="bo.checkCategory != null and bo.checkCategory != ''"> and r.check_category = #{bo.checkCategory}</if>
<if test="bo.checkCss != null and bo.checkCss != ''"> and r.check_css = #{bo.checkCss}</if>
<if test="bo.lawEnforcementItemText != null and bo.lawEnforcementItemText != ''"> and law_enforcement_item_text like concat('%', #{bo.lawEnforcementItemText,jdbcType=VARCHAR}, '%')</if>
<if test="bo.beginTime != null and bo.beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{bo.beginTime},'%Y-%m-%d')
</if>
<if test="bo.endTime != null and bo.endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{bo.endTime},'%Y-%m-%d')
</if>
<!-- 选择了自定义时间但未填入时间时,默认查当年数据,避免全表扫描导致慢SQL和连接断开 -->
<if test="bo.dateSearch != null and bo.dateSearch == 'select-time' and (bo.beginTime == null or bo.beginTime == '') and (bo.endTime == null or bo.endTime == '')">
AND YEAR(r.enforcement_time) = YEAR(NOW())
</if>
<if test="bo.beginEnforcementTime != null and bo.beginEnforcementTime != ''"><!-- 开始时间检索用于预警搜索 -->
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{bo.beginEnforcementTime},'%Y-%m-%d')
</if>
<if test="bo.endEnforcementTime != null and bo.endEnforcementTime != ''"><!-- 结束时间检索用于预警搜索 -->
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{bo.endEnforcementTime},'%Y-%m-%d')
</if>
<if test="bo.year != null and bo.year != ''">
AND YEAR(r.enforcement_time) = #{bo.year}
</if>
<if test="bo.quarter != null and bo.quarter != '' ">
AND QUARTER(r.enforcement_time) = #{bo.quarter}
</if>
<if test="bo.month != null and bo.month != '' ">
AND DATE_FORMAT(r.enforcement_time, '%m') = #{bo.month}
</if>
<if test="bo.lawEnforceCategory != null and bo.lawEnforceCategory!=''"> and law_enforce_category = #{bo.lawEnforceCategory}</if>
<!-- 数据范围过滤 -->
<!-- <if test="params.dataScope != null and params.dataScope != ''">
&lt;!&ndash; 数据范围过滤 &ndash;&gt;
${params.dataScope}
</if>-->
</where>
order by r.enforcement_time desc
</select>
</mapper>

5
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/report/EnforcementRegistrationReportMapper.xml

@ -369,10 +369,11 @@
AND er.enforcement_time &lt; DATE_ADD(STR_TO_DATE(CONCAT(#{bo.dateSearch},'-01'),'%Y-%m-%d'),INTERVAL 1 MONTH)
</if>
<if test="bo.beginTime != null and bo.beginTime != ''">
AND er.enforcement_time >= #{bo.beginTime}
and DATE_FORMAT(er.enforcement_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{bo.beginTime},'%Y-%m-%d')
</if>
<if test="bo.endTime != null and bo.endTime != ''">
AND er.enforcement_time &lt; DATE_ADD(#{bo.endTime}, INTERVAL 1 DAY)
and DATE_FORMAT(er.enforcement_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{bo.endTime},'%Y-%m-%d')
</if>
<if test="dataFilter != null and dataFilter != ''">
${dataFilter}

Loading…
Cancel
Save