Commit afa90c43 authored by zhuwei's avatar zhuwei

1

parent e0f4b4ae
......@@ -138,7 +138,7 @@ class Amercement extends Basic
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$res = $this->s_amercement->editAmercement($this->userId,$params['id'],$params,$params['edit_type'],$this->userId);//int(1)
$res = $this->s_amercement->editAmercement($params['id'],$params,$params['edit_type'],$this->userId);//int(1)
return $this->response($res['code'], $res['msg']);
}
......
......@@ -192,7 +192,7 @@ class AmercementService
*/
public function getAmercementList($status,$amercement_type,$agent_id, $page_no, $page_size)
{
$field = "id,status,type,money,submit_agent_id,agent_id,remarks,create_time";
$field = "id,status,type,money,submit_agent_id,agent_id,remarks,create_time,forfeit_penalty,money_sum";
$condition = [];
if($amercement_type == 0){
$condition ['agent_id']= $agent_id;
......@@ -223,11 +223,6 @@ class AmercementService
$money_sum = $forfeit_penalty + $result[$key]['money'];
$result[$key]['money_sum'] = $money_sum;//罚款总金额
$this->updateAmercement($val['id'],['money_sum'=>$money_sum]);
}elseif($status == 1){//已支付
$forfeit_penalty = 100;
$result[$key]['forfeit_penalty'] = $val['forfeit_penalty'];
$result[$key]['money_sum'] = $forfeit_penalty + $result[$key]['money'];
$result[$key]['pay_time'] = '';
}
$result[$key]['img'] = $this->getAmercementImage($val['id']);
}
......@@ -316,7 +311,7 @@ class AmercementService
* @param $operation_id
* @return array
*/
public function editAmercement($agent_id,$id,$params,$edit_type,$operation_id)
public function editAmercement($id,$params,$edit_type,$operation_id)
{
switch ($edit_type) {
case 0 :
......@@ -334,8 +329,8 @@ class AmercementService
foreach ($result_img as $key => $val) {
$list_img[] = $val['file_name'];
}
foreach ($params['img'] as $key => $val) {
$params_img = explode(',',$params['img']);
foreach ($params_img as $key => $val) {
if(!in_array($val,$list_img)){
$insert=[];
$insert["file_name"] = $val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment