...
|
...
|
@@ -81,7 +81,7 @@ class ThirdsendController extends HomeBaseController |
|
|
// $final_list[$agencyk] = $agencyv;
|
|
|
// $final_list[$agencyk]['agency_id'] = $agencyv['id'];
|
|
|
// $final_list[$agencyk]['user_id'] = $user_id;
|
|
|
$money = $agencyv['housing_price']*10000 + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'] ;
|
|
|
$money = $agencyv['housing_price'] + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'] ;
|
|
|
$money_arr[] = $money;
|
|
|
$fianlMoney = substr($money, 0,-4);
|
|
|
$agency_list[$agencyk]['true_money'] = $money;
|
...
|
...
|
@@ -144,7 +144,7 @@ class ThirdsendController extends HomeBaseController |
|
|
$userNeedList = Db::name('UserNeed')->where($where_need)->field('id,pay_time')->find();
|
|
|
if(!empty($userNeedList)) {
|
|
|
$time = time();
|
|
|
$sendTime = intval($userNeedList['pay_time']+1797);
|
|
|
$sendTime = intval($userNeedList['pay_time']+1780);
|
|
|
if($time < $sendTime){
|
|
|
$this->apiResponse('0','未到发布时间',['now'=>$time,'pay'=>$sendTime]);
|
|
|
}else{
|
...
|
...
|
@@ -201,7 +201,7 @@ class ThirdsendController extends HomeBaseController |
|
|
$userNeedList['user_type'] = Db::name('Member')->where(['id'=>$userNeedList['user_id']])->value('type');
|
|
|
$time = time();
|
|
|
// 查询相应报价
|
|
|
$final_time = $userNeedList['pay_time'] + $userNeedList['quotation_time'] * 86400;
|
|
|
$final_time = $userNeedList['pay_time'] + $userNeedList['quotation_time'] * 86400 + 1800;
|
|
|
// 判断时间是否正确
|
|
|
if ($time >= $final_time) {
|
|
|
// 处理未支付报价
|
...
|
...
|
@@ -235,10 +235,16 @@ class ThirdsendController extends HomeBaseController |
|
|
$get_list = array();
|
|
|
// 删除十万以内报价
|
|
|
foreach ($agency_list as $tenk=>$tenv){
|
|
|
$ten_money = $tenv['housing_price'] * 10000 + $tenv['assessment_tax'] + $tenv['security_tax'] + $tenv['else_tax'] + $tenv['service_charge'];
|
|
|
$ten_money = $tenv['housing_price'] + $tenv['assessment_tax'] + $tenv['security_tax'] + $tenv['else_tax'] + $tenv['service_charge'];
|
|
|
if($ten_money > 100000){
|
|
|
$is_trueMoney[] = $tenv;
|
|
|
} else {
|
|
|
$up_agen['id'] = $tenv['id'];
|
|
|
$up_agen_res['status'] = 3;
|
|
|
$res_up = Db::name('Agency')->where($up_agen)->update($up_agen_res);
|
|
|
if(!$res_up){
|
|
|
Db::rollback();
|
|
|
}
|
|
|
$this->agency_order_refund($tenv,'中介报价未进入决赛圈退款',2);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -251,7 +257,7 @@ class ThirdsendController extends HomeBaseController |
|
|
// 判断是否在品牌企业中
|
|
|
if (strstr($brav, $agencyv['company']) !== false) {
|
|
|
// 存在
|
|
|
$agen_money = $agencyv['housing_price'] * 10000 + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$agen_money = $agencyv['housing_price'] + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
if (empty($agen_arr)) {
|
|
|
$agen_arr[0]['money'] = $agen_money;
|
|
|
$agen_arr[0]['id'] = $agencyv['id'];
|
...
|
...
|
@@ -266,7 +272,7 @@ class ThirdsendController extends HomeBaseController |
|
|
}
|
|
|
}
|
|
|
// 取出前三报价
|
|
|
$money = $agencyv['housing_price'] * 10000 + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$money = $agencyv['housing_price'] + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$money_list[$agencyv['id']] = $money;
|
|
|
}
|
|
|
asort($money_list);
|
...
|
...
|
@@ -653,7 +659,7 @@ class ThirdsendController extends HomeBaseController |
|
|
// 循环需求,查询相应报价
|
|
|
foreach ($userNeedList as $uNeedk => $uNeedv) {
|
|
|
$uNeedv['user_type'] = Db::name('Member')->where(['id'=>$uNeedv['user_id']])->value('type');
|
|
|
$final_time = $uNeedv['pay_time'] + $uNeedv['quotation_time'] * 86400;
|
|
|
$final_time = $uNeedv['pay_time'] + $uNeedv['quotation_time'] * 86400 + 1800;
|
|
|
if ($time >= $final_time) {
|
|
|
// 处理未支付报价
|
|
|
$not_pay = Db::name('Agency')->where(['need_id'=>$uNeedv['id'],'status'=>1])->column('id');
|
...
|
...
|
@@ -686,10 +692,16 @@ class ThirdsendController extends HomeBaseController |
|
|
if ($agency_list) {
|
|
|
// 删除十万以内报价
|
|
|
foreach ($agency_list as $tenk=>$tenv){
|
|
|
$ten_money = $tenv['housing_price'] * 10000 + $tenv['assessment_tax'] + $tenv['security_tax'] + $tenv['else_tax'] + $tenv['service_charge'];
|
|
|
$ten_money = $tenv['housing_price'] + $tenv['assessment_tax'] + $tenv['security_tax'] + $tenv['else_tax'] + $tenv['service_charge'];
|
|
|
if($ten_money > 100000){
|
|
|
$is_trueMoney[] = $tenv;
|
|
|
} else {
|
|
|
$up_agen['id'] = $tenv['id'];
|
|
|
$up_agen_res['status'] = 3;
|
|
|
$res_up = Db::name('Agency')->where($up_agen)->update($up_agen_res);
|
|
|
if(!$res_up){
|
|
|
Db::rollback();
|
|
|
}
|
|
|
$this->agency_order_refund($tenv,'中介报价未进入决赛圈退款',2);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -703,7 +715,7 @@ class ThirdsendController extends HomeBaseController |
|
|
// 判断是否在品牌企业中
|
|
|
if (strstr($brav, $agencyv['company']) !== false) {
|
|
|
// 存在
|
|
|
$agen_money = $agencyv['housing_price'] * 10000 + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$agen_money = $agencyv['housing_price'] + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
if (empty($agen_arr)) {
|
|
|
$agen_arr[0]['money'] = $agen_money;
|
|
|
$agen_arr[0]['id'] = $agencyv['id'];
|
...
|
...
|
@@ -718,7 +730,7 @@ class ThirdsendController extends HomeBaseController |
|
|
}
|
|
|
}
|
|
|
// 取出前三报价
|
|
|
$money = $agencyv['housing_price'] * 10000 + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$money = $agencyv['housing_price'] + $agencyv['assessment_tax'] + $agencyv['security_tax'] + $agencyv['else_tax'] + $agencyv['service_charge'];
|
|
|
$money_list[$agencyv['id']] = $money;
|
|
|
}
|
|
|
asort($money_list);
|
...
|
...
|
@@ -1319,6 +1331,7 @@ class ThirdsendController extends HomeBaseController |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加推荐人余额
|
|
|
public function handle($need,$agency)
|
|
|
{
|
...
|
...
|
|