Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
327ec488
Commit
327ec488
authored
Mar 31, 2022
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【电子报聘】报聘经纪人所属体系规则优化
parent
d1aa5bcf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
123 additions
and
25 deletions
+123
-25
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
+4
-4
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringContractServiceImpl.java
+18
-6
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
+21
-8
yd-api/src/main/java/com/yd/dal/entity/practitioner/hiring/HiringListInfo.java
+28
-1
yd-api/src/main/java/com/yd/dal/mapper/practitioner/PractitionerHiringMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/practitioner/impl/PractitionerHiringDALServiceImpl.java
+23
-2
yd-api/src/main/resources/mapper/agms/AgmsHiringMapper.xml
+8
-2
yd-api/src/main/resources/mapper/practitioner/PractitionerHiringMapper.xml
+18
-2
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsHiringServiceImpl.java
View file @
327ec488
...
...
@@ -232,10 +232,10 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
String
approveRole
=
step
.
getApproveRole
();
AclPractitionerHiringMembership
membership
=
membershipMapper
.
selectByHiringBasicInfoId
(
hiringBasicInfoId
);
if
(
"subsystemOwner"
.
equals
(
approveRole
))
{
if
(!
practitionerId
.
equals
(
membership
.
getSubsystemOwnerId
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"无此流程的审批权限"
));
return
;
}
//
if (!practitionerId.equals(membership.getSubsystemOwnerId())) {
//
responseVO.setCommonResult(new CommonResult(false, "无此流程的审批权限"));
//
return;
//
}
}
else
{
if
(!
practitionerId
.
equals
(
membership
.
getMentorPractitionerId
()))
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
"无此流程的审批权限"
));
...
...
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringContractServiceImpl.java
View file @
327ec488
...
...
@@ -6,11 +6,14 @@ import com.yd.api.practitioner.service.PractitionerHiringContractService;
import
com.yd.dal.entity.customer.*
;
import
com.yd.dal.mapper.customer.*
;
import
com.yd.dal.mapper.practitioner.PractitionerHiringMapper
;
import
com.yd.dal.service.customer.AclPractitionerSubordinateSystemDALService
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.cache.SystemConfigService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.HttpUtil
;
import
com.yd.util.PDFConfiguration
;
import
org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -43,6 +46,8 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
private
AclInsurerBranchMapper
branchMapper
;
@Autowired
private
AclInsurerBranchDeptMapper
deptMapper
;
@Autowired
private
AclPractitionerSubordinateSystemDALService
aclPractitionerSubordinateSystemDALService
;
/**
...
...
@@ -169,7 +174,14 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
AclPractitioner
introducer
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getIntroducerPractitionerId
());
AclPractitioner
second
=
aclPractitionerMapper
.
selectByMobileNo
(
basicInfo
.
getMobileNo
());
List
<
AclPractitionerHiringWorkingExperience
>
workingExperienceList
=
workingExperienceMapper
.
selectByHiringBasicInfoId
(
hiringBasicInfoId
);
//获取体系负责人的的审批记录
List
<
AclPractitionerHiringApproveRecords
>
recordsList
=
recordsMapper
.
queryListByBasicInfoId
(
hiringBasicInfoId
);
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"approveStepId"
,
2
);
List
<
AclPractitionerHiringApproveRecords
>
systermOwnerRecords
=
(
List
<
AclPractitionerHiringApproveRecords
>)
CollectionUtils
.
select
(
recordsList
,
predicate
);
AclPractitionerHiringApproveRecords
systermOwnerRecord
=
systermOwnerRecords
.
get
(
0
);
List
<
AclPractitionerSubordinateSystem
>
subordinateSystems
=
aclPractitionerSubordinateSystemDALService
.
findByOwnerPractitionerId
(
systermOwnerRecord
.
getApprovingPractitionerId
());
AclPractitionerSubordinateSystem
systermOwnerRecordSystem
=
subordinateSystems
.
get
(
0
);
String
mentorName
=
mentor
==
null
?
""
:
mentor
.
getName
();
String
mentorIdNo
=
mentor
==
null
?
""
:
mentor
.
getIdNo
();
...
...
@@ -192,7 +204,7 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
//1页
data
.
put
(
"contactNo"
,
contractNo
);
data
.
put
(
"practitionerNo"
,
second
.
getPractitionerCode
());
data
.
put
(
"subsystem"
,
memberShip
.
getSubsystem
());
data
.
put
(
"subsystem"
,
systermOwnerRecordSystem
.
getName
());
data
.
put
(
"practitioner"
,
basicInfo
.
getName
());
data
.
put
(
"idNo"
,
basicInfo
.
getIdNo
());
...
...
@@ -205,7 +217,7 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
data
.
put
(
"firstPartyResponser"
,
firstPartyResponser
);
data
.
put
(
"firstPartyAddress"
,
firstPartyAddress
);
// 设置一些地址
this
.
setSomeAddress
(
data
,
hiringBasicInfoId
);
this
.
setSomeAddress
(
data
,
hiringBasicInfoId
,
systermOwnerRecordSystem
);
Calendar
now
=
Calendar
.
getInstance
();
data
.
put
(
"contactYear"
,
now
.
get
(
Calendar
.
YEAR
)
+
""
);
...
...
@@ -245,7 +257,7 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
data
.
put
(
"secondEffectiveDay"
,
applyDate
.
get
(
Calendar
.
DAY_OF_MONTH
)
+
""
);
data
.
put
(
"secondParty802"
,
basicInfo
.
getName
());
data
.
put
(
"secondMentor801"
,
mentorName
);
data
.
put
(
"secondSubsystem"
,
memberShip
.
getSubsystem
());
data
.
put
(
"secondSubsystem"
,
systermOwnerRecordSystem
.
getName
());
data
.
put
(
"secondSubsystemNo"
,
""
);
// 签核人员
this
.
setApprovepeople
(
data
,
hiringBasicInfoId
);
...
...
@@ -269,10 +281,10 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
return
data
;
}
private
void
setSomeAddress
(
Map
<
String
,
String
>
data
,
Long
hiringBasicInfoId
)
{
private
void
setSomeAddress
(
Map
<
String
,
String
>
data
,
Long
hiringBasicInfoId
,
AclPractitionerSubordinateSystem
systermOwnerRecordSystem
)
{
AclPractitionerHiringBasicInfo
basicInfo
=
basicInfoMapper
.
selectByPrimaryKey
(
hiringBasicInfoId
);
AclPractitionerHiringMembership
memberShip
=
membershipMapper
.
selectByHiringBasicInfoId
(
hiringBasicInfoId
);
AclPractitioner
systemOwner
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getSubsystemOw
nerId
());
AclPractitioner
systemOwner
=
aclPractitionerMapper
.
selectByPrimaryKey
(
systermOwnerRecordSystem
.
getOwnerPractitio
nerId
());
AclPractitioner
mentor
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getMentorPractitionerId
());
String
mentorName
=
mentor
==
null
?
""
:
mentor
.
getName
();
...
...
@@ -287,7 +299,7 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
data
.
put
(
"secondMobileNo"
,
basicInfo
.
getMobileNo
());
data
.
put
(
"secondSubsystemOwner"
,
memberShip
.
getSubsystemOwner
());
data
.
put
(
"secondSubsystemOwner"
,
systermOwnerRecordSystem
.
getName
());
data
.
put
(
"secondSubsystemSignature"
,
memberShip
.
getSubsystemOwner
());
// 查团队长信息
String
systemOwnerIdNo
=
null
;
...
...
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerHiringServiceImpl.java
View file @
327ec488
...
...
@@ -11,6 +11,7 @@ import com.yd.dal.entity.practitioner.hiring.*;
import
com.yd.dal.mapper.customer.*
;
import
com.yd.dal.service.customer.AclPractitionerDALService
;
import
com.yd.dal.service.customer.AclPractitionerHiringApproveRecordsDALService
;
import
com.yd.dal.service.customer.AclPractitionerSubordinateSystemDALService
;
import
com.yd.dal.service.practitioner.PractitionerHiringDALService
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.ali.send.service.SendService
;
...
...
@@ -61,6 +62,8 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
private
AclPractitionerDALService
aclPractitionerDALService
;
@Autowired
private
AclPractitionerPotentialMapper
aclPractitionerPotentialMapper
;
@Autowired
private
AclPractitionerSubordinateSystemDALService
aclPractitionerSubordinateSystemDALService
;
private
PractitionerHiringDALService
practitionerHiringDalService
;
private
SystemConfigService
systemConfigService
;
...
...
@@ -422,11 +425,11 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
Long
approvingStatus
=
requestVO
.
getApprovingStatus
();
//等保调整
List
<
AclCustomer
>
findByObjSortable
=
aclPractitionerDALService
.
getAclCustomers
(
practitionerId
,
null
);
if
(
null
==
findByObjSortable
){
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"630028"
)));
return
responseVO
;
}
//
List<AclCustomer> findByObjSortable = aclPractitionerDALService.getAclCustomers(practitionerId,null);
//
if(null == findByObjSortable ){
//
responseVO.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("630028")));
//
return responseVO;
//
}
List
<
HiringListInfo
>
hiringListInfoList
;
if
(
Long
.
valueOf
(
"0"
).
equals
(
approvingStatus
))
{
// 当前经纪人的待审批记录
...
...
@@ -795,6 +798,14 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
private
void
sendMsgAfterPDF
(
Long
hiringBasicInfoId
)
{
AclPractitionerHiringBasicInfo
basicInfo
=
basicInfoMapper
.
selectByPrimaryKey
(
hiringBasicInfoId
);
AclPractitionerHiringMembership
memberShip
=
membershipMapper
.
selectByHiringBasicInfoId
(
hiringBasicInfoId
);
//获取体系负责人的的审批记录
List
<
AclPractitionerHiringApproveRecords
>
recordsList
=
recordsMapper
.
queryListByBasicInfoId
(
hiringBasicInfoId
);
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"approveStepId"
,
2
);
List
<
AclPractitionerHiringApproveRecords
>
systermOwnerRecords
=
(
List
<
AclPractitionerHiringApproveRecords
>)
CollectionUtils
.
select
(
recordsList
,
predicate
);
AclPractitionerHiringApproveRecords
systermOwnerRecord
=
systermOwnerRecords
.
get
(
0
);
List
<
AclPractitionerSubordinateSystem
>
subordinateSystems
=
aclPractitionerSubordinateSystemDALService
.
findByOwnerPractitionerId
(
systermOwnerRecord
.
getApprovingPractitionerId
());
AclPractitionerSubordinateSystem
systermOwnerRecordSystem
=
subordinateSystems
.
get
(
0
);
List
<
String
>
mobileNoList
=
new
ArrayList
<>(
3
);
mobileNoList
.
add
(
basicInfo
.
getMobileNo
());
...
...
@@ -811,8 +822,8 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
mobileNoList
.
add
(
mentor
.
getMobileNo
());
}
if
(
memberShip
.
getSubsystemOw
nerId
()
!=
null
)
{
AclPractitioner
system
=
aclPractitionerMapper
.
selectByPrimaryKey
(
memberShip
.
getSubsystemOw
nerId
());
if
(
systermOwnerRecord
.
getApprovingPractitio
nerId
()
!=
null
)
{
AclPractitioner
system
=
aclPractitionerMapper
.
selectByPrimaryKey
(
systermOwnerRecord
.
getApprovingPractitio
nerId
());
mobileNoList
.
add
(
system
.
getMobileNo
());
}
// 若辅导人和团队长为同一人,去重
...
...
@@ -900,7 +911,9 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
}
private
String
handleApproveStatus
(
AclPractitionerHiringMembership
hiringMemberShip
)
{
if
(
Long
.
valueOf
(
"30"
).
equals
(
hiringMemberShip
.
getMdDropOptionId
()))
{
// 经纪人报聘职级
String
mdDropOptionName
=
hiringMemberShip
.
getMdDropOptionName
();
if
(
mdDropOptionName
.
indexOf
(
"S2"
)>=
0
||
mdDropOptionName
.
indexOf
(
"S3"
)>=
0
)
{
return
"2"
;
}
if
(
hiringMemberShip
.
getMentor
()
==
null
||
hiringMemberShip
.
getMentorPractitionerId
()
==
null
)
{
...
...
yd-api/src/main/java/com/yd/dal/entity/practitioner/hiring/HiringListInfo.java
View file @
327ec488
package
com
.
yd
.
dal
.
entity
.
practitioner
.
hiring
;
import
com.google.common.base.Strings
;
import
com.yd.dal.entity.order.CustomerPolicyInfo
;
import
com.yd.util.CommonUtil
;
import
java.util.Date
;
...
...
@@ -41,6 +40,10 @@ public class HiringListInfo implements Comparable<HiringListInfo> {
*/
private
String
applicationTime
;
private
Long
s1PractitionerId
;
private
Long
s2PractitionerId
;
private
Long
s3PractitionerId
;
/**
* 获取 经纪人基本信息id
*
...
...
@@ -149,6 +152,30 @@ public class HiringListInfo implements Comparable<HiringListInfo> {
this
.
applicationTime
=
applicationTime
;
}
public
Long
getS1PractitionerId
()
{
return
s1PractitionerId
;
}
public
void
setS1PractitionerId
(
Long
s1PractitionerId
)
{
this
.
s1PractitionerId
=
s1PractitionerId
;
}
public
Long
getS2PractitionerId
()
{
return
s2PractitionerId
;
}
public
void
setS2PractitionerId
(
Long
s2PractitionerId
)
{
this
.
s2PractitionerId
=
s2PractitionerId
;
}
public
Long
getS3PractitionerId
()
{
return
s3PractitionerId
;
}
public
void
setS3PractitionerId
(
Long
s3PractitionerId
)
{
this
.
s3PractitionerId
=
s3PractitionerId
;
}
@Override
public
String
toString
()
{
return
"HiringListInfo{"
+
...
...
yd-api/src/main/java/com/yd/dal/mapper/practitioner/PractitionerHiringMapper.java
View file @
327ec488
...
...
@@ -5,6 +5,7 @@ import com.yd.dal.entity.practitioner.hiring.*;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author xxy
...
...
@@ -68,4 +69,6 @@ public interface PractitionerHiringMapper {
List
<
HiringListInfo
>
querySystemOwnerUnhandledList
(
Long
practitionerId
);
String
getNextContractNo
();
Map
<
String
,
Long
>
queryS1S2S3
(
Long
practitionerId
);
}
yd-api/src/main/java/com/yd/dal/service/practitioner/impl/PractitionerHiringDALServiceImpl.java
View file @
327ec488
...
...
@@ -18,7 +18,6 @@ import com.yd.dal.service.meta.MdPractitionerHiringApproveStepsDALService;
import
com.yd.dal.service.practitioner.PractitionerHiringDALService
;
import
com.yd.dal.service.user.AclUserDALService
;
import
com.yd.rmi.cache.SystemConfigService
;
import
com.yd.util.CommonUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -209,6 +208,8 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
private
List
<
HiringListInfo
>
queryYdLifeHiringinfoList
(
Long
practitionerId
)
{
// 查询审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
int
approvalIdentity
=
this
.
queryApprovalIdentity
(
practitionerId
);
// 查询当前经纪人的S1,S2,S3体系的团队长practitionerId
Map
<
String
,
Long
>
SystemOwners
=
practitionerHiringMapper
.
queryS1S2S3
(
practitionerId
);
List
<
HiringListInfo
>
resultList
=
new
ArrayList
<>();
if
(
approvalIdentity
==
1
)
{
...
...
@@ -221,7 +222,27 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
resultList
.
addAll
(
list1
);
resultList
.
addAll
(
list2
);
}
return
resultList
;
// resultList = practitionerHiringMapper.querySystemOwnerUnhandledList(practitionerId);
List
<
HiringListInfo
>
list
=
new
ArrayList
<>();
for
(
HiringListInfo
item
:
resultList
)
{
Long
s2PractitionerId
=
item
.
getS2PractitionerId
();
Long
s1PractitionerId
=
item
.
getS1PractitionerId
();
Long
s3PractitionerId
=
item
.
getS3PractitionerId
();
if
(
s2PractitionerId
!=
null
&&
practitionerId
.
equals
(
s2PractitionerId
)){
list
.
add
(
item
);
continue
;
}
if
(
s2PractitionerId
==
null
&&
s1PractitionerId
!=
null
&&
practitionerId
.
equals
(
s1PractitionerId
)){
list
.
add
(
item
);
continue
;
}
if
(
s2PractitionerId
==
null
&&
s1PractitionerId
==
null
&&
practitionerId
.
equals
(
s3PractitionerId
)){
list
.
add
(
item
);
}
}
return
list
;
}
private
List
<
HiringListInfo
>
queryAGMSHiringinfoList
(
String
practitionerMobileNo
)
{
...
...
yd-api/src/main/resources/mapper/agms/AgmsHiringMapper.xml
View file @
327ec488
...
...
@@ -322,8 +322,14 @@
<if
test=
"approveStatus != null"
>
and b.approve_status = #{approveStatus}
</if>
and m.md_drop_option_id = 30
and m.md_drop_option_id
in (select id
from ag_md_drop_options md
left join ag_md_drop_master ms on ms.id = m.drop_master_id
where 1=1
and ms.scenario_code = 'practitioner_level'
and md.drop_option_code in ('S2','S3')
)
</select>
</mapper>
yd-api/src/main/resources/mapper/practitioner/PractitionerHiringMapper.xml
View file @
327ec488
...
...
@@ -9,6 +9,9 @@
<result
column=
"practitionerLevel"
jdbcType=
"VARCHAR"
property=
"practitionerLevel"
/>
<result
column=
"mentor"
jdbcType=
"VARCHAR"
property=
"mentor"
/>
<result
column=
"applicationTime"
jdbcType=
"VARCHAR"
property=
"applicationTime"
/>
<result
column=
"s1PractitionerId"
jdbcType=
"BIGINT"
property=
"s1PractitionerId"
/>
<result
column=
"s2PractitionerId"
jdbcType=
"BIGINT"
property=
"s2PractitionerId"
/>
<result
column=
"s3PractitionerId"
jdbcType=
"BIGINT"
property=
"s3PractitionerId"
/>
</resultMap>
<select
id=
"findHiringList"
resultMap=
"HiringListInfo"
>
select b.id hiringBasicInfoId,
...
...
@@ -249,11 +252,14 @@
date_format(b.created_at, '%Y-%m-%d %H:%i:%s') applicationTime,
if(m.mentor_practitioner_id = #{practitionerId,jdbcType=BIGINT} and
m.subsystem_owner_id = #{practitionerId,jdbcType=BIGINT}, 0,
if(m.mentor_practitioner_id = #{practitionerId,jdbcType=BIGINT}, 1, 2)) approvalIdentity
if(m.mentor_practitioner_id = #{practitionerId,jdbcType=BIGINT}, 1, 2)) approvalIdentity,
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s1_id) as s1PractitionerId,
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s2_id) as s2PractitionerId,
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s3_id) as s3PractitionerId
from ag_acl_practitioner_hiring_basic_info b
left join ag_acl_practitioner_hiring_membership m on b.id = m.hiring_basic_info_id
left join ag_acl_practitioner p on m.subsystem_owner_id = p.id
where 1=1
and m.subsystem_owner_id = #{practitionerId,jdbcType=BIGINT}
and b.approve_status = '1'
and m.md_drop_option_id != (select id
from ag_md_drop_options
...
...
@@ -266,4 +272,13 @@
<select
id=
"getNextContractNo"
resultType=
"java.lang.String"
statementType=
"CALLABLE"
>
select f_getNextContractNo()
</select>
<select
id=
"queryS1S2S3"
resultType=
"Map"
>
SELECT
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s1_id) as s1PractitionerId,
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s2_id) as s2PractitionerId,
(select owner_practitioner_id from ag_acl_practitioner_subordinate_system where id=p.s3_id) as s3PractitionerId
from ag_acl_practitioner p
where p.id = #{practitionerId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment