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
a25cd455
Commit
a25cd455
authored
Sep 17, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id
parent
ecda759e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
Cost.php
application/index/controller/Cost.php
+23
-3
No files found.
application/index/controller/Cost.php
View file @
a25cd455
...
@@ -63,7 +63,7 @@ class Cost extends Basic
...
@@ -63,7 +63,7 @@ class Cost extends Basic
$where
=
$this
->
buildWhere
(
$this
->
params
);
$where
=
$this
->
buildWhere
(
$this
->
params
);
$field
=
'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,a.status,'
;
$field
=
'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,a.status,'
;
$field
.=
'b.name as agent_name,a.site_id'
;
$field
.=
'b.name as agent_name,a.site_id
,a.payee_agent_id
'
;
$cost_service
=
new
CostService
();
$cost_service
=
new
CostService
();
if
(
empty
(
$this
->
params
[
'excel'
]))
{
if
(
empty
(
$this
->
params
[
'excel'
]))
{
...
@@ -73,9 +73,17 @@ class Cost extends Basic
...
@@ -73,9 +73,17 @@ class Cost extends Basic
$order
=
'a.ID DESC'
;
$order
=
'a.ID DESC'
;
}
}
$list
=
$this
->
fee_model
->
getJoinAgentList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where
);
$list
=
$this
->
fee_model
->
getJoinAgentList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where
);
$s_redis
=
new
RedisCacheService
();
foreach
(
$list
as
$k
=>
$v
)
{
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'type_name'
]
=
$cost_service
->
getFeeType
(
$v
[
'type'
]);
$list
[
$k
][
'type_name'
]
=
$cost_service
->
getFeeType
(
$v
[
'type'
]);
$list
[
$k
][
'fee_item_name'
]
=
$cost_service
->
getFeeItem
(
$v
[
'fee_item'
]);
$list
[
$k
][
'fee_item_name'
]
=
$cost_service
->
getFeeItem
(
$v
[
'fee_item'
]);
if
(
empty
(
$v
[
'payee_agent_id'
]))
{
$list
[
$k
][
'payee_agent_name'
]
=
''
;
}
else
{
$agent_data
=
$s_redis
->
getRedisCache
(
2
,
$v
[
'payee_agent_id'
]);
$list
[
$k
][
'payee_agent_name'
]
=
$agent_data
[
'name'
];
}
}
}
$data
[
'list'
]
=
$list
;
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$this
->
fee_model
->
getJoinAgentListTotal
(
$where
);
$data
[
'total'
]
=
$this
->
fee_model
->
getJoinAgentListTotal
(
$where
);
...
@@ -334,11 +342,23 @@ class Cost extends Basic
...
@@ -334,11 +342,23 @@ class Cost extends Basic
{
{
$code
=
101
;
$code
=
101
;
$params
=
$this
->
params
;
$params
=
&
$this
->
params
;
if
(
empty
(
$params
[
'id'
]))
{
if
(
empty
(
$params
[
'id'
]
&&
empty
(
$params
[
'id_array'
])
))
{
return
$this
->
response
(
$code
,
'参数错误'
);
return
$this
->
response
(
$code
,
'参数错误'
);
}
}
if
(
isset
(
$params
[
'id_array'
]))
{
if
(
empty
(
$params
[
'id_array'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
}
if
(
isset
(
$params
[
'id'
]))
{
if
(
empty
(
$params
[
'id'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
}
switch
(
$params
[
'check_status'
])
{
switch
(
$params
[
'check_status'
])
{
case
1
:
case
1
:
$params
[
'status'
]
=
1
;
break
;
$params
[
'status'
]
=
1
;
break
;
...
...
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