Commit f38b4140 authored by clone's avatar clone

我的成交

parent 989c7b58
......@@ -421,16 +421,9 @@ class OrderLog extends Basic
{
$params = $this->params;
/* $params = array(
"bargain_id" => 6,
"house_id" => 1,
"house_title"=> "wwww",
"internal_address" =>"ewewerwer",
"user_id" => 1,
"user_name" =>"nihhkkk",
"user_phone"=>"123****3333"
"bargain_id" => 169,
);*/
if (!isset($params["bargain_id"]) || !isset($params["house_id"]) || !isset($params["house_title"]) || !isset($params["internal_address"])
|| !isset($params["user_id"]) || !isset($params["user_name"]) || !isset($params["user_phone"])) {
if (!isset($params["bargain_id"])) {
return $this->response("101", "请求参数错误");
}
......
......@@ -55,7 +55,7 @@ class OrderLogService
* @throws \think\exception\DbException
*/
public function addCollectingBill($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img,$source)
$industry_type, $remark, $transfer_img, $source)
{
$bill_arr = $params = [];
$father_id = 0;
......@@ -63,15 +63,15 @@ class OrderLogService
if (isset($collecting["type"]) && isset($collecting["pay_type"]) && isset($collecting["money"])) {
if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img,$source);
$house_number, $industry_type, $remark, $transfer_img, $source);
$father_id = $this->payLogModel->insertPayLog($params);
} else {
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,$source));
$house_number, $industry_type, $remark, $transfer_img, $source));
}
}
}
if($father_id > 0){
if ($father_id > 0) {
$pushMarchIn = new PushMessageService($params["report_id"], 2);
$pushMarchIn->pushMarchInMessage($params["report_id"], 2); //推送
}
......@@ -83,7 +83,7 @@ class OrderLogService
}
private function collectingBillBin($father_id, $collecting_arr, $agent_id, $agent_name, $report_id, $order_id, $order_no, $house_number,
$industry_type, $remark, $transfer_img,$source)
$industry_type, $remark, $transfer_img, $source)
{
$arr["report_id"] = $report_id;
......@@ -125,7 +125,7 @@ class OrderLogService
* @throws \think\exception\DbException
*/
public function addBargain($submit_agent_id, $submit_agent_name, $report_id, $order_id, $order_no, $trade_type, $price,
$commission, $commission_arr,$house_number, $is_open)
$commission, $commission_arr, $house_number, $is_open)
{
$bargain_arr = [];
$father_id = 0;
......@@ -135,11 +135,11 @@ class OrderLogService
&& isset($commission_val["scale_fee"])) {
if ($father_id == 0) {
$params = $this->bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id,
$order_no, $trade_type, $price, $commission,$house_number, $is_open);
$order_no, $trade_type, $price, $commission, $house_number, $is_open);
$father_id = $this->bargainModel->insertBargain($params);
} else {
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,$house_number, $is_open));
$order_id, $order_no, $trade_type, $price, $commission, $house_number, $is_open));
}
}
array_push($agent_arr, [ $commission_val["agent_id"] ]);
......@@ -161,7 +161,7 @@ class OrderLogService
}
private function bargainBin($father_id, $commission_val, $submit_agent_id, $submit_agent_name, $report_id, $order_id,
$order_no, $trade_type, $price, $commission,$house_number, $is_open)
$order_no, $trade_type, $price, $commission, $house_number, $is_open)
{
$arr["report_id"] = $report_id;
$arr["father_id"] = $father_id;
......@@ -726,7 +726,7 @@ class OrderLogService
$where_ = $condition;
if ($agentArr) {
$params["report_agent_id"] = $agentArr;
$params["agent_id_s"] = array("in",$agentArr);
$params["agent_id_s"] = array( "in", $agentArr );
$condition .= "and b.report_agent_id in (" . trim($agentArr) . ") ";
}
......@@ -814,18 +814,21 @@ class OrderLogService
$bargain_info_filed = "a.id,a.house_number,a.is_open,a.trade_type,a.price,a.commission,c.id,c.internal_title,
c.internal_address,d.user_id,d.user_phone,d.user_name";
/**
* ->join("o_order b" ,"a.order_id = b.id","left")
->join("g_houses c" ,"b.house_id = b.id","left")
->join("o_report d","a.report_id = d.id","left")
*/
$result = [];
$bargainInfo = $bargainModel->selectBargainDetail($bargain_info_filed, $params);
if(count($bargainInfo) > 0){
}
$result["bargainInfo"] = $bargainInfo;
//分佣提成
$cent_commission = [];
$result["cent_commission"] = $cent_commission;
//税费
$taxes = [];
$result["taxes"] = $taxes;
return $result;
}
......@@ -908,9 +911,10 @@ class OrderLogService
* @param $order_id
* @return false|\PDOStatement|string|\think\Collection
*/
public function getBillInfo($order_id){
public function getBillInfo($order_id)
{
$filed = "house_number,industry_type";
return $this->payLogModel->getBeforeBillInfo($filed,["order_id"=>$order_id]);
return $this->payLogModel->getBeforeBillInfo($filed, [ "order_id" => $order_id ]);
}
......@@ -922,10 +926,11 @@ class OrderLogService
* @param $real_money
* @return false|int
*/
public function updateBillInfo($id,$trade_no,$pay_time,$real_money){
public function updateBillInfo($id, $trade_no, $pay_time, $real_money)
{
$params["id"] = $id;
$params["trade_no"] = $trade_no;
$params["pay_time"] = date("Y-m-d H:i:s",$pay_time);
$params["pay_time"] = date("Y-m-d H:i:s", $pay_time);
$params["real_money"] = $real_money;
return $this->payLogModel->updatePayLog($params);
......
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