Commit 9bf84d05 authored by clone's avatar clone

bug

parent 06b2cb84
......@@ -60,7 +60,7 @@ class OrderLogService
* @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)
$industry_type, $remark, $transfer_img, $source)
{
$bill_arr = $params = [];
$father_id = 0;
......@@ -436,7 +436,7 @@ class OrderLogService
remark,transfer_img,real_money,source,create_time";
$payLogData = $oPayLogModel->selectPayLogByOrderNo($field_pay_log, [ "order_id" => $order_id ]);
if (count($payLogData) > 0) {
$sortPayLogData = $this->arr2tree($payLogData);
$sortPayLogData = $this->arr2tree($payLogData);
foreach ($sortPayLogData as $k => $v) {
$v["step_name"] = "pay_log";
$v["img_path"] = CHAT_IMG_URL;
......@@ -540,7 +540,7 @@ class OrderLogService
remark,transfer_img,real_money,source,create_time";
$payLogData = $oPayLogModel->selectPayLogByOrderNo($field_pay_log, [ "order_id" => $order_id ]);
if (count($payLogData) > 0) {
$sortPayLogData = $this->arr2tree($payLogData);
$sortPayLogData = $this->arr2tree($payLogData);
foreach ($sortPayLogData as $k => $v) {
$v["step_name"] = "pay_log";
$v["img_path"] = CHAT_IMG_URL;
......@@ -567,7 +567,7 @@ class OrderLogService
if (count($bargainData) > 0) {
$bargain_data_arr = $this->arr2TreeBargain($bargainData);
foreach ($bargain_data_arr as $k2 => $v2) {
$v2["step_name"] = "bargain";
$v2["step_name"] = "bargain";
$result[$sort++] = $v2;
}
}
......@@ -590,12 +590,12 @@ class OrderLogService
foreach ($tree as $i => $v) {
//查询图片
$oImgModel = new OImg();
$params["img_id"] = $v[0]["father_id"];
$params["img_type"] = 2;
$img_arr = $oImgModel->getImgList($params);
$trees[$i]["img"] = $img_arr;
$trees[$i]["list"] = $v;
$oImgModel = new OImg();
$params["img_id"] = $v[0]["father_id"];
$params["img_type"] = 2;
$img_arr = $oImgModel->getImgList($params);
$trees[$i]["img"] = $img_arr;
$trees[$i]["list"] = $v;
$trees[$i]["create_time"] = $v[0]["create_time"];
}
......@@ -608,7 +608,8 @@ class OrderLogService
* @param $list
* @return array
*/
public function arr2TreeBargain($list) {
public function arr2TreeBargain($list)
{
$tree = $trees = [];
foreach ($list as $key => $item) {
......@@ -1122,15 +1123,15 @@ class OrderLogService
$filed = "a.id,a.father_id,a.house_number,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address";
$result = $bargainModel->selectBargainList($filed, $params, $pageNo, $pageSize);
$list = [];
$list = [];
foreach ($result as $k => $v) {
$father_id = $v["father_id"];
if($father_id > 0 && in_array($father_id, $list)){
if ($father_id > 0 && in_array($father_id, $list)) {
unset($result[$k]);
}else{
} else {
$result[$k]["create_time"] = date("Y-m-d", strtotime($v["create_time"]));
$result[$k]["id"] = $v["father_id"];
array_push($list,$father_id);
$result[$k]["id"] = $v["father_id"] == 0 ? $v["id"] : $v["father_id"];
array_push($list, $father_id);
}
}
$sortResult = [];
......@@ -1224,7 +1225,7 @@ class OrderLogService
$cent_commission_arr = $bargainModel->selectBargainCommission($field_commission, [ "bargain_id" => $bargain_id ]);
//dump($cent_commission_arr);
$cent_commissions = [];
$cent_commissions = [];
$result["cent_commission"] = $this->recursion($cent_commission_arr, $cent_commissions, 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