Merge pull request 'Updated getPumpResult response parameter discharge from flow_reading and default value as '1' to delete rows count and modified admin user names' (#967) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #967
This commit was merged in pull request #967.
This commit is contained in:
@@ -1705,6 +1705,7 @@ class TestingPanelController extends Controller
|
||||
$current = $entry['current'] ?? '0';
|
||||
$watt = $entry['watt'] ?? '0';
|
||||
$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();
|
||||
|
||||
$cnt++;
|
||||
@@ -1780,6 +1781,7 @@ class TestingPanelController extends Controller
|
||||
$current = $entry['current'] ?? '0';
|
||||
$watt = $entry['watt'] ?? '0';
|
||||
$tested_by = $entry['tested_by'] ?? $userName;
|
||||
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||
|
||||
$createdRows++;
|
||||
PumpTestingEntry::create([
|
||||
@@ -2038,9 +2040,9 @@ class TestingPanelController extends Controller
|
||||
'frequency' => $result['frequency'] ?? '0',
|
||||
'speed' => $result['speed'] ?? '0',
|
||||
'd_head' => $result['head'] ?? '0',
|
||||
'flow_reading' => $result['flow_reading'] ?? '0',
|
||||
'flow_reading' => $result['discharge'] ?? '0',
|
||||
'current' => $result['current'] ?? '0',
|
||||
'watt' => $result['watt'] ?? '0',
|
||||
'watt' => (string) (($result['watt'] ?? '0') * 1000),
|
||||
'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'),
|
||||
];
|
||||
@@ -2256,7 +2258,7 @@ class TestingPanelController extends Controller
|
||||
|
||||
if ($pumpTestingResult) {
|
||||
// update logic
|
||||
$cnt = 0;
|
||||
$cnt = 1;
|
||||
$updatedRows = 0;
|
||||
foreach ($results as $result) {
|
||||
if (! $result) {
|
||||
@@ -2276,6 +2278,7 @@ class TestingPanelController extends Controller
|
||||
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
||||
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
||||
$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();
|
||||
|
||||
$cnt++;
|
||||
@@ -2366,6 +2369,7 @@ class TestingPanelController extends Controller
|
||||
$overall_efficiency = $result['overall_efficiency'] ?? '0';
|
||||
$pump_efficiency = $result['pump_efficiency'] ?? '0';
|
||||
$tested_by = $result['tested_by'] ?? $userName;
|
||||
$tested_by = ($tested_by == 'jothi') ? 'Admin' : $tested_by;
|
||||
|
||||
$createdRows++;
|
||||
PumpTestingResult::create([
|
||||
|
||||
Reference in New Issue
Block a user