Merge branch 'hotfix/market_shift_rebind' of wmtx/platform into release

修改市场换绑-影响玩家换绑
master
廖金灵 4 years ago committed by Gogs
commit 51a3c8fd87

@ -275,6 +275,9 @@ class FinancePromoteController extends AdminController
if($istimeselect){
$map['s.payed_time']=$istimeselect;
}
if ($isMarketLeader) {
$map['s.market_admin_id'] = ['gt', 0];
}
if ($adminId > 0) {
$map['s.market_admin_id'] = $adminId;
}

@ -591,6 +591,9 @@ class MarketPercentageController extends ThinkController
}
$data = M("market_altogether","tab_")
->field("tab_market_altogether.*,market_percentage")
->join("left join sys_auth_group_access access on tab_market_altogether.admin_id = access.uid")
->join("left join sys_auth_group auth on access.group_id=auth.id")
->where($map);
if ($_REQUEST['export']) {
@ -628,6 +631,8 @@ class MarketPercentageController extends ThinkController
$data[$key]['start_time'] = date("Y-m-1",strtotime($value['pay_time']));
$data[$key]['end_time'] = date("Y-m-t",strtotime($value['pay_time']));
$market_percentage = json_decode($value['market_percentage'],true);
if ($value['level'] == 21) {
$data[$key]['level'] = '初级';
} else if ($value['level'] == 11) {
@ -642,6 +647,13 @@ class MarketPercentageController extends ThinkController
$data[$key]['is_send'] = '未发放';
}
//两个起提流水都没达到时,不展示税后毛利
$sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses'];
if ($sum_amount<$market_percentage['performance_revenue']&&$sum_amount<$market_percentage['appraisal_bonuses']) {
$data[$key]['company_profit'] = "0.00";
$value['company_profit'] = "0.00";
}
$data[$key]['wait_commission'] =
number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 2, '.', '');

@ -35,10 +35,16 @@
<th>公司性质</th>
<th>内外团归属</th>
<th>合同期限</th>
<th>开票税点</th>
<th>账户名</th>
<th>开户行</th>
<th>银行账号</th>
<th>是否签署合同</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
<th>备注</th>
<th>会长账号</th>
@ -61,11 +67,18 @@
<td rowspan="{$data.row}">{$data.company_type}</td>
<td rowspan="{$data.row}">{$data.company_belong}</td>
<td rowspan="{$data.row}">{$data.contact_begin} - {$data.contact_end}</td>
<td rowspan="{$data.row}">{$data.fax_ratio}%</td>
<td rowspan="{$data.row}">{$data.bank_address}</td>
<td rowspan="{$data.row}">{$data.bank_name}</td>
<td rowspan="{$data.row}">&nbsp;{$data.bank_card}</td>
<td rowspan="{$data.row}">{$data.is_sign_contact}</td>
<td rowspan="{$data.row}">{$data.ali_user}</td>
<td rowspan="{$data.row}">{$data.ali_account}</td>
<td rowspan="{$data.row}">{$data.content}</td>
<notempty name="data.list">
<foreach name="data['list']" item="promote" key="promotekey">
<if condition="$promotekey gt 0">

@ -379,6 +379,9 @@ class PromoteService {
'promote_id' => $toPromote['id'],
'promote_account' => $toPromote['account']
];
$updateMarket = [
'market_admin_id' => $toPromote['admin_id'],
];
$map = $otherMap = ['promote_id' => $fromPromote['id']];
if (count($shiftIds) > 0) {
@ -397,12 +400,12 @@ class PromoteService {
$orderMap1 = $otherMap;
$orderMap1['pay_time'] = ['egt', $orderTime];
M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save($updateData); // 只改未对账的数据
M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save(array_merge($updateData, $updateMarket)); // 只改未对账的数据
M('bind_spend', 'tab_')->where($orderMap1)->save($updateData);
$orderMap2 = $otherMap;
$orderMap2['create_time'] = ['egt', $orderTime];
M('deposit', 'tab_')->where($orderMap2)->save($updateData);
M('deposit', 'tab_')->where($orderMap2)->save(array_merge($updateData, $updateMarket));
M('user_play_data_count', 'tab_')->where($orderMap2)->save(['promote_id' => $toPromote['id']]);
$status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);

Loading…
Cancel
Save