|
@ -1,5 +1,5 @@ |
|
|
<?php |
|
|
<?php |
|
|
error_reporting(0); |
|
|
// ini_set('display_errors', 'on'); |
|
|
require dirname(__DIR__) . '/common/composer/vendor/autoload.php'; |
|
|
require dirname(__DIR__) . '/common/composer/vendor/autoload.php'; |
|
|
|
|
|
|
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet; |
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet; |
|
@ -22,12 +22,13 @@ $sql = " |
|
|
COUNT(this_order.sub_address) AS facility_count |
|
|
COUNT(this_order.sub_address) AS facility_count |
|
|
FROM( |
|
|
FROM( |
|
|
SELECT |
|
|
SELECT |
|
|
SUBSTR(w.address,1,2) AS sub_address, |
|
|
SUBSTR(TRIM(w.address),1,2) AS sub_address, |
|
|
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),1,4) AS date_year, |
|
|
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),1,4) AS date_year, |
|
|
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),6,2) AS date_month, |
|
|
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),6,2) AS date_month, |
|
|
w.facility_kind, |
|
|
w.facility_kind, |
|
|
w.contract_type |
|
|
w.contract_type |
|
|
FROM wipwholestatus AS w |
|
|
FROM wipwholestatus AS w |
|
|
|
|
|
WHERE status = '1' |
|
|
) AS this_order |
|
|
) AS this_order |
|
|
WHERE 1 = 1 |
|
|
WHERE 1 = 1 |
|
|
GROUP BY this_order.contract_type, |
|
|
GROUP BY this_order.contract_type, |
|
@ -132,6 +133,7 @@ $sql = " |
|
|
w.facility_kind |
|
|
w.facility_kind |
|
|
FROM wipwholestatus AS w |
|
|
FROM wipwholestatus AS w |
|
|
WHERE 1=1 |
|
|
WHERE 1=1 |
|
|
|
|
|
AND status = '1' |
|
|
AND real_contract_arrival_date >= '$start_y-$start_m-0' |
|
|
AND real_contract_arrival_date >= '$start_y-$start_m-0' |
|
|
AND real_contract_arrival_date <= '$end_y-$end_m-0' |
|
|
AND real_contract_arrival_date <= '$end_y-$end_m-0' |
|
|
) AS new_order |
|
|
) AS new_order |
|
@ -172,6 +174,7 @@ $sql = " |
|
|
w.renovate_type |
|
|
w.renovate_type |
|
|
FROM wipwholestatus AS w |
|
|
FROM wipwholestatus AS w |
|
|
WHERE 1=1 |
|
|
WHERE 1=1 |
|
|
|
|
|
AND status = '1' |
|
|
AND real_contract_arrival_date >= '$start_y-$start_m-0' |
|
|
AND real_contract_arrival_date >= '$start_y-$start_m-0' |
|
|
AND real_contract_arrival_date <= '$end_y-$end_m-0' |
|
|
AND real_contract_arrival_date <= '$end_y-$end_m-0' |
|
|
AND contract_type = 'B' |
|
|
AND contract_type = 'B' |
|
|