Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
data-server
Commits
05ea4456
Commit
05ea4456
authored
Apr 09, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化月度肥料任务
parent
0b532595
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
60 deletions
+65
-60
DayTaskServiceImpl.java
...ava/cn/wisenergy/service/app/impl/DayTaskServiceImpl.java
+65
-60
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/DayTaskServiceImpl.java
View file @
05ea4456
...
...
@@ -212,6 +212,9 @@ public class DayTaskServiceImpl implements DayTaskService {
return
R
.
ok
(
0
,
true
);
}
//如果用户的团队业绩不存在的,新增本月团队业绩
addTeamPerformance
(
userList
);
boolean
bool
=
monthlyIncome
(
totalMoney
,
userList
);
if
(!
bool
)
{
return
R
.
ok
(
1
,
false
);
...
...
@@ -238,13 +241,15 @@ public class DayTaskServiceImpl implements DayTaskService {
totalMoney
=
totalMoney
.
add
(
orderInfo
.
getPayment
());
}
double
number
=
Math
.
floor
(
totalMoney
.
doubleValue
()
/
3980
/
12
);
if
(
number
==
0
)
{
return
R
.
ok
(
0
,
true
);
}
//1、判断当前月是否是业绩开始的第一个月
List
<
TeamPerformance
>
teamPerformances
=
teamPerformanceMapper
.
getByBeforeTime
(
yearMonth
);
//2、集合为空 是业绩开始的第一个月
if
(
CollectionUtils
.
isEmpty
(
teamPerformances
))
{
if
(
number
!=
0
)
{
//获取月业绩前20用户
List
<
TeamPerformance
>
list
=
teamPerformanceMapper
.
userTwenty
(
yearMonth
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
...
...
@@ -311,8 +316,6 @@ public class DayTaskServiceImpl implements DayTaskService {
if
(!
bool
)
{
return
R
.
ok
(
1
,
false
);
}
}
log
.
info
(
"本月最大进步奖日定时任务执行成功"
);
return
R
.
ok
(
0
,
true
);
}
...
...
@@ -463,7 +466,9 @@ public class DayTaskServiceImpl implements DayTaskService {
if
(
null
!=
memberPercent
)
{
//获取本月团队总金额
TeamPerformance
teamPerformance
=
teamPerformanceMapper
.
getByUserIdAndTime
(
user
.
getUserId
(),
yearMonth
);
if
(
null
==
teamPerformance
){
}
//获取该等级团队总金额
Double
teamTotal
=
teamPerformanceMapper
.
countTeamMoney
(
user
.
getUserLevel
(),
yearMonth
);
if
(
null
!=
teamPerformance
&&
null
!=
teamTotal
)
{
...
...
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