Browse Source

执法端-修改查看执法历史信息

dev-V1.0.6
niujiyi 3 months ago
parent
commit
b32448089a
  1. 9
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnforcementRegistrationController.java
  2. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java
  3. 4
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/EnforcementRegistrationMapper.java
  4. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEnforcementRegistrationService.java
  5. 8
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EnforcementRegistrationServiceImpl.java
  6. 188
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/EnforcementRegistrationMapper.xml

9
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enforcement/AppEnforcementRegistrationController.java

@ -548,10 +548,15 @@ public class AppEnforcementRegistrationController extends BaseController {
pageQuery.setPageNum(1);
}
bo.setLawEnforcementId(LoginHelper.getDeptId());
//bo.setLawEnforcementId(LoginHelper.getDeptId());
//根据用户ID查询用户执法证件号码
SysUserVo user = sysUserService.selectUserById( LoginHelper.getUserId());
if (user != null){
bo.setUserId(user.getLawCertificateNum());
}
// 使用标准的分页查询方法
TableDataInfo<EnforcementRegistrationVo> pageResult = DataPermissionHelper.ignore(() ->
enforcementRegistrationService.queryPageList(bo, pageQuery)
enforcementRegistrationService.queryPageListInfo(bo, pageQuery)
);
List<EnforcementRegistrationVo> list = pageResult.getRows();

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

@ -129,7 +129,7 @@ public class EnforcementRegistrationBo extends BaseEntity {
private Long reslut;
/**
*
* 用户
*/
private String userId;

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

@ -75,6 +75,10 @@ public interface EnforcementRegistrationMapper extends BaseMapperPlus<Enforcemen
@InterceptorIgnore(dataPermission = "true")
List<EnforcementRegistrationVo> selectEnforcementRegistrationList(@Param("bo") EnforcementRegistrationBo bo,@Param("page") Page<EnforcementRegistrationVo> page);
@InterceptorIgnore(dataPermission = "true")
List<EnforcementRegistrationVo> selectEnforcementRegistrationListInfo(@Param("bo") EnforcementRegistrationBo bo,@Param("page") Page<EnforcementRegistrationVo> page);
/**
* 统计当前用户作为执法人员的执法登记总数
* (包含执法人员1和执法人员2)

2
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEnforcementRegistrationService.java

@ -39,7 +39,7 @@ public interface IEnforcementRegistrationService {
* @return 企业端-执法登记记录分页列表
*/
TableDataInfo<EnforcementRegistrationVo> queryPageList(EnforcementRegistrationBo bo, PageQuery pageQuery);
TableDataInfo<EnforcementRegistrationVo> queryPageListInfo(EnforcementRegistrationBo bo, PageQuery pageQuery);
/**
* 企业端-分页查询执法登记记录列表(含投诉标记、字典翻译、超时计算等)
*

8
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EnforcementRegistrationServiceImpl.java

@ -110,6 +110,14 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
return TableDataInfo.build(page);
}
@Override
public TableDataInfo<EnforcementRegistrationVo> queryPageListInfo(EnforcementRegistrationBo bo, PageQuery pageQuery) {
// 使用自定义XML查询,包含num字段(企业执法次数)
Page<EnforcementRegistrationVo> page = pageQuery.build();
List<EnforcementRegistrationVo> list = baseMapper.selectEnforcementRegistrationListInfo(bo, page);
page.setRecords(list);
return TableDataInfo.build(page);
}
/**
* 查询符合条件的企业端-执法登记记录列表
*

188
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/EnforcementRegistrationMapper.xml

@ -595,15 +595,18 @@
<if test="bo.params.endTime != null and bo.params.endTime != ''">
AND er.enforcement_time &lt;= #{bo.params.endTime}
</if>
<if test="(bo.userId != null and bo.userId != '') and (bo.bureauDeptId == null or bo.bureauDeptId == '')">
<!-- <if test="(bo.userId != null and bo.userId != '') and (bo.lawEnforcementId == null or bo.lawEnforcementId == '')">
AND (er.law_enforcer_id = #{bo.userId} OR er.user_id = #{bo.userId} OR FIND_IN_SET(#{bo.userId}, er.law_enforcer_id_two))
</if>-->
<if test="bo.userId != null and bo.userId != ''">
and (law_enforcer_id = #{bo.userId} or user_id = #{bo.userId} or FIND_IN_SET(#{bo.userId}, law_enforcer_id_two))
</if>
<if test="bo.bureauDeptId != null and bo.bureauDeptId != ''">
AND er.bureau_dept_id = #{bo.bureauDeptId}
</if>
<if test="bo.lawEnforcementId != null and bo.lawEnforcementId != ''">
<!-- <if test="bo.lawEnforcementId != null and bo.lawEnforcementId != ''">
AND er.law_enforcement_id = #{bo.lawEnforcementId}
</if>
</if>-->
</where>
) t
<where>
@ -617,6 +620,185 @@
AND t.num &gt;= #{bo.num}
</if>
</where>
ORDER BY t.num DESC, t.enforcement_time DESC
</select>
<select id="selectEnforcementRegistrationListInfo" parameterType="com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo" resultType="com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo">
SELECT * FROM (
SELECT
er.id,
er.law_enforcement,
er.law_enforcement_id,
er.enforce,
er.enterprise_id,
er.enterprise_name,
er.enterprise_number,
er.enforcement_time,
er.create_time,
er.create_by,
er.law_enforcer,
er.law_enforcer_id,
er.law_enforcer_tel,
er.law_enforcer_two,
er.law_enforcer_id_two,
er.law_enforcer_tel_two,
er.subsidiaryer,
er.subsidiaryer_id,
er.subsidiaryer_tel,
er.law_enforcement_item,
er.law_enforcement_item_text,
er.law_enforcement_basis,
er.law_enforcement_basis_text,
er.remark,
er.reslut,
er.user_id,
er.dept_id,
er.is_delete,
er.status,
er.law_enforcement_code,
er.is_complaint,
er.is_submit,
er.unite_check,
er.check_css,
er.enforce_reason,
er.law_field,
er.check_category,
er.bureau_dept_id,
er.bureau_dept_name,
er.is_evaluate,
er.law_id,
er.law_text,
COALESCE(ent_count.cnt, 0) as num
FROM enforcement_registration er
LEFT JOIN (
SELECT enterprise_number, COUNT(*) as cnt
FROM enforcement_registration
WHERE is_submit = 1
<if test="bo.isDelete != null">
AND is_delete = #{bo.isDelete}
</if>
<if test="bo.dateType != null and bo.dateType == 1">
AND enforcement_time &gt;= DATE_FORMAT(CURDATE(), '%Y-%m-01')
</if>
<if test="bo.dateType != null and bo.dateType == 2">
AND enforcement_time &gt;= CONCAT(YEAR(CURDATE()), '-', LPAD(QUARTER(CURDATE())*3-2, 2, '0'), '-01')
</if>
<if test="bo.dateType != null and bo.dateType == 3">
AND enforcement_time &gt;= CONCAT(YEAR(CURDATE()), '-01-01')
</if>
<if test="bo.beginTime != null and bo.beginTime != ''">
AND enforcement_time &gt;= #{bo.beginTime}
</if>
<if test="bo.endTime != null and bo.endTime != ''">
AND enforcement_time &lt;= #{bo.endTime}
</if>
<if test="bo.bureauDeptId != null and bo.bureauDeptId != ''">
AND bureau_dept_id = #{bo.bureauDeptId}
</if>
GROUP BY enterprise_number
) ent_count ON er.enterprise_number = ent_count.enterprise_number
<where>
<!--er.is_submit = 1-->
<if test="bo.enterpriseId != null and bo.enterpriseId != ''">
AND er.enterprise_id = #{bo.enterpriseId}
</if>
<if test="bo.enterpriseName != null and bo.enterpriseName != ''">
AND er.enterprise_name LIKE CONCAT('%', #{bo.enterpriseName}, '%')
</if>
<if test="bo.enterpriseNumber != null and bo.enterpriseNumber != ''">
AND er.enterprise_number = #{bo.enterpriseNumber}
</if>
<if test="bo.isDelete != null">
AND er.is_delete = #{bo.isDelete}
</if>
<if test="bo.status != null">
AND er.status = #{bo.status}
</if>
<if test="bo.unionNo != null and bo.unionNo != ''">
AND er.union_no = #{bo.unionNo}
</if>
<if test="bo.hasUnion != null">
AND er.has_union = #{bo.hasUnion}
</if>
<if test="bo.isRealUnion != null">
AND er.is_real_union = #{bo.isRealUnion}
</if>
<if test="bo.hasAuto != null">
AND er.has_auto = #{bo.hasAuto}
</if>
<if test="bo.searchValue != null and bo.searchValue != ''">
AND (
er.enterprise_name LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.enterprise_number LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.enterprise_address LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement_code LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.bureau_dept_name LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcer LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcer_two LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement_item_text LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement_basis LIKE CONCAT('%', #{bo.searchValue}, '%')
OR DATE_FORMAT(er.enforcement_time, '%Y-%m-%d') LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.check_css LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.check_category LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.enforce_reason LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.remark LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement_basis_text LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_text LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.enforce LIKE CONCAT('%', #{bo.searchValue}, '%')
OR er.law_enforcement_item LIKE CONCAT('%', #{bo.searchValue}, '%')
)
</if>
<if test="bo.dateSearch != null and bo.dateSearch != ''">
AND er.enforcement_time &gt;= CONCAT(#{bo.dateSearch}, '-01')
AND er.enforcement_time &lt; DATE_ADD(CONCAT(#{bo.dateSearch}, '-01'), INTERVAL 1 MONTH)
</if>
<if test="bo.dateType != null and bo.dateType == 1">
AND er.enforcement_time &gt;= DATE_FORMAT(CURDATE(), '%Y-%m-01')
</if>
<if test="bo.dateType != null and bo.dateType == 2">
AND er.enforcement_time &gt;= CONCAT(YEAR(CURDATE()), '-', LPAD(QUARTER(CURDATE())*3-2, 2, '0'), '-01')
</if>
<if test="bo.dateType != null and bo.dateType == 3">
AND er.enforcement_time &gt;= CONCAT(YEAR(CURDATE()), '-01-01')
</if>
<if test="bo.beginTime != null and bo.beginTime != ''">
AND er.enforcement_time &gt;= #{bo.beginTime}
</if>
<if test="bo.endTime != null and bo.endTime != ''">
AND er.enforcement_time &lt;= #{bo.endTime}
</if>
<if test="bo.params.beginTime != null and bo.params.beginTime != ''">
AND er.enforcement_time &gt;= #{bo.params.beginTime}
</if>
<if test="bo.params.endTime != null and bo.params.endTime != ''">
AND er.enforcement_time &lt;= #{bo.params.endTime}
</if>
<!-- <if test="(bo.userId != null and bo.userId != '') and (bo.lawEnforcementId == null or bo.lawEnforcementId == '')">
AND (er.law_enforcer_id = #{bo.userId} OR er.user_id = #{bo.userId} OR FIND_IN_SET(#{bo.userId}, er.law_enforcer_id_two))
</if>-->
<if test="bo.userId != null and bo.userId != ''">
and (law_enforcer_id = #{bo.userId} or user_id = #{bo.userId} or FIND_IN_SET(#{bo.userId}, law_enforcer_id_two))
</if>
<if test="bo.bureauDeptId != null and bo.bureauDeptId != ''">
AND er.bureau_dept_id = #{bo.bureauDeptId}
</if>
<!-- <if test="bo.lawEnforcementId != null and bo.lawEnforcementId != ''">
AND er.law_enforcement_id = #{bo.lawEnforcementId}
</if>-->
</where>
) t
<where>
<if test="bo.numLeft != null and bo.numLeft != ''">
AND t.num &gt;= #{bo.numLeft}
</if>
<if test="bo.numRight != null and bo.numRight != ''">
AND t.num &lt;= #{bo.numRight}
</if>
<if test="bo.num != null and bo.num != ''">
AND t.num &gt;= #{bo.num}
</if>
</where>
ORDER BY t.create_time DESC
</select>

Loading…
Cancel
Save