Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
0ef9a6d2
Commit
0ef9a6d2
authored
Aug 06, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩查询 加上当天业绩
parent
b687e857
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
7 deletions
+42
-7
Performance.php
application/index/controller/Performance.php
+42
-7
PerformanceService.php
application/index/service/PerformanceService.php
+0
-0
No files found.
application/index/controller/Performance.php
View file @
0ef9a6d2
...
...
@@ -21,6 +21,37 @@ class Performance extends Basic
$this
->
service_
=
new
PerformanceService
();
}
public
function
getSearchTimeType
(
$start_day
,
$end_day
)
{
//todo 1.今天之前,不包括今天
$search_time_type
=
1
;
if
(
(
date
(
'Y-m-d'
,
strtotime
(
$start_day
))
!=
date
(
"Y-m-d"
,
time
()))
&&
(
date
(
'Y-m-d'
,
strtotime
(
$end_day
))
!=
date
(
"Y-m-d"
,
time
()))
){
$search_time_type
=
1
;
}
//todo 2.今天之前,包括今天
if
(
(
date
(
'Y-m-d'
,
strtotime
(
$start_day
))
!=
date
(
"Y-m-d"
,
time
()))
&&
(
date
(
'Y-m-d'
,
strtotime
(
$end_day
))
==
date
(
"Y-m-d"
,
time
()))
){
$search_time_type
=
2
;
}
//todo 3.就只查询今天
if
(
(
date
(
'Y-m-d'
,
strtotime
(
$start_day
))
==
date
(
"Y-m-d"
,
time
()))
&&
(
date
(
'Y-m-d'
,
strtotime
(
$end_day
))
==
date
(
"Y-m-d"
,
time
()))
){
$search_time_type
=
3
;
}
return
$search_time_type
;
}
//TODO 区域业绩排行 District
/**
...
...
@@ -40,14 +71,16 @@ class Performance extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
//默认排序一周 2018-07-18改为本月
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$is_today
=
!
empty
(
$params
[
"is_today"
])
?
$params
[
"is_today"
]
:
0
;
//todo 业绩查询目前分三种情况
$search_time_type
=
$this
->
getSearchTimeType
(
$start_day
,
$end_day
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
is_today
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
search_time_type
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
...
...
@@ -84,10 +117,11 @@ class Performance extends Basic
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$is_today
=
!
empty
(
$params
[
"is_today"
])
?
$params
[
"is_today"
]
:
0
;
//todo 业绩查询目前分三种情况
$search_time_type
=
$this
->
getSearchTimeType
(
$start_day
,
$end_day
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
is_today
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
search_time_type
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
...
...
@@ -126,10 +160,11 @@ class Performance extends Basic
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$is_today
=
!
empty
(
$params
[
"is_today"
])
?
$params
[
"is_today"
]
:
0
;
//todo 业绩查询目前分三种情况
$search_time_type
=
$this
->
getSearchTimeType
(
$start_day
,
$end_day
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
is_today
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
,
$
search_time_type
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
...
...
application/index/service/PerformanceService.php
View file @
0ef9a6d2
This diff is collapsed.
Click to expand it.
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