123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.hz.employmentsite.mapper.cquery.JobUserCQuery">
- <select id="selectJobUserList" resultType="com.hz.employmentsite.vo.jobUserManager.JobUserVo">
- select jobuser.* ,gender.name as GenderName,culture.name as CultureName,site.SiteName,jobstatus.name as
- JobStatusName,keytype.name as KeyTypeName,sys_politics.name as politicsStatusName,sys_health.name as healthName,
- sys_family.name as familyNatureName,sys_full_time.Name as isFullTimeName,sys_occ_category.Name as occupationalCategoryName,
- sys_occ_level.Name as occupationalLevelName,sys_blood_type.Name as bloodTypeName,sys_marital_status.Name as MaritalStatusName,
- area_region.name as RegionName,area_street.name as StreetName,
- (select count(*) from pc_recommend recommend where jobuser.JobUserID = recommend.JobuserID and isRead = 1)as
- RecommendedCount
- ,case when jobuser.IdentityNumber is not null and jobuser.IdentityNumber <![CDATA[ <> ]]>'' then
- TIMESTAMPDIFF(YEAR,STR_TO_DATE(SUBSTRING(jobuser.IdentityNumber, 7, 8),'%Y%m%d'),CURRENT_DATE())
- else null end as age
- from pc_jobuser jobuser
- left join pc_site site on site.SiteID = jobuser.SiteID
- left join sys_dictionary_item culture on jobuser.CultureRank = culture.value and
- culture.DictionaryCode='HighestDegree'
- left join sys_dictionary_item gender on jobuser.Sex = gender.value and gender.DictionaryCode='Gender'
- left join sys_dictionary_item jobstatus on jobuser.JobStatusID = jobstatus.value and
- jobstatus.DictionaryCode='JobStatus'
- left join sys_dictionary_item keytype on jobuser.KeyPersonTypeID = keytype.value and
- keytype.DictionaryCode='KeyPersonType'
- left join (select * from sys_dictionary_item where DictionaryCode ='PoliticsStatus') sys_politics on
- jobuser.PoliticsStatusID = sys_politics.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='Health') sys_health on
- jobuser.healthID = sys_health.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='FamilyNature') sys_family on
- jobuser.familyNatureID = sys_family.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='IsFullTime') sys_full_time on
- jobuser.IsFullTime = sys_full_time.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='OccupationalCategory') sys_occ_category on
- jobuser.OccupationalCategory = sys_occ_category.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='OccupationalLevel') sys_occ_level on
- jobuser.OccupationalLevel = sys_occ_level.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='BloodType') sys_blood_type on
- jobuser.BloodTypeID = sys_blood_type.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='MaritalStatus') sys_marital_status on
- jobuser.MaritalStatusID = sys_marital_status.Value
- left join area_code area_region on jobuser.RegionCode = area_region.code
- left join area_code area_street on jobuser.StreetCode = area_street.code
- where 1=1
- <if test="jobUserIDList != '' and jobUserIDList != null">
- and jobuser.jobuserID in (${jobUserIDList})
- </if>
- <if test="name != '' and name != null">
- and jobuser.name like Concat('%',#{name},'%')
- </if>
- <if test="siteId != null and siteId != ''">
- and jobuser.siteId = #{siteId}
- </if>
- <if test="jobStatus != null and jobStatus != ''">
- and jobuser.jobStatusID = #{jobStatus}
- </if>
- <if test="sexId != null and sexId != ''">
- and jobuser.sex = #{sexId}
- </if>
- <if test="educationTypeId != null and educationTypeId != ''">
- and jobuser.CultureRank = #{educationTypeId}
- </if>
- <if test="emphasisTypeId != null and emphasisTypeId != ''">
- and jobuser.KeyPersonTypeID = #{emphasisTypeId}
- </if>
- <if test="createUserId != null and createUserId != ''">
- and jobuser.CreateUserID = #{createUserId}
- </if>
- <if test="workTime!='' and workTime!=null">
- and Date(jobuser.CreateTime) = Date(#{workTime})
- </if>
- order by jobuser.CreateTime desc
- </select>
- </mapper>
|