|
|
@ -76,6 +76,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="uniteCheck != null and uniteCheck != ''"> and unite_check = #{uniteCheck}</if> |
|
|
<if test="uniteCheck != null and uniteCheck != ''"> and unite_check = #{uniteCheck}</if> |
|
|
<if test="isReg != null"> and is_reg = #{isReg}</if> |
|
|
<if test="isReg != null"> and is_reg = #{isReg}</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
|
|
and ( enterprise_name like concat(concat('%',#{searchValue}),'%') |
|
|
|
|
|
or check_item in (SELECT id FROM linkage_dict where title like concat(concat('%',#{searchValue}),'%')) |
|
|
|
|
|
or law_enforcement_code like concat(concat('%',#{searchValue}),'%') |
|
|
|
|
|
or law_enforcement like concat(concat('%',#{searchValue}),'%') |
|
|
|
|
|
) |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 1"> |
|
|
|
|
|
and DATE_FORMAT(check_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="dateType != null and dateType == 2"> |
|
|
|
|
|
AND DATE_FORMAT(check_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(check_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(check_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="searchDate != null and searchDate != ''"> |
|
|
|
|
|
and DATE_FORMAT(check_time, '%Y-%m') = #{searchDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
order by check_time desc |
|
|
|
|
|
</select> |
|
|
|
|
|
<select id="selectTotal" parameterType="EnterpriseLawEnforcement" resultType="long"> |
|
|
|
|
|
select count(1) from enterprise_law_enforcement |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="lawEnforcement != null and lawEnforcement != ''"> and law_enforcement = #{lawEnforcement}</if> |
|
|
|
|
|
<if test="lawEnforcementId != null and lawEnforcementId != ''"> and law_enforcement_id = #{lawEnforcementId}</if> |
|
|
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if> |
|
|
|
|
|
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if> |
|
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|
|
|
|
|
<if test="checkTime != null "> and check_time = #{checkTime}</if> |
|
|
|
|
|
<if test="lawEnforcer != null and lawEnforcer != ''"> and law_enforcer = #{lawEnforcer}</if> |
|
|
|
|
|
<if test="lawEnforcerTel != null and lawEnforcerTel != ''"> and law_enforcer_tel = #{lawEnforcerTel}</if> |
|
|
|
|
|
<if test="status != null"> and status = #{lawEnforcerTel}</if> |
|
|
|
|
|
<if test="isSubmit != null "> and is_submit = #{isSubmit}</if> |
|
|
|
|
|
<if test="lawEnforcementItem != null and lawEnforcementItem != ''"> and law_enforcement_item like concat('%', #{lawEnforcementItem}, '%')</if> |
|
|
|
|
|
<if test="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if> |
|
|
|
|
|
<if test="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</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="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if> |
|
|
|
|
|
<if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if> |
|
|
|
|
|
<if test="linkTel != null and linkTel != ''"> and link_tel = #{linkTel}</if> |
|
|
|
|
|
<if test="checkItem != null and checkItem != ''"> and check_item = #{checkItem}</if> |
|
|
|
|
|
<if test="checkItemText != null and checkItemText != ''"> and check_item_text like concat('%', #{checkItemText}, '%')</if> |
|
|
|
|
|
<if test="checkRequire != null and checkRequire != ''"> and check_require = #{checkRequire}</if> |
|
|
|
|
|
<if test="checkRequireText != null and checkRequireText != ''"> and check_require_text like concat('%', #{checkRequireText}, '%')</if> |
|
|
|
|
|
<if test="uniteCheck != null and uniteCheck != ''"> and unite_check = #{uniteCheck}</if> |
|
|
|
|
|
<if test="isReg != null"> and is_reg = #{isReg}</if> |
|
|
|
|
|
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
and ( enterprise_name like concat(concat('%',#{searchValue}),'%') |
|
|
and ( enterprise_name like concat(concat('%',#{searchValue}),'%') |
|
|
or check_item in (SELECT id FROM linkage_dict where title like concat(concat('%',#{searchValue}),'%')) |
|
|
or check_item in (SELECT id FROM linkage_dict where title like concat(concat('%',#{searchValue}),'%')) |
|
|
@ -107,7 +170,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
and DATE_FORMAT(check_time, '%Y-%m') = #{searchDate} |
|
|
and DATE_FORMAT(check_time, '%Y-%m') = #{searchDate} |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
order by check_time desc |
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectEnterpriseLawEnforcementById" parameterType="String" resultMap="EnterpriseLawEnforcementResult"> |
|
|
<select id="selectEnterpriseLawEnforcementById" parameterType="String" resultMap="EnterpriseLawEnforcementResult"> |
|
|
|