Updated getPumpResult response parameter discharge from flow_reading and default value as '1' to delete rows count and modified admin user names
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 29s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 33s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 8m21s
Laravel Pint / pint (pull_request) Successful in 8m14s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 29s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 33s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 8m21s
Laravel Pint / pint (pull_request) Successful in 8m14s
This commit is contained in:
@@ -1705,6 +1705,7 @@ class TestingPanelController extends Controller
|
|||||||
$current = $entry['current'] ?? '0';
|
$current = $entry['current'] ?? '0';
|
||||||
$watt = $entry['watt'] ?? '0';
|
$watt = $entry['watt'] ?? '0';
|
||||||
$tested_by = $entry['tested_by'] ?? $userName;
|
$tested_by = $entry['tested_by'] ?? $userName;
|
||||||
|
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||||
// $pendingExists = PumpTestingEntry::where('plant_id', $plantId)->where('pump_serial_number', $pumpSerial)->where('pump_testing_master_id', $pumpMasterId)->where('tested_type', $testedType)->where('sl_no', $sl_no)->first();
|
// $pendingExists = PumpTestingEntry::where('plant_id', $plantId)->where('pump_serial_number', $pumpSerial)->where('pump_testing_master_id', $pumpMasterId)->where('tested_type', $testedType)->where('sl_no', $sl_no)->first();
|
||||||
|
|
||||||
$cnt++;
|
$cnt++;
|
||||||
@@ -1780,6 +1781,7 @@ class TestingPanelController extends Controller
|
|||||||
$current = $entry['current'] ?? '0';
|
$current = $entry['current'] ?? '0';
|
||||||
$watt = $entry['watt'] ?? '0';
|
$watt = $entry['watt'] ?? '0';
|
||||||
$tested_by = $entry['tested_by'] ?? $userName;
|
$tested_by = $entry['tested_by'] ?? $userName;
|
||||||
|
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||||
|
|
||||||
$createdRows++;
|
$createdRows++;
|
||||||
PumpTestingEntry::create([
|
PumpTestingEntry::create([
|
||||||
@@ -2038,9 +2040,9 @@ class TestingPanelController extends Controller
|
|||||||
'frequency' => $result['frequency'] ?? '0',
|
'frequency' => $result['frequency'] ?? '0',
|
||||||
'speed' => $result['speed'] ?? '0',
|
'speed' => $result['speed'] ?? '0',
|
||||||
'd_head' => $result['head'] ?? '0',
|
'd_head' => $result['head'] ?? '0',
|
||||||
'flow_reading' => $result['flow_reading'] ?? '0',
|
'flow_reading' => $result['discharge'] ?? '0',
|
||||||
'current' => $result['current'] ?? '0',
|
'current' => $result['current'] ?? '0',
|
||||||
'watt' => $result['watt'] ?? '0',
|
'watt' => (string) (($result['watt'] ?? '0') * 1000),
|
||||||
'tested_by' => $result['created_by'] ?? $userName,
|
'tested_by' => $result['created_by'] ?? $userName,
|
||||||
'created_datetime' => ! empty($result['created_at']) ? Carbon::parse($result['created_at'])->setTimezone('Asia/Kolkata')->format('Y-m-d H:i:s') : now('Asia/Kolkata')->format('Y-m-d H:i:s'),
|
'created_datetime' => ! empty($result['created_at']) ? Carbon::parse($result['created_at'])->setTimezone('Asia/Kolkata')->format('Y-m-d H:i:s') : now('Asia/Kolkata')->format('Y-m-d H:i:s'),
|
||||||
];
|
];
|
||||||
@@ -2256,7 +2258,7 @@ class TestingPanelController extends Controller
|
|||||||
|
|
||||||
if ($pumpTestingResult) {
|
if ($pumpTestingResult) {
|
||||||
// update logic
|
// update logic
|
||||||
$cnt = 0;
|
$cnt = 1;
|
||||||
$updatedRows = 0;
|
$updatedRows = 0;
|
||||||
foreach ($results as $result) {
|
foreach ($results as $result) {
|
||||||
if (! $result) {
|
if (! $result) {
|
||||||
@@ -2276,6 +2278,7 @@ class TestingPanelController extends Controller
|
|||||||
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
||||||
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
||||||
$tested_by = $result['tested_by'] ?? $userName;
|
$tested_by = $result['tested_by'] ?? $userName;
|
||||||
|
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||||
// $pendingExists = PumpTestingResult::where('plant_id', $plantId)->where('pump_serial_number', $pumpSerial)->where('pump_testing_master_id', $pumpMasterId)->where('tested_type', $testedType)->where('sl_no', $sl_no)->first();
|
// $pendingExists = PumpTestingResult::where('plant_id', $plantId)->where('pump_serial_number', $pumpSerial)->where('pump_testing_master_id', $pumpMasterId)->where('tested_type', $testedType)->where('sl_no', $sl_no)->first();
|
||||||
|
|
||||||
$cnt++;
|
$cnt++;
|
||||||
@@ -2366,6 +2369,7 @@ class TestingPanelController extends Controller
|
|||||||
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
||||||
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
||||||
$tested_by = $result['tested_by'] ?? $userName;
|
$tested_by = $result['tested_by'] ?? $userName;
|
||||||
|
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||||
|
|
||||||
$createdRows++;
|
$createdRows++;
|
||||||
PumpTestingResult::create([
|
PumpTestingResult::create([
|
||||||
|
|||||||
Reference in New Issue
Block a user