|
@@ -18,12 +18,12 @@
|
|
|
<result column="live_city_" property="liveCity" />
|
|
|
<result column="intention_city_" property="intentionCity" />
|
|
|
<result column="educational_background_" property="educationalBackground" />
|
|
|
- <result column="subject_id_" property="subjectId" />
|
|
|
- <result column="is_interviewed_" property="isInterviewed" />
|
|
|
+ <result column="subject_id_list_" property="subjectIdList" />
|
|
|
+ <result column="assessment_result_" property="assessmentResult" />
|
|
|
<result column="other_comment_" property="otherComment" />
|
|
|
<result column="entry_date_" property="entryDate" />
|
|
|
<result column="position_" property="position" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
|
|
|
- <result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
|
|
|
+ <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
|
|
|
<result column="is_probation_period_" property="isProbationPeriod" />
|
|
|
<result column="bank_card_no_" property="bankCardNo" />
|
|
|
<result column="bank_address_" property="bankAddress" />
|
|
@@ -33,6 +33,9 @@
|
|
|
<result column="source_from_" property="sourceFrom" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
+ <result column="organName" property="organName" />
|
|
|
+ <result column="subjectName" property="subjectName" />
|
|
|
+ <result column="operatorName" property="operatorName" />
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -53,8 +56,8 @@
|
|
|
<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
AS ID FROM DUAL </selectKey> -->
|
|
|
INSERT INTO employee_info
|
|
|
- (id_,real_name_,mobile_no_,wechat_no_,id_card_,age_,gender_,birthdate_,emergency_contact_name_,emergency_contact_relation_,emergency_contact_phone_,live_city_,intention_city_,educational_background_,subject_id_,is_interviewed_,other_comment_,entry_date_,organ_id_,position_,job_nature_,is_probation_period_,bank_card_no_,bank_address_,resignation_date_,operator_id_,source_from_,create_time_,update_time_)
|
|
|
- VALUES(#{id},#{realName},#{mobileNo},#{wechatNo},#{idCard},#{age},#{gender},#{birthdate},#{emergencyContactName},#{emergencyContactRelation},#{emergencyContactPhone},#{liveCity},#{intentionCity},#{educationalBackground},#{subjectId},#{isInterviewed},#{otherComment},#{entryDate},#{organId},#{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isProbationPeriod},#{bankCardNo},#{bankAddress},#{resignationDate},#{operatorId},#{sourceFrom},#{createTime},#{updateTime})
|
|
|
+ (id_,real_name_,mobile_no_,wechat_no_,id_card_,age_,gender_,birthdate_,emergency_contact_name_,emergency_contact_relation_,emergency_contact_phone_,live_city_,intention_city_,educational_background_,subject_id_list_,assessment_result_,other_comment_,entry_date_,organ_id_,position_,status_,is_probation_period_,bank_card_no_,bank_address_,resignation_date_,operator_id_,source_from_,create_time_,update_time_)
|
|
|
+ VALUES(#{id},#{realName},#{mobileNo},#{wechatNo},#{idCard},#{age},#{gender},#{birthdate},#{emergencyContactName},#{emergencyContactRelation},#{emergencyContactPhone},#{liveCity},#{intentionCity},#{educationalBackground},#{subjectIdList},#{assessmentResult},#{otherComment},#{entryDate},#{organId},#{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isProbationPeriod},#{bankCardNo},#{bankAddress},#{resignationDate},#{operatorId},#{sourceFrom},#{createTime},#{updateTime})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -64,8 +67,8 @@
|
|
|
<if test="isProbationPeriod != null">
|
|
|
is_probation_period_ = #{isProbationPeriod},
|
|
|
</if>
|
|
|
- <if test="subjectId != null">
|
|
|
- subject_id_ = #{subjectId},
|
|
|
+ <if test="subjectIdList != null">
|
|
|
+ subject_id_list_ = #{subjectIdList},
|
|
|
</if>
|
|
|
<if test="gender != null">
|
|
|
gender_ = #{gender},
|
|
@@ -76,8 +79,8 @@
|
|
|
<if test="otherComment != null">
|
|
|
other_comment_ = #{otherComment},
|
|
|
</if>
|
|
|
- <if test="jobNature != null">
|
|
|
- job_nature_ = #{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ <if test="status != null">
|
|
|
+ status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
<if test="educationalBackground != null">
|
|
|
educational_background_ = #{educationalBackground},
|
|
@@ -124,8 +127,8 @@
|
|
|
<if test="wechatNo != null">
|
|
|
wechat_no_ = #{wechatNo},
|
|
|
</if>
|
|
|
- <if test="isInterviewed != null">
|
|
|
- is_interviewed_ = #{isInterviewed},
|
|
|
+ <if test="assessmentResult != null">
|
|
|
+ assessment_result_ = #{assessmentResult},
|
|
|
</if>
|
|
|
<if test="mobileNo != null">
|
|
|
mobile_no_ = #{mobileNo},
|
|
@@ -160,37 +163,41 @@
|
|
|
<sql id="queryPageMap">
|
|
|
<where>
|
|
|
<if test="organId != null">
|
|
|
- AND organ_id_ = #{organId}
|
|
|
+ AND ei.organ_id_ = #{organId}
|
|
|
</if>
|
|
|
<if test="userNameOrIdOrMobile != null">
|
|
|
- AND (real_name_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR mobile_no_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR id_ = #{userNameOrIdOrMobile})
|
|
|
+ AND (ei.real_name_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.mobile_no_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.id_ = #{userNameOrIdOrMobile})
|
|
|
</if>
|
|
|
<if test="subjectId != null">
|
|
|
- AND subject_id_ = #{subjectId}
|
|
|
+ AND find_in_set(#{subjectId},ei.subject_id_list_)
|
|
|
</if>
|
|
|
<if test="sourceFrom != null">
|
|
|
- AND source_from_ = #{sourceFrom}
|
|
|
+ AND ei.source_from_ = #{sourceFrom}
|
|
|
</if>
|
|
|
<if test="position != null">
|
|
|
- AND position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ AND ei.position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
- <if test="jobNature != null">
|
|
|
- AND job_nature_ = #{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ <if test="status != null">
|
|
|
+ AND ei.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="EmployeeInfo" parameterType="map">
|
|
|
- SELECT * FROM employee_info
|
|
|
+ SELECT o.name_ organName,group_concat(s.name_) subjectName,u.real_name_ operatorName,ei.* FROM employee_info ei
|
|
|
+ left join subject s on find_in_set(s.id_,ei.subject_id_list_)
|
|
|
+ left join organization o on o.id_ = ei.organ_id_
|
|
|
+ left join sys_user u on u.id_ = ei.operator_id_
|
|
|
<include refid="queryPageMap"/>
|
|
|
- ORDER BY id_
|
|
|
+ GROUP BY ei.id_
|
|
|
+ ORDER BY ei.update_time_
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM employee_info
|
|
|
+ SELECT COUNT(ei.id_) FROM employee_info ei
|
|
|
<include refid="queryPageMap"/>
|
|
|
</select>
|
|
|
</mapper>
|