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
2c5732a8
Commit
2c5732a8
authored
Aug 22, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
370629d4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
route.php
application/route.php
+0
-0
ResultsSummaryNewTask.php
application/task/controller/ResultsSummaryNewTask.php
+37
-10
No files found.
application/route.php
View file @
2c5732a8
This diff is collapsed.
Click to expand it.
application/task/controller/ResultsSummaryNewTask.php
View file @
2c5732a8
...
@@ -12,6 +12,7 @@ use app\model\OPayLogModel;
...
@@ -12,6 +12,7 @@ use app\model\OPayLogModel;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
use
app\model\TAgentTotalModel
;
use
app\model\TAgentTotalModel
;
use
app\model\Users
;
use
app\model\Users
;
use
Think\Log
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -79,6 +80,31 @@ class ResultsSummaryNewTask
...
@@ -79,6 +80,31 @@ class ResultsSummaryNewTask
unset
(
$this
->
payLogModel
);
unset
(
$this
->
payLogModel
);
}
public
function
totalAgentResultsByTime
()
{
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
$total_time
=
$_GET
[
"total_time"
];
$total
=
$this
->
agentsModel
->
getAgentsCountByTask
();
$pageSize
=
20
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
$this
->
executeTotal
(
$resultArr
,
$total_time
);
unset
(
$resultArr
);
}
unset
(
$this
->
agentsModel
);
unset
(
$this
->
tAgentTotalModel
);
unset
(
$this
->
houseModel
);
unset
(
$this
->
userModel
);
unset
(
$this
->
bargainModel
);
unset
(
$this
->
reportModel
);
unset
(
$this
->
marchInModel
);
unset
(
$this
->
payLogModel
);
}
}
/**
/**
...
@@ -87,15 +113,15 @@ class ResultsSummaryNewTask
...
@@ -87,15 +113,15 @@ class ResultsSummaryNewTask
* @param $district_id
* @param $district_id
* @param $total_time string 比如修改了数据如成交报告,成交报告提交时间是昨天那么这里的时间就是昨天
* @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
)
{
{
$params
[
0
][
"id"
]
=
$agent_id
;
$params
[
0
][
"id"
]
=
$agent_id
;
$params
[
0
][
"store_id"
]
=
$store_id
;
$params
[
0
][
"store_id"
]
=
$store_id
;
$params
[
0
][
"district_id"
]
=
$district_id
;
$params
[
0
][
"district_id"
]
=
$district_id
;
/* $params[0]["id"] = 5439;
/* $params[0]["id"] = 5439;
$params[0]["store_id"] = 92;
$params[0]["store_id"] = 92;
$params[0]["district_id"] = 2;
$params[0]["district_id"] = 2;
$total_time = '2018-08-15';*/
$total_time = '2018-08-15';*/
$this
->
executeTotal
(
$params
,
$total_time
);
$this
->
executeTotal
(
$params
,
$total_time
);
}
}
...
@@ -123,10 +149,12 @@ class ResultsSummaryNewTask
...
@@ -123,10 +149,12 @@ class ResultsSummaryNewTask
if
(
count
(
$total_time_arr
)
>
0
)
{
if
(
count
(
$total_time_arr
)
>
0
)
{
$id
=
$total_time_arr
[
0
][
"id"
];
$id
=
$total_time_arr
[
0
][
"id"
];
}
}
if
(
empty
(
$value
[
"id"
])
||
empty
(
$value
[
"district_id"
])
||
empty
(
$value
[
"store_id"
]))
{
$agent_id
=
empty
(
$value
[
"id"
])
?
0
:
$value
[
"id"
];
continue
;
$district_id
=
empty
(
$value
[
"district_id"
])
?
0
:
$value
[
"district_id"
];
}
$store_id
=
empty
(
$value
[
"store_id"
])
?
0
:
$value
[
"store_id"
];
$agent_id
=
$value
[
"id"
];
$district_id
=
$value
[
"district_id"
];
$store_id
=
$value
[
"store_id"
];
//todo 查询时间段的数据
//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
);
...
@@ -142,7 +170,6 @@ class ResultsSummaryNewTask
...
@@ -142,7 +170,6 @@ class ResultsSummaryNewTask
unset
(
$result
);
unset
(
$result
);
}
}
if
(
count
(
$insertArr
)
>
0
)
{
if
(
count
(
$insertArr
)
>
0
)
{
$this
->
tAgentTotalModel
->
addTotal
(
$insertArr
);
$this
->
tAgentTotalModel
->
addTotal
(
$insertArr
);
}
}
...
...
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