代码提交
This commit is contained in:
parent
0fb7c94c07
commit
8ce3ce3f6b
|
@ -196,20 +196,21 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="unitSecurityUserRoster" resultType="com.changhu.pojo.dto.SecurityUserRosterDTO">
|
<select id="unitSecurityUserRoster" resultType="com.changhu.pojo.dto.SecurityUserRosterDTO">
|
||||||
select su.snow_flake_id,
|
select su.snow_flake_id,
|
||||||
su.name,
|
su.name,
|
||||||
su.sex,
|
su.sex,
|
||||||
su.photo,
|
su.photo,
|
||||||
TIMESTAMPDIFF(YEAR, su.date_of_birth, CURDATE()) AS 'age',
|
TIMESTAMPDIFF(YEAR, su.date_of_birth, CURDATE()) AS 'age',
|
||||||
su.id_card,
|
su.id_card,
|
||||||
su.telephone,
|
su.telephone,
|
||||||
su.education_level,
|
su.education_level,
|
||||||
eu.name as 'enterprisesUnitName',
|
eu.name as 'enterprisesUnitName',
|
||||||
suu.name as 'securityUnitName',
|
suu.name as 'securityUnitName',
|
||||||
su.security_number
|
su.security_number
|
||||||
from enterprises_unit eu
|
from enterprises_unit eu
|
||||||
LEFT JOIN service_project sp ON sp.enterprises_unit_id = eu.snow_flake_id AND sp.delete_flag = 0
|
LEFT join police_unit pu on eu.police_unit_id = pu.snow_flake_id and pu.delete_flag = 0
|
||||||
JOIN security_user su ON su.service_project_id = sp.snow_flake_id AND su.delete_flag = 0
|
LEFT JOIN service_project sp ON sp.enterprises_unit_id = eu.snow_flake_id AND sp.delete_flag = 0
|
||||||
LEFT JOIN security_unit suu ON su.security_unit_id = suu.snow_flake_id AND suu.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
|
where eu.delete_flag = 0
|
||||||
<choose>
|
<choose>
|
||||||
<when test="level==1">
|
<when test="level==1">
|
||||||
|
|
Loading…
Reference in New Issue