Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-staff
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a358eedd
authored
Mar 31, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.7.0版本 飞行督导:批量变更接口、新增招聘需求接口调整
1 parent
213e5ac7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
28 deletions
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/recruitment/RecruitmentDemandDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/RecruitmentDemandRemote.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/RecruitmentDemandRemoteImpl.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/recruitment/RecruitmentDemandService.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/recruitment/RecruitmentDemandDTO.java
View file @
a358eed
...
...
@@ -60,4 +60,22 @@ public class RecruitmentDemandDTO extends RecruitmentDemand {
private
List
<
RecruitmentOnboardingPlanDTO
>
onboardingPlans
;
private
List
<
RecruitmentTrialOnboardingDTO
>
trialOnboardingPlans
;
@ApiModelProperty
(
notes
=
"批量操作的招聘需求id列表"
)
private
List
<
Integer
>
ids
;
@ApiModelProperty
(
notes
=
"变更类型:1-区域运营 2-技师督导 3-招聘负责人 4-创建人"
)
private
Integer
changeType
;
@ApiModelProperty
(
notes
=
"接收人姓名"
)
private
String
receiverName
;
@ApiModelProperty
(
notes
=
"接收人账号(uuid)"
)
private
String
receiverUuid
;
@ApiModelProperty
(
notes
=
"接收人手机号"
)
private
String
receiverPhone
;
@ApiModelProperty
(
notes
=
"省份名称(未创建系统门店时,用于查询技术督导)"
)
private
String
province
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/RecruitmentDemandRemote.java
View file @
a358eed
...
...
@@ -74,4 +74,9 @@ public interface RecruitmentDemandRemote {
@ApiParam
(
name
=
"dto"
,
notes
=
"招聘需求id、系统门店名称和商户号"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"关联结果"
)
RpcResponse
<
String
>
recruitmentDemandLinkMerchant
(
@NotNull
RecruitmentDemandDTO
dto
);
@ApiMethod
(
"招聘需求批量变更"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"招聘需求id列表、变更类型、接收人信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"变更结果"
)
RpcResponse
<
String
>
recruitmentDemandBatchChange
(
@NotNull
RecruitmentDemandDTO
dto
);
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/RecruitmentDemandRemoteImpl.java
View file @
a358eed
...
...
@@ -255,4 +255,18 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
return
RpcResponse
.
error
(
e
);
}
}
@Override
public
RpcResponse
<
String
>
recruitmentDemandBatchChange
(
RecruitmentDemandDTO
dto
)
{
try
{
recruitmentDemandService
.
recruitmentDemandBatchChange
(
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
);
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/recruitment/RecruitmentDemandService.java
View file @
a358eed
...
...
@@ -211,38 +211,50 @@ public class RecruitmentDemandService {
// 查询门店省市信息
String
merchantId
=
dto
.
getMerchantId
();
String
provinceName
=
null
;
if
(
StringUtils
.
isNotBlank
(
merchantId
))
{
RpcPagination
<
ListMerchantRequest
>
merchantPagination
=
new
RpcPagination
<>();
merchantPagination
.
setPageNum
(
1
);
merchantPagination
.
setPageSize
(
1
);
ListMerchantRequest
condition
=
new
ListMerchantRequest
();
condition
.
setAccounttypeIdList
(
Arrays
.
asList
(
AccountTypeEnum
.
SHOP_4S
.
getValue
(),
AccountTypeEnum
.
YQ_SHOP
.
getValue
(),
AccountTypeEnum
.
VIRTUAL_YQ_SHOP
.
getValue
()));
condition
.
setMerchantNoStrSet
(
merchantId
);
condition
.
setStatus
(
String
.
valueOf
(
MerchantAccountStatusEnum
.
HAVE_PUBLISH
.
getValue
()));
merchantPagination
.
setCondition
(
condition
);
RpcResponse
<
RpcPagination
<
MerchantRopResponse
>>
merchantWithPageResp
=
merchantRemote
.
listMerchantWithPage
(
merchantPagination
);
if
(
merchantWithPageResp
.
hasResult
())
{
RpcPagination
<
MerchantRopResponse
>
merchantWithPage
=
merchantWithPageResp
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
merchantWithPage
.
getList
()))
{
MerchantRopResponse
merchant
=
merchantWithPage
.
getList
().
get
(
0
);
if
(
Objects
.
nonNull
(
merchant
))
{
// 保存省名称+市名称
String
provinceCity
=
""
;
if
(
StringUtils
.
isNotBlank
(
merchant
.
getProvinceName
()))
{
provinceCity
=
merchant
.
getProvinceName
();
provinceName
=
merchant
.
getProvinceName
();
}
if
(
StringUtils
.
isNotBlank
(
merchant
.
getCityName
()))
{
provinceCity
+=
merchant
.
getCityName
();
}
if
(
StringUtils
.
isNotBlank
(
provinceCity
))
{
dto
.
setProvinceCity
(
provinceCity
);
boolean
bySystemMerchant
=
!
Boolean
.
FALSE
.
equals
(
dto
.
getBySystemMerchant
());
if
(
bySystemMerchant
)
{
// 通过系统门店创建:查询门店省市信息
dto
.
setBySystemMerchant
(
true
);
dto
.
setConnectionFlag
(
true
);
if
(
StringUtils
.
isNotBlank
(
merchantId
))
{
RpcPagination
<
ListMerchantRequest
>
merchantPagination
=
new
RpcPagination
<>();
merchantPagination
.
setPageNum
(
1
);
merchantPagination
.
setPageSize
(
1
);
ListMerchantRequest
condition
=
new
ListMerchantRequest
();
condition
.
setAccounttypeIdList
(
Arrays
.
asList
(
AccountTypeEnum
.
SHOP_4S
.
getValue
(),
AccountTypeEnum
.
YQ_SHOP
.
getValue
(),
AccountTypeEnum
.
VIRTUAL_YQ_SHOP
.
getValue
()));
condition
.
setMerchantNoStrSet
(
merchantId
);
condition
.
setStatus
(
String
.
valueOf
(
MerchantAccountStatusEnum
.
HAVE_PUBLISH
.
getValue
()));
merchantPagination
.
setCondition
(
condition
);
RpcResponse
<
RpcPagination
<
MerchantRopResponse
>>
merchantWithPageResp
=
merchantRemote
.
listMerchantWithPage
(
merchantPagination
);
if
(
merchantWithPageResp
.
hasResult
())
{
RpcPagination
<
MerchantRopResponse
>
merchantWithPage
=
merchantWithPageResp
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
merchantWithPage
.
getList
()))
{
MerchantRopResponse
merchant
=
merchantWithPage
.
getList
().
get
(
0
);
if
(
Objects
.
nonNull
(
merchant
))
{
// 保存省名称+市名称
String
provinceCity
=
""
;
if
(
StringUtils
.
isNotBlank
(
merchant
.
getProvinceName
()))
{
provinceCity
=
merchant
.
getProvinceName
();
provinceName
=
merchant
.
getProvinceName
();
}
if
(
StringUtils
.
isNotBlank
(
merchant
.
getCityName
()))
{
provinceCity
+=
merchant
.
getCityName
();
}
if
(
StringUtils
.
isNotBlank
(
provinceCity
))
{
dto
.
setProvinceCity
(
provinceCity
);
}
}
}
}
}
}
else
{
// 未创建系统门店:直接使用入参中的字段就存,不查询门店
dto
.
setBySystemMerchant
(
false
);
dto
.
setConnectionFlag
(
false
);
// 省份信息取入参中的 province,用于后续查询技术督导
provinceName
=
dto
.
getProvince
();
}
// 根据省份查询技术督导(仅针对特定业务类型:窗膜技师、三膜技师、车衣技师、精品技师)
...
...
@@ -412,6 +424,75 @@ public class RecruitmentDemandService {
recruitmentDemandMapper
.
updateByPrimaryKeySelective
(
update
);
}
/**
* 招聘需求批量变更
* 可变更状态:待人事确认、待督导确认、招聘中
* 变更类型:1-区域运营 2-技师督导 3-招聘负责人 4-创建人
*
* @param dto 包含 ids、changeType、receiverName、receiverUuid、receiverPhone、updatedBy
*/
@Transactional
public
void
recruitmentDemandBatchChange
(
RecruitmentDemandDTO
dto
)
{
RpcAssert
.
assertNotNull
(
dto
.
getIds
(),
DefaultErrorEnum
.
DATA_NULL
,
"ids不能为空"
);
RpcAssert
.
assertNotEmpty
(
dto
.
getIds
(),
DefaultErrorEnum
.
DATA_NULL
,
"请选择招聘需求"
);
RpcAssert
.
assertNotNull
(
dto
.
getChangeType
(),
DefaultErrorEnum
.
DATA_NULL
,
"changeType不能为空"
);
RpcAssert
.
assertNotEmpty
(
dto
.
getReceiverName
(),
DefaultErrorEnum
.
DATA_NULL
,
"receiverName不能为空"
);
RpcAssert
.
assertNotEmpty
(
dto
.
getReceiverUuid
(),
DefaultErrorEnum
.
DATA_NULL
,
"receiverUuid不能为空"
);
// 校验所有招聘需求必须为待人事确认、待督导确认、招聘中状态
List
<
Byte
>
allowedStatuses
=
Arrays
.
asList
(
RecruitmentDemandStatusEnum
.
WAIT_HUMAN_CONFIRM
.
getValue
(),
RecruitmentDemandStatusEnum
.
WAIT_SUPERVISOR_CONFIRM
.
getValue
(),
RecruitmentDemandStatusEnum
.
RECRUITING
.
getValue
()
);
List
<
RecruitmentDemand
>
demands
=
new
ArrayList
<>();
for
(
Integer
id
:
dto
.
getIds
())
{
RecruitmentDemand
demand
=
recruitmentDemandMapper
.
selectByPrimaryKey
(
id
);
if
(
demand
==
null
)
{
throw
new
RpcServiceException
(
RpcErrorEnum
.
BUSINESS_ERROR
,
"招聘需求不存在,id:"
+
id
);
}
if
(!
allowedStatuses
.
contains
(
demand
.
getStatus
()))
{
throw
new
RpcServiceException
(
RpcErrorEnum
.
BUSINESS_ERROR
,
"请选择未办结的招聘需求"
);
}
demands
.
add
(
demand
);
}
Date
now
=
new
Date
();
int
changeType
=
dto
.
getChangeType
();
for
(
RecruitmentDemand
demand
:
demands
)
{
RecruitmentDemand
update
=
new
RecruitmentDemand
();
update
.
setId
(
demand
.
getId
());
update
.
setUpdatedBy
(
dto
.
getUpdatedBy
());
update
.
setUpdatedDate
(
now
);
switch
(
changeType
)
{
case
1
:
// 区域运营
update
.
setRegionOperationName
(
dto
.
getReceiverName
());
update
.
setRegionOperationId
(
dto
.
getReceiverUuid
());
break
;
case
2
:
// 技师督导
update
.
setTechnicalSupervisorName
(
dto
.
getReceiverName
());
update
.
setTechnicalSupervisorPhone
(
dto
.
getReceiverPhone
());
break
;
case
3
:
// 招聘负责人
update
.
setRecruiterName
(
dto
.
getReceiverName
());
update
.
setRecruiterPhone
(
dto
.
getReceiverPhone
());
break
;
case
4
:
// 创建人
update
.
setCreatedBy
(
dto
.
getReceiverName
());
update
.
setCreatedPhone
(
dto
.
getReceiverPhone
());
break
;
default
:
throw
new
RpcServiceException
(
RpcErrorEnum
.
BUSINESS_ERROR
,
"无效的变更类型"
);
}
recruitmentDemandMapper
.
updateByPrimaryKeySelective
(
update
);
}
}
public
RecruitmentDemandDetailDTO
recruitmentDemandDetailWeb
(
Integer
id
)
{
RecruitmentDemand
demand
=
recruitmentDemandMapper
.
selectByPrimaryKey
(
id
);
if
(
Objects
.
isNull
(
demand
))
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment