比例体系修改

master
zhengyongxing 4 years ago
parent cd41447eb8
commit 6d3b5f05b4

@ -191,13 +191,16 @@ class CompanySystemRatioController extends AdminController
//将比例整合 //将比例整合
function handleRatio($handleData = []) { function handleRatio($handleData = []) {
$finalData = []; $finalData = [];
// dump($handleData);die();
foreach ($handleData as $key => $value) { foreach ($handleData as $key => $value) {
foreach ($value as $vk => $vv) { foreach ($value as $vk => $vv) {
foreach ($vv as $k => $v) { foreach ($vv as $k => $v) {
if ($finalData[$key][$v['turnover']]) { if ($finalData[$key][$v['turnover']]) {
$finalData[$key][$v['turnover']][$vk] = $v["ratio"]; $finalData[$key][$v['turnover']][$vk] = $v["ratio"];
// if($v["instanceof"] != 0 && ($vk==0||$vk==1||$vk==2) && $handleData[$key][$vk][$k-1]["ratio"]) {
// $finalData[$key][$v['turnover']][$vk] = $handleData[$key][$vk][$k-1]["ratio"];
// }
//判断是否有相同值且一个是>=另一个是>的情况 //判断是否有相同值且一个是>=另一个是>的情况
if ($finalData[$key][$v['turnover']]["instanceof"] != $v["instanceof"]) { if ($finalData[$key][$v['turnover']]["instanceof"] != $v["instanceof"]) {
$finalData[$key][$v['turnover']]["instanceof"] = 0; $finalData[$key][$v['turnover']]["instanceof"] = 0;
@ -224,7 +227,7 @@ class CompanySystemRatioController extends AdminController
} }
// dump($finalData); // dump($finalData);die();
$data = []; $data = [];
foreach ($finalData as $key => $value) { foreach ($finalData as $key => $value) {

Loading…
Cancel
Save