Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified app/.htaccess
100644 → 100755
Empty file.
Empty file modified app/Common.php
100644 → 100755
Empty file.
Empty file modified app/Config/App.php
100644 → 100755
Empty file.
Empty file modified app/Config/Autoload.php
100644 → 100755
Empty file.
Empty file modified app/Config/Boot/development.php
100644 → 100755
Empty file.
Empty file modified app/Config/Boot/production.php
100644 → 100755
Empty file.
Empty file modified app/Config/Boot/testing.php
100644 → 100755
Empty file.
Empty file modified app/Config/CURLRequest.php
100644 → 100755
Empty file.
Empty file modified app/Config/Cache.php
100644 → 100755
Empty file.
Empty file modified app/Config/Constants.php
100644 → 100755
Empty file.
Empty file modified app/Config/ContentSecurityPolicy.php
100644 → 100755
Empty file.
Empty file modified app/Config/Cookie.php
100644 → 100755
Empty file.
Empty file modified app/Config/Database.php
100644 → 100755
Empty file.
Empty file modified app/Config/DocTypes.php
100644 → 100755
Empty file.
Empty file modified app/Config/Email.php
100644 → 100755
Empty file.
Empty file modified app/Config/Encryption.php
100644 → 100755
Empty file.
Empty file modified app/Config/Events.php
100644 → 100755
Empty file.
Empty file modified app/Config/Exceptions.php
100644 → 100755
Empty file.
Empty file modified app/Config/Feature.php
100644 → 100755
Empty file.
Empty file modified app/Config/Filters.php
100644 → 100755
Empty file.
Empty file modified app/Config/ForeignCharacters.php
100644 → 100755
Empty file.
Empty file modified app/Config/Format.php
100644 → 100755
Empty file.
Empty file modified app/Config/Generators.php
100644 → 100755
Empty file.
Empty file modified app/Config/Honeypot.php
100644 → 100755
Empty file.
Empty file modified app/Config/Images.php
100644 → 100755
Empty file.
Empty file modified app/Config/Kint.php
100644 → 100755
Empty file.
Empty file modified app/Config/Logger.php
100644 → 100755
Empty file.
Empty file modified app/Config/Migrations.php
100644 → 100755
Empty file.
Empty file modified app/Config/Mimes.php
100644 → 100755
Empty file.
Empty file modified app/Config/Modules.php
100644 → 100755
Empty file.
Empty file modified app/Config/MongoDbConfig.php
100644 → 100755
Empty file.
Empty file modified app/Config/Pager.php
100644 → 100755
Empty file.
Empty file modified app/Config/Paths.php
100644 → 100755
Empty file.
Empty file modified app/Config/Publisher.php
100644 → 100755
Empty file.
Empty file modified app/Config/Routes.php
100644 → 100755
Empty file.
Empty file modified app/Config/Security.php
100644 → 100755
Empty file.
Empty file modified app/Config/Services.php
100644 → 100755
Empty file.
Empty file modified app/Config/Toolbar.php
100644 → 100755
Empty file.
Empty file modified app/Config/UserAgents.php
100644 → 100755
Empty file.
Empty file modified app/Config/Validation.php
100644 → 100755
Empty file.
Empty file modified app/Config/View.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/Alert_Settings_Controller.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/BaseController.php
100644 → 100755
Empty file.
36 changes: 31 additions & 5 deletions app/Controllers/Common_Graph.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,20 @@ public function getDataRaw($graphRef,$fromTime=null,$toTime=null){
}
else{
$s_time_range = strtotime($value['calendar_date']." ".$value['start_time']);
$e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
// $e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
$duration_min =0;
$duration_sec =0;

$tmp = explode(".", $value['split_duration']);
if (sizeof($tmp) >1) {
$duration_min = floatval($tmp[0]);
$duration_sec = floatval($tmp[1]);
}
else{
$duration_min = floatval($tmp[0]);
}
$duration = (int)(($duration_min*60) + ($duration_sec));
$e_time_range = $s_time_range + $duration;

if ($s_time_range <= $s_time_range_limit && $e_time_range >= $s_time_range_limit) {
$output[$key]['start_time'] = $FromTime;
Expand Down Expand Up @@ -120,7 +133,20 @@ public function getDataRaw($graphRef,$fromTime=null,$toTime=null){
}
else{
$s_time_range = strtotime($value['calendar_date']." ".$value['start_time']);
$e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
// $e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
$duration_min =0;
$duration_sec =0;

$tmp = explode(".", $value['duration']);
if (sizeof($tmp) >1) {
$duration_min = floatval($tmp[0]);
$duration_sec = floatval($tmp[1]);
}
else{
$duration_min = floatval($tmp[0]);
}
$duration = (int)(($duration_min*60) + ($duration_sec));
$e_time_range = $s_time_range + $duration;

if ($s_time_range <= $s_time_range_limit && $e_time_range >= $s_time_range_limit) {
$getAllTimeValues[$key]['start_time'] = $FromTime;
Expand Down Expand Up @@ -354,7 +380,7 @@ public function getDataRaw($graphRef,$fromTime=null,$toTime=null){
if ($graphRef == "Overall") {
return $Overall;
}
}
}


public function calculateOverallOEE($MachineWiseData){
Expand Down Expand Up @@ -655,7 +681,7 @@ public function oeeData($MachineWiseDataRaw,$getAllTimeValues,$noplan=false){
return $DowntimeTimeData;
}


//
public function getDuration($f,$t){
$from_time = strtotime($f);
$to_time = strtotime($t);
Expand Down Expand Up @@ -741,7 +767,7 @@ public function oeeDataTreand($MachineWiseDataRaw,$x,$part,$days,$noplan=false){
return $downData;
}


//

}

Expand Down
Empty file modified app/Controllers/Current_Shift_Performance.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/Daily_production_controller.php
100644 → 100755
Empty file.
30 changes: 28 additions & 2 deletions app/Controllers/Financial_Metrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,20 @@ public function getDataRaw($graphRef,$fromTime=null,$toTime=null){
}
else{
$s_time_range = strtotime($value['calendar_date']." ".$value['start_time']);
$e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
// $e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
$duration_min =0;
$duration_sec =0;

$tmp = explode(".", $value['split_duration']);
if (sizeof($tmp) >1) {
$duration_min = floatval($tmp[0]);
$duration_sec = floatval($tmp[1]);
}
else{
$duration_min = floatval($tmp[0]);
}
$duration = (int)(($duration_min*60) + ($duration_sec));
$e_time_range = $s_time_range + $duration;

if ($s_time_range <= $s_time_range_limit && $e_time_range >= $s_time_range_limit) {
$output[$key]['start_time'] = $FromTime;
Expand Down Expand Up @@ -161,7 +174,20 @@ public function getDataRaw($graphRef,$fromTime=null,$toTime=null){
}
else{
$s_time_range = strtotime($value['calendar_date']." ".$value['start_time']);
$e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
// $e_time_range = strtotime($value['calendar_date']." ".$value['end_time']);
$duration_min =0;
$duration_sec =0;

$tmp = explode(".", $value['duration']);
if (sizeof($tmp) >1) {
$duration_min = floatval($tmp[0]);
$duration_sec = floatval($tmp[1]);
}
else{
$duration_min = floatval($tmp[0]);
}
$duration = (int)(($duration_min*60) + ($duration_sec));
$e_time_range = $s_time_range + $duration;

if ($s_time_range <= $s_time_range_limit && $e_time_range >= $s_time_range_limit) {
$getAllTimeValues[$key]['start_time'] = $FromTime;
Expand Down
Empty file modified app/Controllers/General.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/Home.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/Login.php
100644 → 100755
Empty file.
89 changes: 42 additions & 47 deletions app/Controllers/OEE_Drill_Down_controller.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class OEE_Drill_Down_controller extends BaseController
{
protected $graph_obj;
// constructor
function __construct(){
//parent::__construct();
$this->session = \Config\Services::session();
Expand All @@ -15,7 +16,7 @@ function __construct(){
// $this->Financial = new Financial_Model();
}


// overall oee teep and ooe value getting
public function OverallOEETarget(){
if ($this->request->isAJAX()) {
log_message("info","\n\n oee drill down over all graph function calling !!");
Expand All @@ -24,31 +25,22 @@ public function OverallOEETarget(){
$ref="Overall";
$fromTime = $this->request->getVar("from");
$toTime = $this->request->getVar("to");
// $fromTime = "2023-11-12T09:00:00";
// $toTime = "2023-11-18T08:00:00";



// $start_time = microtime(true);
// $Overall = $this->getDataRaw($ref,$fromTime,$toTime);
// $fromTime = "2023-11-18T14:00:00";
// $toTime = "2023-11-24T13:00:00";
$Overall = $this->graph_obj->getDataRaw($ref,$fromTime,$toTime);
// $end_time = microtime(true);
// $execution_time = ($end_time - $start_time);
// echo " Execution time of script = ".$execution_time." sec";
$end_time_logger_overall_g = microtime(true);
$execution_time_logger_overall_g = ($end_time_logger_overall_g - $start_time_logger_overall_g);
log_message("info","oee drill down overall graph execution duration is :\t".$execution_time_logger_overall_g);


echo json_encode($Overall);

// echo "<pre>";
// print_r($Overall);

}

}

// general settings get oee and teep and ooe target value
public function getOverallTarget(){
log_message("oee drill down graph overall graph function calling !!");
$start_time_logger_oa = microtime(true);
Expand Down Expand Up @@ -252,7 +244,7 @@ public function oeeTrendDay(){

}


// oee trend graph filter and array arrange function
public function oeeDataTreand($MachineWiseDataRaw,$x,$part,$days,$noplan=false,$filter_data)
{
$downData=[];
Expand Down Expand Up @@ -405,6 +397,7 @@ public function getMachineWiseOEE(){

}

// machine wise oee sorting function
public function selectionSortOEE($arr, $n)
{
// One by one move boundary of unsorted subarray
Expand Down Expand Up @@ -454,45 +447,45 @@ public function getAvailabilityReasonWise($fromTime,$toTime){
// $toTime="2023-03-03T11:00:00";

// // Calculation for to find ALL time value
$tmpFromDate =explode("T", $fromTime);
$tmpToDate = explode("T", $toTime);
$tmpFromDate =explode("T", $fromTime);
$tmpToDate = explode("T", $toTime);


//Raw data from Reason mapping Table...........
$rawData = $this->graph_obj->getDataRaw($ref,$fromTime,$toTime);
//Raw data from Reason mapping Table...........
$rawData = $this->graph_obj->getDataRaw($ref,$fromTime,$toTime);

// machine wise records
$ref1 = "MachinewiseOEE";
$MachinewiseData = $this->graph_obj->getDataRaw($ref1,$fromTime,$toTime);
// machine wise records
$ref1 = "MachinewiseOEE";
$MachinewiseData = $this->graph_obj->getDataRaw($ref1,$fromTime,$toTime);

//Difference between two dates......
$diff = abs(strtotime($toTime) - strtotime($fromTime));
$AllTime = (int)($diff/60);

//time split for date+time seperated values
$tmpFrom = explode("T",$fromTime);
$tmpTo = explode("T",$toTime);
// temporary time......
$tempFrom = explode(":",$tmpFrom[1]);
$tempTo = explode(":",$tmpTo[1]);
//From date
$FromDate = $tmpFrom[0];
//milli seconds added ":00", because in real data milli seconds added
$FromTime = $tempFrom[0].":00".":00";
//Exact value
//$FromTime = $tmpFrom[1];
//To Date
$ToDate = $tmpTo[0];
//milli seconds added ":00"
$ToTime = $tempTo[0].":00".":00";
//Difference between two dates......
$diff = abs(strtotime($toTime) - strtotime($fromTime));
$AllTime = (int)($diff/60);

//time split for date+time seperated values
$tmpFrom = explode("T",$fromTime);
$tmpTo = explode("T",$toTime);
// temporary time......
$tempFrom = explode(":",$tmpFrom[1]);
$tempTo = explode(":",$tmpTo[1]);
//From date
$FromDate = $tmpFrom[0];
//milli seconds added ":00", because in real data milli seconds added
$FromTime = $tempFrom[0].":00".":00";
//Exact value
//$FromTime = $tmpFrom[1];
//To Date
$ToDate = $tmpTo[0];
//milli seconds added ":00"
$ToTime = $tempTo[0].":00".":00";

//Machine Wise Calculated Data...........
//$MachinewiseData = $this->getDataRaw($ref);
//$MachinewiseData = $this->getDataRaw($ref);
// Machine Name and ID Reference............
$MachineName = $this->data->getMachineRecGraph();
// Need not change, because machine id updated........
// Machine Id Conversion as per the Machine data.......
// $MachineName = $this->convertMachineId($MachineName);

// Downtime Reason.......
$DowntimeReason = $this->data->downtimeReason();

Expand Down Expand Up @@ -609,7 +602,7 @@ public function getAvailabilityReasonWise($fromTime,$toTime){
return $out;
}


// availability opportunity graph for reason wise sorting function
public function selectionSortAvailability($arr, $n)
{
// One by one move boundary of unsorted subarray
Expand Down Expand Up @@ -666,7 +659,7 @@ public function selectionSortAvailability($arr, $n)
return $arr;
}


// machine wise availability graph for graph filter function
public function getmachine_reason_availability(){
if ($this->request->isAJAX()) {
$fromTime = $this->request->getVar("from");
Expand Down Expand Up @@ -770,7 +763,7 @@ public function getmachine_reason_availability(){

}
}

// sub function for availability graph for graph filter function
public function getoppcost_arr($rid,$res,$machine_arr){
$temp_arr = [];
foreach ($res['data'] as $key => $value) {
Expand All @@ -786,7 +779,7 @@ public function getoppcost_arr($rid,$res,$machine_arr){

return $temp_arr;
}

// sub function for availability graph for graph filter function
public function getduration_arr($rid,$res,$machine_arr){

$tmpid_arr = [];
Expand Down Expand Up @@ -969,6 +962,7 @@ public function performanceOpportunity(){
// print_r($out);
}

// sorting function for performance opportunity graph
public function selectionSortQuality($arr, $n){
//int i, j, min_idx;

Expand Down Expand Up @@ -1594,6 +1588,7 @@ public function getoppcost_arr_first_loader($rid,$res){
return $temp_arr;
}

// sub function for availability graph
public function getduration_arr_first_loader($rid,$res){

$tmpid_arr = [];
Expand Down
Empty file modified app/Controllers/Operator.php
100644 → 100755
Empty file.
Empty file modified app/Controllers/PDM_controller.php
100644 → 100755
Empty file.
Loading