Commit bc884610 authored by hujun's avatar hujun

后台审核开业

parent cd67dbdb
...@@ -51,9 +51,15 @@ class PayLogOpenService ...@@ -51,9 +51,15 @@ class PayLogOpenService
public function addOpenCheck($open_id, $status, $remark, $operation_id, $operation_name) public function addOpenCheck($open_id, $status, $remark, $operation_id, $operation_name)
{ {
return $this->payLogOpenLogModel->addOpenCheck( $id = $this->payLogOpenLogModel->getAllList('id', $open_id, ['status'=>$status]); //检查当前状态是否审核过
$this->OpenLogCheckBin($open_id, $status, $remark, $operation_id, $operation_name) if (empty($id)) {
); $num = $this->payLogOpenLogModel->addOpenCheck(
$this->OpenLogCheckBin($open_id, $status, $remark, $operation_id, $operation_name)
);
} else {
$num = 0;
}
return $num;
} }
/** /**
......
...@@ -12,6 +12,7 @@ namespace app\index\controller; ...@@ -12,6 +12,7 @@ namespace app\index\controller;
use app\api\service\ConvertCouponService; use app\api\service\ConvertCouponService;
use app\api\service\CouponService; use app\api\service\CouponService;
use app\api_broker\service\OrderLogService; use app\api_broker\service\OrderLogService;
use app\api_broker\service\PayLogOpenService;
use app\api_broker\service\PayLogService; use app\api_broker\service\PayLogService;
use app\api_broker\service\RedisCacheService; use app\api_broker\service\RedisCacheService;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
...@@ -41,6 +42,7 @@ use app\model\ORefundModel; ...@@ -41,6 +42,7 @@ use app\model\ORefundModel;
use app\model\TAgentTotalModel; use app\model\TAgentTotalModel;
use app\model\Users; use app\model\Users;
use app\task\controller\ResultsSummaryNewTask; use app\task\controller\ResultsSummaryNewTask;
use think\Exception;
use think\Request; use think\Request;
class Finance extends Basic class Finance extends Basic
...@@ -5242,4 +5244,91 @@ class Finance extends Basic ...@@ -5242,4 +5244,91 @@ class Finance extends Basic
return $this->response(200, '', $pay_open_data); return $this->response(200, '', $pay_open_data);
} }
/**
* 开盘申请
*
* @return \think\Response
* @throws Exception
* User HuJun
* Date 19-5-17 上午11:27
*/
public function openPayLog()
{
$params = $this->params;
/* $params = array(
"pay_log_id" => 1,
"report_id" => 1,
"bargain_id" => 1,
"order_id" => 1,
"agent_id" => 1,
"house_id" => 1,
"intro" => "123123",
"house_address" => "123123",
"remark" => "123123",
"open_img" => "123123",
);*/
$checkResult = $this->validate($params, "api_broker/PayLogOpenValidate.applyForOpen");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$service_ = new PayLogOpenService();
$pay_log_id = $params["pay_log_id"];
$report_id = $params["report_id"];
$bargain_id = $params["bargain_id"];
$agent_id = $params["agent_id"];
$house_id = $params["house_id"];
$house_address = $params["house_address"];
$intro = $params["intro"];
try {
$open_img = json_decode($params["open_img"], true);
} catch (Exception $exception) {
return $this->response("101", "申请开盘图片解析错误:" . $exception);
}
$return_id = $service_->addApplyForOpen($pay_log_id, $report_id, $bargain_id, $agent_id, $house_id, $intro,
$house_address, $open_img);
if ($return_id > 0) {
return $this->response("200", "success", ["id" => $return_id]);
} else {
return $this->response("101", "save error");
}
}
/**
* 审核开业
* @return \think\Response
*/
public function openPayLogCheck()
{
$params = $this->params;
/* $params = array(
"open_id" => 1,
"status" => 1, //1总监审核 2财务一审 3财务二审
"remark" => 1,
"operation_id" => 1,
"operation_name" => "222",
);*/
$checkResult = $this->validate($params, "api_broker/PayLogOpenValidate.openCheck");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$service_ = new PayLogOpenService();
$open_id = $params["open_id"];
$status = $params["status"];
$remark = $params["remark"];
$operation_id = $params["operation_id"];
$operation_name = $params["operation_name"];
$return_id = $service_->addOpenCheck($open_id, $status, $remark, $operation_id, $operation_name);
if ($return_id > 0) {
return $this->response("200", "审核成功", ["id" => $return_id]);
} else {
return $this->response("101", "审核失败");
}
}
} }
...@@ -299,6 +299,8 @@ Route::group('index', [ ...@@ -299,6 +299,8 @@ Route::group('index', [
'payCheckListDisc/:check_status' => ['index/Finance/payCheckList', ['method' => 'GET'], ['check_status' => 4]],//收款开业审核-总监 'payCheckListDisc/:check_status' => ['index/Finance/payCheckList', ['method' => 'GET'], ['check_status' => 4]],//收款开业审核-总监
'delPayCheck' => ['index/Finance/delPayCheck', ['method' => 'POST']],//删除收款开业审核 'delPayCheck' => ['index/Finance/delPayCheck', ['method' => 'POST']],//删除收款开业审核
'getPayCheckDetail' => ['index/Finance/getPayCheckDetail', ['method' => 'GET']],//开业审核详情 'getPayCheckDetail' => ['index/Finance/getPayCheckDetail', ['method' => 'GET']],//开业审核详情
'openPayLog' => ['index/Finance/openPayLog', ['method' => 'POST']],//开业审核详情
'openPayLogCheck' => ['index/Finance/openPayLogCheck', ['method' => 'POST']],//审核开业
'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细 'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细
'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细 'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细
......
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