debug the excel reports

This commit is contained in:
2024-02-20 13:22:11 +00:00
parent c8538855ae
commit 79cde5bd69
85 changed files with 1001859 additions and 96 deletions

View File

@@ -57,10 +57,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 601 THEN operation_type_amount3
WHEN operation_type_id4 = 601 THEN operation_type_amount4
END)) AS KhakiDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 601 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100
WHEN operation_type_id2 = 601 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100
WHEN operation_type_id3 = 601 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100
WHEN operation_type_id4 = 601 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100
ROUND(SUM(CASE WHEN operation_type_id1 = 601 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 601 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 601 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 601 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS KhakiDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN operation_type_amount1
@@ -68,10 +68,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 602 THEN operation_type_amount3
WHEN operation_type_id4 = 602 THEN operation_type_amount4
END)) AS RosaziDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100
WHEN operation_type_id2 = 602 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100
WHEN operation_type_id3 = 602 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100
WHEN operation_type_id4 = 602 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100
ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 602 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 602 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 602 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS RosaziDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN operation_type_amount1
@@ -79,10 +79,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 603 THEN operation_type_amount3
WHEN operation_type_id4 = 603 THEN operation_type_amount4
END)) AS AbneyehDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100
WHEN operation_type_id2 = 603 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100
WHEN operation_type_id3 = 603 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100
WHEN operation_type_id4 = 603 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100
ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 603 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 603 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 603 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS AbneyehDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN operation_type_amount1
@@ -90,10 +90,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 604 THEN operation_type_amount3
WHEN operation_type_id4 = 604 THEN operation_type_amount4
END)) AS AsphaltDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100
WHEN operation_type_id2 = 604 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100
WHEN operation_type_id3 = 604 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100
WHEN operation_type_id4 = 604 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100
ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 604 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 604 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 604 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS AsphaltDone,
COUNT(*) AS countAll,
province_fa,
@@ -113,7 +113,7 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
$query .= " GROUP BY province_id
ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query));
$data = DB::select($query);
$sum = [
'KhakiDoing' => 0,