Commit 527ed7a0 authored by zw's avatar zw

获取收款图片

parent 797efb45
...@@ -8,6 +8,7 @@ use app\model\AAgents; ...@@ -8,6 +8,7 @@ use app\model\AAgents;
use app\model\GHouses; use app\model\GHouses;
use app\model\ODaily; use app\model\ODaily;
use app\model\ODailyLog; use app\model\ODailyLog;
use app\model\OImg;
use app\model\OPayLogAdjustment; use app\model\OPayLogAdjustment;
use app\model\OPayLogModel; use app\model\OPayLogModel;
...@@ -372,7 +373,7 @@ class DailyPaperService ...@@ -372,7 +373,7 @@ class DailyPaperService
$agent_info_field = "id,name,store_id,district_id,level"; $agent_info_field = "id,name,store_id,district_id,level";
$agent_info = $this->aAgentsModel->getAgentById($agent_info_field, $agent_info_arr); $agent_info = $this->aAgentsModel->getAgentById($agent_info_field, $agent_info_arr);
if (count($agent_info) <= 0 || ($agent_info[0]["level"] !=20 && $agent_info[0]["level"] !=40)) { if (count($agent_info) <= 0 || ($agent_info[0]["level"] != 20 && $agent_info[0]["level"] != 40)) {
return ["code" => 101, "msg" => "经纪人信息错误"]; return ["code" => 101, "msg" => "经纪人信息错误"];
} }
$params = $this->dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, $params = $this->dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
...@@ -381,7 +382,7 @@ class DailyPaperService ...@@ -381,7 +382,7 @@ class DailyPaperService
} }
public function dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, public function dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay, $private_bank,$cash, $pos, $other_bank,$store_id,$district_id) $family_pay, $private_bank, $cash, $pos, $other_bank, $store_id, $district_id)
{ {
$arr["agent_id"] = $agent_id; $arr["agent_id"] = $agent_id;
$arr["agent_name"] = $agent_name; $arr["agent_name"] = $agent_name;
...@@ -396,8 +397,8 @@ class DailyPaperService ...@@ -396,8 +397,8 @@ class DailyPaperService
$arr["cash"] = $cash; $arr["cash"] = $cash;
$arr["pos"] = $pos; $arr["pos"] = $pos;
$arr["other_bank"] = $other_bank; $arr["other_bank"] = $other_bank;
$arr["create_time"] = date("Y-m-d H:i:s",time()); $arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s",time()); $arr["update_time"] = date("Y-m-d H:i:s", time());
return $arr; return $arr;
} }
...@@ -455,8 +456,8 @@ class DailyPaperService ...@@ -455,8 +456,8 @@ class DailyPaperService
* @param $remark * @param $remark
* @return mixed * @return mixed
*/ */
public function dailyLogBin($daily_id,$agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, public function dailyLogBin($daily_id, $agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay, $private_bank,$cash, $pos, $other_bank,$store_id,$district_id,$remark) $family_pay, $private_bank, $cash, $pos, $other_bank, $store_id, $district_id, $remark)
{ {
$arr["daily_id"] = $daily_id; $arr["daily_id"] = $daily_id;
$arr["operation_id"] = $agent_id; $arr["operation_id"] = $agent_id;
...@@ -471,13 +472,12 @@ class DailyPaperService ...@@ -471,13 +472,12 @@ class DailyPaperService
$arr["cash"] = $cash; $arr["cash"] = $cash;
$arr["pos"] = $pos; $arr["pos"] = $pos;
$arr["other_bank"] = $other_bank; $arr["other_bank"] = $other_bank;
$arr["create_time"] = date("Y-m-d H:i:s",time()); $arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s",time()); $arr["update_time"] = date("Y-m-d H:i:s", time());
return $arr; return $arr;
} }
/** /**
* 获取提交的日报记录 * 获取提交的日报记录
* @param $agent_id * @param $agent_id
...@@ -499,4 +499,17 @@ class DailyPaperService ...@@ -499,4 +499,17 @@ class DailyPaperService
} }
/**
* @param $pay_log_id
* @return false|\PDOStatement|string|\think\Collection
*/
public function getImgs($pay_log_id)
{
$oImgModel = new OImg();
$params["img_id"] = $pay_log_id;
$params["img_type"] = 1;
return $oImgModel->getImgList($params);
}
} }
\ No newline at end of file
...@@ -159,4 +159,27 @@ class DailyPaper extends Basic ...@@ -159,4 +159,27 @@ class DailyPaper extends Basic
} }
} }
/**
* @return \think\Response
*/
public function getPayLogImg(){
$params = $this->params;
/* $params = array(
"pay_log_id" => 1
);*/
if(!isset($params["pay_log_id"])){
return $this->response("101", "请求参数错误");
}
$img_list = $this->service_->getImgs($params["pay_log_id"]);
if(count($img_list) > 0){
$result["img_path"] = CHAT_IMG_URL;
$result["img_info"] = $img_list;
return $this->response("200","success",$result);
}else{
return $this->response("200","request null");
}
}
} }
\ No newline at end of file
...@@ -396,6 +396,7 @@ Route::group('index', [ ...@@ -396,6 +396,7 @@ Route::group('index', [
'dailyDetail' => ['index/DailyPaper/dailyDetail', ['method' => 'get|post']], 'dailyDetail' => ['index/DailyPaper/dailyDetail', ['method' => 'get|post']],
'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']], 'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']],
'commitCheck' => ['index/DailyPaper/commitCheck', ['method' => 'get|post']], 'commitCheck' => ['index/DailyPaper/commitCheck', ['method' => 'get|post']],
'getPayLogImg' => ['index/DailyPaper/getPayLogImg', ['method' => 'get|post']],
]); ]);
......
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