Commit cdd39cb7 authored by clone's avatar clone

1

parent b6913b64
......@@ -5,11 +5,14 @@ use app\api_broker\service\OfficeOrderLogService;
use app\api_broker\service\OrderLogService;
use app\api_broker\service\VerifyRepetitionService;
use app\api_broker\service\VipService;
use app\model\AAgents;
use app\model\OfficeGRoom;
use app\model\OfficeOBargainModel;
use app\model\OfficeOImg;
use app\model\OfficeOMarchInModel;
use app\model\OfficeOrderModel;
use app\model\OMarchInModel;
use think\Exception;
/**
* Created by PhpStorm.
......@@ -670,7 +673,7 @@ class OfficeOrderLog extends Basic{
return $this->response(101, 'Id or agent_id or source is null.');
}
$source = empty($this->params['source']) ? 0 : $this->params['source'];
$bargain = new OBargainModel();
$bargain = new OfficeOBargainModel();
$data['data'] = $bargain->addBargainCommission($this->params['id'], $this->agentId, $this->params['agent_id'],
$this->params['role'], $this->params['scale_fee'], $this->params['scale'], $source);
......@@ -701,7 +704,7 @@ class OfficeOrderLog extends Basic{
if (!isset($params["order_id"]) || !isset($params["submit_agent_id"])) {
return $this->response("101", "请求参数错误");
}
$bargainModel = new OBargainModel();
$bargainModel = new OfficeOBargainModel();
$where_["father_id"] = 0;
$where_["order_id"] = $params["order_id"];
$where_["submit_agent_id"] = $params["submit_agent_id"];
......@@ -763,7 +766,7 @@ class OfficeOrderLog extends Basic{
$where_["order_id"] = $params["order_id"];
$where_["father_id"] = 0;
$where_["account_statement"] = 0;
$oBargainModel = new OBargainModel();
$oBargainModel = new OfficeOBargainModel();
$data = $oBargainModel->selectBargainByOrderNo($field, $where_, "id desc");
if (count($data) > 0) {
$list["bargain_id"] = $data[0]["id"];
......@@ -798,7 +801,7 @@ class OfficeOrderLog extends Basic{
//todo 该商铺7日带看次数
$model = new OrderModel();
$model = new OfficeOrderModel();
$params["house_id"] = $params['house_id'];
$start_time = date("Y-m-d", strtotime("-7 day"));
$end_time = date("Y-m-d", time());
......
......@@ -13,7 +13,13 @@ use app\model\FollowUpLogModel;
use app\model\GHousesFollowUp;
use app\model\GHousesToAgents;
use app\model\OBargainModel;
use app\model\OfficeOBargainModel;
use app\model\OfficeOImg;
use app\model\OfficeOMarchInModel;
use app\model\OfficeOPayLogModel;
use app\model\OfficeOrderModel;
use app\model\OfficeORefundModel;
use app\model\OfficeOReportModel;
use app\model\OImg;
use app\model\OMarchInModel;
use app\model\OPayLogAdjustment;
......@@ -38,8 +44,8 @@ class OfficeOrderLogService
function __construct()
{
$this->payLogModel = new OPayLogModel();
$this->bargainModel = new OBargainModel();
$this->payLogModel = new OfficeOPayLogModel();
$this->bargainModel = new OfficeOBargainModel();
$this->o_img_model = new OfficeOImg();
}
......@@ -407,7 +413,7 @@ class OfficeOrderLogService
*/
public function selectOrderDetail($where_)
{
$orderModel = new OrderModel();
$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_name as user_nick,c.user_phone,
c.user_pic,c.sex,d.internal_address as house_address";
$result = $orderModel->selectOrderDetail($field, $where_);
......@@ -434,13 +440,13 @@ class OfficeOrderLogService
$sort = 0;
//todo 1.验证订单是否存在
$orderModel = new OrderModel();
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$orderModel = new OfficeOrderModel();
$oReportModel = new OfficeOReportModel();
$oMarchInModel = new OfficeOMarchInModel();
$followUpLogModel = new FollowUpLogModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$oPayLogModel = new OfficeOPayLogModel();
$oRefundModel = new OfficeORefundModel();
$oBargainModel = new OfficeOBargainModel();
$orderData = $orderModel->selectOrderByOrderId("a.f_id,a.house_title,b.internal_address", ["order_id" => $order_id]);
......@@ -548,15 +554,15 @@ class OfficeOrderLogService
$sort = 0;
//todo 1.验证订单是否存在
$orderModel = new OrderModel();
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$orderModel = new OfficeOrderModel();
$oReportModel = new OfficeOReportModel();
$oMarchInModel = new OfficeOMarchInModel();
$followUpLogModel = new FollowUpLogModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$oPayLogModel = new OfficeOPayLogModel();
$oRefundModel = new OfficeORefundModel();
$oBargainModel = new OfficeOBargainModel();
$oPayLogAdjustmentModel = new OPayLogAdjustment();
$oRefundLogModel = new ORefundLogModel();
$oRefundLogModel = new OfficeORefundLoORefundLogModel();
$orderData = $orderModel->selectOrderByOrderId("a.f_id,a.house_title,b.internal_address", ["order_id" => $order_id]);
......@@ -671,7 +677,7 @@ class OfficeOrderLogService
public function getOImg($id, $img_type)
{
//查询图片
$oImgModel = new OImg();
$oImgModel = new OfficeOImg();
$params["img_id"] = $id;
$params["img_type"] = $img_type;
$img_arr = $oImgModel->getImgList($params);
......@@ -691,7 +697,7 @@ class OfficeOrderLogService
}
foreach ($tree as $i => $v) {
//查询图片
$oImgModel = new OImg();
$oImgModel = new OfficeOImg();
$params["img_id"] = $v[0]["father_id"];
$params["img_type"] = 2;
$img_arr = $oImgModel->getImgList($params);
......@@ -753,12 +759,12 @@ class OfficeOrderLogService
$sort = 0;
//todo 1.验证订单是否存在
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$oReportModel = new OfficeOReportModel();
$oMarchInModel = new OfficeOMarchInModel();
$followUpLogModel = new FollowUpLogModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$oPayLogModel = new OfficeOPayLogModel();
$oRefundModel = new OfficeORefundModel();
$oBargainModel = new OfficeOBargainModel();
$uPhoneFollowModel = new UPhoneFollowUp($site_id);
$uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id);
......@@ -945,34 +951,19 @@ class OfficeOrderLogService
$sort = 0;
//todo 1.验证订单是否存在
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$oReportModel = new OfficeOReportModel();
$oMarchInModel = new OfficeOMarchInModel();
$followUpLogModel = new FollowUpLogModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$appointWatchShopModel = new AppointWatchShop();
//客户c端提交预约看铺
$field_appoint = "a.id,a.create_time,b.user_name as name";
$appointData = $appointWatchShopModel->getAppointWatchOur(1, 15, "a.id desc", $field_appoint, ["a.user_id" => $user_id]);
if (count($appointData) > 0) {
foreach ($appointData as $k => $v) {
$v["step_name"] = "appoint";
$v["step"] = "提交预约看铺";
$result[$sort++] = $v;
}
}
$oPayLogModel = new OfficeOPayLogModel();
$oRefundModel = new OfficeORefundModel();
$oBargainModel = new OfficeOBargainModel();
$field_report = "a.id,a.create_time,a.predict_see_time,a.intro,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$reportData = $oReportModel->selectReportByUserId($field_report, ["user_id" => $user_id]);
if (count($appointData) > 0 && count($reportData) <= 0) {
return $this->sortByTime($result);
} elseif (count($appointData) <= 0 && count($reportData) <= 0) {
return [];
}
$order_ids = $report_ids = "";
......@@ -1270,7 +1261,7 @@ class OfficeOrderLogService
$where_ .= " and a.house_id in ($ids)";
$orderModel = new OrderModel();
$orderModel = new OfficeOrderModel();
$result = $orderModel->searchOrder($field, $condition, $where_, $pageNo, $pageSize);
$reportService = new ReportService();
......@@ -1324,7 +1315,7 @@ class OfficeOrderLogService
return ["code" => "101", "msg" => "搜索类型错误"];
}
$orderModel = new OrderModel();
$orderModel = new OfficeOrderModel();
$result = $orderModel->searchOrderAll($field, $condition, $pageNo, $pageSize);
$reportService = new ReportService();
......@@ -1351,7 +1342,7 @@ class OfficeOrderLogService
$ids = $aService->getAgentsByAgentId($agent_id);
$params["ids"] = $ids;
$bargainModel = new OBargainModel();
$bargainModel = new OfficeOBargainModel();
$filed = "a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,
b.user_name,b.user_id,c.id as order_id,c.order_no,d.id as house_id,d.internal_title,d.internal_address,b.id as report_id";
$result = $bargainModel->selectBargainList($filed, $params, $pageNo, $pageSize);
......@@ -1386,7 +1377,7 @@ class OfficeOrderLogService
{
$params["order_id"] = $order_id;
$bargainModel = new OBargainModel();
$bargainModel = new OfficeOBargainModel();
$filed = "a.id,a.father_id,a.price,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,c.order_no,a.report_id";
$result = $bargainModel->selectBargainList($filed, $params, 1, 15);
......@@ -1468,7 +1459,7 @@ class OfficeOrderLogService
public function getBargainDetail($params): array
{
$bargainModel = new OBargainModel();
$bargainModel = new OfficeOBargainModel();
$bargain_info_filed = "a.id,a.house_number,a.account_time,a.account_statement,a.father_id,a.is_open,a.trade_type,
a.price,a.industry_type,a.estimated_receipt_date,a.commission,c.id as house_id,c.internal_title,c.internal_address,
d.user_id,d.user_phone,d.user_name";
......@@ -1542,7 +1533,7 @@ class OfficeOrderLogService
*/
public function userUpdateInfo($report_id)
{
$reportModel = new OReportModel();
$reportModel = new OfficeOReportModel();
$filed = "id,user_id";
$params["id"] = $report_id;
$result = $reportModel->selectReportById($filed, $params);
......@@ -1560,7 +1551,7 @@ class OfficeOrderLogService
*/
public function searchBargainAgents($type, $order_id)
{
$orderModel = new OrderModel();
$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,
c.user_pic,c.sex";
$where_["order_id"] = $order_id;
......@@ -1586,7 +1577,7 @@ class OfficeOrderLogService
$list = $userModel->getAgentByUserId($field, $params);
break;
case 3: //反签 == 报备人
$reportModel = new OReportModel();
$reportModel = new OfficeOReportModel();
$params["a.id"] = $result[0]["report_id"];
$params["b.status"] = 0;
$list = $reportModel->getAgentByOrderId($field, $params);
......@@ -1630,7 +1621,7 @@ class OfficeOrderLogService
*/
public function searchBargainAllAgents($order_id)
{
$orderModel = new OrderModel();
$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,
c.user_pic,c.sex";
$where_["order_id"] = $order_id;
......@@ -1683,7 +1674,7 @@ class OfficeOrderLogService
$key++;
}
$reportModel = new OReportModel();
$reportModel = new OfficeOReportModel();
$params["a.id"] = $result[0]["report_id"];
$params["b.status"] = 0;
$report_data = $reportModel->getAgentByOrderId($field, $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