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
4b41b72a
Commit
4b41b72a
authored
May 27, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除无团队不能保存目标判断
parent
ad776e3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
29 deletions
+31
-29
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+31
-29
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
4b41b72a
...
...
@@ -1324,20 +1324,22 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
for
(
MktLeadsAssignedTrack
info
:
mktLeadsAssignedTracks
){
boolean
isStatistics
=
false
;
String
time
=
CommonUtil
.
dateParseString
(
info
.
getTrackTime
(),
"yyyy-MM-dd"
);
if
(
CommonUtil
.
isThisMonth
(
time
)){
scoreMonth
+=
info
.
getTrackScore
();
if
(
CommonUtil
.
isToday
(
time
)){
scoreDay
+=
info
.
getTrackScore
();
if
(!
CommonUtil
.
isNullOrBlank
(
time
)){
if
(
CommonUtil
.
isThisMonth
(
time
)){
scoreMonth
+=
info
.
getTrackScore
();
if
(
CommonUtil
.
isToday
(
time
)){
scoreDay
+=
info
.
getTrackScore
();
}
isStatistics
=
true
;
}
if
(
CommonUtil
.
isThisWeek
(
time
)){
scoreWeek
+=
info
.
getTrackScore
();
isStatistics
=
true
;
}
//既不属于月也不属于周跳出
if
(!
isStatistics
){
break
;
}
isStatistics
=
true
;
}
if
(
CommonUtil
.
isThisWeek
(
time
)){
scoreWeek
+=
info
.
getTrackScore
();
isStatistics
=
true
;
}
//既不属于月也不属于周跳出
if
(!
isStatistics
){
break
;
}
}
//计算新增商机个数
...
...
@@ -1394,7 +1396,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Integer
goalsType
=
requestVO
.
getGoalsType
();
//初始化之前数据 全部修改为不启用
initializationAction
(
practitionerId
,
year
,
goalsType
);
AclPractitionerSubordinateSystem
subordinate
;
AclPractitionerSubordinateSystem
subordinate
=
new
AclPractitionerSubordinateSystem
()
;
if
(
goalsType
==
2
){
//查询经纪人所在团队
List
<
AclPractitionerSubordinateSystem
>
subordinates
=
aclPractitionerSubordinateSystemDALService
.
findByOwnerPractitionerId
(
practitionerId
);
...
...
@@ -1403,13 +1405,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
responseVO
;
}
subordinate
=
subordinates
.
get
(
0
);
}
else
{
subordinate
=
aclPractitionerSubordinateSystemDALService
.
findByPractitionerId
(
practitionerId
);
if
(
subordinate
==
null
){
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830018"
)));
return
responseVO
;
}
}
}
//
else {
//
subordinate = aclPractitionerSubordinateSystemDALService.findByPractitionerId(practitionerId);
//
if (subordinate == null){
//
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830018")));
//
return responseVO;
//
}
//
}
//保存年目标
Date
date
=
new
Date
();
saveYearGoal
(
requestVO
,
practitionerId
,
date
,
year
,
goalsType
,
subordinate
);
...
...
@@ -1461,7 +1463,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsGoals
.
setPractitionerId
(
practitionerId
);
mktLeadsGoals
.
setCurrentYear
(
year
);
mktLeadsGoals
.
setGoalsType
(
goalsType
);
AclPractitionerSubordinateSystem
subordinateSystem
;
AclPractitionerSubordinateSystem
subordinateSystem
=
new
AclPractitionerSubordinateSystem
()
;
if
(
goalsType
==
2
){
List
<
AclPractitionerSubordinateSystem
>
subordinateSystems
=
aclPractitionerSubordinateSystemDALService
.
findByOwnerPractitionerId
(
practitionerId
);
if
(
subordinateSystems
.
isEmpty
()){
...
...
@@ -1469,13 +1471,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
responseVO
;
}
subordinateSystem
=
subordinateSystems
.
get
(
0
);
}
else
{
subordinateSystem
=
aclPractitionerSubordinateSystemDALService
.
findByPractitionerId
(
practitionerId
);
if
(
subordinateSystem
==
null
){
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830018"
)));
return
responseVO
;
}
}
}
//
else {
//
subordinateSystem = aclPractitionerSubordinateSystemDALService.findByPractitionerId(practitionerId);
//
if (subordinateSystem == null){
//
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830018")));
//
return responseVO;
//
}
//
}
mktLeadsGoals
.
setSubordinateSystemId
(
subordinateSystem
.
getId
());
List
<
MktLeadsGoals
>
mktLeadsGoalsList
=
mktLeadsGoalsDALService
.
findByMktLeadsGoals
(
mktLeadsGoals
);
List
<
SalesTargetMonth
>
salesTargetMonthList
=
new
ArrayList
<>();
...
...
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