1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?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,inSites.InstitutionID as institutionID,
- 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,occ_cat.OccupationalName as
- occupationalCategoryName,
- sys_occ_level.Name as occupationalLevelName,sys_blood_type.Name as bloodTypeName,sys_marital_status.Name as
- MaritalStatusName, sys_nation.Name as nationName,
- 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 pc_occupational occ_cat on
- jobuser.OccupationalCategory =
- occ_cat.OccupationalID
- 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 (select * from sys_dictionary_item where DictionaryCode ='NationType') sys_nation on
- jobuser.Nation = sys_nation.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
- left join pc_site_institution inSites on site.SiteID = inSites.SiteID
- left join pc_institution institution on inSites.institutionID = institution.InstitutionID
- 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="curLoginUserSiteID!='' and curLoginUserSiteID!=null">
- and jobuser.siteId = #{curLoginUserSiteID}
- </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>
- <if test="regionCode != '' and regionCode != null">
- and jobuser.RegionCode = #{regionCode}
- </if>
- <if test="startDate != null and endDate == null">
- and jobuser.CreateTime <![CDATA[ >= ]]> #{startDate}
- </if>
- <if test="endDate != null and startDate == null">
- and jobuser.CreateTime <![CDATA[ <= ]]> #{endDate}
- </if>
- <if test="startDate != null and endDate != null">
- and jobuser.CreateTime <![CDATA[ >= ]]> #{startDate}
- and jobuser.CreateTime <![CDATA[ <= ]]> #{endDate}
- </if>
- order by jobuser.CreateTime desc
- </select>
- </mapper>
|