Browse Source

新增委托执法

v6
Chendy 1 year ago
parent
commit
e156433050
  1. 18
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 24
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/feign/DeptApiImpl.java
  3. 27
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/mapper/DeptMapper.java
  4. 38
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml
  5. 27
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java
  6. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  7. 9
      lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/feign/DeptApi.java

18
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java

@ -1,5 +1,6 @@
package com.zdxt.app.controller;
import com.alibaba.fastjson.JSONObject;
import com.zdxt.common.util.CommonUtil;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.DictDataBean;
@ -877,4 +878,21 @@ public class AppEnforcementRegistrationController extends BaseController
// registration.setParams(params);
return ZDResponse.success("查询成功", registration);
}
/**
* 获取全部执法部门
* @param bean
* @return
*/
@PostMapping("/getAllEnforceDept")
@ResponseBody
public TableDataInfo getAllEnforceDept(@RequestBody DeptBean bean){
int count=deptApi.getAllEnforceDeptCount(bean);
List<DeptBean> list= deptApi.getAllEnforceDept(bean);
TableDataInfo rspData = getDataTable(list);
rspData.setCode(0);
rspData.setRows(list);
rspData.setTotal(count);
return rspData;
}
}

24
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/feign/DeptApiImpl.java

@ -326,4 +326,28 @@ public class DeptApiImpl implements DeptApi {
BeanUtil.copyProperties(dept, bean);
return bean;
}
@Override
public List<DeptBean> getAllEnforceDept(DeptBean bean) {
Dept dept=new Dept();
BeanUtil.copyProperties(bean,dept);
dept.setZone(2);
List<Dept> list=deptMapper.getAllEnforceDept(dept);
List<DeptBean> res=new ArrayList<>();
list.forEach(li->{
DeptBean db=new DeptBean();
BeanUtil.copyProperties(li,db);
res.add(db);
});
return res;
}
@Override
public int getAllEnforceDeptCount(DeptBean bean) {
Dept dept=new Dept();
BeanUtil.copyProperties(bean,dept);
dept.setZone(2);
int res=deptMapper.getAllEnforceDeptCount(dept);
return res;
}
}

27
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/mapper/DeptMapper.java

@ -40,7 +40,7 @@ public interface DeptMapper
/**
* 查询部门人数
*
*
* @param dept 部门信息
* @return 结果
*/
@ -48,7 +48,7 @@ public interface DeptMapper
/**
* 查询部门是否存在用户
*
*
* @param deptId 部门ID
* @return 结果
*/
@ -56,7 +56,7 @@ public interface DeptMapper
/**
* 查询部门管理数据
*
*
* @param dept 部门信息
* @return 部门信息集合
*/
@ -74,7 +74,7 @@ public interface DeptMapper
/**
* 删除部门管理信息
*
*
* @param deptId 部门ID
* @return 结果
*/
@ -82,7 +82,7 @@ public interface DeptMapper
/**
* 新增部门信息
*
*
* @param dept 部门信息
* @return 结果
*/
@ -90,7 +90,7 @@ public interface DeptMapper
/**
* 修改部门信息
*
*
* @param dept 部门信息
* @return 结果
*/
@ -100,7 +100,7 @@ public interface DeptMapper
/**
* 修改子元素关系
*
*
* @param depts 子元素
* @return 结果
*/
@ -108,7 +108,7 @@ public interface DeptMapper
/**
* 根据部门ID查询信息
*
*
* @param deptId 部门ID
* @return 部门信息
*/
@ -117,7 +117,7 @@ public interface DeptMapper
/**
* 校验部门名称是否唯一
*
*
* @param deptName 部门名称
* @param parentId 父部门ID
* @return 结果
@ -134,14 +134,14 @@ public interface DeptMapper
/**
* 修改所在部门的父级部门状态
*
*
* @param dept 部门
*/
void updateDeptStatus(Dept dept);
/**
* 根据ID查询所有子部门
*
*
* @param deptId 部门ID
* @return 部门列表
*/
@ -181,4 +181,9 @@ public interface DeptMapper
* @return
*/
Dept selectDeptByCreditcode(String code);
List<Dept> getAllEnforceDept(Dept bean);
int getAllEnforceDeptCount(Dept bean);
}

38
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml

@ -539,5 +539,43 @@
<include refid="selectDeptVo"/>
where creditcode =#{code}
</select>
<select id="getAllEnforceDept" resultType="com.zdxt.domain.auth.Dept" parameterType="Dept">
SELECT
dept_id,dept_name
FROM
`sys_dept`
WHERE
zone IS NOT NULL
AND zone != ''
and zone!=#{zone}
and dept_name!='街道'
<if test="deptName != null and deptName != ''">
and dept_name like concat('%', #{deptName}, '%')
</if>
<if test="deptId != null and deptId != ''">
and dept_id !=#{deptId}
</if>
<if test="params.pageNum != null and params.pageSize != null">
LIMIT #{params.pageNum}, #{params.pageSize}
</if>
</select>
<select id="getAllEnforceDeptCount" resultType="Integer" parameterType="Dept">
SELECT
count(*)
FROM
sys_dept
WHERE
zone IS NOT NULL
AND zone != ''
and zone!=#{zone}
and dept_name!='街道'
<if test="deptName != null and deptName != ''">
and dept_name like concat('%', #{deptName}, '%')
</if>
<if test="deptId != null and deptId != ''">
and dept_id !=#{deptId}
</if>
</select>
</mapper>

27
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java

@ -254,11 +254,38 @@ public class EnforcementRegistration extends BaseDomain
private String lawEnforceCategoryText;
/**
* 委托执法id
*/
private String entrustDeptId;
/**
* 委托执法部门名称
*/
private String entrustDeptName;
/**
* 行政执法评价
*/
private EnterpriseEvaluate enterpriseEvaluate;
public String getEntrustDeptId() {
return entrustDeptId;
}
public void setEntrustDeptId(String entrustDeptId) {
this.entrustDeptId = entrustDeptId;
}
public String getEntrustDeptName() {
return entrustDeptName;
}
public void setEntrustDeptName(String entrustDeptName) {
this.entrustDeptName = entrustDeptName;
}
public String getLawEnforceCategoryText() {
return lawEnforceCategoryText;
}

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -53,6 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="hasUnion" column="has_union" />
<result property="hasAuto" column="has_auto" />
<result property="lawEnforceCategory" column="law_enforce_category" />
<result property="entrustDeptId" column="entrust_dept_id" />
<result property="entrustDeptName" column="entrust_dept_name" />
</resultMap>
<resultMap type="com.zdxt.code.domain.EnforceRegCount" id="EnforceRegCountResult">
@ -71,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
law_enforcement_basis, law_enforcement_basis_text, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,
is_complaint,is_submit, unite_check,check_css, enforce_reason, law_field,check_category,
bureau_dept_id,bureau_dept_name,is_evaluate, law_id, law_text, has_union, has_auto, union_no,
law_enforce_category
law_enforce_category,entrust_dept_id,entrust_dept_name
from enforcement_registration
</sql>
@ -729,6 +731,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hasUnion != null"> has_union,</if>
<if test="hasAuto != null"> has_auto,</if>
<if test="lawEnforceCategory != null and lawEnforceCategory!=''"> law_enforce_category,</if>
<if test="entrustDeptId != null and entrustDeptId!=''"> entrust_dept_id,</if>
<if test="entrustDeptName != null and entrustDeptName!=''"> entrust_dept_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@ -777,6 +781,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hasUnion != null"> #{hasUnion},</if>
<if test="hasAuto != null"> #{hasAuto},</if>
<if test="lawEnforceCategory != null and lawEnforceCategory!=''"> #{lawEnforceCategory},</if>
<if test="entrustDeptId != null and entrustDeptId!=''"> #{entrustDeptId},</if>
<if test="entrustDeptName != null and entrustDeptName!=''"> #{entrustDeptName},</if>
</trim>
</insert>
@ -829,6 +835,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hasUnion != null"> has_union = #{hasUnion},</if>
<if test="hasAuto != null"> has_auto = #{hasAuto},</if>
<if test="lawEnforceCategory != null and lawEnforceCategory!=''"> law_enforce_category = #{lawEnforceCategory},</if>
<if test="entrustDeptId != null and entrustDeptId!=''"> entrust_dept_id=#{entrustDeptId},</if>
<if test="entrustDeptName != null and entrustDeptName!=''"> entrust_dept_name=#{entrustDeptName},</if>
</trim>
where id = #{id}
</update>

9
lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/feign/DeptApi.java

@ -144,4 +144,13 @@ public interface DeptApi {
*/
DeptBean selectDeptByCreditcode(String code);
/**
* 获取全部执法部门
* @param bean
* @return
*/
List<DeptBean> getAllEnforceDept(DeptBean bean);
int getAllEnforceDeptCount(DeptBean bean);
}

Loading…
Cancel
Save