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
de010fbf
Commit
de010fbf
authored
Aug 15, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
c2dff300
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
Performance.php
application/index/controller/Performance.php
+0
-2
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+1
-1
PerformanceService.php
application/index/service/PerformanceService.php
+1
-3
OBargainModel.php
application/model/OBargainModel.php
+3
-1
No files found.
application/index/controller/Performance.php
View file @
de010fbf
...
@@ -114,8 +114,6 @@ class Performance extends Basic
...
@@ -114,8 +114,6 @@ class Performance extends Basic
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$end_day
=
!
empty
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$father_id
=
!
empty
(
$params
[
"father_id"
])
?
$params
[
"father_id"
]
:
''
;
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"type"
],
$end_day
,
$start_day
,
$pageNo
,
$pageSize
,
$father_id
);
if
(
count
(
$list
)
>
0
)
{
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
[
'list'
];
$result
[
"list"
]
=
$list
[
'list'
];
...
...
application/index/controller/PerformanceInfo.php
View file @
de010fbf
...
@@ -32,7 +32,7 @@ class PerformanceInfo extends Basic
...
@@ -32,7 +32,7 @@ class PerformanceInfo extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$where
=
[
];
$where
[
'Obargain.status'
]
=
[
'neq'
,
30
];
/*开始结束时间*/
/*开始结束时间*/
if
((
$this
->
params
[
'create_time_start'
]
!=
NULL
)
&&
(
$this
->
params
[
'create_time_end'
]
!=
NULL
))
{
if
((
$this
->
params
[
'create_time_start'
]
!=
NULL
)
&&
(
$this
->
params
[
'create_time_end'
]
!=
NULL
))
{
$where
[
'Obargain.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time_start'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time_end'
]
.
' 23:59:59'
]];
$where
[
'Obargain.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time_start'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time_end'
]
.
' 23:59:59'
]];
...
...
application/index/service/PerformanceService.php
View file @
de010fbf
...
@@ -51,10 +51,9 @@ class PerformanceService
...
@@ -51,10 +51,9 @@ class PerformanceService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
totalAgent
(
$type
,
$yesterday
,
$end_day
,
$father_id
)
public
function
totalAgent
(
$type
,
$yesterday
,
$end_day
,
$
pageNo
,
$pageSize
,
$
father_id
)
{
{
$where_
=
[];
$where_
=
[];
$where_
[
'total_time'
]
=
array
(
'between'
,
array
(
$end_day
,
$yesterday
)
);
if
(
$father_id
){
if
(
$father_id
){
if
(
$type
==
1
){
if
(
$type
==
1
){
$where_
[
'store_id'
]
=
$father_id
;
$where_
[
'store_id'
]
=
$father_id
;
...
@@ -63,7 +62,6 @@ class PerformanceService
...
@@ -63,7 +62,6 @@ class PerformanceService
}
}
}
}
$where_
=
[];
$where_
[
'a.create_time'
]
=
array
(
'between'
,
array
(
$end_day
.
" 00:00:00"
,
$yesterday
.
" 23:59:59"
)
);
$where_
[
'a.create_time'
]
=
array
(
'between'
,
array
(
$end_day
.
" 00:00:00"
,
$yesterday
.
" 23:59:59"
)
);
$field
=
"b.id as agent_id,b.store_id,b.district_id,sum(a.scale_fee) as performance_total"
;
$field
=
"b.id as agent_id,b.store_id,b.district_id,sum(a.scale_fee) as performance_total"
;
...
...
application/model/OBargainModel.php
View file @
de010fbf
...
@@ -1217,6 +1217,8 @@ class OBargainModel extends Model
...
@@ -1217,6 +1217,8 @@ class OBargainModel extends Model
break
;
break
;
}
}
$result
=
$this
->
db_
$result
=
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
@@ -1225,7 +1227,7 @@ class OBargainModel extends Model
...
@@ -1225,7 +1227,7 @@ class OBargainModel extends Model
->
group
(
$group_
)
->
group
(
$group_
)
->
order
(
$order
)
->
order
(
$order
)
->
select
();
->
select
();
//
echo $this->db_->getLastSql();
//echo $this->db_->getLastSql();
return
$result
;
return
$result
;
}
}
...
...
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