Commit 5393dcad authored by clone's avatar clone

报备时间轴

parent dedb0166
......@@ -404,9 +404,9 @@ class OrderLog extends Basic
public function selectReportAllV2()
{
$params = $this->params;
/* $params = array(
$params = array(
"order_id" => 38024,
);*/
);
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
......@@ -425,9 +425,9 @@ class OrderLog extends Basic
public function selectReportAllV3()
{
$params = $this->params;
/* $params = array(
"order_id" => 38002,
);*/
$params = array(
"order_id" => 38024,
);
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
......
......@@ -8,6 +8,7 @@ use app\model\FollowUpLogModel;
use app\model\GHousesFollowUp;
use app\model\GHousesToAgents;
use app\model\OBargainModel;
use app\model\OFinancialAudit;
use app\model\OImg;
use app\model\OMarchInModel;
use app\model\OPartialCommission;
......@@ -386,6 +387,7 @@ class OrderLogService
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$oFinancialModel = new OFinancialAudit();
$orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]);
......@@ -467,6 +469,16 @@ class OrderLogService
}
}
//审核流程
$field_financial = "id,bargain_id,agent_id,source,status,remark,audit_level,audit_id,audit_name,create_time,update_time";
$oFinancialData = $oFinancialModel->selectFinancialByOrderNo($field_financial, [ "order_id" => $order_id ]);
if (count($oFinancialData) > 0) {
foreach ($oFinancialData as $k => $v) {
$v["step_name"] = "financial";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result);
}
......@@ -490,6 +502,7 @@ class OrderLogService
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$oFinancialModel = new OFinancialAudit();
$orderData = $orderModel->selectOrderByOrderId("f_id,house_title", [ "order_id" => $order_id ]);
......@@ -572,6 +585,16 @@ class OrderLogService
}
}
//审核流程
$field_financial = "id,bargain_id,agent_id,source,status,remark,audit_level,audit_id,audit_name,create_time,update_time";
$oFinancialData = $oFinancialModel->selectFinancialByOrderNo($field_financial, [ "order_id" => $order_id ]);
if (count($oFinancialData) > 0) {
foreach ($oFinancialData as $k => $v) {
$v["step_name"] = "financial";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result);
}
......
......@@ -17,7 +17,8 @@ class OFinancialAudit extends BaseModel
* @param $data
* @return false|int
*/
public function addAudit($data) {
public function addAudit($data)
{
$save_data['bargain_id'] = $data['bargain_id'];
$save_data['agent_id'] = $data['agent_id'];
$save_data['order_no'] = $data['order_no'];
......@@ -40,7 +41,8 @@ class OFinancialAudit extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getLastStep($bargain_id) {
public function getLastStep($bargain_id)
{
return $this->field('id,audit_level')->where([
'bargain_id' => $bargain_id,
'status' => 1,
......@@ -76,7 +78,8 @@ class OFinancialAudit extends BaseModel
* @return bool
* @throws \think\exception\PDOException
*/
public function backOutUpdate(int $bargain_id, array $params = []) : bool {
public function backOutUpdate(int $bargain_id, array $params = []): bool
{
if (empty($bargain_id)) {
return false;
......@@ -102,4 +105,30 @@ class OFinancialAudit extends BaseModel
return $result;
}
/**
* 查询成交报告记录
*
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectFinancialByOrderNo($filed, $params)
{
$where_ = [];
if (isset($params["order_id"])) {
$where_["order_id"] = $params["order_id"];
}
$where_["is_del"] = 0;
$data = $this
->field($filed)
->where($where_)
->select();
return $data;
}
}
\ 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