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_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_,job_subject_id_list_,resignation_reason_,job_type_,job_nature_,hrbp_,tenant_id_) 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},#{jobSubjectIdList},#{resignationReason},#{jobType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{hrbp},#{tenantId}) UPDATE employee_info is_probation_period_ = #{isProbationPeriod}, subject_id_list_ = #{subjectIdList}, gender_ = #{gender}, entry_date_ = #{entryDate}, other_comment_ = #{otherComment}, status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, educational_background_ = #{educationalBackground}, emergency_contact_phone_ = #{emergencyContactPhone}, resignation_date_ = #{resignationDate}, position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, update_time_ = #{updateTime}, emergency_contact_relation_ = #{emergencyContactRelation}, id_ = #{id}, bank_card_no_ = #{bankCardNo}, real_name_ = #{realName}, id_card_ = #{idCard}, age_ = #{age}, live_city_ = #{liveCity}, intention_city_ = #{intentionCity}, create_time_ = #{createTime}, wechat_no_ = #{wechatNo}, assessment_result_ = #{assessmentResult}, mobile_no_ = #{mobileNo}, emergency_contact_name_ = #{emergencyContactName}, birthdate_ = #{birthdate}, bank_address_ = #{bankAddress}, organ_id_ = #{organId}, operator_id_ = #{operatorId}, job_subject_id_list_ = #{jobSubjectIdList}, resignation_reason_ = #{resignationReason}, job_type_ = #{jobType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, job_nature_ = #{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, hrbp_ = #{hrbp}, next_visit_date_ = #{nextVisitDate}, source_from_ = #{sourceFrom} WHERE id_ = #{id} and tenant_id_ = #{tenantId} DELETE FROM employee_info WHERE id_ = #{id} ei.tenant_id_ = #{tenantId} AND ei.mobile_no_ IS NULL AND ei.wechat_no_ IS NULL AND (ei.mobile_no_ IS NOT NULL OR ei.wechat_no_ IS NOT NULL) AND ei.organ_id_ = #{organId} AND (ei.real_name_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.mobile_no_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.id_ = #{userNameOrIdOrMobile}) AND find_in_set(#{subjectId},ei.subject_id_list_) AND ei.source_from_ = #{sourceFrom} AND ei.hrbp_ = #{hrbp} AND ei.intention_city_ LIKE CONCAT('%',#{intentionCity},'%') AND ei.position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} AND ei.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} AND date(ei.update_time_) >= #{startDate} AND date(ei.update_time_) <= #{endDate} AND date(ei.next_visit_date_) >= #{visitStartDate} AND date(ei.next_visit_date_) <= #{visitEndDate} AND (ei.operator_id_ like concat('%',#{operator},'%') or u.real_name_ like concat('%',#{operator},'%'))