Compare commits

..

No commits in common. "c5f5f1df97a9eb0e8066a416193e6a99b21945a8" and "b49833510873da585c372b6dd133393a926f2a39" have entirely different histories.

2 changed files with 34 additions and 43 deletions

View File

@ -1,7 +1,6 @@
package com.changhu.pojo.dto;
import com.alibaba.fastjson2.annotation.JSONField;
import com.changhu.common.db.enums.EducationLevel;
import com.changhu.common.db.enums.ServiceProjectType;
import com.changhu.common.db.enums.Sex;
import com.changhu.pojo.model.LegalPersonInfo;
@ -82,9 +81,6 @@ public class ServiceProjectDTO {
static class SecurityUserInfo {
@Schema(description = "id")
private Long snowFlakeId;
@JSONField(serializeUsing = MinioPrefixSerializer.class)
@Schema(description = "照片")
private String photo;
@Schema(description = "名字")
private String name;
@Schema(description = "手机号")
@ -107,7 +103,5 @@ public class ServiceProjectDTO {
private String remark;
@Schema(description = "创建时间")
private String createTime;
@Schema(description = "文化程度")
private EducationLevel educationLevel;
}
}

View File

@ -43,10 +43,9 @@
property="securityUserList" />
</resultMap>
<select id="getServiceProjectByEnterprisesUnitId" resultMap="ServiceProjectDTOResultMap">
SELECT sp.*,
IF(mpu.snow_flake_id IS NOT NULL,
json_object('name', mpu.NAME, 'sex', mpu.sex, 'telephone', mpu.telephone, 'idCard', mpu.id_card),
NULL) AS 'projectManagerInfo',
SELECT
sp.*,
IF(mpu.snow_flake_id IS NOT NULL,json_object( 'name', mpu.NAME, 'sex', mpu.sex, 'telephone', mpu.telephone, 'idCard', mpu.id_card ),NULL) AS 'projectManagerInfo',
json_object(
'name',su1.name,
'socialCode',su1.social_code,
@ -57,7 +56,6 @@
) as 'securityUnitInfo',
if(COUNT(su.snow_flake_id)>0,JSON_ARRAYAGG(json_object(
'snowFlakeId',su.snow_flake_id,
'photo', su.photo,
'name',su.name,
'telephone',su.telephone,
'workPost',su.work_post,
@ -68,18 +66,19 @@
'securityNumber',su.security_number,
'homeAddress',su.home_address,
'remark',su.remark,
'educationLevel', su.education_level,
'createTime',su.create_time
)),JSON_ARRAY()) as 'securityUserList'
FROM service_project sp
FROM
service_project sp
left join security_unit su1 on sp.security_unit_id = su1.snow_flake_id
LEFT JOIN mini_program_user mpu ON sp.project_manager_mini_program_user_id = mpu.snow_flake_id AND
mpu.identity = 'project_manager'
LEFT JOIN mini_program_user mpu ON sp.project_manager_mini_program_user_id = mpu.snow_flake_id AND mpu.identity = 'project_manager'
left join security_user su on su.service_project_id = sp.snow_flake_id and su.delete_flag = 0
WHERE sp.delete_flag = 0
WHERE
sp.delete_flag = 0
AND sp.enterprises_unit_id = #{enterprisesUnitId}
group by sp.snow_flake_id
ORDER BY sp.create_time DESC
ORDER BY
sp.create_time DESC
</select>
<resultMap id="SecurityUnitUseStatisticsDTOResultMap" type="com.changhu.pojo.dto.SecurityUnitUseStatisticsDTO">
<result
@ -171,7 +170,6 @@
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
@ -201,7 +199,6 @@
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