feat(SecurityUnitUseStatisticsDTO): 增加地区信息字段- 在 SecurityUnitUseStatisticsDTO 中添加省、市、区/县、街道名称字段
- 修改 OpenApiMapper.xml,加入地区信息的 SQL 查询
This commit is contained in:
parent
8abdda276a
commit
4f9c69f3bd
|
@ -49,4 +49,13 @@ public class SecurityUnitUseStatisticsDTO {
|
||||||
@Schema(description = "项目经理联系方式")
|
@Schema(description = "项目经理联系方式")
|
||||||
private String serviceProjectManagerTelephone;
|
private String serviceProjectManagerTelephone;
|
||||||
|
|
||||||
|
@Schema(description = "省")
|
||||||
|
private String provinceName;
|
||||||
|
@Schema(description = "市")
|
||||||
|
private String cityName;
|
||||||
|
@Schema(description = "区/县")
|
||||||
|
private String districtsName;
|
||||||
|
@Schema(description = "街道")
|
||||||
|
private String streetName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,13 +50,22 @@
|
||||||
sp.id_number,
|
sp.id_number,
|
||||||
su.legal_person_info as 'securityUnitLegalPersonInfo',
|
su.legal_person_info as 'securityUnitLegalPersonInfo',
|
||||||
mpu.name as 'serviceProjectManagerName',
|
mpu.name as 'serviceProjectManagerName',
|
||||||
mpu.telephone as 'serviceProjectManagerTelephone'
|
mpu.telephone as 'serviceProjectManagerTelephone',
|
||||||
|
ad1.name as 'provinceName',
|
||||||
|
ad2.name as 'cityName',
|
||||||
|
ad3.name as 'districtsName',
|
||||||
|
ad4.name as 'streetName'
|
||||||
from police_unit pu
|
from police_unit pu
|
||||||
join enterprises_unit eu on pu.snow_flake_id = eu.police_unit_id and eu.delete_flag = 0
|
join enterprises_unit eu on pu.snow_flake_id = eu.police_unit_id and eu.delete_flag = 0
|
||||||
join service_project sp on eu.snow_flake_id = sp.enterprises_unit_id and sp.delete_flag = 0
|
join service_project sp on eu.snow_flake_id = sp.enterprises_unit_id and sp.delete_flag = 0
|
||||||
join security_unit su on sp.security_unit_id = su.snow_flake_id and su.delete_flag = 0
|
join security_unit su on sp.security_unit_id = su.snow_flake_id and su.delete_flag = 0
|
||||||
LEFT join mini_program_user mpu on sp.project_manager_mini_program_user_id = mpu.snow_flake_id
|
LEFT join mini_program_user mpu on sp.project_manager_mini_program_user_id = mpu.snow_flake_id
|
||||||
LEFT join security_user suu on suu.service_project_id = sp.snow_flake_id and suu.delete_flag = 0
|
LEFT join security_user suu on suu.service_project_id = sp.snow_flake_id and suu.delete_flag = 0
|
||||||
|
left join administrative_division ad1 on eu.province = ad1.code and ad1.delete_flag = 0
|
||||||
|
left join administrative_division ad2 on eu.city = ad2.code and ad2.delete_flag = 0
|
||||||
|
left join administrative_division ad3 on eu.districts = ad3.code and ad3.delete_flag = 0
|
||||||
|
left join administrative_division ad4 on eu.street = ad4.code and ad4.delete_flag = 0
|
||||||
|
|
||||||
where pu.delete_flag = 0
|
where pu.delete_flag = 0
|
||||||
<choose>
|
<choose>
|
||||||
<when test="level==1">
|
<when test="level==1">
|
||||||
|
|
Loading…
Reference in New Issue