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
61873746
Commit
61873746
authored
Sep 28, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释
parent
37a3946d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
83 deletions
+2
-83
Performance.php
application/index/controller/Performance.php
+2
-83
No files found.
application/index/controller/Performance.php
View file @
61873746
...
...
@@ -23,38 +23,6 @@ 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
/**
* 区域业绩排行
...
...
@@ -98,7 +66,7 @@ class Performance extends Basic
}
//
TODO
门店排行 Store
// 门店排行 Store
/**
...
...
@@ -136,7 +104,7 @@ class Performance extends Basic
}
//
TODO
个人业绩排行 Individual
// 个人业绩排行 Individual
/**
...
...
@@ -178,55 +146,6 @@ class Performance extends Basic
}
/**
* 导出
* @return string
*/
public
function
getPerformanceExcel
()
{
$export
=
new
ExportExcelUntil
();
$data
=
Session
::
get
(
'excelPerformance'
);
if
(
!
$data
){
return
$this
->
response
(
"101"
,
"Session读取失败"
);
}
foreach
(
$data
[
'data'
]
as
$key
=>
$v
)
{
$e_data_old
[
'index_'
]
=
$v
[
'index_'
];
if
(
$data
[
'type'
]
==
3
){
$e_data_old
[
'name'
]
=
$v
[
'district_name'
];
}
elseif
(
$data
[
'type'
]
==
2
){
$e_data_old
[
'name'
]
=
$v
[
'store_name'
];
}
else
{
$e_data_old
[
'name'
]
=
$v
[
'name'
];
}
$e_data_old
[
'performance_total'
]
=
$v
[
'performance_total'
];
$e_data_old
[
'paylog'
]
=
$v
[
'paylog_total'
];
$e_data_old
[
'bargain_sum'
]
=
$v
[
'bargain_sum_total'
];
$e_data_old
[
'march_in_num'
]
=
$v
[
'march_in_num_total'
];
$e_data_old
[
'look_at_num'
]
=
$v
[
'look_at_num_total'
];
$e_data_old
[
'add_house_num'
]
=
$v
[
'add_house_num_total'
];
$e_data_old
[
'add_user_num'
]
=
$v
[
'add_user_num_total'
];
$e_data_old
[
'team_num'
]
=
$v
[
'team_num'
];
$e_data_new
[]
=
$e_data_old
;
}
if
(
$data
[
'type'
]
==
3
){
$title
=
[
'排名'
,
'部门'
,
'业绩(元)'
,
'成交单数'
,
'收款数'
,
'进场数'
,
'报备数'
,
'新增商铺'
,
'新增客户'
,
'团队人数'
];
}
elseif
(
$data
[
'type'
]
==
2
){
$title
=
[
'排名'
,
'门店'
,
'业绩(元)'
,
'成交单数'
,
'收款数'
,
'进场数'
,
'报备数'
,
'新增商铺'
,
'新增客户'
,
'团队人数'
];
}
else
{
$title
=
[
'排名'
,
'经纪人'
,
'业绩(元)'
,
'成交单数'
,
'收款数'
,
'进场数'
,
'报备数'
,
'新增商铺'
,
'新增客户'
,
'团队人数'
];
}
$export
->
exportTable
(
'业绩排行'
,
$e_data_new
,
10
,
'业绩排行表'
,
$title
);
return
''
;
}
...
...
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