Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
92123274
IoTSharp
项目概览
IoTSharp
/
IoTSharp
10 个月 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
92123274
编写于
12月 22, 2021
作者:
W
wq1234wq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
事件增加查询条件
上级
6b549a4c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
53 addition
and
12 deletion
+53
-12
IoTSharp.TaskAction/DeviceActionExcutor.cs
IoTSharp.TaskAction/DeviceActionExcutor.cs
+1
-1
IoTSharp/ClientApp/src/app/routes/flow/flowevents/flowevents.component.html
.../src/app/routes/flow/flowevents/flowevents.component.html
+17
-2
IoTSharp/ClientApp/src/app/routes/flow/flowevents/flowevents.component.ts
...pp/src/app/routes/flow/flowevents/flowevents.component.ts
+19
-3
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
+2
-1
IoTSharp/Controllers/Models/IPageParam.cs
IoTSharp/Controllers/Models/IPageParam.cs
+3
-1
IoTSharp/Controllers/RulesController.cs
IoTSharp/Controllers/RulesController.cs
+11
-4
未找到文件。
IoTSharp.TaskAction/DeviceActionExcutor.cs
浏览文件 @
92123274
...
...
@@ -32,7 +32,7 @@ namespace IoTSharp.TaskAction
request
.
RequestFormat
=
DataFormat
.
Json
;
request
.
AddHeader
(
"Content-Type"
,
contentType
);
request
.
AddHeader
(
"cache-control"
,
"no-cache"
);
request
.
AddJsonBody
(
JsonConvert
.
SerializeObject
(
new
{
sosType
=
"1"
,
sosContent
=
input
.
Input
,
usingUserId
=
"
zhangsan
"
}));
request
.
AddJsonBody
(
JsonConvert
.
SerializeObject
(
new
{
sosType
=
"1"
,
sosContent
=
input
.
Input
,
usingUserId
=
""
}));
var
response
=
restclient
.
Execute
(
request
);
if
(
response
.
StatusCode
==
HttpStatusCode
.
OK
)
{
...
...
IoTSharp/ClientApp/src/app/routes/flow/flowevents/flowevents.component.html
浏览文件 @
92123274
...
...
@@ -10,11 +10,26 @@
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
nzMd=
"8"
nzSm=
"24"
>
<nz-form-item>
<nz-form-label
nzFor=
"Name"
>
规则
</nz-form-label>
<nz-form-control>
<input
nz-input
[(ngModel)]=
"q.RuleName"
name=
"RuleName"
#UserName
placeholder=
"请输入"
/>
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
nzMd=
"8"
nzSm=
"24"
>
<nz-form-item>
<nz-form-label
nzFor=
"Creator"
>
创建
人
</nz-form-label>
<nz-form-label
nzFor=
"Creator"
>
创建
对象
</nz-form-label>
<nz-form-control>
<input
nz-input
[(ngModel)]=
"q.Creator"
name=
"Creator"
#UserPhone
placeholder=
"请输入"
/>
<input
nz-input
[(ngModel)]=
"q.Creator"
name=
"Creator"
#UserPhone
placeholder=
"请输入"
[nzAutocomplete]=
"auto"
/>
<nz-autocomplete
#auto
>
<nz-auto-option
*ngFor=
"let option of devices"
[nzValue]=
"option.value"
>
{{ option.text }}
</nz-auto-option>
</nz-autocomplete>
</nz-form-control>
</nz-form-item>
</div>
...
...
IoTSharp/ClientApp/src/app/routes/flow/flowevents/flowevents.component.ts
浏览文件 @
92123274
import
{
Component
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
STPage
,
STReq
,
STRes
,
STComponent
,
STColumn
,
STData
,
STColumnTag
}
from
'
@delon/abc/st
'
;
import
{
_HttpClient
,
SettingsService
}
from
'
@delon/theme
'
;
import
{
Guid
}
from
'
guid-typescript
'
;
import
{
NzDrawerService
}
from
'
ng-zorro-antd/drawer
'
;
import
{
NzMessageService
}
from
'
ng-zorro-antd/message
'
;
import
{
FloweventviewComponent
}
from
'
../floweventview/floweventview.component
'
;
...
...
@@ -12,6 +13,12 @@ import { FloweventviewComponent } from '../floweventview/floweventview.component
styleUrls
:
[
'
./flowevents.component.less
'
]
})
export
class
FloweventsComponent
implements
OnInit
{
devices
:
creator
[]
=
[{
value
:
Guid
.
EMPTY
,
text
:
'
测试
'
}];
TAG
:
STColumnTag
=
{
'
Normal
'
:
{
text
:
'
设备
'
,
color
:
'
green
'
},
'
TestPurpose
'
:
{
text
:
'
测试
'
,
color
:
'
orange
'
},
...
...
@@ -26,7 +33,8 @@ export class FloweventsComponent implements OnInit {
pi
:
number
;
ps
:
number
;
Name
:
string
;
Creator
:
string
;
Creator
:
string
;
RuleName
:
string
;
CreatTime
:
Date
[];
sorter
:
string
;
status
:
number
|
null
;
...
...
@@ -35,6 +43,7 @@ export class FloweventsComponent implements OnInit {
ps
:
10
,
Name
:
''
,
Creator
:
''
,
RuleName
:
''
,
CreatTime
:
[],
sorter
:
''
,
status
:
null
,
...
...
@@ -115,6 +124,7 @@ export class FloweventsComponent implements OnInit {
ps
:
10
,
Name
:
''
,
Creator
:
''
,
RuleName
:
''
,
CreatTime
:
[],
sorter
:
''
,
status
:
null
,
...
...
@@ -144,7 +154,13 @@ export interface baseevent{
Bizid
:
string
;
name
:
string
;
ruleId
:
string
;
createrDateTime
:
string
;
creatorName
:
string
;
createrDateTime
:
string
;
creatorName
:
string
;
}
export
interface
creator
{
value
:
string
;
text
:
string
;
}
\ No newline at end of file
IoTSharp/ClientApp/src/app/shared/shared-zorro.module.ts
浏览文件 @
92123274
...
...
@@ -37,6 +37,7 @@ import { NzCodeEditorModule } from 'ng-zorro-antd/code-editor';
import
{
NzTreeViewModule
}
from
'
ng-zorro-antd/tree-view
'
;
import
{
NzResizableModule
}
from
'
ng-zorro-antd/resizable
'
;
import
{
NzCollapseModule
}
from
'
ng-zorro-antd/collapse
'
;
import
{
NzAutocompleteModule
}
from
'
ng-zorro-antd/auto-complete
'
;
export
const
SHARED_ZORRO_MODULES
=
[
NzButtonModule
,
NzMessageModule
,
...
...
@@ -75,5 +76,5 @@ export const SHARED_ZORRO_MODULES = [
NzStepsModule
,
NzCodeEditorModule
,
NzTreeViewModule
,
NzResizableModule
,
NzCollapseModule
NzResizableModule
,
NzCollapseModule
,
NzAutocompleteModule
];
IoTSharp/Controllers/Models/IPageParam.cs
浏览文件 @
92123274
...
...
@@ -33,8 +33,10 @@ namespace IoTSharp.Controllers.Models
public
class
EventParam
:
IPageParam
{
public
string
Name
{
get
;
set
;
}
public
string
RuleName
{
get
;
set
;
}
public
string
CreatorName
{
get
;
set
;
}
public
string
Creator
{
get
;
set
;
}
public
Guid
?
Creator
{
get
;
set
;
}
public
DateTime
[]
CreatTime
{
get
;
set
;
}
}
...
...
IoTSharp/Controllers/RulesController.cs
浏览文件 @
92123274
...
...
@@ -1129,10 +1129,17 @@ namespace IoTSharp.Controllers
condition
=
condition
.
And
(
x
=>
x
.
CreaterDateTime
>
m
.
CreatTime
[
0
]
&&
x
.
CreaterDateTime
<
m
.
CreatTime
[
1
]);
}
//if (m.Creator!=null)
//{
// condition = condition.And(x => x.Creator == m.Creator);
//}
if
(!
string
.
IsNullOrEmpty
(
m
.
RuleName
))
{
condition
=
condition
.
And
(
x
=>
x
.
FlowRule
.
Name
.
Contains
(
m
.
RuleName
));
}
if
(
m
.
Creator
!=
null
&&
m
.
Creator
!=
Guid
.
Empty
)
{
condition
=
condition
.
And
(
x
=>
x
.
Creator
==
m
.
Creator
.
Value
);
}
var
result
=
_context
.
BaseEvents
.
OrderByDescending
(
c
=>
c
.
CreaterDateTime
).
Where
(
condition
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录