Commit e6403118 by 谢海旭

v5.7.1版本 招聘管理:列表、详情、关联以及表调整

1 parent f1e69f5b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</parent> </parent>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-staff-api</artifactId> <artifactId>rpc-dj-staff-api</artifactId>
<version>5.6.4-SNAPSHOT</version> <version>5.7.1-SNAPSHOT</version>
<name>rpc-dj-staff-api</name> <name>rpc-dj-staff-api</name>
<properties> <properties>
<deploy.scanPackage>cn.com.glsx.dj.staff.remote</deploy.scanPackage> <deploy.scanPackage>cn.com.glsx.dj.staff.remote</deploy.scanPackage>
......
...@@ -21,15 +21,6 @@ import java.util.List; ...@@ -21,15 +21,6 @@ import java.util.List;
@Data @Data
public class RecruitmentDemandDetailDTO extends RecruitmentDemand { public class RecruitmentDemandDetailDTO extends RecruitmentDemand {
@ApiModelProperty(notes = "近一个月销售量")
private Integer salesVolume;
@ApiModelProperty(notes = "门店地址")
private String merchantAddress;
@ApiModelProperty(notes = "品牌")
private String brand;
@ApiModelProperty(notes = "招聘信息") @ApiModelProperty(notes = "招聘信息")
private List<RecruitmentResume> resumes; private List<RecruitmentResume> resumes;
......
...@@ -37,12 +37,47 @@ public class RecruitmentDemand implements Serializable { ...@@ -37,12 +37,47 @@ public class RecruitmentDemand implements Serializable {
private String merchantName; private String merchantName;
/** /**
* 门店id(门店和园区店商户) * 门店 id(门店和园区店商户)
*/ */
@Column(name = "merchant_id") @Column(name = "merchant_id")
private String merchantId; private String merchantId;
/** /**
* 主营品牌,多个以/分隔
*/
@ApiModelProperty(notes = "主营品牌,多个以/分隔")
@Column(name = "brand")
private String brand;
/**
* 是否已关联系统门店,0 未关联 1 已关联,默认 1
*/
@ApiModelProperty(notes = "是否已关联系统门店,0 未关联 1 已关联,默认 1")
@Column(name = "connection_flag")
private Boolean connectionFlag;
/**
* 是否通过系统门店创建,0 否 1 是,默认 1
*/
@ApiModelProperty(notes = "是否通过系统门店创建,0 否 1 是,默认 1")
@Column(name = "by_system_merchant")
private Boolean bySystemMerchant;
/**
* 近一个月新车销量
*/
@ApiModelProperty(notes = "近一个月新车销量")
@Column(name = "salesVolume")
private Integer salesVolume;
/**
* 门店地址
*/
@ApiModelProperty(notes = "门店地址")
@Column(name = "merchant_address")
private String merchantAddress;
/**
* 区域运营id/uuid * 区域运营id/uuid
*/ */
@Column(name = "region_operation_id") @Column(name = "region_operation_id")
......
...@@ -69,4 +69,9 @@ public interface RecruitmentDemandRemote { ...@@ -69,4 +69,9 @@ public interface RecruitmentDemandRemote {
@ApiParam(name = "dto", notes = "新增招聘需求信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "dto", notes = "新增招聘需求信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("招聘需求详情") @ApiResponse("招聘需求详情")
RpcResponse<RecruitmentDemandDTO> recruitmentDemandAdd(@NotNull RecruitmentDemandDTO dto); RpcResponse<RecruitmentDemandDTO> recruitmentDemandAdd(@NotNull RecruitmentDemandDTO dto);
@ApiMethod("招聘需求关联系统门店")
@ApiParam(name = "dto", notes = "招聘需求id、系统门店名称和商户号", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("关联结果")
RpcResponse<String> recruitmentDemandLinkMerchant(@NotNull RecruitmentDemandDTO dto);
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-staff-api</artifactId> <artifactId>rpc-dj-staff-api</artifactId>
<version>5.6.4-SNAPSHOT</version> <version>5.7.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.oreframework.boot</groupId> <groupId>org.oreframework.boot</groupId>
......
...@@ -241,4 +241,18 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{ ...@@ -241,4 +241,18 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<String> recruitmentDemandLinkMerchant(RecruitmentDemandDTO dto) {
try {
recruitmentDemandService.recruitmentDemandLinkMerchant(dto);
return RpcResponse.success("success");
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
} }
...@@ -382,13 +382,49 @@ public class RecruitmentDemandService { ...@@ -382,13 +382,49 @@ public class RecruitmentDemandService {
return CommonUtil.getFirst(recruitmentDemandMapper.listRecruitmentDemand(condition)); return CommonUtil.getFirst(recruitmentDemandMapper.listRecruitmentDemand(condition));
} }
/**
* 招聘需求关联系统门店
* 仅未关联状态可进行关联(connection_flag = false)
*
* @param dto 包含招聘需求id、系统门店名称和商户号
*/
@Transactional
public void recruitmentDemandLinkMerchant(RecruitmentDemandDTO dto) {
RpcAssert.assertNotNull(dto.getId(), DefaultErrorEnum.DATA_NULL, "id不能为空");
RpcAssert.assertNotEmpty(dto.getMerchantName(), DefaultErrorEnum.DATA_NULL, "merchantName不能为空");
RpcAssert.assertNotEmpty(dto.getMerchantId(), DefaultErrorEnum.DATA_NULL, "merchantId不能为空");
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(dto.getId());
if (demand == null) {
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "招聘需求不存在");
}
if (Boolean.TRUE.equals(demand.getConnectionFlag())) {
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "该招聘需求已关联系统门店,请勿重复操作");
}
RecruitmentDemand update = new RecruitmentDemand();
update.setId(dto.getId());
update.setMerchantName(dto.getMerchantName());
update.setMerchantId(dto.getMerchantId());
update.setConnectionFlag(true);
update.setUpdatedBy(dto.getUpdatedBy());
update.setUpdatedDate(new Date());
recruitmentDemandMapper.updateByPrimaryKeySelective(update);
}
public RecruitmentDemandDetailDTO recruitmentDemandDetailWeb(Integer id) { public RecruitmentDemandDetailDTO recruitmentDemandDetailWeb(Integer id) {
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(id); RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(id);
if (Objects.isNull(demand)) { if (Objects.isNull(demand)) {
return null; return null;
} }
int salesVolume = getSalesVolume(Integer.parseInt(demand.getMerchantId())); boolean hasSystemMerchant = Boolean.TRUE.equals(demand.getBySystemMerchant());
int salesVolume;
if (hasSystemMerchant) {
salesVolume = getSalesVolume(Integer.parseInt(demand.getMerchantId()));
} else {
salesVolume = demand.getSalesVolume() != null ? demand.getSalesVolume() : 0;
}
Integer demandId = demand.getId(); Integer demandId = demand.getId();
Example resumeExample = new Example(RecruitmentResume.class); Example resumeExample = new Example(RecruitmentResume.class);
...@@ -427,7 +463,9 @@ public class RecruitmentDemandService { ...@@ -427,7 +463,9 @@ public class RecruitmentDemandService {
detailDTO.setOnboardingPlans(plans); detailDTO.setOnboardingPlans(plans);
detailDTO.setLogs(logs); detailDTO.setLogs(logs);
detailDTO.setTrialOnboardings(trialOnboardings); detailDTO.setTrialOnboardings(trialOnboardings);
// 查询门店信息(地址)
if (hasSystemMerchant) {
// 已关联系统门店:查询门店信息(地址)
String merchantId = demand.getMerchantId(); String merchantId = demand.getMerchantId();
RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>(); RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>();
merchantPagination.setPageNum(1); merchantPagination.setPageNum(1);
...@@ -449,11 +487,6 @@ public class RecruitmentDemandService { ...@@ -449,11 +487,6 @@ public class RecruitmentDemandService {
} }
} }
} }
// 查询门店主营品牌信息
Map<Integer, String> merchantBrandMap = merchantService.getMerchantBrandMap(Lists.newArrayList(Integer.parseInt(merchantId)), true);
if (CollectionUtil.isNotEmpty(merchantBrandMap)) {
detailDTO.setBrand(merchantBrandMap.get(Integer.parseInt(merchantId)));
} }
return detailDTO; return detailDTO;
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER" />
<result column="merchant_name" property="merchantName" jdbcType="VARCHAR" /> <result column="merchant_name" property="merchantName" jdbcType="VARCHAR" />
<result column="merchant_id" property="merchantId" jdbcType="VARCHAR" /> <result column="merchant_id" property="merchantId" jdbcType="VARCHAR" />
<result column="brand" property="brand" jdbcType="VARCHAR" />
<result column="connection_flag" property="connectionFlag" jdbcType="BIT" />
<result column="by_system_merchant" property="bySystemMerchant" jdbcType="BIT" />
<result column="salesVolume" property="salesVolume" jdbcType="INTEGER" />
<result column="merchant_address" property="merchantAddress" jdbcType="VARCHAR" />
<result column="region_operation_id" property="regionOperationId" jdbcType="VARCHAR" /> <result column="region_operation_id" property="regionOperationId" jdbcType="VARCHAR" />
<result column="region_operation_name" property="regionOperationName" jdbcType="VARCHAR" /> <result column="region_operation_name" property="regionOperationName" jdbcType="VARCHAR" />
<result column="business_type" property="businessType" jdbcType="VARCHAR" /> <result column="business_type" property="businessType" jdbcType="VARCHAR" />
...@@ -44,7 +49,8 @@ ...@@ -44,7 +49,8 @@
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
id, merchant_name, merchant_id, region_operation_id, region_operation_name, business_type, id, merchant_name, merchant_id, brand, connection_flag, by_system_merchant,
salesVolume, merchant_address, region_operation_id, region_operation_name, business_type,
business_type_name, recruitment_quantity, recruitment_type, recruitment_type_name, business_type_name, recruitment_quantity, recruitment_type, recruitment_type_name,
requirement_description, recruiter_name, recruiter_phone, technical_supervisor_name, requirement_description, recruiter_name, recruiter_phone, technical_supervisor_name,
technical_supervisor_phone, recall_reason, province_city, status, urgent, start_time, technical_supervisor_phone, recall_reason, province_city, status, urgent, start_time,
...@@ -96,7 +102,8 @@ ...@@ -96,7 +102,8 @@
</select> </select>
<select id="listRecruitmentDemand" resultMap="DTOResultMap"> <select id="listRecruitmentDemand" resultMap="DTOResultMap">
select dclrd.id, dclrd.urgent, dclrd.merchant_name, dclrd.merchant_id, dclrd.region_operation_id, dclrd.region_operation_name, select dclrd.id, dclrd.urgent, dclrd.merchant_name, dclrd.merchant_id, dclrd.brand, dclrd.connection_flag,
dclrd.by_system_merchant, dclrd.salesVolume, dclrd.merchant_address, dclrd.region_operation_id, dclrd.region_operation_name,
dclrd.business_type, dclrd.business_type_name, dclrd.recruitment_quantity, dclrd.recruitment_type, dclrd.business_type, dclrd.business_type_name, dclrd.recruitment_quantity, dclrd.recruitment_type,
dclrd.recruitment_type_name, dclrd.requirement_description, dclrd.recruiter_name, dclrd.recruiter_phone, dclrd.recruitment_type_name, dclrd.requirement_description, dclrd.recruiter_name, dclrd.recruiter_phone,
dclrd.recall_reason, dclrd.status, dclrd.confirm_flag, dclrd.created_date, dclrd.technical_supervisor_name, dclrd.recall_reason, dclrd.status, dclrd.confirm_flag, dclrd.created_date, dclrd.technical_supervisor_name,
...@@ -220,12 +227,19 @@ ...@@ -220,12 +227,19 @@
<if test="technicalSupervisorName != null and technicalSupervisorName != ''"> <if test="technicalSupervisorName != null and technicalSupervisorName != ''">
and technical_supervisor_name like concat('%', #{technicalSupervisorName}, '%') and technical_supervisor_name like concat('%', #{technicalSupervisorName}, '%')
</if> </if>
<if test="brand != null and brand != ''">
and brand like concat('%', #{brand}, '%')
</if>
<if test="connectionFlag != null">
and connection_flag = #{connectionFlag}
</if>
order by FIELD(status, 0,4,1,2,3) asc, created_date desc order by FIELD(status, 0,4,1,2,3) asc, created_date desc
</select> </select>
<select id="find72HoursNoResumeDemands" resultMap="BaseResultMap"> <select id="find72HoursNoResumeDemands" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -247,7 +261,8 @@ ...@@ -247,7 +261,8 @@
<select id="find24HoursUnprocessedResumeDemands" resultMap="BaseResultMap"> <select id="find24HoursUnprocessedResumeDemands" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -270,7 +285,8 @@ ...@@ -270,7 +285,8 @@
<select id="find48HoursUnprocessedResumeDemands" resultMap="BaseResultMap"> <select id="find48HoursUnprocessedResumeDemands" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -293,7 +309,8 @@ ...@@ -293,7 +309,8 @@
<select id="find24HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap"> <select id="find24HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -316,7 +333,8 @@ ...@@ -316,7 +333,8 @@
<select id="find48HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap"> <select id="find48HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -339,7 +357,8 @@ ...@@ -339,7 +357,8 @@
<select id="find24HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap"> <select id="find24HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
...@@ -362,7 +381,8 @@ ...@@ -362,7 +381,8 @@
<select id="find48HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap"> <select id="find48HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap">
SELECT SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name, d.id, d.merchant_name, d.merchant_id, d.brand, d.connection_flag, d.by_system_merchant,
d.salesVolume, d.merchant_address, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type, d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone, d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason, d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!