Commit 46b0ae36 authored by clone's avatar clone

1

parent 9938d83d
...@@ -42,69 +42,6 @@ class OrderLogService ...@@ -42,69 +42,6 @@ class OrderLogService
$this->bargainModel = new OBargainModel(); $this->bargainModel = new OBargainModel();
} }
/**
* 批量插入收款记录
*
* @param $agent_id
* @param $agent_name
* @param $report_id
* @param $order_id
* @param $order_no
* @param $collecting_bill
* @param $house_number
* @param $industry_type
* @param $remark
* @param $transfer_img
* @param $source
* @param $income_time
* @param $received_money
* @param $type_ext
* @param $bargain_id
* @param $is_open
* @return int|string
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addCollectingBillV2($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img, $source, $income_time, $received_money,
$type_ext, $bargain_id, $is_open)
{
$bill_arr = $params = [];
$father_id = $pay_type = 0;
foreach ($collecting_bill as $collecting) {
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, $income_time,
0, 0, $received_money, $type_ext, $bargain_id, $is_open);
$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,
$income_time, 0, 0, $received_money, $type_ext, $bargain_id, $is_open));
}
// $this->updateBargainIsOpen($bargain_id, $collecting['type'], $is_open);
$type = $collecting['type'];
}
}
if ($father_id > 0) {
//保存图片
$oImgModel = new OImg();
$oImgModel->addImgAll($father_id, 2, $transfer_img);
$pushMarchIn = new PushMessageService();
$pushMarchIn->pushMarchInMessage($params["report_id"], 2, $agent_id, $type); //推送
}
//todo if bill_arr not null, save database table
if (!empty($bill_arr)) {
return $this->payLogModel->addPayLog($bill_arr);
}
return $father_id;
}
/** /**
* 批量插入收款记录 * 批量插入收款记录
* *
......
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