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
fbb45b38
Commit
fbb45b38
authored
May 09, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opitimize
parent
568012d5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
5 deletions
+91
-5
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+31
-1
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/AddRecruitTrackRequestVO.java
+27
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssignedTrack.java
+3
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
+2
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
+5
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
+20
-4
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
fbb45b38
...
...
@@ -505,11 +505,41 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
aclPractitionerPotentialAssignedTrackDALService
.
saveAll
(
potentialAssignedTrackList
);
}
}
@Override
public
AddRecruitTrackResponseVO
addRecruitTrack
(
AddRecruitTrackRequestVO
requestVO
)
{
AddRecruitTrackResponseVO
responseVO
=
new
AddRecruitTrackResponseVO
();
Long
trackId
=
requestVO
.
getTrackId
();
Long
trackStatusId
=
requestVO
.
getTrackStatusId
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
potentialId
=
requestVO
.
getPractitionerPotentialId
();
if
(
trackId
!=
null
&&
trackStatusId
!=
null
&&
practitionerId
!=
null
&&
potentialId
!=
null
){
AclPractitionerPotentialAssignedTrack
assignedTrack
=
new
AclPractitionerPotentialAssignedTrack
();
//1、查询团队长对该增员几天是否已经进行过该增员状态
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPractitionerIdAndPotentialId
(
practitionerId
,
potentialId
);
if
(
assignedTrackList
==
null
||
assignedTrackList
.
isEmpty
()){
//3、如果没有,获取增员状态对应的分值,
// assignedTrack.setTrackScore();
}
assignedTrack
.
setPractitionerAssignedId
(
practitionerId
);
assignedTrack
.
setPractitionerPotentialId
(
potentialId
);
assignedTrack
.
setTrackStatusId
(
trackStatusId
);
assignedTrack
.
setNotice
(
requestVO
.
getNotice
());
assignedTrack
.
setIsActive
(
1
);
assignedTrack
.
setCreatorType
(
2
);
assignedTrack
.
setCreatedBy
(
practitionerId
);
assignedTrack
.
setCreatedAt
(
new
Date
());
}
else
{
String
[]
paras
=
{
"trackId,trackStatusId,practitionerId,potentialId"
};
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610002"
,
paras
)));
}
return
null
;
}
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/AddRecruitTrackRequestVO.java
View file @
fbb45b38
...
...
@@ -2,6 +2,9 @@ package com.yd.api.practitioner.vo.recruit;
public
class
AddRecruitTrackRequestVO
{
private
Long
trackId
;
private
Long
practitionerId
;
private
Long
practitionerPotentialId
;
private
Integer
trackScore
;
private
Long
trackStatusId
;
private
String
notice
;
private
Integer
isActive
;
...
...
@@ -37,4 +40,28 @@ public class AddRecruitTrackRequestVO {
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
public
Long
getPractitionerId
()
{
return
practitionerId
;
}
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
}
public
Long
getPractitionerPotentialId
()
{
return
practitionerPotentialId
;
}
public
void
setPractitionerPotentialId
(
Long
practitionerPotentialId
)
{
this
.
practitionerPotentialId
=
practitionerPotentialId
;
}
public
Integer
getTrackScore
()
{
return
trackScore
;
}
public
void
setTrackScore
(
Integer
trackScore
)
{
this
.
trackScore
=
trackScore
;
}
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssignedTrack.java
View file @
fbb45b38
...
...
@@ -66,5 +66,7 @@ public class AclPractitionerPotentialAssignedTrack implements Serializable {
private
Integer
isLasted
;
private
Integer
trackScore
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
View file @
fbb45b38
...
...
@@ -18,4 +18,6 @@ public interface AclPractitionerPotentialAssignedTrackMapper {
int
updateByPrimaryKey
(
AclPractitionerPotentialAssignedTrack
record
);
void
insertList
(
@Param
(
"potentialAssignedTrackList"
)
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"potentialId"
)
Long
potentialId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
View file @
fbb45b38
...
...
@@ -9,4 +9,6 @@ import java.util.List;
public
interface
AclPractitionerPotentialAssignedTrackDALService
{
void
saveAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
Long
practitionerId
,
Long
potentialId
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
View file @
fbb45b38
...
...
@@ -17,4 +17,9 @@ public class AclPractitionerPotentialAssignedTrackDALServiceImpl implements AclP
public
void
saveAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
)
{
aclPractitionerPotentialAssignedTrackMapper
.
insertList
(
potentialAssignedTrackList
);
}
@Override
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
Long
practitionerId
,
Long
potentialId
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPractitionerIdAndPotentialId
(
practitionerId
,
potentialId
);
}
}
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
View file @
fbb45b38
...
...
@@ -15,9 +15,10 @@
<result
column=
"updator_type"
jdbcType=
"INTEGER"
property=
"updatorType"
/>
<result
column=
"creator_type"
jdbcType=
"INTEGER"
property=
"creatorType"
/>
<result
column=
"is_lasted"
jdbcType=
"INTEGER"
property=
"isLasted"
/>
<result
column=
"track_score"
jdbcType=
"INTEGER"
property=
"trackScore"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, practitioner_potential_id, practitioner_assigned_id, track_status_id,
notice,
id, practitioner_potential_id, practitioner_assigned_id, track_status_id,
track_score,notice,
is_active, created_at, created_by, updated_at, updated_by, creator_type, updator_type,is_lasted
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
...
...
@@ -26,17 +27,25 @@
from ag_acl_practitioner_potential_assigned_track
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"findByPractitionerIdAndPotentialId"
resultType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigned_track
where practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
AND practitioner_potential_id = #{potentialId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_acl_practitioner_potential_assigned_track
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigned_track (practitioner_potential_id, practitioner_assigned_id,
track_status_id,
notice, is_active,
track_status_id,
track_score,notice, is_active,
created_at, created_by, updated_at,
updated_by, updator_type,creator_type,is_lasted )
values (#{practitionerPotentialId,jdbcType=BIGINT}, #{practitionerAssignedId,jdbcType=BIGINT},
#{trackStatusId,jdbcType=BIGINT},
#{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{trackStatusId,jdbcType=BIGINT},
#{trackScore,jdbcType=INTEGER}, #{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT},#{updatorType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{isLasted,jdbcType=INTEGER})
</insert>
...
...
@@ -52,6 +61,9 @@
<if
test=
"trackStatusId != null"
>
track_status_id,
</if>
<if
test=
"trackScore != null"
>
track_score,
</if>
<if
test=
"notice != null"
>
notice,
</if>
...
...
@@ -103,7 +115,7 @@
</insert>
<insert
id=
"insertList"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigned_track(practitioner_potential_id, practitioner_assigned_id,
track_status_id, notice, is_active,
track_status_id,
track_score,
notice, is_active,
created_at, created_by, updated_at,
updated_by, updator_type,creator_type,is_lasted )
values
...
...
@@ -112,6 +124,7 @@
#{item.practitionerPotentialId},
#{item.practitionerAssignedId},
#{item.trackStatusId},
#{item.trackScore},
#{item.notice},
#{item.isActive},
#{item.createdAt},
...
...
@@ -136,6 +149,9 @@
<if
test=
"trackStatusId != null"
>
track_status_id = #{trackStatusId,jdbcType=BIGINT},
</if>
<if
test=
"trackScore != null"
>
track_score = #{trackScore,jdbcType=INTEGER},
</if>
<if
test=
"notice != null"
>
notice = #{notice,jdbcType=VARCHAR},
</if>
...
...
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