|
@@ -132,7 +132,7 @@ class PowerwarnController extends PushWarnController
|
|
case 'digitalReserved4'://预留4
|
|
case 'digitalReserved4'://预留4
|
|
case 'digitalReserved5'://预留5
|
|
case 'digitalReserved5'://预留5
|
|
case 'digitalReserved6'://预留6
|
|
case 'digitalReserved6'://预留6
|
|
- case 'LoadLiveL1'://预留2
|
|
|
|
|
|
+ case 'LoadLiveL1'://L1带电
|
|
case 'TripL1'://L1故障跳闸
|
|
case 'TripL1'://L1故障跳闸
|
|
case 'OverIL1'://L1电流越限
|
|
case 'OverIL1'://L1电流越限
|
|
case 'OverVL1'://L1过压
|
|
case 'OverVL1'://L1过压
|
|
@@ -185,6 +185,7 @@ class PowerwarnController extends PushWarnController
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
$res = M()->query("select b.site_address as address,b.site_name as siteName,a.site_id as siteId,a.device_name as deviceName from device as a join site as b on a.site_id=b.id where a.device_code='" . $device_code . "'");
|
|
$res = M()->query("select b.site_address as address,b.site_name as siteName,a.site_id as siteId,a.device_name as deviceName from device as a join site as b on a.site_id=b.id where a.device_code='" . $device_code . "'");
|
|
$outage_plan = M()->query("SELECT * FROM wc_blackout_plan WHERE site_id=".$res[0]['siteId']." AND enable=1 AND start_time<'".date("Y-m-d H:i:s")."' AND end_time>='".date("Y-m-d H:i:s")."'");
|
|
$outage_plan = M()->query("SELECT * FROM wc_blackout_plan WHERE site_id=".$res[0]['siteId']." AND enable=1 AND start_time<'".date("Y-m-d H:i:s")."' AND end_time>='".date("Y-m-d H:i:s")."'");
|
|
if (!empty($outage_plan)){
|
|
if (!empty($outage_plan)){
|
|
@@ -198,17 +199,32 @@ class PowerwarnController extends PushWarnController
|
|
$phone_sql = M()->query("select personnel_phone as phone from personnel where personnel_function in(1,2,4) and site_id=" . $res[0]['siteId']." ".$where." group by personnel_phone");
|
|
$phone_sql = M()->query("select personnel_phone as phone from personnel where personnel_function in(1,2,4) and site_id=" . $res[0]['siteId']." ".$where." group by personnel_phone");
|
|
}
|
|
}
|
|
|
|
|
|
- print_r($phone_sql);
|
|
|
|
|
|
+// print_r($phone_sql);
|
|
if (count($phone_sql) == 0) {
|
|
if (count($phone_sql) == 0) {
|
|
echo '系统内部出现问题';
|
|
echo '系统内部出现问题';
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
- $openids = $this->array_column1($phone_sql, "phone");
|
|
|
|
|
|
+ $phone_sql1 = "";
|
|
|
|
+ if ($Data['meas_name']=='LoadLiveL1'){
|
|
|
|
+ foreach ($phone_sql as $key=>$value){
|
|
|
|
+ if ($phone_sql[$key]['phone']!='13917483378'||$phone_sql[$key]['phone']!='13917687789'||
|
|
|
|
+ $phone_sql[$key]['phone']!='13617382188'||$phone_sql[$key]['phone']!='17621295894'){
|
|
|
|
+ $phone_sql1[]['phone'] = $phone_sql[$key]['phone'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (count($phone_sql1) == 0) {
|
|
|
|
+ echo '无关联手机号';
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
|
|
+ print_r($phone_sql1);
|
|
|
|
+ $openids = $this->array_column1($phone_sql1, "phone");
|
|
if (empty($openids)) {
|
|
if (empty($openids)) {
|
|
echo 'open is null';
|
|
echo 'open is null';
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
if ($device_code=='DA00013165'||$device_code=='DA00012784'||$device_code=='DA00013596'||$device_code=='DA00013433'
|
|
if ($device_code=='DA00013165'||$device_code=='DA00012784'||$device_code=='DA00013596'||$device_code=='DA00013433'
|
|
||$device_code=='DA00012827'||$device_code=='DA00021164'||$device_code=='DA00021241'||$device_code=='DA00021248'
|
|
||$device_code=='DA00012827'||$device_code=='DA00021164'||$device_code=='DA00021241'||$device_code=='DA00021248'
|
|
||$device_code=='DA00021152'||$device_code=='DA00020371'){
|
|
||$device_code=='DA00021152'||$device_code=='DA00020371'){
|