feat: Refactor company and job management to include company nature
- Added companyNature field to Company entity and updated related services and mappers. - Removed jobNature field from Job and ESJobDocument entities as it is no longer needed. - Updated CompanyController to handle current company information and synchronization of account codes. - Enhanced CompanyServiceImpl to manage company nature changes and synchronize related job postings. - Updated SQL migrations to add company nature field and associated business dictionary entries. - Refactored job-related services to ensure they reflect the latest company nature information.
This commit is contained in:
@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
<result property="description" column="description" />
|
||||
<result property="nature" column="nature" />
|
||||
<result property="companyNature" column="company_nature" />
|
||||
<result property="totalRecruitment" column="total_recruitment" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="businessLicenseUrl" column="business_license_url" />
|
||||
@@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompanyVo">
|
||||
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time,is_imp_company,imp_company_type,enterprise_type,legal_person,legal_id_card,legal_phone,is_hrs from company
|
||||
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,company_nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time,is_imp_company,imp_company_type,enterprise_type,legal_person,legal_id_card,legal_phone,is_hrs from company
|
||||
</sql>
|
||||
|
||||
<sql id="companyIndustryFilter">
|
||||
@@ -99,13 +100,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO company (
|
||||
name, location, industry, scale, code, description, nature,
|
||||
name, location, industry, scale, code, description, nature, company_nature,
|
||||
create_by, create_time, del_flag
|
||||
) VALUES
|
||||
<foreach collection="list" item="company" separator=",">
|
||||
(
|
||||
#{company.name}, #{company.location}, #{company.industry}, #{company.scale},
|
||||
#{company.code}, #{company.description}, #{company.nature},
|
||||
#{company.code}, #{company.description}, #{company.nature}, #{company.companyNature},
|
||||
#{company.createBy}, #{company.createTime}, #{company.delFlag}
|
||||
)
|
||||
</foreach>
|
||||
@@ -127,9 +128,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="companyIndustryFilter"/>
|
||||
<if test="scale != null and scale != ''"> and scale = #{scale}</if>
|
||||
<if test="nature != null and nature != ''"> and nature = #{nature}</if>
|
||||
<if test="companyNature != null and companyNature != ''"> and company_nature = #{companyNature}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
|
||||
<if test="userId != null"> and user_id = #{userId}</if>
|
||||
<if test="isHrs != null and isHrs != ''"> and is_hrs = #{isHrs}</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
and create_time >= #{startDate}
|
||||
@@ -143,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT * FROM COMPANY WHERE COMPANY_ID IN (select -1
|
||||
<if test="companyNature!=null and companyNature!=''">
|
||||
UNION
|
||||
SELECT COMPANY_ID FROM COMPANY WHERE nature = #{companyNature}
|
||||
SELECT COMPANY_ID FROM COMPANY WHERE company_nature = #{companyNature}
|
||||
</if>
|
||||
<if test="targ!=null and targ!=''">
|
||||
UNION
|
||||
@@ -160,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="companyIndustryFilter"/>
|
||||
<if test="scale != null and scale != ''"> and scale = #{scale}</if>
|
||||
<if test="nature != null and nature != ''"> and nature = #{nature}</if>
|
||||
<if test="companyNature != null and companyNature != ''"> and company_nature = #{companyNature}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
@@ -176,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectAdminCompanyList" parameterType="CompanySearch" resultMap="CompanyResult">
|
||||
select t.company_id, t.name, t.location, t.industry, t.scale, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.remark,t.code,t.description,
|
||||
t.nature,t.total_recruitment,t.registered_address,t.contact_person,t.contact_person_phone,t.is_abnormal,t.not_pass_reason,t.status,case when t.status='2'
|
||||
t.nature,t.company_nature,t.total_recruitment,t.registered_address,t.contact_person,t.contact_person_phone,t.is_abnormal,t.not_pass_reason,t.status,case when t.status='2'
|
||||
then t.update_time else null end reject_time,t.is_imp_company,t.imp_company_type,t.enterprise_type,t.legal_person,t.legal_id_card,t.legal_phone,t.is_hrs,
|
||||
su.lc_userid from company t
|
||||
left join sys_user su on t.code=su.id_card
|
||||
@@ -184,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="name != null and name != ''"> and t.name like concat('%', cast(#{name, jdbcType=VARCHAR} as varchar), '%')</if>
|
||||
<if test="scale != null and scale != ''"> and t.scale = #{scale}</if>
|
||||
<if test="nature != null and nature != ''"> and t.nature = #{nature}</if>
|
||||
<if test="companyNature != null and companyNature != ''"> and t.company_nature = #{companyNature}</if>
|
||||
<if test="code != null and code != ''"> and t.code = #{code}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
<if test="companyId != null and companyId != ''"> and t.company_id = #{companyId}</if>
|
||||
|
||||
Reference in New Issue
Block a user