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
3b8d12d6
Commit
3b8d12d6
authored
Sep 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b3e4d235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
Amercement.php
application/index/controller/Amercement.php
+2
-2
AmercementService.php
application/index/service/AmercementService.php
+17
-9
No files found.
application/index/controller/Amercement.php
View file @
3b8d12d6
...
...
@@ -131,8 +131,8 @@ class Amercement extends Basic
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
$
this
->
s_amercement
->
editAmercement
(
$params
[
'id'
],
$params
,
$params
[
'edit_type'
],
$this
->
userId
);
//int(1)
return
$this
->
response
(
"200"
,
"成功"
);
$
res
=
$this
->
s_amercement
->
editAmercement
(
$this
->
userId
,
$params
[
'id'
],
$params
,
$params
[
'edit_type'
],
$this
->
userId
);
//int(1)
return
$this
->
response
(
$res
[
'code'
],
$res
[
'msg'
]
);
}
...
...
application/index/service/AmercementService.php
View file @
3b8d12d6
...
...
@@ -12,6 +12,7 @@ namespace app\index\service;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\index\untils\ExportExcelUntil
;
use
app\model\AAgents
;
use
app\model\OAmercementImgModel
;
...
...
@@ -270,7 +271,7 @@ class AmercementService
$conditions
=
[];
$conditions
[
"id"
]
=
$id
;
$field
=
"id,status,type,money,submit_agent_id,agent_id,remarks,create_time,operation_id,operation_time"
;
$field
=
"id,status,type,money,submit_agent_id,agent_id,remarks,create_time,operation_id,operation_time
,forfeit_penalty
"
;
$result
=
$this
->
m_amercement
->
getAmercementInfo
(
$conditions
,
$field
);
if
(
!
$result
){
...
...
@@ -284,13 +285,14 @@ class AmercementService
$agent_data
=
$redis_cache
->
getRedisCache
(
2
,
$result
[
'agent_id'
]);
$result
[
'agent_name'
]
=
$agent_data
[
'name'
];
if
(
$result
[
'status'
]
==
0
)
{
//待支付
$forfeit_penalty
=
100
;
$result
[
'forfeit_penalty'
]
=
$forfeit_penalty
;
//滞纳金
$result
[
'money_sum'
]
=
$forfeit_penalty
+
$result
[
'money'
];
//罚款总金额
// $now_time = date("Y-m-d H:i:s", time());
// $forfeit_penalty = $this->updateForfeitPenalty($result['id'],$result['create_time'],$now_time,$result['money']);
// $result['forfeit_penalty'] = $forfeit_penalty;//滞纳金
$result
[
'money_sum'
]
=
$result
[
'forfeit_penalty'
]
+
$result
[
'money'
];
//罚款总金额
}
elseif
(
$result
[
'status'
]
==
1
)
{
//已支付
$forfeit_penalty
=
100
;
$result
[
'forfeit_penalty'
]
=
$forfeit_penalty
;
$result
[
'money_sum'
]
=
$forfeit_penalty
+
$result
[
'money'
];
$result
[
'pay_time'
]
=
''
;
$result
[
'operation_name'
]
=
''
;
...
...
@@ -306,17 +308,23 @@ class AmercementService
/**
* 更新数据
* @param $agent_id
* @param $id
* @param $params
* @param $edit_type
* @param $operation_id
* @return
bool
* @return
array
*/
public
function
editAmercement
(
$id
,
$params
,
$edit_type
,
$operation_id
)
public
function
editAmercement
(
$
agent_id
,
$
id
,
$params
,
$edit_type
,
$operation_id
)
{
switch
(
$edit_type
)
{
case
0
:
//0编辑
$vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$vip
->
checkRule
(
$agent_id
,
'updateAmercement'
);
if
(
$is_can_edit
==
1
){
return
[
'code'
=>
101
,
'msg'
=>
'暂无权限'
];
}
$this
->
updateAmercement
(
$id
,
$params
);
break
;
case
1
:
...
...
@@ -327,7 +335,7 @@ class AmercementService
//2转已支付
$this
->
consummationAmercement
(
$id
,
$operation_id
);
}
return
true
;
return
[
'code'
=>
101
,
'msg'
=>
'成功'
]
;
}
/**
...
...
@@ -349,7 +357,7 @@ class AmercementService
$data
[
'type'
]
=
$params
[
'type'
];
if
((
isset
(
$params
[
'remarks'
]))
&&
$params
[
'remarks'
])
$data
[
'
social_security_fee'
]
=
$params
[
'social_security_fee
'
];
$data
[
'
remarks'
]
=
$params
[
'remarks
'
];
if
(
!
$data
)
{
return
false
;
...
...
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