Exemple #1
0
 public function _indexDiagram()
 {
     $codeFlowPhase = CodeFlowPhase::all(['ID', 'NAME']);
     $loProductionUnit = LoProductionUnit::all(['ID', 'NAME']);
     $loArea = LoArea::where(['PRODUCTION_UNIT_ID' => $loProductionUnit[0]->ID])->get(['ID', 'NAME']);
     $facility = Facility::where(['AREA_ID' => $loArea[0]->ID])->get(['ID', 'NAME']);
     $intObjectType = IntObjectType::where(['DISPLAY_TYPE' => 1])->get(['CODE', 'NAME']);
     $tmp = ucwords($intObjectType[0]->NAME);
     $mode = 'App\\Models\\' . str_replace(' ', '', $tmp);
     $type = $mode::where(['FACILITY_ID' => $facility[0]->ID])->get(['ID', 'NAME']);
     return view('front.diagram', ['codeFlowPhase' => $codeFlowPhase, 'loProductionUnit' => $loProductionUnit, 'loArea' => $loArea, 'facility' => $facility, 'intObjectType' => $intObjectType, 'type' => $type]);
 }
Exemple #2
0
 /**
  * @return \Illuminate\Routing\Route|null|string
  */
 public function ingnoreId()
 {
     $id = $this->route('facility');
     $name = $this->input('name');
     return Facility::where(compact('id', 'name'))->exists() ? $id : '';
 }
Exemple #3
0
 public function getUomType($uom_type = null, $facility_id)
 {
     if ($uom_type == null) {
         $uom_type = StandardUom::where('facility_id', $facility_id)->select('UOM_TYPE')->first();
         if ($uom_type == null) {
             $uom_type = Facility::where('facility_id', $facility_id)->select('UOM_TYPE')->first();
         }
     }
     return $uom_type;
 }