<iftest="deptQx != null and deptQx != ''">and bureau_dept_id =#{deptQx}</if>
<iftest="deptQx != null and deptQx != ''">and bureau_dept_id =#{deptQx}</if>
<iftest="lawEnforcement != null and lawEnforcement != ''"> and law_enforcement like concat('%', #{lawEnforcement}, '%')</if>
<iftest="lawEnforcement != null and lawEnforcement != ''"> and law_enforcement like concat('%', #{lawEnforcement}, '%')</if>
<iftest="bureauDeptName != null and bureauDeptName != ''"> and bureau_dept_name like concat('%', #{bureauDeptName}, '%')</if>
<iftest="bureauDeptName != null and bureauDeptName != ''"> and bureau_dept_name like concat('%', #{bureauDeptName}, '%')</if>
<iftest="lawEnforcementId != null and lawEnforcementId != ''"> and law_enforcement_id = #{lawEnforcementId}</if>
<iftest="lawEnforcementId != null and lawEnforcementId != ''"> and law_enforcement_id = #{lawEnforcementId}</if>
<iftest="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<iftest="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<iftest="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<iftest="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<iftest="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if>
<iftest="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if>
<iftest="enforcementTime != null "> and enforcement_time = #{enforcementTime}</if>
<iftest="enforcementTime != null "> and enforcement_time = #{enforcementTime}</if>
<iftest="lawEnforcer != null and lawEnforcer != ''"> and (law_enforcer like concat('%',#{lawEnforcer} ,'%') or law_enforcer_two like concat('%',#{lawEnforcer} ,'%'))</if>
<iftest="lawEnforcer != null and lawEnforcer != ''"> and (law_enforcer like concat('%',#{lawEnforcer} ,'%') or law_enforcer_two like concat('%',#{lawEnforcer} ,'%'))</if>
<iftest="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</if>
<iftest="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</if>
<iftest="lawEnforcerTel != null and lawEnforcerTel != ''"> and law_enforcer_tel = #{lawEnforcerTel}</if>
<iftest="lawEnforcerTel != null and lawEnforcerTel != ''"> and law_enforcer_tel = #{lawEnforcerTel}</if>
<iftest="lawEnforcerIdTwo != null and lawEnforcerIdTwo != ''"> and law_enforcer_id_two = #{lawEnforcerIdTwo}</if>
<iftest="lawEnforcerIdTwo != null and lawEnforcerIdTwo != ''"> and law_enforcer_id_two = #{lawEnforcerIdTwo}</if>
<iftest="lawEnforcerTelTwo != null and lawEnforcerTelTwo != ''"> and law_enforcer_tel_two = #{lawEnforcerTelTwo}</if>
<iftest="lawEnforcerTelTwo != null and lawEnforcerTelTwo != ''"> and law_enforcer_tel_two = #{lawEnforcerTelTwo}</if>
<iftest="subsidiaryer != null and subsidiaryer != ''"> and subsidiaryer = #{subsidiaryer}</if>
<iftest="subsidiaryer != null and subsidiaryer != ''"> and subsidiaryer = #{subsidiaryer}</if>
<iftest="subsidiaryerId != null and subsidiaryerId != ''"> and subsidiaryer_id = #{subsidiaryerId}</if>
<iftest="subsidiaryerId != null and subsidiaryerId != ''"> and subsidiaryer_id = #{subsidiaryerId}</if>
<iftest="subsidiaryerTel != null and subsidiaryerTel != ''"> and subsidiaryer_tel = #{subsidiaryerTel}</if>
<iftest="subsidiaryerTel != null and subsidiaryerTel != ''"> and subsidiaryer_tel = #{subsidiaryerTel}</if>
<iftest="lawEnforcementItem != null and lawEnforcementItem != ''"> and law_enforcement_item = #{lawEnforcementItem}</if>
<iftest="lawEnforcementItem != null and lawEnforcementItem != ''"> and law_enforcement_item = #{lawEnforcementItem}</if>
<iftest="lawEnforcementItemText != null and lawEnforcementItemText != ''"> and law_enforcement_item_text like concat('%', #{lawEnforcementItemText,jdbcType=VARCHAR}, '%')</if>
<iftest="lawEnforcementItemText != null and lawEnforcementItemText != ''"> and law_enforcement_item_text like concat('%', #{lawEnforcementItemText,jdbcType=VARCHAR}, '%')</if>
<iftest="lawEnforcementBasis != null and lawEnforcementBasis != ''"> and law_enforcement_basis = #{lawEnforcementBasis}</if>
<iftest="lawEnforcementBasis != null and lawEnforcementBasis != ''"> and law_enforcement_basis = #{lawEnforcementBasis}</if>
<iftest="lawEnforcementBasisText != null and lawEnforcementBasisText != ''"> and law_enforcement_basis_text = #{lawEnforcementBasisText}</if>
<iftest="lawEnforcementBasisText != null and lawEnforcementBasisText != ''"> and law_enforcement_basis_text = #{lawEnforcementBasisText}</if>
<iftest="reslut != null "> and reslut = #{reslut}</if>
<iftest="reslut != null "> and reslut = #{reslut}</if>
<iftest="isSubmit != null "> and is_submit = #{isSubmit}</if>
<iftest="isSubmit != null "> and is_submit = #{isSubmit}</if>
<iftest="userId != null "> and user_id = #{userId}</if>
<iftest="userId != null "> and user_id = #{userId}</if>
<iftest="deptId != null "> and dept_id = #{deptId}</if>
<iftest="deptId != null "> and dept_id = #{deptId}</if>
<iftest="isDelete != null "> and is_delete = #{isDelete}</if>
<iftest="isDelete != null "> and is_delete = #{isDelete}</if>
<iftest="isComplaint != null "> and is_complaint = #{isComplaint}</if>
<iftest="isComplaint != null "> and is_complaint = #{isComplaint}</if>
<iftest="status != null "> and status = #{status}</if>
<iftest="status != null "> and status = #{status}</if>
<iftest="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if>
<iftest="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if>
<iftest="uniteCheck == '0'.toString()"> and unite_check is not null</if>
<iftest="uniteCheck == '0'.toString()"> and unite_check is not null</if>
<iftest="uniteCheck == '1'.toString()"> and unite_check is null</if>
<iftest="uniteCheck == '1'.toString()"> and unite_check is null</if>
<iftest="enforce == '0'.toString()"> and check_css is not null</if>
<iftest="enforce == '0'.toString()"> and check_css is not null</if>
<iftest="enforce == '1'.toString()"> and check_css is null</if>
<iftest="enforce == '1'.toString()"> and check_css is null</if>
<iftest="checkCategory != null and checkCategory != ''"> and check_category = #{checkCategory}</if>
<iftest="checkCategory != null and checkCategory != ''"> and check_category = #{checkCategory}</if>
<iftest="checkCss != null and checkCss != ''"> and check_css = #{checkCss}</if>
<iftest="checkCss != null and checkCss != ''"> and check_css = #{checkCss}</if>
<iftest="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
<iftest="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') >= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
and DATE_FORMAT(create_time,'%Y-%m-%d') >= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
</if>
<iftest="endTime != null and endTime != ''"><!-- 结束时间检索 -->
<iftest="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
and DATE_FORMAT(create_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</if>
<choose>
<whentest="params.dataScope != null and params.dataScope != ''">
and dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} or find_in_set( #{deptId} , ancestors ) <![CDATA[ <> ]]> 0 )