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
38ab8f4c
Commit
38ab8f4c
authored
Apr 11, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
a3d71d89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
OrderLog.php
application/api_broker/controller/OrderLog.php
+1
-1
Performance.php
application/api_broker/controller/Performance.php
+6
-7
ResultsSummaryTask.php
application/task/controller/ResultsSummaryTask.php
+5
-1
No files found.
application/api_broker/controller/OrderLog.php
View file @
38ab8f4c
...
...
@@ -293,7 +293,7 @@ class OrderLog extends Basic
$params
=
$this
->
params
;
/* $params = array(
"type" => 4, //0.客户电话 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id" => 100
31
,
"agent_id" => 100
14
,
"search_keyword" => "小"
);*/
if
(
!
isset
(
$params
[
"type"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"search_keyword"
]))
{
...
...
application/api_broker/controller/Performance.php
View file @
38ab8f4c
...
...
@@ -37,9 +37,9 @@ class Performance extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*
$params = array(
"agent_id" => 1,
"type" =>
1
, //1表示个人业绩排行 2门店 3区域
/*
$params = array(
"agent_id" => 1
0015
,
"type" =>
2
, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" =>""
);*/
...
...
@@ -47,10 +47,8 @@ class Performance extends Basic
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
//默认排序一周
$end_day
=
isset
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
isset
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$end_day
,
$start_day
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
...
...
@@ -59,6 +57,7 @@ class Performance extends Basic
$result
[
"end_time"
]
=
$end_day
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
}
...
...
application/task/controller/ResultsSummaryTask.php
View file @
38ab8f4c
...
...
@@ -44,6 +44,7 @@ class ResultsSummaryTask
public
function
totalAgentResults
()
{
set_time_limit
(
0
);
//todo 1.分页查询经纪人, 2遍历执行,判断一个经纪人在统计表最后一条统计数据的日期
//TODO 3.日期加一天并判断是否大于等于当前时间大于return 4.执行此日期的统计,5.当次日期小于当前日期,递归日期加一。继续统计
$total
=
$this
->
agentsModel
->
getAgentsCountByTask
();
...
...
@@ -68,6 +69,7 @@ class ResultsSummaryTask
private
function
executeTotal
(
$resultArr
)
{
set_time_limit
(
0
);
foreach
(
$resultArr
as
$key
=>
$value
)
{
$param
[
"agent_id"
]
=
$value
[
"id"
];
$param
[
"is_del"
]
=
0
;
...
...
@@ -100,6 +102,7 @@ class ResultsSummaryTask
private
function
selectTotal
(
$agent_id
,
$district_id
,
$store_id
,
$start_total_time
,
$end_total_time
)
{
set_time_limit
(
0
);
//todo 如果查询出这个时间段都为0 则给此经纪人插入条最后一个日期的为空的数据
$result_arr
=
[];
$start_total_time
=
$start_total_time
.
" 00:00:00"
;
...
...
@@ -152,6 +155,7 @@ class ResultsSummaryTask
private
function
foreachResult
(
$list
)
{
set_time_limit
(
0
);
$result
=
[];
if
(
count
(
$list
)
<=
0
)
{
/*$day = date("Y-m-d", strtotime("-1 day"));
...
...
@@ -167,7 +171,7 @@ class ResultsSummaryTask
private
function
binAgentModel
(
$agent_id
,
$district_id
,
$store_id
,
$result_arr
,
$start_total_time
,
$end_total_time
)
{
set_time_limit
(
0
);
$params
=
[];
$i
=
0
;
while
(
$start_total_time
<=
$end_total_time
)
{
...
...
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