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
756e5a47
Commit
756e5a47
authored
Nov 26, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task
parent
e4409386
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
ResultsSummaryNewTask.php
application/task/controller/ResultsSummaryNewTask.php
+13
-6
No files found.
application/task/controller/ResultsSummaryNewTask.php
View file @
756e5a47
...
...
@@ -67,7 +67,7 @@ class ResultsSummaryNewTask
$pageSize
=
20
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id
,site_id
"
);
$this
->
executeTotal
(
$resultArr
,
null
);
unset
(
$resultArr
);
}
...
...
@@ -92,7 +92,7 @@ class ResultsSummaryNewTask
$pageSize
=
20
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id
,site_id
"
);
$this
->
executeTotal
(
$resultArr
,
$total_time
);
unset
(
$resultArr
);
}
...
...
@@ -117,7 +117,7 @@ class ResultsSummaryNewTask
$pageSize
=
20
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id
,site_id
"
);
$this
->
executeTotal
(
$resultArr
,
$total_time
);
unset
(
$resultArr
);
}
...
...
@@ -164,11 +164,12 @@ class ResultsSummaryNewTask
* @param $district_id
* @param $total_time string 比如修改了数据如成交报告,成交报告提交时间是昨天那么这里的时间就是昨天
*/
public
function
updateTotalByAgentId
(
$agent_id
,
$store_id
,
$district_id
,
$total_time
)
public
function
updateTotalByAgentId
(
$agent_id
,
$store_id
,
$district_id
,
$total_time
,
$site_id
)
{
$params
[
0
][
"id"
]
=
$agent_id
;
$params
[
0
][
"store_id"
]
=
$store_id
;
$params
[
0
][
"district_id"
]
=
$district_id
;
$params
[
0
][
"site_id"
]
=
$site_id
;
/* $params[0]["id"] = 5439;
$params[0]["store_id"] = 92;
$params[0]["district_id"] = 2;
...
...
@@ -206,8 +207,9 @@ class ResultsSummaryNewTask
$agent_id
=
$value
[
"id"
];
$district_id
=
$value
[
"district_id"
];
$store_id
=
$value
[
"store_id"
];
$site_id
=
$value
[
"site_id"
];
//todo 查询时间段的数据
$result
=
$this
->
selectTotal
(
$agent_id
,
$district_id
,
$store_id
,
$start_total_time
,
$end_total_time
);
$result
=
$this
->
selectTotal
(
$agent_id
,
$district_id
,
$store_id
,
$start_total_time
,
$end_total_time
,
$site_id
);
if
(
empty
(
$result
))
continue
;
if
(
$id
>
0
)
{
...
...
@@ -239,7 +241,7 @@ class ResultsSummaryNewTask
// dump($params);
}*/
private
function
selectTotal
(
$agent_id
,
$district_id
,
$store_id
,
$start_total_time
,
$end_total_time
)
private
function
selectTotal
(
$agent_id
,
$district_id
,
$store_id
,
$start_total_time
,
$end_total_time
,
$site_id
)
{
//todo 如果查询出这个时间段都为0 则给此经纪人插入条最后一个日期的为空的数据
$result_arr
=
[];
...
...
@@ -285,6 +287,11 @@ class ResultsSummaryNewTask
$result_arr
[
"bargain_sum"
]
=
$bargainSum
[
0
][
"num"
];
//带看数
$bargainSum
=
$this
->
bargainModel
->
getAddBargainNumGroupTimeNew
(
$params
,
3
);
//表示统计
$result_arr
[
"bargain_sum"
]
=
$bargainSum
[
0
][
"num"
];
return
$this
->
binAgentModel
(
$agent_id
,
$district_id
,
$store_id
,
$result_arr
,
$start_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