Compare commits

..

No commits in common. "b086e5a49f5186f997a884795e8b286f3dfd26de" and "144bca851a24fb988de08b2f9fd6adb5fb5516d4" have entirely different histories.

10 changed files with 0 additions and 107 deletions

View File

@ -1,25 +0,0 @@
package com.changhu.common.db.enums;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.changhu.common.db.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author 20252
* @createTime 2024/12/19 上午9:31
* @desc EducationLevel...
*/
@Getter
@AllArgsConstructor
public enum EducationLevel implements BaseEnum<String>, IEnum<String> {
PRIMARY_SCHOOL("primary_school", "小学"),
JUNIOR_SCHOOL("junior_school", "初中"),
HIGH_SCHOOL("high_school", "高中"),
COLLEGE("college", "大专"),
UNDERGRADUATE("undergraduate", "本科"),
UNDERGRADUATE_MORE("undergraduate_more", "本科以上"),
;
private final String value;
private final String label;
}

View File

@ -68,11 +68,4 @@ public class OpenController {
return openApiService.securityUserRoster(id, type); return openApiService.securityUserRoster(id, type);
} }
@Operation(summary = "单位下的安保人员花名册")
@GetMapping("/unitSecurityUserRoster")
public List<SecurityUserRosterDTO> unitSecurityUserRoster(@Schema(description = "代码") @RequestParam String code,
@Schema(description = "等级") @RequestParam Integer level) {
return openApiService.unitSecurityUserRoster(code, level);
}
} }

View File

@ -51,9 +51,4 @@ public interface OpenApiMapper {
*/ */
List<SecurityUserRosterDTO> securityUserRoster(@Param("id") Long id, List<SecurityUserRosterDTO> securityUserRoster(@Param("id") Long id,
@Param("type") EnterprisesUnitOrServiceProjectType type); @Param("type") EnterprisesUnitOrServiceProjectType type);
/**
* 单位下的服务人员花名册
*/
List<SecurityUserRosterDTO> unitSecurityUserRoster(String code, Integer level);
} }

View File

@ -1,6 +1,5 @@
package com.changhu.module.miniProgram.pojo.params; package com.changhu.module.miniProgram.pojo.params;
import com.changhu.common.db.enums.EducationLevel;
import com.changhu.common.db.enums.Sex; import com.changhu.common.db.enums.Sex;
import com.changhu.common.validator.annotation.IdCard; import com.changhu.common.validator.annotation.IdCard;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -67,8 +66,4 @@ public class SecurityUserSaveOrUpdateParams {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
@NotNull(message = "文化程度为必选")
@Schema(description = "文化程度")
private EducationLevel educationLevel;
} }

View File

@ -2,7 +2,6 @@ package com.changhu.module.miniProgram.pojo.vo;
import cn.hutool.core.util.DesensitizedUtil; import cn.hutool.core.util.DesensitizedUtil;
import com.changhu.common.annotation.Desensitized; import com.changhu.common.annotation.Desensitized;
import com.changhu.common.db.enums.EducationLevel;
import com.changhu.common.db.enums.Sex; import com.changhu.common.db.enums.Sex;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -64,9 +63,6 @@ public class ServiceProjectSecurityUserPagerVo {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
@Schema(description = "文化程度")
private EducationLevel educationLevel;
@Schema(description = "创建时间") @Schema(description = "创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;
} }

View File

@ -1,11 +1,8 @@
package com.changhu.pojo.dto; package com.changhu.pojo.dto;
import cn.hutool.core.util.DesensitizedUtil; import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson2.annotation.JSONField;
import com.changhu.common.annotation.Desensitized; import com.changhu.common.annotation.Desensitized;
import com.changhu.common.db.enums.EducationLevel;
import com.changhu.common.db.enums.Sex; import com.changhu.common.db.enums.Sex;
import com.changhu.support.fastjson2.serializer.MinioPrefixSerializer;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -18,9 +15,6 @@ import lombok.Data;
public class SecurityUserRosterDTO { public class SecurityUserRosterDTO {
@Schema(description = "id") @Schema(description = "id")
private Long snowFlakeId; private Long snowFlakeId;
@Schema(description = "照片")
@JSONField(serializeUsing = MinioPrefixSerializer.class)
private String photo;
@Schema(description = "名称") @Schema(description = "名称")
private String name; private String name;
@Schema(description = "性别") @Schema(description = "性别")
@ -39,6 +33,4 @@ public class SecurityUserRosterDTO {
private String securityUnitName; private String securityUnitName;
@Schema(description = "保安证号") @Schema(description = "保安证号")
private String securityNumber; private String securityNumber;
@Schema(description = "文化程度")
private EducationLevel educationLevel;
} }

View File

@ -1,7 +1,6 @@
package com.changhu.pojo.entity; package com.changhu.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.changhu.common.db.enums.EducationLevel;
import com.changhu.common.db.enums.Sex; import com.changhu.common.db.enums.Sex;
import com.changhu.support.mybatisplus.pojo.entity.BaseEntity; import com.changhu.support.mybatisplus.pojo.entity.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -100,9 +99,5 @@ public class SecurityUser extends BaseEntity implements Serializable {
*/ */
private String remark; private String remark;
/**
* 文化程度
*/
private EducationLevel educationLevel;
} }

View File

@ -56,9 +56,4 @@ public interface OpenApiService {
* @return 花名册 * @return 花名册
*/ */
List<SecurityUserRosterDTO> securityUserRoster(Long id, EnterprisesUnitOrServiceProjectType type); List<SecurityUserRosterDTO> securityUserRoster(Long id, EnterprisesUnitOrServiceProjectType type);
/**
* 单位下的安保人员花名册
*/
List<SecurityUserRosterDTO> unitSecurityUserRoster(String code, Integer level);
} }

View File

@ -123,10 +123,4 @@ public class OpenApiServiceImpl implements OpenApiService {
public List<SecurityUserRosterDTO> securityUserRoster(Long id, EnterprisesUnitOrServiceProjectType type) { public List<SecurityUserRosterDTO> securityUserRoster(Long id, EnterprisesUnitOrServiceProjectType type) {
return openApiMapper.securityUserRoster(id, type); return openApiMapper.securityUserRoster(id, type);
} }
@Override
public List<SecurityUserRosterDTO> unitSecurityUserRoster(String code, Integer level) {
return openApiMapper.unitSecurityUserRoster(code, level);
}
} }

View File

@ -166,7 +166,6 @@
select su.snow_flake_id, select su.snow_flake_id,
su.name, su.name,
su.sex, su.sex,
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,
@ -191,40 +190,4 @@
</choose> </choose>
order by su.create_time desc order by su.create_time desc
</select> </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,
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
where eu.delete_flag = 0
<choose>
<when test="level==1">
and eu.province = #{code}
</when>
<when test="level==2">
and eu.city = #{code}
</when>
<when test="level==3">
and eu.districts = #{code}
</when>
<when test="level==4">
and eu.street = #{code}
</when>
<when test="level==5">
and pu.code = #{code}
</when>
<otherwise>and eu.snow_flake_id = -1</otherwise>
</choose>
order by su.create_time desc
</select>
</mapper> </mapper>