diff --git a/docs/演示方案.docx b/docs/演示方案.docx
index a99d404f..a158d99b 100644
Binary files a/docs/演示方案.docx and b/docs/演示方案.docx differ
diff --git a/docs/研发/环境配置.md b/docs/研发/环境配置.md
index e7066090..60e7dcd0 100644
--- a/docs/研发/环境配置.md
+++ b/docs/研发/环境配置.md
@@ -1,19 +1,21 @@
-#windows 10下需要安装的软件
+# windows 10下需要安装的软件
-##visual studio 2019 社区版(https://visualstudio.microsoft.com/vs/)
+## visual studio 2019 社区版(https://visualstudio.microsoft.com/vs/)
-##windows 10 linux 子系统应用:Unbuntu 18.04 LTS(windows下使用命令行wsl -t Ubuntu-18.04关闭)
+## windows 10 linux 子系统
-设置用户名和密码为pi,输入sudo passwd root,设置root密码为root,输入su root,切换到root用户
+### 安装系统并配置root登录
-#Ubuntu 18.04下需要安装的软件
+1.按照Unbuntu 18.04 LTS
+1.设置用户名和密码为pi,输入sudo passwd root,设置root密码为root
+1.命令行配置root启动:ubuntu1804 config --default-user root
+1.命令行:wsl -t Ubuntu-18.04 关闭linux子系统
+1.以管理员方式运行linux子系统
-##检查CPU架构版本
+### 更新
->uname -a
-
-##更换源(http://mirrors.163.com/.help/ubuntu.html)
-
+1.检查CPU架构版本:uanme -a
+1.更换源:
>lsb_release -a
>cp /etc/apt/sources.list /etc/apt/sources.list.bk
>>/etc/apt/sources.list
@@ -32,15 +34,16 @@ deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe
复制上面更新过的内容并替换/etc/apt/sources.list
>apt update
+### 安装软件
-##安装supervisor(http://supervisord.org/)
+#### 安装supervisor(http://supervisord.org/)
>apt install supervisor
>mv /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bk
>>/etc/supervisor/supervisord.conf
复制publish\src\linux-x64\publish\supervisord.conf内容替换/etc/supervisor/supervisord.conf
>service supervisor start
-##安装nginx (http://nginx.org/en/linux_packages.html#Ubuntu)
+#### 安装nginx (http://nginx.org/en/linux_packages.html#Ubuntu)
>apt install curl gnupg2 ca-certificates lsb-release
>echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
@@ -52,10 +55,11 @@ deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe
>service nginx start
-##安装influxdb(https://portal.influxdata.com/downloads/)
+#### 安装influxdb(https://portal.influxdata.com/downloads/)
>wget https://dl.influxdata.com/influxdb/releases/influxdb_1.7.8_amd64.deb
>sudo dpkg -i influxdb_1.7.8_amd64.deb
>service influxd start
+>apt install influxdb-client
@@ -65,8 +69,9 @@ PermitRootLogin yes
>ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key
>service ssh restart
+==========================================================
-##安装pip
+#### 安装pip
>apt install python-pip
>pip --version
@@ -78,9 +83,18 @@ PermitRootLogin yes
设置开机启动:sudo systemctl enable supervisor
+##安装mysql
+##windows的linux子系统无法设置开机启动,手动创建start.sh脚本并在开机后执行
+>service ssh start
+>service supervisor start
+>service nginx start
+>influxd >/dev/null 2>&1 &
+>dockerd --iptables=false
-##安装mysql
+可以通过crontab reboot的方式开机运行(未验证)
+##docker https://docs.docker.com/install/linux/docker-ce/ubuntu/
+以管理员权限启动linux子系统(https://www.jianshu.com/p/20ebdbf68744)
diff --git a/projects/Infrastructure/Application/BaseEntityRequest.cs b/projects/Infrastructure/Application/BaseEntityRequest.cs
index 31d31b73..158d7cc0 100644
--- a/projects/Infrastructure/Application/BaseEntityRequest.cs
+++ b/projects/Infrastructure/Application/BaseEntityRequest.cs
@@ -1,6 +1,6 @@
+using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc;
namespace Infrastructure.Application
{
diff --git a/projects/Infrastructure/Application/BaseResult.cs b/projects/Infrastructure/Application/BaseResult.cs
index 4310a619..88707196 100644
--- a/projects/Infrastructure/Application/BaseResult.cs
+++ b/projects/Infrastructure/Application/BaseResult.cs
@@ -1,8 +1,8 @@
-using System;
+using Infrastructure.Extensions;
+using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq.Expressions;
-using Infrastructure.Extensions;
namespace Infrastructure.Application
{
diff --git a/projects/Infrastructure/Application/EditModel.cs b/projects/Infrastructure/Application/EditModel.cs
index 7ac672b1..95119d77 100644
--- a/projects/Infrastructure/Application/EditModel.cs
+++ b/projects/Infrastructure/Application/EditModel.cs
@@ -1,6 +1,6 @@
+using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc;
namespace Infrastructure.Application
{
diff --git a/projects/Infrastructure/wwwroot/js/site.js b/projects/Infrastructure/wwwroot/js/site.js
index 6e9b4b52..17a43f2d 100644
--- a/projects/Infrastructure/wwwroot/js/site.js
+++ b/projects/Infrastructure/wwwroot/js/site.js
@@ -144,7 +144,7 @@ function InitControls() {
$('input.cron').each(function () {
$(this).jqCron({
lang: 'cn',
- enabled_year: false,
+ enabled_year: true,
enabled_minute: true,
multiple_dom: true,
multiple_month: true,
diff --git a/projects/IoT.Shared/Areas/Admin/Views/Command/_Code.cshtml b/projects/IoT.Shared/Areas/Admin/Views/Command/_Code.cshtml
index 8b2e426c..966fd668 100644
--- a/projects/IoT.Shared/Areas/Admin/Views/Command/_Code.cshtml
+++ b/projects/IoT.Shared/Areas/Admin/Views/Command/_Code.cshtml
@@ -26,8 +26,7 @@
- 温度
-
+ 温度℃
}
else if (Model.Type == 2)
{
diff --git a/projects/IoT.Shared/Areas/Admin/Views/Command/_Script.cshtml b/projects/IoT.Shared/Areas/Admin/Views/Command/_Script.cshtml
index 1e53b77d..9d91eb1d 100644
--- a/projects/IoT.Shared/Areas/Admin/Views/Command/_Script.cshtml
+++ b/projects/IoT.Shared/Areas/Admin/Views/Command/_Script.cshtml
@@ -33,8 +33,8 @@
});
}
});
- $('body').on('change,load',"input[type='range']",function (e) {
- $(this).attr('data-value',e.target.value);
+ $('body').on('change', "input[type='range']", function (e) {
+ $(this).prev().find('span').html(parseInt(e.target.value) + 15);
});
});
function AirChange(e) {
diff --git a/projects/IoTCenter/Application/Models/EditGlobalIoTTiggerModel.cs b/projects/IoTCenter/Application/Models/EditGlobalIoTTiggerModel.cs
index efa72a18..a5c37a4f 100644
--- a/projects/IoTCenter/Application/Models/EditGlobalIoTTiggerModel.cs
+++ b/projects/IoTCenter/Application/Models/EditGlobalIoTTiggerModel.cs
@@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
namespace IoTCenter.Application.Models
{
- [Display(Name = "触发器")]
+ [Display(Name = "平台触发器")]
public class EditGlobalIoTTiggerModel : EditModel
{
[Display(Name = "触发器名称")]
diff --git a/projects/IoTCenter/Services/IoTCenterEventHandler.cs b/projects/IoTCenter/Services/IoTCenterEventHandler.cs
index 6fe3a83e..57bb211a 100644
--- a/projects/IoTCenter/Services/IoTCenterEventHandler.cs
+++ b/projects/IoTCenter/Services/IoTCenterEventHandler.cs
@@ -58,7 +58,7 @@ namespace IoTCenter.Services
var timer = message.Data;
if (timer.NodeId == null)
{
- RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron);
+ RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron, TimeZoneInfo.Local);
}
}
@@ -67,7 +67,7 @@ namespace IoTCenter.Services
var timer = message.Data;
if (timer.NodeId == null)
{
- RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron);
+ RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron, TimeZoneInfo.Local);
}
}
diff --git a/projects/IoTCenter/Startup.cs b/projects/IoTCenter/Startup.cs
index 91db3f53..e81f03d4 100644
--- a/projects/IoTCenter/Startup.cs
+++ b/projects/IoTCenter/Startup.cs
@@ -48,7 +48,7 @@ namespace IoTCenter
var timers = timerRepo.ReadOnlyTable().Where(o => o.NodeId == null).ToList();
foreach (var timer in timers)
{
- RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron);
+ RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron, TimeZoneInfo.Local);
}
var tiggerRepo = scope.ServiceProvider.GetService>();
var tiggers = tiggerRepo.ReadOnlyTable().Where(o => o.NodeId == null).ToList();
diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json
index 2cf15df0..7ea5aa4b 100644
--- a/projects/IoTCenter/appsettings.json
+++ b/projects/IoTCenter/appsettings.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-rc.1218",
+ "version": "1.0.0-rc.1219",
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/projects/IoTNode/Services/IoTNodeEventHandler.cs b/projects/IoTNode/Services/IoTNodeEventHandler.cs
index 822088e5..2814d5df 100644
--- a/projects/IoTNode/Services/IoTNodeEventHandler.cs
+++ b/projects/IoTNode/Services/IoTNodeEventHandler.cs
@@ -30,12 +30,12 @@ namespace IoTNode.Services
public void Handle(EntityInsertedEvent message)
{
- RecurringJob.AddOrUpdate(message.Data.Id.ToString(), o => o.TimerHanle(message.Data.Id), message.Data.Cron);
+ RecurringJob.AddOrUpdate(message.Data.Id.ToString(), o => o.TimerHanle(message.Data.Id), message.Data.Cron, TimeZoneInfo.Local);
}
public void Handle(EntityUpdatedEvent message)
{
- RecurringJob.AddOrUpdate(message.Data.Id.ToString(), o => o.TimerHanle(message.Data.Id), message.Data.Cron);
+ RecurringJob.AddOrUpdate(message.Data.Id.ToString(), o => o.TimerHanle(message.Data.Id), message.Data.Cron, TimeZoneInfo.Local);
}
public void Handle(EntityDeletedEvent message)
diff --git a/projects/IoTNode/Startup.cs b/projects/IoTNode/Startup.cs
index 2ae94750..a90bc547 100644
--- a/projects/IoTNode/Startup.cs
+++ b/projects/IoTNode/Startup.cs
@@ -53,7 +53,7 @@ namespace IoTNode
var timers = timerRepo.ReadOnlyTable().Where(o => o.NodeId != null).ToList();
foreach (var timer in timers)
{
- RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron);
+ RecurringJob.AddOrUpdate(timer.Id.ToString(), o => o.TimerHanle(timer.Id), timer.Cron, TimeZoneInfo.Local);
}
var tiggerRepo = scope.ServiceProvider.GetService>();
var tiggers = tiggerRepo.ReadOnlyTable().Where(o => o.NodeId != null).ToList();
diff --git a/publish/src/linux-arm64/publish/install.md b/publish/src/linux-arm64/publish/install.md
index 24c6e38b..69443782 100644
--- a/publish/src/linux-arm64/publish/install.md
+++ b/publish/src/linux-arm64/publish/install.md
@@ -41,4 +41,7 @@ root
13.supervisor
#service supervisor restart
14.֤
-http://192.168.3.2:9001û룺usr pwd
\ No newline at end of file
+http://192.168.3.2:9001û룺usr pwd
+
+15.ʱ
+#dpkg-reconfigure tzdata
\ No newline at end of file
diff --git a/publish/src/linux-x64/publish/apps/srs/conf/srs.conf b/publish/src/linux-x64/publish/apps/srs/conf/srs.conf
index 3a9d56cf..bcff0ae3 100644
--- a/publish/src/linux-x64/publish/apps/srs/conf/srs.conf
+++ b/publish/src/linux-x64/publish/apps/srs/conf/srs.conf
@@ -46,6 +46,6 @@ vhost __defaultVhost__ {
}
http_hooks {
enabled on;
- on_dvr http://localhost/IoTCenter/App/OnDvr;
+ on_dvr http://localhost:8011/App/OnDvr;
}
}