cqp 2 settimane fa
parent
commit
f19145907d

+ 3 - 2
app/Exports/ResearchExpenseSummarySheetExport.php

@@ -78,6 +78,7 @@ class ResearchExpenseSummarySheetExport implements WithEvents, WithTitle
 
 
                     // 固定数值列
                     // 固定数值列
                     $sheet->setCellValue("{$col_7_1}{$currentRow}", $item['val7_1'] ?? 0);
                     $sheet->setCellValue("{$col_7_1}{$currentRow}", $item['val7_1'] ?? 0);
+                    $sheet->setCellValue("{$col_7_2}{$currentRow}", $item['val7_2'] ?? 0);
                     $sheet->setCellValue("{$col_8_1}{$currentRow}", $item['val8_1'] ?? 0);
                     $sheet->setCellValue("{$col_8_1}{$currentRow}", $item['val8_1'] ?? 0);
                     $sheet->setCellValue("{$col_8_3}{$currentRow}", $item['val8_3'] ?? 0);
                     $sheet->setCellValue("{$col_8_3}{$currentRow}", $item['val8_3'] ?? 0);
 
 
@@ -86,10 +87,10 @@ class ResearchExpenseSummarySheetExport implements WithEvents, WithTitle
                     $lastDetailCol = Coordinate::stringFromColumnIndex($startDetailIdx + $totalDynamic - 1);
                     $lastDetailCol = Coordinate::stringFromColumnIndex($startDetailIdx + $totalDynamic - 1);
 
 
                     $sheet->setCellValue("{$col_6}{$currentRow}", "=SUM({$firstDetailCol}{$currentRow}:{$lastDetailCol}{$currentRow})");
                     $sheet->setCellValue("{$col_6}{$currentRow}", "=SUM({$firstDetailCol}{$currentRow}:{$lastDetailCol}{$currentRow})");
-                    $sheet->setCellValue("{$col_7_2}{$currentRow}", "={$col_7_1}{$currentRow}");
+//                    $sheet->setCellValue("{$col_7_2}{$currentRow}", "={$col_7_1}{$currentRow}");
                     $sheet->setCellValue("{$col_8_2}{$currentRow}", "={$col_8_1}{$currentRow}*0.8");
                     $sheet->setCellValue("{$col_8_2}{$currentRow}", "={$col_8_1}{$currentRow}*0.8");
                     $sheet->setCellValue("{$col_8_4}{$currentRow}", "={$col_8_3}{$currentRow}*0.8");
                     $sheet->setCellValue("{$col_8_4}{$currentRow}", "={$col_8_3}{$currentRow}*0.8");
-                    $sheet->setCellValue("{$col_E}{$currentRow}", "={$col_6}{$currentRow}+{$col_7_2}{$currentRow}+{$col_8_2}{$currentRow}+{$col_8_4}{$currentRow}");
+                    $sheet->setCellValue("{$col_E}{$currentRow}", "={$col_6}{$currentRow}+{$col_7_1}{$currentRow}+{$col_7_2}{$currentRow}+{$col_8_2}{$currentRow}+{$col_8_4}{$currentRow}");
 
 
                     // 严格清洗类型字符串进行归集
                     // 严格清洗类型字符串进行归集
                     $cleanType = preg_replace('/[\s\v\t\r\n]+/u', '', (string)$item['type']);
                     $cleanType = preg_replace('/[\s\v\t\r\n]+/u', '', (string)$item['type']);

+ 4 - 3
app/Service/ExportFileService.php

@@ -892,7 +892,7 @@ class ExportFileService extends Service
             $rowValues[] = (float)($v['device_depreciation'] ?? 0);
             $rowValues[] = (float)($v['device_depreciation'] ?? 0);
 
 
             // B. 初始化累加变量
             // B. 初始化累加变量
-            $val7_1 = 0; // 其他相关费用合计 (所有 total_amount 之和)
+//            $val7_1 = 0; // 其他相关费用合计 (所有 total_amount 之和)
             $val8_1 = 0; // 委托境内合计 (所有 entrust1_amount 之和)
             $val8_1 = 0; // 委托境内合计 (所有 entrust1_amount 之和)
             $val8_3 = 0; // 委托境外合计 (所有 entrust2_amount 之和)
             $val8_3 = 0; // 委托境外合计 (所有 entrust2_amount 之和)
 
 
@@ -908,7 +908,7 @@ class ExportFileService extends Service
                 $rowValues[] = $amount;
                 $rowValues[] = $amount;
 
 
                 // 1. 累加其他相关费用合计 (7.1)
                 // 1. 累加其他相关费用合计 (7.1)
-                if(! empty($feeData['is_other']) && $feeData['is_other'] == Fee::IS_OTHER_ONE) $val7_1 += $amount;
+//                if(! empty($feeData['is_other']) && $feeData['is_other'] == Fee::IS_OTHER_ONE) $val7_1 += $amount;
 
 
                 // 2. 累加委托费用 (8.1 和 8.3)
                 // 2. 累加委托费用 (8.1 和 8.3)
                 $val8_1 += (float)($feeData['entrust1_amount'] ?? 0);
                 $val8_1 += (float)($feeData['entrust1_amount'] ?? 0);
@@ -921,7 +921,8 @@ class ExportFileService extends Service
                 'status' => (($v['state'] ?? '') == "完结" ? 3 : 2),
                 'status' => (($v['state'] ?? '') == "完结" ? 3 : 2),
                 'type'   => $v['expense_type'] ?? '费用化支出',
                 'type'   => $v['expense_type'] ?? '费用化支出',
                 'values' => $rowValues,
                 'values' => $rowValues,
-                'val7_1' => $val7_1,
+                'val7_1' => $v['other_amount'],
+                'val7_2' => $v['jj_other_amount'],
                 'val8_1' => $val8_1,
                 'val8_1' => $val8_1,
                 'val8_3' => $val8_3,
                 'val8_3' => $val8_3,
             ];
             ];

+ 6 - 1
app/Service/StatisticService.php

@@ -416,7 +416,12 @@ class StatisticService extends StatisticCommonService
             ];
             ];
             $return[] = $item_value;
             $return[] = $item_value;
         }
         }
-        return [true, ["list" => $return, "fee_type_list" => $fee_type_list]];
+        //修改
+        foreach ($fee_type_list as $key => $value){
+            if($value['is_after']) unset($fee_type_list[$key]);
+        }
+
+        return [true, ["list" => $return, "fee_type_list" => array_values($fee_type_list)]];
 
 
     }
     }