<commit_before>SELECT d.DEPARTMENT_ID, d.DEPARTMENT_CODE, d.NAME, d.PARENT_ID, d.PARENT_CODE FROM  c1_department d
where d.state_code = '1' and d.data_state_code = '1'
<#if cardone.StringUtils.isNotBlank(departmentId)>
AND  (LOCATE(:departmentId, d.PARENT_TREE_ID) > 0) OR (d.DEPARTMENT_ID = :departmentId)
<#elseif cardone.StringUtils.isNotBlank(departmentCode)>
AND  (LOCATE(:departmentCode, d.PARENT_TREE_CODE) > 0) OR (d.DEPARTMENT_CODE = :departmentCode)
</#if>
ORDER BY d.DEPARTMENT_CODE<commit_msg>查询权限控制<commit_after>SELECT d.DEPARTMENT_ID, d.DEPARTMENT_CODE, d.NAME, d.PARENT_ID, d.PARENT_CODE FROM  c1_department d
where d.state_code = '1' and d.data_state_code = '1'
<#if cardone.StringUtils.isNotBlank(departmentId)>
and (:departmentId = ANY(string_to_array(d.PARENT_TREE_ID, ',')) OR (d.DEPARTMENT_ID = :departmentId))
<#elseif cardone.StringUtils.isNotBlank(departmentCode)>
and (:departmentCode = ANY(string_to_array(d.PARENT_TREE_CODE, ',')) OR (d.DEPARTMENT_CODE = :departmentCode))
</#if>
ORDER BY d.DEPARTMENT_CODE
{'fraction_non_alphanumeric': 0.1355275895450145, 'fraction_numerical': 0.007744433688286544, 'mean_word_length': 7.40650406504065, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '145981', 'n_tokens_mistral': 444, 'n_tokens_neox': 426, 'n_words': 71}