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
3471ac49
Commit
3471ac49
authored
Mar 25, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩
parent
ba20d46e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
7 deletions
+73
-7
Performance.php
application/api_broker/controller/Performance.php
+20
-0
PerformanceService.php
application/api_broker/service/PerformanceService.php
+0
-0
VerifyService.php
application/api_broker/service/VerifyService.php
+1
-1
GHouses.php
application/model/GHouses.php
+17
-0
OBargainModel.php
application/model/OBargainModel.php
+11
-2
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+8
-4
Users.php
application/model/Users.php
+15
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Performance.php
View file @
3471ac49
...
...
@@ -146,4 +146,24 @@ class Performance extends Basic
}
}
public
function
storeOrAgentSort
(){
$params
=
$this
->
params
;
$params
=
array
(
"agent_id"
=>
1
,
"start_time"
=>
"2018-03-10"
,
"end_time"
=>
"2018-03-23"
,
);
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
try
{
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$exception
);
}
}
}
application/api_broker/service/PerformanceService.php
View file @
3471ac49
This diff is collapsed.
Click to expand it.
application/api_broker/service/VerifyService.php
View file @
3471ac49
...
...
@@ -22,7 +22,7 @@ class VerifyService
}
/**
* 经纪人身份验证
* 经纪人身份验证
获取经纪人
* @param $agent_id
* @return null|string
*/
...
...
application/model/GHouses.php
View file @
3471ac49
...
...
@@ -518,6 +518,23 @@ class GHouses extends BaseModel
->
select
();
}
public
function
getAddHouseNum
(
$params
){
$field
=
"count(1) as num"
;
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"upload_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$where_
)
->
select
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
/******zw end ************/
...
...
application/model/OBargainModel.php
View file @
3471ac49
...
...
@@ -324,9 +324,18 @@ class OBargainModel extends Model
->
select
();
}
public
function
getAddBargainNum
(
$params
){
public
function
getAddBargainNum
(
$params
,
$type
){
$where_
=
[];
$field
=
"count(1) as num"
;
if
(
$type
==
1
){
$field
=
"sum(scale_fee) as num"
;
}
elseif
(
$type
==
2
){
$field
=
"sum(practical_fee) as num"
;
}
elseif
(
$type
==
3
){
$field
=
"count(1) as num"
;
}
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
...
...
application/model/TAgentTotalModel.php
View file @
3471ac49
...
...
@@ -57,15 +57,18 @@ class TAgentTotalModel extends Model
->
select
();
}
/**
* 获取分组统计数据
* @param $field
* @param $params
* @param $type
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getTotalByAgentId
(
$
params
,
$type
)
public
function
getTotalByAgentId
(
$
field
,
$params
,
$type
,
$order
=
""
)
{
$group_
=
"
agent_id
"
;
$group_
=
""
;
switch
(
$type
)
{
case
1
:
$group_
=
"agent_id"
;
...
...
@@ -76,12 +79,13 @@ class TAgentTotalModel extends Model
case
3
:
$group_
=
"district_id"
;
break
;
}
$result
=
$this
->
db_
->
field
(
"agent_id,store_id,district_id,sum(performance) as performance_total"
)
->
field
(
$field
)
->
where
(
$params
)
->
group
(
$group_
)
->
order
(
"performance_total desc"
)
->
order
(
$order
)
->
select
();
//echo $this->db_->getLastSql();
return
$result
;
...
...
application/model/Users.php
View file @
3471ac49
...
...
@@ -325,6 +325,21 @@ class Users extends Model
->
select
();
}
public
function
getAddUserNum
(
$params
){
$field
=
"count(1) as num"
;
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"referrer_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$where_
)
->
select
();
}
public
function
all_user_count
(
$params
=
''
)
{
...
...
application/route.php
View file @
3471ac49
...
...
@@ -363,6 +363,7 @@ Route::group('broker', [
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]],
'agentPerformanceBySearch'
=>
[
'api_broker/Performance/agentPerformanceBySearch'
,
[
'method'
=>
'get'
]],
'orderNoList'
=>
[
'api_broker/Performance/orderNoList'
,
[
'method'
=>
'get'
]],
'storeOrAgentSort'
=>
[
'api_broker/Performance/storeOrAgentSort'
,
[
'method'
=>
'get'
]],
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
...
...
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