代码提交

This commit is contained in:
luozhun 2024-12-19 15:36:50 +08:00
parent 0fb7c94c07
commit 8ce3ce3f6b
1 changed files with 15 additions and 14 deletions

View File

@ -196,20 +196,21 @@
</select>
<select id="unitSecurityUserRoster" resultType="com.changhu.pojo.dto.SecurityUserRosterDTO">
select su.snow_flake_id,
su.name,
su.sex,
su.photo,
TIMESTAMPDIFF(YEAR, su.date_of_birth, CURDATE()) AS 'age',
su.id_card,
su.telephone,
su.education_level,
eu.name as 'enterprisesUnitName',
suu.name as 'securityUnitName',
su.security_number
from enterprises_unit eu
LEFT JOIN service_project sp ON sp.enterprises_unit_id = eu.snow_flake_id AND sp.delete_flag = 0
JOIN security_user su ON su.service_project_id = sp.snow_flake_id AND su.delete_flag = 0
LEFT JOIN security_unit suu ON su.security_unit_id = suu.snow_flake_id AND suu.delete_flag = 0
su.name,
su.sex,
su.photo,
TIMESTAMPDIFF(YEAR, su.date_of_birth, CURDATE()) AS 'age',
su.id_card,
su.telephone,
su.education_level,
eu.name as 'enterprisesUnitName',
suu.name as 'securityUnitName',
su.security_number
from enterprises_unit eu
LEFT join police_unit pu on eu.police_unit_id = pu.snow_flake_id and pu.delete_flag = 0
LEFT JOIN service_project sp ON sp.enterprises_unit_id = eu.snow_flake_id AND sp.delete_flag = 0
JOIN security_user su ON su.service_project_id = sp.snow_flake_id AND su.delete_flag = 0
LEFT JOIN security_unit suu ON su.security_unit_id = suu.snow_flake_id AND suu.delete_flag = 0
where eu.delete_flag = 0
<choose>
<when test="level==1">