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
499e15ef
Commit
499e15ef
authored
Apr 11, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店拜访定位地址和门店地址
parent
38ab8f4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Supervise.php
application/api_broker/controller/Supervise.php
+7
-2
AgentsVisitors.php
application/model/AgentsVisitors.php
+1
-0
No files found.
application/api_broker/controller/Supervise.php
View file @
499e15ef
...
@@ -105,13 +105,13 @@ class Supervise extends Basic
...
@@ -105,13 +105,13 @@ class Supervise extends Basic
if
(
$agent_data
[
'level'
]
==
10
)
{
if
(
$agent_data
[
'level'
]
==
10
)
{
$where
=
'a.user_id = '
.
$this
->
params
[
'agent_id'
];
$where
=
'a.user_id = '
.
$this
->
params
[
'agent_id'
];
}
else
{
}
else
{
$where
=
'b.s
hop
_id = '
.
$agent_data
[
'store_id'
];
$where
=
'b.s
tore
_id = '
.
$agent_data
[
'store_id'
];
}
}
//拜访类型(0代表门店拜访、1代表监督执行)
//拜访类型(0代表门店拜访、1代表监督执行)
if
(
empty
(
$this
->
params
[
'visit_type'
]))
{
if
(
empty
(
$this
->
params
[
'visit_type'
]))
{
$where
.=
' AND visit_type = 0'
;
$where
.=
' AND visit_type = 0'
;
$fields
=
'
longitude,latitude,
address,a.remarks,scene_photo,b.name,a.created,leader_name,leader_phone,b.phone,agentshopname'
;
$fields
=
'
a.longitude,a.latitude,c.province,c.city,c.district,c.address as agent_address,a.
address,a.remarks,scene_photo,b.name,a.created,leader_name,leader_phone,b.phone,agentshopname'
;
}
else
{
}
else
{
$where
.=
' AND visit_type = 1'
;
$where
.=
' AND visit_type = 1'
;
$fields
=
'longitude,latitude,address,a.remarks,scene_photo,b.name,a.created'
;
$fields
=
'longitude,latitude,address,a.remarks,scene_photo,b.name,a.created'
;
...
@@ -125,6 +125,11 @@ class Supervise extends Basic
...
@@ -125,6 +125,11 @@ class Supervise extends Basic
$data
[
'list'
]
=
$supervision
->
getVisitorsList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
$data
[
'list'
]
=
$supervision
->
getVisitorsList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
if
(
empty
(
$this
->
params
[
'visit_type'
]))
{
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'agent_address'
]
=
$data
[
'list'
][
$k
][
'province'
]
.
$data
[
'list'
][
$k
][
'city'
]
.
$data
[
'list'
][
$k
][
'district'
]
.
$data
[
'list'
][
$k
][
'agent_address'
];
}
}
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'scene_photo'
]
=
CK_IMG_URL
.
'images/supervise/'
.
$v
[
'scene_photo'
];
$data
[
'list'
][
$k
][
'scene_photo'
]
=
CK_IMG_URL
.
'images/supervise/'
.
$v
[
'scene_photo'
];
}
}
...
...
application/model/AgentsVisitors.php
View file @
499e15ef
...
@@ -19,6 +19,7 @@ class AgentsVisitors extends BaseModel
...
@@ -19,6 +19,7 @@ class AgentsVisitors extends BaseModel
public
function
getVisitorsList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
public
function
getVisitorsList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.user_id = b.id'
,
'left'
)
->
join
(
'a_agents b'
,
'a.user_id = b.id'
,
'left'
)
->
join
(
'a_store c'
,
'b.store_id = c.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
...
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