16 changed files with 860 additions and 69 deletions
@ -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); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -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; |
||||
|
} |
||||
@ -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; |
||||
|
} |
||||
@ -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); |
||||
|
} |
||||
@ -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); |
||||
|
|
||||
|
} |
||||
@ -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); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -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 >= #{bo.lawBeginTime} |
||||
|
</if> |
||||
|
<if test="bo.lawEndTime !=null"> |
||||
|
and t1.enforcement_time <= #{bo.lawEndTime} |
||||
|
</if> |
||||
|
<if test="bo.feedbackBeginTime !=null"> |
||||
|
and t4.create_time >= #{bo.feedbackBeginTime} |
||||
|
</if> |
||||
|
<if test="bo.feedbackEndTime !=null"> |
||||
|
and t4.create_time <= #{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 >= #{bo.lawBeginTime} |
||||
|
</if> |
||||
|
<if test="bo.lawEndTime !=null"> |
||||
|
and t1.enforcement_time <= #{bo.lawEndTime} |
||||
|
</if> |
||||
|
<if test="bo.feedbackBeginTime !=null"> |
||||
|
and t4.create_time >= #{bo.feedbackBeginTime} |
||||
|
</if> |
||||
|
<if test="bo.feedbackEndTime !=null"> |
||||
|
and t4.create_time <= #{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> |
||||
Loading…
Reference in new issue