|
@@ -1346,7 +1346,7 @@ class Lampcontrol extends Base_Controller {
|
|
|
}
|
|
|
if ($datatype == 'lampinfo') {
|
|
|
|
|
|
- $fields = "number,projectid,address,longitude,latitude,section,boardpower,lamptype,boardtype,batteryah,loadpower,devstatus,loadtype,supplier,upazilla,po,manu,protocoltype,updatetime,status,power,model,fascal_year,fascal_year_phase,iccid,softwareVersion,customer_ID,street_light_SN,customer_name,date";
|
|
|
+ $fields = "number,projectid,address,longitude,latitude,section,boardpower,lamptype,boardtype,batteryah,loadpower,devstatus,loadtype,supplier,upazilla,po,manu,protocoltype,updatetime,netstatus as status,power,model,fascal_year,fascal_year_phase,iccid,softwareVersion,customer_ID,street_light_SN,customer_name,date,battvoltage,overtimes,solarpower,id";
|
|
|
|
|
|
$res = $this->Lamp_model->get_one(['id'=>$lamp_id],$fields);
|
|
|
if (empty($res)) {
|
|
@@ -1414,38 +1414,44 @@ class Lampcontrol extends Base_Controller {
|
|
|
}
|
|
|
}
|
|
|
$data = array(
|
|
|
- "lamp_no" => $res["number"],
|
|
|
- "project_name" => $this->Project_model->getNameById($res["projectid"]),
|
|
|
+ "lamp_no" => $res["number"],
|
|
|
+ "section" => $res["section"],
|
|
|
+ 'status' => $res['status'],
|
|
|
+ "updatetime" => $res["updatetime"],
|
|
|
"address" => $res["address"],
|
|
|
+ "loadpower" => $res["loadpower"],
|
|
|
+ 'street_light_SN' => $res['street_light_SN'],
|
|
|
+ 'customer_ID' => $res['customer_ID'],
|
|
|
+ 'customer_name' => $res['customer_name'],
|
|
|
+ 'fascal_year' => $res['fascal_year'],
|
|
|
+ 'fascal_year_phase' => $res['fascal_year_phase'],
|
|
|
+
|
|
|
+ 'battvoltage' => $res['battvoltage'],
|
|
|
+ 'overtimes' => $res['overtimes'],
|
|
|
+ 'solarpower' => $res['solarpower'],
|
|
|
+ "isfaulted" => $res["devstatus"],
|
|
|
+ "id" => $res["id"],
|
|
|
+ "project_name" => $this->Project_model->getNameById($res["projectid"]),
|
|
|
"longitude" => $res["longitude"],
|
|
|
"latitude" => $res["latitude"],
|
|
|
- "isfaulted" => $res["devstatus"],
|
|
|
- "section" => $res["section"],
|
|
|
- "boardpower" => floatval($res["boardpower"]),
|
|
|
+ // "boardpower" => floatval($res["boardpower"]),
|
|
|
"lamptype" => $res['lamptype'],
|
|
|
+ 'softwareVersion' => $res['softwareVersion'],
|
|
|
+
|
|
|
"boardtype" => $res['boardtype'],
|
|
|
- "batteryah" => $res["batteryah"],
|
|
|
- "loadpower" => $res["loadpower"],
|
|
|
- 'status' => $res['status'],
|
|
|
+ // "batteryah" => $res["batteryah"],
|
|
|
// 'batterytype' => $res['batterytype'],
|
|
|
'protocoltype'=>intval($res['protocoltype']),
|
|
|
'supplier'=>intval($res['supplier']),
|
|
|
'upazilla'=>intval($res['upazilla']),
|
|
|
'po'=>intval($res['po']),
|
|
|
'manu'=>intval($res['manu']),
|
|
|
- "updatetime" => $res["updatetime"],
|
|
|
'loadtype' => $res['loadtype'],
|
|
|
'power' => $res['power'],
|
|
|
'model' => $res['model'],
|
|
|
- 'fascal_year' => $res['fascal_year'],
|
|
|
- 'fascal_year_phase' => $res['fascal_year_phase'],
|
|
|
'iccid' => $res['iccid'],
|
|
|
'projectname' => $projectname['projectname'],
|
|
|
'projectid' => $res['projectid'],
|
|
|
- 'softwareVersion' => $res['softwareVersion'],
|
|
|
- 'street_light_SN' => $res['street_light_SN'],
|
|
|
- 'customer_ID' => $res['customer_ID'],
|
|
|
- 'customer_name' => $res['customer_name'],
|
|
|
'date' => $res['date'],
|
|
|
'supplier_name' => $supplier_name,
|
|
|
'model_name' => $model_name,
|