Commit 362b06ef authored by hujun's avatar hujun

更新成交报告开业

parent 9804a896
...@@ -80,6 +80,8 @@ class OrderLogService ...@@ -80,6 +80,8 @@ class OrderLogService
array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $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, $source, $income_time, 0, 0, $received_money, $type_ext, $bargain_id)); $house_number, $industry_type, $remark, $transfer_img, $source, $income_time, 0, 0, $received_money, $type_ext, $bargain_id));
} }
$this->updateBargainIsOpen($bargain_id, $collecting['type']);
} }
} }
if ($father_id > 0) { if ($father_id > 0) {
...@@ -156,6 +158,7 @@ class OrderLogService ...@@ -156,6 +158,7 @@ class OrderLogService
$report_id, $order_id, $order_no, $house_number, $industry_type, $remark, $transfer_img, $source, $report_id, $order_id, $order_no, $house_number, $industry_type, $remark, $transfer_img, $source,
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext, $bargain_id)); $income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext, $bargain_id));
} }
$this->updateBargainIsOpen($bargain_id, $collecting['type']);
} }
} }
if ($father_id > 0) { if ($father_id > 0) {
...@@ -1789,4 +1792,25 @@ class OrderLogService ...@@ -1789,4 +1792,25 @@ class OrderLogService
return $this->bargainModel->agentBargainAll($filed, $params); return $this->bargainModel->agentBargainAll($filed, $params);
} }
/**
* 更新成交报告开业
*
* @param $bargain_id
* @param $type
* @return bool|int
*/
public function updateBargainIsOpen($bargain_id, $type) {
if (empty($bargain_id) && !in_array($type, [91,92])) {
return false;
}
$num = $this->bargainModel->updateBargainById($bargain_id, ['is_open'=>1]);
if ($num) {
$result = 1;
} else {
$result = 0;
}
return $result;
}
} }
\ No newline at end of file
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