Commit 0e5511bc authored by clone's avatar clone

1

parent 4fb75a66
...@@ -83,6 +83,11 @@ class OfficeOrderLogService ...@@ -83,6 +83,11 @@ class OfficeOrderLogService
$father_id = 0; $father_id = 0;
$money = 0; $money = 0;
$type = 0; $type = 0;
//获取门店id
$redis_service = new RedisCacheService();
$agent_data = $redis_service->getRedisCache(2, $agent_id);
$store_id = $agent_data['store_id'];
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 (!$this->verifyType($collecting["type"], $collecting["pay_type"], $receipt_number)) { if (!$this->verifyType($collecting["type"], $collecting["pay_type"], $receipt_number)) {
...@@ -100,13 +105,13 @@ class OfficeOrderLogService ...@@ -100,13 +105,13 @@ class OfficeOrderLogService
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $params = $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, $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, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext,
$bargain_id, $is_open); $bargain_id, $is_open, $store_id);
$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, $agent_name, 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, $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, $income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money,
$type_ext, $bargain_id, $is_open)); $type_ext, $bargain_id, $is_open, $store_id));
} }
//$this->updateBargainIsOpen($bargain_id, $collecting['type'], $is_open); //$this->updateBargainIsOpen($bargain_id, $collecting['type'], $is_open);
} }
...@@ -280,13 +285,14 @@ class OfficeOrderLogService ...@@ -280,13 +285,14 @@ class OfficeOrderLogService
private function collectingBillBin($father_id, $collecting_arr, $agent_id, $agent_name, $report_id, $order_id, 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, $order_no, $house_number, $industry_type, $remark, $transfer_img, $source,
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name,
$received_money, $type_ext, $bargain_id, $is_open) $received_money, $type_ext, $bargain_id, $is_open, $store_id)
{ {
$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["reckon_in_store"] = $store_id;
$arr["source"] = $source; $arr["source"] = $source;
$arr["agent_id"] = $agent_id; $arr["agent_id"] = $agent_id;
$arr["agent_name"] = $agent_name; $arr["agent_name"] = $agent_name;
...@@ -1435,7 +1441,7 @@ class OfficeOrderLogService ...@@ -1435,7 +1441,7 @@ class OfficeOrderLogService
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function searchBargainAgents($type, $order_id,$site_id) public function searchBargainAgents($type, $order_id, $site_id)
{ {
$orderModel = new OfficeOrderModel(); $orderModel = new OfficeOrderModel();
$field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone, $field = "a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone,
...@@ -1525,7 +1531,7 @@ class OfficeOrderLogService ...@@ -1525,7 +1531,7 @@ class OfficeOrderLogService
$where_house["a.type"] = ['in', '2,3']; $where_house["a.type"] = ['in', '2,3'];
$where_house["a.is_del"] = 0; $where_house["a.is_del"] = 0;
$where_house["b.status"] = 0; $where_house["b.status"] = 0;
$agent_house = $houseAgents->getAgentsByHouseId($field.',a.type', $where_house); $agent_house = $houseAgents->getAgentsByHouseId($field . ',a.type', $where_house);
$list = []; $list = [];
$key = 0; $key = 0;
......
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