Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
c698ed45
IoTSharp
项目概览
IoTSharp
/
IoTSharp
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
c698ed45
编写于
2月 12, 2022
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. 修正sqlserver的数据,
2. 调整 一些地方填写 租户信息
上级
4a6ed055
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
155 addition
and
194 deletion
+155
-194
IoTSharp.Data.SqlServer/Migrations/20220212100016_SQLServerSchema2022.Designer.cs
...Migrations/20220212100016_SQLServerSchema2022.Designer.cs
+32
-48
IoTSharp.Data.SqlServer/Migrations/20220212100016_SQLServerSchema2022.cs
...qlServer/Migrations/20220212100016_SQLServerSchema2022.cs
+31
-39
IoTSharp.Data.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
...SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
+31
-47
IoTSharp/Controllers/RulesController.cs
IoTSharp/Controllers/RulesController.cs
+53
-52
IoTSharp/IoTSharp.xml
IoTSharp/IoTSharp.xml
+8
-8
未找到文件。
IoTSharp.Data.SqlServer/Migrations/20220212
091230
_SQLServerSchema2022.Designer.cs
→
IoTSharp.Data.SqlServer/Migrations/20220212
100016
_SQLServerSchema2022.Designer.cs
浏览文件 @
c698ed45
...
...
@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace
IoTSharp.Data.SqlServer.Migrations
{
[
DbContext
(
typeof
(
ApplicationDbContext
))]
[
Migration
(
"20220212
091230
_SQLServerSchema2022"
)]
[
Migration
(
"20220212
100016
_SQLServerSchema2022"
)]
partial
class
SQLServerSchema2022
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
...
...
@@ -926,7 +926,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"FieldCode"
)
...
...
@@ -941,7 +941,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldI18nKey"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldMaxLength"
)
b
.
Property
<
int
>(
"FieldMaxLength"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"FieldName"
)
...
...
@@ -953,10 +953,10 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldPocoTypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldStatus"
)
b
.
Property
<
int
>(
"FieldStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
long
?
>(
"FieldUIElement"
)
b
.
Property
<
long
>(
"FieldUIElement"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FieldUIElementSchema"
)
...
...
@@ -974,22 +974,22 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldValueLocalDataSource"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldValueType"
)
b
.
Property
<
int
>(
"FieldValueType"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"FieldValueTypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
long
?
>(
"FormId"
)
b
.
Property
<
long
>(
"FormId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
bool
?
>(
"IsEnabled"
)
b
.
Property
<
bool
>(
"IsEnabled"
)
.
HasColumnType
(
"bit"
);
b
.
Property
<
bool
?
>(
"IsRequired"
)
b
.
Property
<
bool
>(
"IsRequired"
)
.
HasColumnType
(
"bit"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
HasKey
(
"FieldId"
);
...
...
@@ -1009,13 +1009,13 @@ namespace IoTSharp.Data.SqlServer.Migrations
SqlServerPropertyBuilderExtensions
.
UseIdentityColumn
(
b
.
Property
<
long
>(
"FieldValueId"
),
1L
,
1
);
b
.
Property
<
long
?
>(
"BizId"
)
b
.
Property
<
long
>(
"BizId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"FieldCode"
)
...
...
@@ -1024,7 +1024,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
DateTime
?>(
"FieldCreateDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
long
?
>(
"FieldId"
)
b
.
Property
<
long
>(
"FieldId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FieldName"
)
...
...
@@ -1036,13 +1036,13 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
long
?
>(
"FieldValueType"
)
b
.
Property
<
long
>(
"FieldValueType"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
long
?
>(
"FromId"
)
b
.
Property
<
long
>(
"FromId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
HasKey
(
"FieldValueId"
);
...
...
@@ -1062,16 +1062,16 @@ namespace IoTSharp.Data.SqlServer.Migrations
SqlServerPropertyBuilderExtensions
.
UseIdentityColumn
(
b
.
Property
<
long
>(
"FormId"
),
1L
,
1
);
b
.
Property
<
long
?
>(
"BizId"
)
b
.
Property
<
long
>(
"BizId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
long
?
>(
"FormCreator"
)
b
.
Property
<
long
>(
"FormCreator"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FormDesc"
)
...
...
@@ -1086,7 +1086,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FormSchame"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FormStatus"
)
b
.
Property
<
int
>(
"FormStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
?>(
"FromCreateDate"
)
...
...
@@ -1098,7 +1098,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"ModelClass"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"Url"
)
...
...
@@ -1237,7 +1237,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
?>(
"FlowRuleRuleId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
?
>(
"NodeStatus"
)
b
.
Property
<
int
>(
"NodeStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"OperationDesc"
)
...
...
@@ -1462,7 +1462,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -1483,7 +1483,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"EventTag"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -2025,15 +2025,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2044,15 +2040,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2063,15 +2055,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2190,15 +2178,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp.Data.SqlServer/Migrations/20220212
091230
_SQLServerSchema2022.cs
→
IoTSharp.Data.SqlServer/Migrations/20220212
100016
_SQLServerSchema2022.cs
浏览文件 @
c698ed45
...
...
@@ -579,27 +579,27 @@ namespace IoTSharp.Data.SqlServer.Migrations
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
FieldName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValue
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValueType
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
tru
e
),
FormId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
FieldValueType
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
fals
e
),
FormId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
Creator
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
false
),
FieldCreateDate
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
true
),
FieldEditDate
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
true
),
FieldCode
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldUnit
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
IsRequired
=
table
.
Column
<
bool
>(
type
:
"bit"
,
nullable
:
tru
e
),
IsEnabled
=
table
.
Column
<
bool
>(
type
:
"bit"
,
nullable
:
tru
e
),
FieldStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
tru
e
),
IsRequired
=
table
.
Column
<
bool
>(
type
:
"bit"
,
nullable
:
fals
e
),
IsEnabled
=
table
.
Column
<
bool
>(
type
:
"bit"
,
nullable
:
fals
e
),
FieldStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
fals
e
),
FieldI18nKey
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValueDataSource
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValueLocalDataSource
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldPattern
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldMaxLength
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
tru
e
),
FieldMaxLength
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
fals
e
),
FieldValueTypeName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldUIElement
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
FieldUIElement
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
FieldUIElementSchema
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldPocoTypeName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
)
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
)
},
constraints
:
table
=>
{
...
...
@@ -608,14 +608,12 @@ namespace IoTSharp.Data.SqlServer.Migrations
name
:
"FK_DynamicFormFieldInfos_Customer_CustomerId"
,
column
:
x
=>
x
.
CustomerId
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
table
.
ForeignKey
(
name
:
"FK_DynamicFormFieldInfos_Tenant_TenantId"
,
column
:
x
=>
x
.
TenantId
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
});
migrationBuilder
.
CreateTable
(
...
...
@@ -624,18 +622,18 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
FieldValueId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
false
)
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
FieldId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
FieldId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
FieldName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValue
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FromId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
FromId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
Creator
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
false
),
FieldCreateDate
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
true
),
FieldCode
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldUnit
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FieldValueType
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
BizId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
)
FieldValueType
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
BizId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
)
},
constraints
:
table
=>
{
...
...
@@ -644,14 +642,12 @@ namespace IoTSharp.Data.SqlServer.Migrations
name
:
"FK_DynamicFormFieldValueInfos_Customer_CustomerId"
,
column
:
x
=>
x
.
CustomerId
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
table
.
ForeignKey
(
name
:
"FK_DynamicFormFieldValueInfos_Tenant_TenantId"
,
column
:
x
=>
x
.
TenantId
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
});
migrationBuilder
.
CreateTable
(
...
...
@@ -660,11 +656,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
FormId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
false
)
.
Annotation
(
"SqlServer:Identity"
,
"1, 1"
),
BizId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
FormCreator
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
tru
e
),
BizId
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
FormCreator
=
table
.
Column
<
long
>(
type
:
"bigint"
,
nullable
:
fals
e
),
FormName
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FormDesc
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
FormStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
tru
e
),
FormStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
fals
e
),
FormSchame
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
ModelClass
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
Url
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
...
...
@@ -672,8 +668,8 @@ namespace IoTSharp.Data.SqlServer.Migrations
FromCreateDate
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
true
),
FormLayout
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
IsCompact
=
table
.
Column
<
bool
>(
type
:
"bit"
,
nullable
:
false
),
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
)
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
)
},
constraints
:
table
=>
{
...
...
@@ -682,14 +678,12 @@ namespace IoTSharp.Data.SqlServer.Migrations
name
:
"FK_DynamicFormInfos_Customer_CustomerId"
,
column
:
x
=>
x
.
CustomerId
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
table
.
ForeignKey
(
name
:
"FK_DynamicFormInfos_Tenant_TenantId"
,
column
:
x
=>
x
.
TenantId
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
});
migrationBuilder
.
CreateTable
(
...
...
@@ -809,8 +803,8 @@ namespace IoTSharp.Data.SqlServer.Migrations
EventTag
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
CreateDateTime
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
false
),
Creator
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
false
),
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
fals
e
)
TenantId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
),
CustomerId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
tru
e
)
},
constraints
:
table
=>
{
...
...
@@ -819,14 +813,12 @@ namespace IoTSharp.Data.SqlServer.Migrations
name
:
"FK_SubscriptionEvents_Customer_CustomerId"
,
column
:
x
=>
x
.
CustomerId
,
principalTable
:
"Customer"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
table
.
ForeignKey
(
name
:
"FK_SubscriptionEvents_Tenant_TenantId"
,
column
:
x
=>
x
.
TenantId
,
principalTable
:
"Tenant"
,
principalColumn
:
"Id"
,
onDelete
:
ReferentialAction
.
Cascade
);
principalColumn
:
"Id"
);
});
migrationBuilder
.
CreateTable
(
...
...
@@ -1099,7 +1091,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
OperationId
=
table
.
Column
<
Guid
>(
type
:
"uniqueidentifier"
,
nullable
:
false
),
AddDate
=
table
.
Column
<
DateTime
>(
type
:
"datetime2"
,
nullable
:
true
),
NodeStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
tru
e
),
NodeStatus
=
table
.
Column
<
int
>(
type
:
"int"
,
nullable
:
fals
e
),
OperationDesc
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
Data
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
BizId
=
table
.
Column
<
string
>(
type
:
"nvarchar(max)"
,
nullable
:
true
),
...
...
IoTSharp.Data.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs
浏览文件 @
c698ed45
...
...
@@ -924,7 +924,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"FieldCode"
)
...
...
@@ -939,7 +939,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldI18nKey"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldMaxLength"
)
b
.
Property
<
int
>(
"FieldMaxLength"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"FieldName"
)
...
...
@@ -951,10 +951,10 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldPocoTypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldStatus"
)
b
.
Property
<
int
>(
"FieldStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
long
?
>(
"FieldUIElement"
)
b
.
Property
<
long
>(
"FieldUIElement"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FieldUIElementSchema"
)
...
...
@@ -972,22 +972,22 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldValueLocalDataSource"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FieldValueType"
)
b
.
Property
<
int
>(
"FieldValueType"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"FieldValueTypeName"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
long
?
>(
"FormId"
)
b
.
Property
<
long
>(
"FormId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
bool
?
>(
"IsEnabled"
)
b
.
Property
<
bool
>(
"IsEnabled"
)
.
HasColumnType
(
"bit"
);
b
.
Property
<
bool
?
>(
"IsRequired"
)
b
.
Property
<
bool
>(
"IsRequired"
)
.
HasColumnType
(
"bit"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
HasKey
(
"FieldId"
);
...
...
@@ -1007,13 +1007,13 @@ namespace IoTSharp.Data.SqlServer.Migrations
SqlServerPropertyBuilderExtensions
.
UseIdentityColumn
(
b
.
Property
<
long
>(
"FieldValueId"
),
1L
,
1
);
b
.
Property
<
long
?
>(
"BizId"
)
b
.
Property
<
long
>(
"BizId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"FieldCode"
)
...
...
@@ -1022,7 +1022,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
DateTime
?>(
"FieldCreateDate"
)
.
HasColumnType
(
"datetime2"
);
b
.
Property
<
long
?
>(
"FieldId"
)
b
.
Property
<
long
>(
"FieldId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FieldName"
)
...
...
@@ -1034,13 +1034,13 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FieldValue"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
long
?
>(
"FieldValueType"
)
b
.
Property
<
long
>(
"FieldValueType"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
long
?
>(
"FromId"
)
b
.
Property
<
long
>(
"FromId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
HasKey
(
"FieldValueId"
);
...
...
@@ -1060,16 +1060,16 @@ namespace IoTSharp.Data.SqlServer.Migrations
SqlServerPropertyBuilderExtensions
.
UseIdentityColumn
(
b
.
Property
<
long
>(
"FormId"
),
1L
,
1
);
b
.
Property
<
long
?
>(
"BizId"
)
b
.
Property
<
long
>(
"BizId"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
long
?
>(
"FormCreator"
)
b
.
Property
<
long
>(
"FormCreator"
)
.
HasColumnType
(
"bigint"
);
b
.
Property
<
string
>(
"FormDesc"
)
...
...
@@ -1084,7 +1084,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"FormSchame"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
int
?
>(
"FormStatus"
)
b
.
Property
<
int
>(
"FormStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
DateTime
?>(
"FromCreateDate"
)
...
...
@@ -1096,7 +1096,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"ModelClass"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"Url"
)
...
...
@@ -1235,7 +1235,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
?>(
"FlowRuleRuleId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
?
>(
"NodeStatus"
)
b
.
Property
<
int
>(
"NodeStatus"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
string
>(
"OperationDesc"
)
...
...
@@ -1460,7 +1460,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
Guid
>(
"Creator"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
Guid
>(
"CustomerId"
)
b
.
Property
<
Guid
?
>(
"CustomerId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
string
>(
"EventDesc"
)
...
...
@@ -1481,7 +1481,7 @@ namespace IoTSharp.Data.SqlServer.Migrations
b
.
Property
<
string
>(
"EventTag"
)
.
HasColumnType
(
"nvarchar(max)"
);
b
.
Property
<
Guid
>(
"TenantId"
)
b
.
Property
<
Guid
?
>(
"TenantId"
)
.
HasColumnType
(
"uniqueidentifier"
);
b
.
Property
<
int
>(
"Type"
)
...
...
@@ -2023,15 +2023,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2042,15 +2038,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2061,15 +2053,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
@@ -2188,15 +2176,11 @@ namespace IoTSharp.Data.SqlServer.Migrations
{
b
.
HasOne
(
"IoTSharp.Data.Customer"
,
"Customer"
)
.
WithMany
()
.
HasForeignKey
(
"CustomerId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"CustomerId"
);
b
.
HasOne
(
"IoTSharp.Data.Tenant"
,
"Tenant"
)
.
WithMany
()
.
HasForeignKey
(
"TenantId"
)
.
OnDelete
(
DeleteBehavior
.
Cascade
)
.
IsRequired
();
.
HasForeignKey
(
"TenantId"
);
b
.
Navigation
(
"Customer"
);
...
...
IoTSharp/Controllers/RulesController.cs
浏览文件 @
c698ed45
...
...
@@ -326,31 +326,22 @@ namespace IoTSharp.Controllers
public
ApiResult
<
bool
>
SaveDiagram
(
ModelWorkFlow
m
)
{
var
profile
=
this
.
GetUserProfile
();
var
activity
=
JsonConvert
.
DeserializeObject
<
IoTSharp
.
Models
.
Rule
.
Activity
>(
m
.
Biz
);
var
activity
=
JsonConvert
.
DeserializeObject
<
Activity
>(
m
.
Biz
);
var
CreatorId
=
Guid
.
NewGuid
();
var
CreateDate
=
DateTime
.
Now
;
var
rule
=
_context
.
FlowRules
.
FirstOrDefault
(
c
=>
c
.
RuleId
==
activity
.
RuleId
);
rule
.
DefinitionsXml
=
m
.
Xml
;
rule
.
Creator
=
profile
.
Id
.
ToString
();
rule
.
CreateId
=
CreatorId
;
// _context.Flows.RemoveRange(_context.Flows.Where(c => c.FlowRule.RuleId == rule.RuleId).ToList());
_context
.
Flows
.
Where
(
c
=>
c
.
FlowRule
.
RuleId
==
rule
.
RuleId
).
ToList
().
ForEach
(
c
=>
_context
.
Flows
.
Where
(
c
=>
c
.
FlowRule
.
RuleId
==
rule
.
RuleId
).
ForEach
(
c
=>
{
c
.
FlowStatus
=
-
1
;
});
_context
.
SaveChanges
();
_context
.
FlowRules
.
Update
(
rule
);
_context
.
SaveChanges
();
if
(
activity
.
BaseBpmnObjects
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
BaseBpmnObjects
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
BaseBpmnObjects
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -362,14 +353,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
}
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
StartEvents
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
StartEvents
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
StartEvents
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -379,14 +371,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
EndEvents
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
EndEvents
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
EndEvents
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -396,14 +389,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
SequenceFlows
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
SequenceFlows
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
SequenceFlows
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -417,14 +411,15 @@ namespace IoTSharp.Controllers
NodeProcessParams
=
c
.
BizObject
.
NodeProcessParams
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
Tasks
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
Tasks
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
Tasks
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -438,14 +433,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
DataInputAssociations
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
DataInputAssociations
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
DataInputAssociations
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -455,14 +451,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
DataOutputAssociations
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
DataOutputAssociations
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
DataOutputAssociations
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -472,14 +469,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
TextAnnotations
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
TextAnnotations
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
TextAnnotations
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -489,14 +487,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
Containers
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
Containers
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
Containers
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -506,8 +505,9 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
...
...
@@ -523,14 +523,13 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
_context
.
SaveChanges
();
}
if
(
activity
.
DataStoreReferences
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
DataStoreReferences
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
DataStoreReferences
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -540,14 +539,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
Lane
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
Lane
.
Select
(
c
=>
new
Flow
var
fw
=
activity
.
Lane
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -557,14 +557,15 @@ namespace IoTSharp.Controllers
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
});
fw
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fw
);
_context
.
SaveChanges
();
}
if
(
activity
.
LaneSet
!=
null
)
{
_context
.
Flows
.
AddRange
(
activity
.
LaneSet
.
Select
(
c
=>
new
Flow
var
fws
=
activity
.
LaneSet
.
Select
(
c
=>
new
Flow
{
FlowRule
=
rule
,
Flowname
=
c
.
BizObject
.
Flowname
,
...
...
@@ -573,9 +574,10 @@ namespace IoTSharp.Controllers
FlowStatus
=
1
,
CreateId
=
CreatorId
,
Createor
=
profile
.
Id
,
CreateDate
=
CreateDate
,
Tenant
=
new
Tenant
()
{
Id
=
profile
.
Tenant
},
}).
ToList
());
CreateDate
=
CreateDate
});
fws
.
ForEach
(
f
=>
_context
.
JustFill
(
this
,
f
));
_context
.
Flows
.
AddRange
(
fws
);
_context
.
SaveChanges
();
}
return
new
ApiResult
<
bool
>(
ApiCode
.
Success
,
"Ok"
,
true
);
...
...
@@ -1086,11 +1088,10 @@ namespace IoTSharp.Controllers
var
list
=
result
.
Select
(
c
=>
new
FlowOperation
{
AddDate
=
c
.
AddDate
,
BaseEvent
=
new
BaseEvent
()
{
EventId
=
c
.
BaseEvent
.
EventId
},
BizId
=
c
.
BizId
,
Data
=
c
.
Data
,
Flow
=
new
Flow
()
{
FlowId
=
c
.
Flow
.
FlowId
}
,
FlowRule
=
new
FlowRule
()
{
RuleId
=
c
.
FlowRule
.
RuleId
}
,
Flow
=
c
.
Flow
,
FlowRule
=
c
.
FlowRule
,
NodeStatus
=
c
.
NodeStatus
,
OperationDesc
=
c
.
OperationDesc
,
OperationId
=
new
Guid
(),
...
...
IoTSharp/IoTSharp.xml
浏览文件 @
c698ed45
...
...
@@ -380,11 +380,11 @@
<returns></returns>
</member>
<member
name=
"M:IoTSharp.Controllers.DictionaryController.Delete(System.Int32)"
>
<summary>
<summary>
</summary>
<param
name=
"id"
></param>
<returns></returns>
</summary>
<param
name=
"id"
></param>
<returns></returns>
</member>
<member
name=
"M:IoTSharp.Controllers.DictionaryGroupController.Save(IoTSharp.Data.BaseDictionaryGroup)"
>
<summary>
...
...
@@ -401,11 +401,11 @@
<returns></returns>
</member>
<member
name=
"M:IoTSharp.Controllers.DynamicFormInfoController.Save(IoTSharp.Data.DynamicFormInfo)"
>
<summary>
<summary>
</summary>
<param
name=
"m"
></param>
<returns></returns>
</summary>
<param
name=
"m"
></param>
<returns></returns>
</member>
<member
name=
"T:IoTSharp.Controllers.InstallerController"
>
<summary>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录