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
f1d9fcb0
Commit
f1d9fcb0
authored
Jun 25, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
5b4144cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
9 deletions
+31
-9
Performance.php
application/api_broker/controller/Performance.php
+4
-4
PerformanceService.php
application/api_broker/service/PerformanceService.php
+14
-4
ASuperviseModel.php
application/model/ASuperviseModel.php
+13
-1
No files found.
application/api_broker/controller/Performance.php
View file @
f1d9fcb0
...
...
@@ -101,10 +101,10 @@ class Performance extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*
$params = array(
"agent_id" =>
6
,
"start_time" => "2018-0
4-09
",
"end_time" => "2018-0
4-12
",
/*
$params = array(
"agent_id" =>
5739
,
"start_time" => "2018-0
6-25
",
"end_time" => "2018-0
6-25
",
);*/
try
{
$result
=
$this
->
service_
->
storePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]);
...
...
application/api_broker/service/PerformanceService.php
View file @
f1d9fcb0
...
...
@@ -340,6 +340,7 @@ class PerformanceService
{
//获取经纪人信息
$result
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
[
"id"
=>
$agent_id
]);
if
(
count
(
$result
)
<=
0
)
{
return
null
;
}
...
...
@@ -361,10 +362,11 @@ class PerformanceService
$verify
=
new
VerifyService
();
$agent_ids
=
$verify
->
getAgentsByAgentId
(
$agent_id
);
$params
[
"agent_id"
]
=
array
(
"in"
,
$agent_ids
);
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agent_ids
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$list
=
$this
->
sumDistrictPerformance
(
$where_
);
$list
=
$this
->
sumDistrictPerformance
(
$params
);
// dump($list);exit;
}
else
{
$field
=
"sum(add_house_num) as add_house_num,sum(add_user_num) as add_user_num,
...
...
@@ -489,35 +491,43 @@ class PerformanceService
//房源
$addHouseNum
=
$this
->
houseModel
->
getAddHouseNum
(
$params
);
$result
[
"add_house_num"
]
=
isset
(
$addHouseNum
[
0
][
"num"
])
?
$addHouseNum
[
0
][
"num"
]
:
0
;
//dump($addHouseNum);
//客源
$addUserNum
=
$this
->
userModel
->
getAddUserNum
(
$params
);
$result
[
"add_user_num"
]
=
isset
(
$addUserNum
[
0
][
"num"
])
?
$addUserNum
[
0
][
"num"
]
:
0
;
//dump($addUserNum);
//业绩
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$params
,
1
);
//1表示业绩 2表示实收
$result
[
"performance"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//实收
$receivedSum
=
$this
->
bargainModel
->
getReceived
(
$params
);
$result
[
"official_receipts"
]
=
isset
(
$receivedSum
[
0
][
"num"
])
?
$receivedSum
[
0
][
"num"
]
:
0
;
//dump($receivedSum);
//约带看
$reportNum
=
$this
->
reportModel
->
getAddReportNum
(
$params
);
$result
[
"look_at_num"
]
=
isset
(
$reportNum
[
0
][
"num"
])
?
$reportNum
[
0
][
"num"
]
:
0
;
//dump($reportNum);
//进场
$addMarchInNum
=
$this
->
marchInModel
->
getAddMarchInNum
(
$params
);
$result
[
"march_in_num"
]
=
isset
(
$addMarchInNum
[
0
][
"num"
])
?
$addMarchInNum
[
0
][
"num"
]
:
0
;
//dump($addMarchInNum);
//收款
$payLogNum
=
$this
->
payLogModel
->
getAddPayLogNum
(
$params
);
$result
[
"paylog"
]
=
isset
(
$payLogNum
[
0
][
"num"
])
?
$payLogNum
[
0
][
"num"
]
:
0
;
//dump($payLogNum);
// 监督
$result
[
"supervision_num"
]
=
$this
->
superviseModel
->
findSuperviseListCount
(
"id"
,
$params
);
$result
[
"supervision_num"
]
=
$this
->
superviseModel
->
getSuperviseListCount
(
$params
);
return
$result
;
}
...
...
application/model/ASuperviseModel.php
View file @
f1d9fcb0
...
...
@@ -58,7 +58,19 @@ class ASuperviseModel extends Model
return
$result
;
}
public
function
getSuperviseListCount
(
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
$result
=
$this
->
where
(
$where_
)
->
count
(
"id"
);
return
$result
;
}
/**
* 统计监督执行数量分时间
* @param $params
...
...
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