|
|
|
@ -78,6 +78,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="creditcode != null and creditcode != ''"> and creditcode = #{creditcode}</if> |
|
|
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
|
|
|
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if> |
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
and (law_enforcement_item_text like concat('%',#{searchValue},'%') |
|
|
|
or bureau_dept_name like concat('%',#{searchValue},'%') |
|
|
|
or law_enforcer like concat('%',#{searchValue},'%') |
|
|
|
or law_enforcer_other like concat('%',#{searchValue},'%') |
|
|
|
) |
|
|
|
</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> |
|
|
|
</where> |
|
|
|
order by enforcement_time desc |
|
|
|
</select> |
|
|
|
@ -97,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
n.law_enforcement_type_text, |
|
|
|
n.law_enforcement_item_text, |
|
|
|
n.law_enforcement_basis_text, |
|
|
|
e.enterprise_address |
|
|
|
n.enterprise_address |
|
|
|
FROM |
|
|
|
non_enforcement_registration n |
|
|
|
<choose> |
|
|
|
@ -279,5 +309,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="getListTotal" parameterType="NonEnforcementRegistration" resultType="Integer"> |
|
|
|
select count(*) from non_enforcement_registration |
|
|
|
<where> |
|
|
|
<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="enforcementTime != null "> and enforcement_time = #{enforcementTime}</if> |
|
|
|
<if test="lawEnforcer != null and lawEnforcer != ''"> and law_enforcer = #{lawEnforcer}</if> |
|
|
|
<if test="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</if> |
|
|
|
<if test="lawEnforcerOther != null and lawEnforcerOther != ''"> and law_enforcer_other = #{lawEnforcerOther}</if> |
|
|
|
<if test="lawEnforcerIdOther != null and lawEnforcerIdOther != ''"> and law_enforcer_id_other = #{lawEnforcerIdOther}</if> |
|
|
|
<if test="lawEnforcementType != null "> and law_enforcement_type = #{lawEnforcementType}</if> |
|
|
|
<if test="lawEnforcementTypeText != null and lawEnforcementTypeText != ''"> and law_enforcement_type_text = #{lawEnforcementTypeText}</if> |
|
|
|
<if test="lawEnforcementItem != null "> and law_enforcement_item = #{lawEnforcementItem}</if> |
|
|
|
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''"> and law_enforcement_item_text = #{lawEnforcementItemText}</if> |
|
|
|
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''"> and law_enforcement_basis = #{lawEnforcementBasis}</if> |
|
|
|
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''"> and law_enforcement_basis_text = #{lawEnforcementBasisText}</if> |
|
|
|
<if test="reslut != null and reslut != ''"> and reslut = #{reslut}</if> |
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if> |
|
|
|
<if test="hasDelete != null and hasDelete != ''"> and has_delete = #{hasDelete}</if> |
|
|
|
<if test="hasComplaint != null and hasComplaint != ''"> and has_complaint = #{hasComplaint}</if> |
|
|
|
<if test="hasSubmit != null and hasSubmit != ''"> and has_submit = #{hasSubmit}</if> |
|
|
|
<if test="hasEvaluate != null and hasEvaluate != ''"> and has_evaluate = #{hasEvaluate}</if> |
|
|
|
<if test="lawId != null and lawId != ''"> and law_id = #{lawId}</if> |
|
|
|
<if test="lawText != null and lawText != ''"> and law_text = #{lawText}</if> |
|
|
|
<if test="bureauDeptId != null and bureauDeptId != ''"> and bureau_dept_id = #{bureauDeptId}</if> |
|
|
|
<if test="bureauDeptName != null and bureauDeptName != ''"> and bureau_dept_name like concat('%', #{bureauDeptName}, '%')</if> |
|
|
|
<if test="creditcode != null and creditcode != ''"> and creditcode = #{creditcode}</if> |
|
|
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
|
|
|
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if> |
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
and (law_enforcement_item_text like concat('%',#{searchValue},'%') |
|
|
|
or bureau_dept_name like concat('%',#{searchValue},'%') |
|
|
|
or law_enforcer like concat('%',#{searchValue},'%') |
|
|
|
or law_enforcer_other like concat('%',#{searchValue},'%') |
|
|
|
) |
|
|
|
</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> |
|
|
|
</where> |
|
|
|
order by enforcement_time desc |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |