|
@@ -5,7 +5,7 @@
|
|
|
* @Author: likang
|
|
|
* @Date: 2022-05-27 13:34:31
|
|
|
* @LastEditors: likang
|
|
|
- * @LastEditTime: 2022-07-18 17:05:10
|
|
|
+ * @LastEditTime: 2022-07-23 18:21:02
|
|
|
*/
|
|
|
|
|
|
namespace catchAdmin\wind\model;
|
|
@@ -89,7 +89,8 @@ class Fan extends Model
|
|
|
$data = [
|
|
|
'id' => intval($obj->id),
|
|
|
'wnum' => Wind::where('id', $obj->wind_id)->value('number'),
|
|
|
- 'number' => intval($this->number),
|
|
|
+ 'number' => strval($this->number),
|
|
|
+ 'model' => ModelDeviceMold::where('device_type', 4)->where('id', $obj->fan_model)->value('name')
|
|
|
|
|
|
];
|
|
|
$content['data'] = $data;
|
|
@@ -122,7 +123,7 @@ class Fan extends Model
|
|
|
$model_name = ModelDeviceMold::where($wheres)->column('name');
|
|
|
$where[] = ['ContentType', '=', 'FanModel'];
|
|
|
$where[] = ['ContentId', 'like', '%' . $wind_num . '_%'];
|
|
|
- $where[] = ['Type', '=', 'add'];
|
|
|
+
|
|
|
//获取当前风场下发的风机模型
|
|
|
$list = Db::name('publish')->where($where)->field('ContentId')->select();
|
|
|
//截取ContentId 获取模型名称
|
|
@@ -143,8 +144,8 @@ class Fan extends Model
|
|
|
$time = msectime();
|
|
|
$json = json_encode([
|
|
|
'id' => $wind_num . '_' . $item,
|
|
|
- 'wunm' => $wind_num,
|
|
|
- 'model' => $item
|
|
|
+ 'wnum' => strval($wind_num),
|
|
|
+ 'model' => strval($item)
|
|
|
]);
|
|
|
$content[] = [
|
|
|
'Type' => 'add',
|