Commit 3c812db1 authored by clone's avatar clone

bug

parent 9455f671
...@@ -92,12 +92,13 @@ class OrderLog extends Basic ...@@ -92,12 +92,13 @@ class OrderLog extends Basic
{ {
$params = $this->params; $params = $this->params;
if (!isset($params["agent_id"]) || !isset($params["report_id"]) || !isset($params["order_id"]) || !isset($params["order_no"]) if (!isset($params["agent_id"]) || !isset($params["agent_id"]) || !isset($params["report_id"]) || !isset($params["order_id"]) || !isset($params["order_no"])
|| !isset($params["collecting_bill"]) || !isset($params["house_number"]) || !isset($params["industry_type"])) { || !isset($params["collecting_bill"]) || !isset($params["house_number"]) || !isset($params["industry_type"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
/* $params = array( /* $params = array(
"agent_id" => 1,//收款经纪人id "agent_id" => 1,//收款经纪人id
"agent_name" => 1,//收款经纪人id
"report_id" => 111,//报备id "report_id" => 111,//报备id
"order_id" => 2, //关联order表id "order_id" => 2, //关联order表id
"order_no" => "123123123", //订单no "order_no" => "123123123", //订单no
...@@ -117,7 +118,7 @@ class OrderLog extends Basic ...@@ -117,7 +118,7 @@ class OrderLog extends Basic
$remark = isset($params["remark"]) ? $params["remark"] : ""; $remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? $params["transfer_img"] : ""; $transfer_img = isset($params["transfer_img"]) ? $params["transfer_img"] : "";
$is_ok = $this->service_->addCollectingBill($params["agent_id"], $params["report_id"], $params["order_id"], $params["order_no"], $is_ok = $this->service_->addCollectingBill($params["agent_id"],$params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img); $params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img);
if ($is_ok > 0) { if ($is_ok > 0) {
......
...@@ -166,6 +166,8 @@ class Shop extends Basic ...@@ -166,6 +166,8 @@ class Shop extends Basic
//获取图片信息 //获取图片信息
foreach ($result as $key => $val) { foreach ($result as $key => $val) {
$result[$key]["api_path"] = CK_IMG_URL; $result[$key]["api_path"] = CK_IMG_URL;
$result[$key]["rent_price"] = $result[$key]["rent_price"] * 0.01;
$param["house_id"] = $val["id"]; $param["house_id"] = $val["id"];
$param["img_type"] = 1; //默认主图 $param["img_type"] = 1; //默认主图
$result[$key]["images"] = $this->gHousesImgModel->getHouseImages($param, 1); $result[$key]["images"] = $this->gHousesImgModel->getHouseImages($param, 1);
......
...@@ -36,6 +36,7 @@ class OrderLogService ...@@ -36,6 +36,7 @@ class OrderLogService
/** /**
*批量插入收款记录 *批量插入收款记录
* @param $agent_id * @param $agent_id
* @param $agent_name
* @param $report_id * @param $report_id
* @param $order_id * @param $order_id
* @param $order_no * @param $order_no
...@@ -46,7 +47,7 @@ class OrderLogService ...@@ -46,7 +47,7 @@ class OrderLogService
* @param $transfer_img * @param $transfer_img
* @return int * @return int
*/ */
public function addCollectingBill($agent_id, $report_id, $order_id, $order_no, $collecting_bill, $house_number, public function addCollectingBill($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img) $industry_type, $remark, $transfer_img)
{ {
$bill_arr = []; $bill_arr = [];
...@@ -54,11 +55,11 @@ class OrderLogService ...@@ -54,11 +55,11 @@ class OrderLogService
foreach ($collecting_bill as $collecting) { foreach ($collecting_bill as $collecting) {
if (isset($collecting["type"]) && isset($collecting["pay_type"]) && isset($collecting["money"])) { if (isset($collecting["type"]) && isset($collecting["pay_type"]) && isset($collecting["money"])) {
if ($father_id == 0) { if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $report_id, $order_id, $order_no, $params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img); $house_number, $industry_type, $remark, $transfer_img);
$father_id = $this->payLogModel->insertPayLog($params); $father_id = $this->payLogModel->insertPayLog($params);
} else { } else {
array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $report_id, $order_id, $order_no, array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img)); $house_number, $industry_type, $remark, $transfer_img));
} }
} }
...@@ -92,7 +93,7 @@ class OrderLogService ...@@ -92,7 +93,7 @@ class OrderLogService
return $father_id; return $father_id;
} }
private function collectingBillBin($father_id, $collecting_arr, $agent_id, $report_id, $order_id, $order_no, $house_number, private function collectingBillBin($father_id, $collecting_arr, $agent_id, $agent_name, $report_id, $order_id, $order_no, $house_number,
$industry_type, $remark, $transfer_img) $industry_type, $remark, $transfer_img)
{ {
...@@ -101,6 +102,7 @@ class OrderLogService ...@@ -101,6 +102,7 @@ class OrderLogService
$arr["order_no"] = $order_no; $arr["order_no"] = $order_no;
$arr["order_id"] = $order_id; $arr["order_id"] = $order_id;
$arr["agent_id"] = $agent_id; $arr["agent_id"] = $agent_id;
$arr["agent_name"] = $agent_name;
$arr["type"] = $collecting_arr["type"]; $arr["type"] = $collecting_arr["type"];
$arr["pay_type"] = $collecting_arr["pay_type"]; $arr["pay_type"] = $collecting_arr["pay_type"];
$arr["money"] = $collecting_arr["money"]; $arr["money"] = $collecting_arr["money"];
...@@ -127,7 +129,7 @@ class OrderLogService ...@@ -127,7 +129,7 @@ class OrderLogService
* @param $commission_arr * @param $commission_arr
* @return int * @return int
*/ */
public function addBargain($submit_agent_id,$submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price, $commission, $commission_arr) public function addBargain($submit_agent_id, $submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price, $commission, $commission_arr)
{ {
$bargain_arr = []; $bargain_arr = [];
$father_id = 0; $father_id = 0;
...@@ -135,11 +137,11 @@ class OrderLogService ...@@ -135,11 +137,11 @@ class OrderLogService
if (isset($commission_val["role"]) && isset($commission_val["agent_id"]) && isset($commission_val["scale"]) if (isset($commission_val["role"]) && isset($commission_val["agent_id"]) && isset($commission_val["scale"])
&& isset($commission_val["scale_fee"])) { && isset($commission_val["scale_fee"])) {
if ($father_id == 0) { if ($father_id == 0) {
$params = $this->bargainBin($father_id, $commission_val, $submit_agent_id,$submit_agent_name, $report_id, $order_id, $params = $this->bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id,
$order_no, $trade_type, $price, $commission); $order_no, $trade_type, $price, $commission);
$father_id = $this->bargainModel->insertBargain($params); $father_id = $this->bargainModel->insertBargain($params);
} else { } else {
array_push($bargain_arr, $this->bargainBin($father_id, $commission_val, $submit_agent_id,$submit_agent_name, $report_id, array_push($bargain_arr, $this->bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id,
$order_id, $order_no, $trade_type, $price, $commission)); $order_id, $order_no, $trade_type, $price, $commission));
} }
...@@ -152,23 +154,23 @@ class OrderLogService ...@@ -152,23 +154,23 @@ class OrderLogService
return $father_id; return $father_id;
} }
private function bargainBin($father_id, $commission_val, $submit_agent_id,$submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price, $commission) private function bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price, $commission)
{ {
$arr["report_id"] = $report_id; $arr["report_id"] = $report_id;
$arr["father_id"] = $father_id; $arr["father_id"] = $father_id;
$arr["order_no"] = $order_no; $arr["order_no"] = $order_no;
$arr["order_id"] = $order_id; $arr["order_id"] = $order_id;
$arr["submit_agent_id"] = $submit_agent_id; $arr["submit_agent_id"] = $submit_agent_id;
$arr["submit_agent_name"] = $submit_agent_name; $arr["submit_agent_name"] = $submit_agent_name;
$arr["trade_type"] = $trade_type; $arr["trade_type"] = $trade_type;
$arr["price"] = $price; $arr["price"] = $price;
$arr["commission"] = $commission; $arr["commission"] = $commission;
$arr["role"] = $commission_val["role"]; $arr["role"] = $commission_val["role"];
$arr["agent_id"] = $commission_val["agent_id"]; $arr["agent_id"] = $commission_val["agent_id"];
$arr["scale"] = $commission_val["scale"]; $arr["scale"] = $commission_val["scale"];
$arr["scale_fee"] = $commission_val["scale_fee"]; $arr["scale_fee"] = $commission_val["scale_fee"];
$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;
} }
...@@ -359,8 +361,8 @@ class OrderLogService ...@@ -359,8 +361,8 @@ class OrderLogService
$item["price_requirement"] = "其他"; $item["price_requirement"] = "其他";
} }
$regions = new Regions(); $regions = new Regions();
$cityInfo = $regions->getAddressByDiscCode($item["district"]); $cityInfo = $regions->getAddressByDiscCode($item["district"]);
$item["area_detail"] = $cityInfo; $item["area_detail"] = $cityInfo;
return $item; return $item;
} }
...@@ -526,14 +528,15 @@ class OrderLogService ...@@ -526,14 +528,15 @@ class OrderLogService
* 成交报告提交后用户状态从求租变成已租 * 成交报告提交后用户状态从求租变成已租
* @param $report_id * @param $report_id
*/ */
public function userUpdateInfo($report_id){ public function userUpdateInfo($report_id)
$reportModel = new OReportModel(); {
$filed = "id,user_id"; $reportModel = new OReportModel();
$filed = "id,user_id";
$params["id"] = $report_id; $params["id"] = $report_id;
$result = $reportModel->selectReportById($filed,$params); $result = $reportModel->selectReportById($filed, $params);
if(count($result) > 0){ if (count($result) > 0) {
$Users = new Users(); $Users = new Users();
$Users -> update_user_status(['id'=>$result[0]["user_id"],'user_status'=>1]); $Users->update_user_status([ 'id' => $result[0]["user_id"], 'user_status' => 1 ]);
} }
} }
......
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