比例体系修改

master
zhengyongxing 4 years ago
parent cd41447eb8
commit 6d3b5f05b4

@ -191,13 +191,16 @@ class CompanySystemRatioController extends AdminController
//将比例整合
function handleRatio($handleData = []) {
$finalData = [];
// dump($handleData);die();
foreach ($handleData as $key => $value) {
foreach ($value as $vk => $vv) {
foreach ($vv as $k => $v) {
if ($finalData[$key][$v['turnover']]) {
$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"]) {
$finalData[$key][$v['turnover']]["instanceof"] = 0;
@ -224,7 +227,7 @@ class CompanySystemRatioController extends AdminController
}
// dump($finalData);
// dump($finalData);die();
$data = [];
foreach ($finalData as $key => $value) {

Loading…
Cancel
Save