|
|
@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="isEvaluate" column="is_evaluate" /> |
|
|
<result property="isEvaluate" column="is_evaluate" /> |
|
|
<result property="lawId" column="law_id" /> |
|
|
<result property="lawId" column="law_id" /> |
|
|
<result property="lawText" column="law_text" /> |
|
|
<result property="lawText" column="law_text" /> |
|
|
|
|
|
<result property="num" column="num" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<resultMap type="com.zdxt.code.domain.EnforceRegCount" id="EnforceRegCountResult"> |
|
|
<resultMap type="com.zdxt.code.domain.EnforceRegCount" id="EnforceRegCountResult"> |
|
|
@ -153,6 +154,142 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</where> |
|
|
</where> |
|
|
order by enforcement_time desc |
|
|
order by enforcement_time desc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEnforcementRegistrationListNew" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> |
|
|
|
|
|
select * from (select id, law_enforcement, law_enforcement_id, enforce, enterprise_id, enterprise_name, |
|
|
|
|
|
enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id, |
|
|
|
|
|
law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer, |
|
|
|
|
|
subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_item_text, |
|
|
|
|
|
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, count( enterprise_number ) AS num |
|
|
|
|
|
from enforcement_registration |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if> |
|
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|
|
|
|
|
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if> |
|
|
|
|
|
<if test="userId != null "> and user_id = #{userId}</if> |
|
|
|
|
|
<if test="deptId != null "> and dept_id = #{deptId}</if> |
|
|
|
|
|
<if test="isDelete != null "> and is_delete = #{isDelete}</if> |
|
|
|
|
|
<if test="status != null "> and status = #{status}</if> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <if test="searchValue != null and searchValue != ''">--> |
|
|
|
|
|
<!-- and (law_enforcement_item_text like concat(concat('%',#{searchValue}),'%')--> |
|
|
|
|
|
<!-- or law_enforcement like concat(concat('%',#{searchValue}),'%')--> |
|
|
|
|
|
<!-- or law_enforcer like concat(concat('%',#{searchValue}),'%')--> |
|
|
|
|
|
<!-- or law_enforcer_two like concat(concat('%',#{searchValue}),'%')--> |
|
|
|
|
|
<!-- or enterprise_name like concat(concat('%',#{searchValue}),'%')--> |
|
|
|
|
|
<!-- )--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
|
|
and ( enterprise_name like concat('%',#{searchValue},'%'))</if> |
|
|
|
|
|
<if test="dateSearch != null and dateSearch != ''"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 1"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 2"> |
|
|
|
|
|
AND DATE_FORMAT(enforcement_time, '%Y-%m') >= CONCAT(YEAR(CURDATE()), '-', |
|
|
|
|
|
CASE WHEN QUARTER(CURDATE()) IN (1) THEN '01' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (2) THEN '04' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (3) THEN '07' |
|
|
|
|
|
ELSE '10' END) |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') <= CONCAT(YEAR(CURDATE()), '-', |
|
|
|
|
|
CASE |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (1) THEN '03' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (2) THEN '06' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (3) THEN '09' |
|
|
|
|
|
ELSE '12' |
|
|
|
|
|
END) |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 3"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateSearch != null and dateSearch != ''"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') <= #{endTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
|
|
|
|
and enforcement_time >= #{params.beginTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
|
|
|
|
and enforcement_time <= #{params.endTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
|
|
${params.dataScope} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
GROUP BY enterprise_number order by enforcement_time desc) t |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="num != null and num != ''"> |
|
|
|
|
|
and t.num >= #{num} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEnforcementRegistrationByEpId" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> |
|
|
|
|
|
<include refid="selectEnforcementRegistrationVo"/> |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if> |
|
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|
|
|
|
|
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if> |
|
|
|
|
|
<if test="userId != null "> and user_id = #{userId}</if> |
|
|
|
|
|
<if test="deptId != null "> and dept_id = #{deptId}</if> |
|
|
|
|
|
<if test="isDelete != null "> and is_delete = #{isDelete}</if> |
|
|
|
|
|
<if test="status != null "> and status = #{status}</if> |
|
|
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
|
|
and ( enterprise_name like concat('%',#{searchValue},'%'))</if> |
|
|
|
|
|
<if test="dateSearch != null and dateSearch != ''"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 1"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 2"> |
|
|
|
|
|
AND DATE_FORMAT(enforcement_time, '%Y-%m') >= CONCAT(YEAR(CURDATE()), '-', |
|
|
|
|
|
CASE WHEN QUARTER(CURDATE()) IN (1) THEN '01' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (2) THEN '04' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (3) THEN '07' |
|
|
|
|
|
ELSE '10' END) |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') <= CONCAT(YEAR(CURDATE()), '-', |
|
|
|
|
|
CASE |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (1) THEN '03' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (2) THEN '06' |
|
|
|
|
|
WHEN QUARTER(CURDATE()) IN (3) THEN '09' |
|
|
|
|
|
ELSE '12' |
|
|
|
|
|
END) |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 3"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateSearch != null and dateSearch != ''"> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> |
|
|
|
|
|
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') <= #{endTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
|
|
|
|
and enforcement_time >= #{params.beginTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
|
|
|
|
and enforcement_time <= #{params.endTime} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
order by enforcement_time desc |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEnforcementRegistrationList1" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> |
|
|
<select id="selectEnforcementRegistrationList1" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> |
|
|
<include refid="selectEnforcementRegistrationVo"/> |
|
|
<include refid="selectEnforcementRegistrationVo"/> |
|
|
<where> |
|
|
<where> |
|
|
|