Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
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
HTML5-李恒逸
sunac-quanmin
Commits
21994628
Commit
21994628
authored
Jun 20, 2017
by
html5-李恒逸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销管-看到之前信息
parent
e7e492a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
kpiadmin.php
html/application/controllers/admin/kpiadmin.php
+6
-3
report.php
html/application/controllers/admin/report.php
+2
-1
No files found.
html/application/controllers/admin/kpiadmin.php
View file @
21994628
...
...
@@ -93,7 +93,8 @@ class Kpiadmin extends CI_Controller
//我是销管
$user_id
=
(
int
)
$this
->
session
->
userdata
(
'u_id'
);
$where
.=
' and R.user_id = '
.
$user_id
;
$buildings_select
=
$this
->
manager
->
get_buildings
(
'id = '
.
$user_id
);
$where
.=
' and B.id in ('
.
$buildings_select
[
0
][
'building_id'
]
.
')'
;
$where
=
trim
(
$where
,
' and '
);
//获取客户总数
...
...
@@ -109,7 +110,8 @@ class Kpiadmin extends CI_Controller
{
foreach
(
$customers
as
$key
=>
$customer
)
{
$customers
[
$key
][
'customers'
]
=
0
;
$where
=
'R.user_id ='
.
$user_id
;
// $where = 'R.user_id =' . $user_id;
$where
=
'B.id in ('
.
$buildings_select
[
0
][
'building_id'
]
.
')'
;
if
(
$con_arr
[
'start_day'
])
{
$where
.=
' and CB.create_time >= '
.
strtotime
(
$con_arr
[
'start_day'
]);
...
...
@@ -205,7 +207,8 @@ class Kpiadmin extends CI_Controller
if
(
$info
[
'role_id'
]
==
10
)
{
$where
.=
' and RR.user_id ='
.
$user_id
;
$buildings_select
=
$this
->
manager
->
get_buildings
(
'id = '
.
$user_id
);
$where
.=
' and B.id in ('
.
$buildings_select
[
0
][
'building_id'
]
.
')'
;
}
else
if
(
$info
[
'role_id'
]
==
11
){
$where
.=
' and D.manager_id ='
.
$user_id
;
}
...
...
html/application/controllers/admin/report.php
View file @
21994628
...
...
@@ -820,7 +820,8 @@ class Report extends CI_Controller
//$where .= ' B.id in('.$b_id.') and';
}
$buildings_select
=
$this
->
manager
->
get_buildings
(
'id = '
.
$user_id
);
$where
.=
' B.id in ('
.
$buildings_select
[
0
][
'building_id'
]
.
')'
;
$buildings_select
=
$this
->
manager
->
get_buildings
(
'id = '
.
$user_id
);
$where
.=
' B.id in ('
.
$buildings_select
[
0
][
'building_id'
]
.
')'
;
$where
=
trim
(
$where
,
' and '
);
return
$where
;
...
...
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