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
2ad65e60
Commit
2ad65e60
authored
Sep 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台罚款账单表
parent
86538976
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
23 deletions
+75
-23
Amercement.php
application/index/controller/Amercement.php
+1
-1
AmercementService.php
application/index/service/AmercementService.php
+73
-22
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Amercement.php
View file @
2ad65e60
...
...
@@ -53,7 +53,7 @@ class Amercement extends Basic
}
public
function
getAmercementList
(){
public
function
getAmercementList
Pc
(){
$params
=
$this
->
params
;
// $params = array(
...
...
application/index/service/AmercementService.php
View file @
2ad65e60
...
...
@@ -115,6 +115,23 @@ class AmercementService
return
$str
;
}
public
function
getStatusName
(
$status
)
{
switch
(
$status
)
{
case
0
:
$str
=
'待支付'
;
break
;
case
1
:
$str
=
'已支付'
;
break
;
case
2
:
$str
=
'已取消'
;
break
;
default
:
$str
=
'暂无'
;
}
return
$str
;
}
/**
* 新增
*
...
...
@@ -222,41 +239,74 @@ class AmercementService
}
/**
* 后台罚款账单表
* @param $params
* @param $page_no
* @param $page_size
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getAmercementListPc
(
$params
,
$page_no
,
$page_size
)
{
$conditions
=
$this
->
buildConditions
(
$params
);
$field
=
"id,status,type,money,submit_agent_id,agent_id,remarks,create_time"
;
$condition
=
[];
if
(
$amercement_type
==
0
){
$condition
[
'agent_id'
]
=
$agent_id
;
}
else
{
$condition
[
'submit_agent_id'
]
=
$agent_id
;
}
$condition
[
'status'
]
=
$status
;
$result
=
$this
->
m_amercement
->
getAmercementList
(
$condition
,
$field
,
$page_no
,
$page_size
);
$result
=
$this
->
m_amercement
->
getAmercementList
(
$conditions
,
$field
,
$page_no
,
$page_size
);
$redis_cache
=
new
RedisCacheService
();
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
'type_name'
]
=
$this
->
getTypeName
(
$val
[
'type'
]);
$result
[
$key
][
'status_name'
]
=
$this
->
getStatusName
(
$val
[
'status'
]);
$agent_data
=
$redis_cache
->
getRedisCache
(
2
,
$val
[
'submit_agent_id'
]);
$result
[
$key
][
'submit_agent_name'
]
=
$agent_data
[
'name'
];
$result
[
$key
][
'submit_agent_phone'
]
=
$agent_data
[
'phone'
];
if
(
$status
==
0
){
//待支付
$forfeit_penalty
=
100
;
$result
[
$key
][
'forfeit_penalty'
]
=
$forfeit_penalty
;
//滞纳金
$result
[
$key
][
'money_sum'
]
=
$forfeit_penalty
+
$result
[
$key
][
'money'
];
//罚款总金额
}
elseif
(
$status
==
1
){
//已支付
$forfeit_penalty
=
100
;
$result
[
$key
][
'forfeit_penalty'
]
=
$forfeit_penalty
;
$result
[
$key
][
'money_sum'
]
=
$forfeit_penalty
+
$result
[
$key
][
'money'
];
$result
[
$key
][
'pay_time'
]
=
''
;
}
$result
[
$key
][
'img'
]
=
$this
->
getAmercementImage
(
$val
[
'id'
]);
$agent_data
=
$redis_cache
->
getRedisCache
(
2
,
$val
[
'agent_id'
]);
$result
[
$key
][
'agent_name'
]
=
$agent_data
[
'name'
];
}
return
$result
;
}
/**
* 构建搜索条件
* @param $params
* @return array
*/
public
function
buildConditions
(
$params
)
{
$conditions
=
[];
//时间
if
(
!
empty
(
$params
[
'start_time'
])
&&
!
empty
(
$params
[
'end_time'
]))
{
$conditions
[
'create_time'
]
=
[
'between'
,
[
$params
[
'start_time'
]
.
' 00:00:00'
,
$params
[
'end_time'
]
.
' 23:59:59'
]];
}
//状态
if
(
!
empty
(
$params
[
'status'
]))
{
$conditions
[
"status"
]
=
$params
[
"status"
];
}
//项目
if
(
!
empty
(
$params
[
'type'
]))
{
$conditions
[
"type"
]
=
$params
[
"type"
];
}
//罚款ID
if
(
!
empty
(
$params
[
'id'
]))
{
$conditions
[
"id"
]
=
$params
[
"id"
];
}
//提交人姓名
if
(
!
empty
(
$params
[
'submit_name'
]))
{
$conditions
[
"id"
]
=
$params
[
"id"
];
}
//被罚款人姓名
if
(
!
empty
(
$params
[
'name'
]))
{
$conditions
[
"id"
]
=
$params
[
"id"
];
}
return
$conditions
;
}
}
\ No newline at end of file
application/route.php
View file @
2ad65e60
...
...
@@ -586,6 +586,7 @@ Route::group('index', [
'recoverCheckRefund'
=>
[
'index/Refund/recoverCheckRefund'
,
[
'method'
=>
'POST|get'
]],
//已审核退款-转审核状态
'addAmercement'
=>
[
'index/Amercement/addAmercement'
,
[
'method'
=>
'GET|POST'
]],
'getAmercementListPc'
=>
[
'index/Amercement/getAmercementListPc'
,
[
'method'
=>
'GET|POST'
]],
]);
...
...
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