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
d25eaa98
Commit
d25eaa98
authored
Jul 09, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0e801efd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
Report.php
application/api_broker/controller/Report.php
+23
-24
No files found.
application/api_broker/controller/Report.php
View file @
d25eaa98
...
@@ -30,8 +30,8 @@ class Report extends Basic
...
@@ -30,8 +30,8 @@ class Report extends Basic
public
function
__construct
(
$request
=
null
)
public
function
__construct
(
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
service_
=
new
ReportService
();
$this
->
service_
=
new
ReportService
();
$this
->
fulModel
=
new
FollowUpLogModel
();
$this
->
fulModel
=
new
FollowUpLogModel
();
$this
->
userService
=
new
UserService
();
$this
->
userService
=
new
UserService
();
...
@@ -83,11 +83,11 @@ class Report extends Basic
...
@@ -83,11 +83,11 @@ class Report extends Basic
$this
->
userService
->
setUserSites
(
$user_id
,
$this
->
siteId
);
//设置用户站点 朱伟 2018-10-22
$this
->
userService
->
setUserSites
(
$user_id
,
$this
->
siteId
);
//设置用户站点 朱伟 2018-10-22
/*记录推送*/
/*记录推送*/
$push
=
new
PushMessageService
();
$push
=
new
PushMessageService
();
$house_ids_arr
=
explode
(
','
,
$house_ids
);
$house_ids_arr
=
explode
(
','
,
$house_ids
);
if
(
is_array
(
$house_ids_arr
))
{
if
(
is_array
(
$house_ids_arr
))
{
foreach
(
$house_ids_arr
as
$k
=>
$v
)
{
foreach
(
$house_ids_arr
as
$k
=>
$v
)
{
$push
->
pushReportMessage
(
$v
,
$agent_id
,
1
,
$this
->
agentId
,
$user_id
);
//推送报备信息
$push
->
pushReportMessage
(
$v
,
$agent_id
,
1
,
$this
->
agentId
,
$user_id
);
//推送报备信息
}
}
}
}
...
@@ -112,13 +112,13 @@ class Report extends Basic
...
@@ -112,13 +112,13 @@ class Report extends Basic
public
function
reportList
()
public
function
reportList
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"agent_id" =>1,
"agent_id" =>1,
"type" => 2,//1表示全部 2表示进场 3 表示收款 4成交报告
"type" => 2,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>1,//0搜索我自己的,1全部
"is_all"=>1,//0搜索我自己的,1全部
"page_no"=>1,
"page_no"=>1,
"page_size"=>15
"page_size"=>15
);*/
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
...
@@ -132,24 +132,24 @@ class Report extends Basic
...
@@ -132,24 +132,24 @@ class Report extends Basic
b.house_id,b.house_title"
;
b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
[];
$result
=
[];
//todo 总监账号看全部带看记录 by 190708
//todo 总监账号看全部带看记录 by 190708
$agentModel
=
new
AAgents
();
$agentModel
=
new
AAgents
();
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
agentId
);
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
agentId
);
if
(
$agents_data
[
"level"
]
==
30
||
$agents_data
[
"level"
]
==
40
){
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
)
{
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
,
1
);
$check_type
=
1
;
}
else
{
if
(
$agents_data
[
"level"
]
<
30
)
{
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
){
$check_type
=
$this
->
service_
->
getCheckType
(
$this
->
agentId
);
$check_type
=
$this
->
service_
->
getCheckType
(
$this
->
agentId
);
if
(
$check_type
==
0
)
{
if
(
$check_type
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
return
$this
->
response
(
101
,
"暂无权限"
);
}
}
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
}
else
{
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
}
}
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
}
else
{
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
}
}
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
}
else
{
...
@@ -158,7 +158,6 @@ class Report extends Basic
...
@@ -158,7 +158,6 @@ class Report extends Basic
}
}
/**
/**
* 获取权限
* 获取权限
* @return int|\think\Response
* @return int|\think\Response
...
@@ -169,7 +168,7 @@ class Report extends Basic
...
@@ -169,7 +168,7 @@ class Report extends Basic
if
(
$result
==
0
)
{
if
(
$result
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
return
$this
->
response
(
101
,
"暂无权限"
);
}
else
{
}
else
{
return
$this
->
response
(
"200"
,
"request success"
,
[
'check_type'
=>
$result
]);
return
$this
->
response
(
"200"
,
"request success"
,
[
'check_type'
=>
$result
]);
}
}
}
}
...
@@ -208,7 +207,7 @@ class Report extends Basic
...
@@ -208,7 +207,7 @@ class Report extends Basic
$params
[
"a.id"
]
=
$params
[
"report_id"
];
$params
[
"a.id"
]
=
$params
[
"report_id"
];
}
}
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
}
else
{
...
@@ -266,7 +265,7 @@ class Report extends Basic
...
@@ -266,7 +265,7 @@ class Report extends Basic
'broker/bargain'
,
'broker/bargain'
,
/* 'broker/statusBargain',*/
/* 'broker/statusBargain',*/
];
];
$param
[
"name"
]
=
array
(
"in"
,
$auth_arr
);
$param
[
"name"
]
=
array
(
"in"
,
$auth_arr
);
$agents
=
new
AAgents
();
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuthIds
(
$params
[
"agent_id"
],
$param
);
$is_auth
=
$agents
->
agentsAuthIds
(
$params
[
"agent_id"
],
$param
);
...
...
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