Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
0918d4aa
Commit
0918d4aa
authored
Dec 15, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体
parent
8808b992
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
755 additions
and
0 deletions
+755
-0
RB_Flow.cs
Edu.Model/Entity/Flow/RB_Flow.cs
+56
-0
RB_Flow_AduitInfo.cs
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
+52
-0
RB_Flow_Node.cs
Edu.Model/Entity/Flow/RB_Flow_Node.cs
+32
-0
RB_Flow_Log.cs
Edu.Model/Entity/Log/RB_Flow_Log.cs
+50
-0
RB_Flow_AduitInfo_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_AduitInfo_ViewModel.cs
+23
-0
RB_Flow_Node_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_Node_ViewModel.cs
+23
-0
RB_Flow_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_ViewModel.cs
+18
-0
RB_Flow_Log_ViewModel.cs
Edu.Model/ViewModel/Log/RB_Flow_Log_ViewModel.cs
+18
-0
FlowLogModule.cs
Edu.Module.Log/FlowLogModule.cs
+53
-0
BasicFlowModule.cs
Edu.Module.System/BasicFlowModule.cs
+200
-0
RB_FlowRepository.cs
Edu.Repository/Flow/RB_FlowRepository.cs
+43
-0
RB_Flow_AduitInfoRepository.cs
Edu.Repository/Flow/RB_Flow_AduitInfoRepository.cs
+50
-0
RB_Flow_NodeRepository.cs
Edu.Repository/Flow/RB_Flow_NodeRepository.cs
+44
-0
RB_Flow_LogRepository.cs
Edu.Repository/Log/RB_Flow_LogRepository.cs
+93
-0
No files found.
Edu.Model/Entity/Flow/RB_Flow.cs
0 → 100644
View file @
0918d4aa
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程设置表【退课相关】
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Flow
{
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 流程名称
/// </summary>
public
string
FlowName
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态(1-删除)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 更新人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
0 → 100644
View file @
0918d4aa
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程节点审核信息实体
/// </summary>
public
class
RB_Flow_AduitInfo
{
/// <summary>
/// 主键编号
/// </summary>
public
int
CheckId
{
get
;
set
;
}
/// <summary>
/// 流程节点编号
/// </summary>
public
int
NodeId
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 审核类型(1-指定人员,2-指定角色)
/// </summary>
public
int
AuditType
{
get
;
set
;
}
/// <summary>
/// 审核人员编号(AuditType为1时使用)
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 是否为特殊节点
/// </summary>
public
int
IsSpecNode
{
get
;
set
;
}
/// <summary>
/// 1-班级教师,2-关联销售,3-分区校长 AuditType为2时使用
/// </summary>
public
int
PostType
{
get
;
set
;
}
/// <summary>
/// 1依次审批(本环节内审批人依次审批) 2 会签(须所有审批人同意)3 或签(一名审批人同意或拒绝即可)
/// </summary>
public
int
AuditWay
{
get
;
set
;
}
}
}
Edu.Model/Entity/Flow/RB_Flow_Node.cs
0 → 100644
View file @
0918d4aa
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程节点实体类
/// </summary>
public
class
RB_Flow_Node
{
/// <summary>
/// 节点编号(主键)
/// </summary>
public
int
NodeId
{
get
;
set
;
}
/// <summary>
/// 节点名称
/// </summary>
public
string
NodeName
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
SortNum
{
get
;
set
;
}
}
}
Edu.Model/Entity/Log/RB_Flow_Log.cs
0 → 100644
View file @
0918d4aa
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Log
{
/// <summary>
/// 流程修改日志实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Flow_Log
{
/// <summary>
/// 流程日志表
/// </summary>
public
int
LogId
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 日志内容
/// </summary>
public
string
LogContent
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态(1-删除)
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Flow/RB_Flow_AduitInfo_ViewModel.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程节点审核信息视图实体类
/// </summary>
public
class
RB_Flow_AduitInfo_ViewModel
:
RB_Flow_AduitInfo
{
/// <summary>
/// 流程节点编号【查询使用】
/// </summary>
public
string
QNodeIds
{
get
;
set
;
}
/// <summary>
/// 流程编号【查询使用】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Flow/RB_Flow_Node_ViewModel.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程节点视图实体类
/// </summary>
public
class
RB_Flow_Node_ViewModel
:
RB_Flow_Node
{
/// <summary>
/// 节点审核人信息列表
/// </summary>
public
List
<
RB_Flow_AduitInfo_ViewModel
>
FlowAduitList
{
get
;
set
;
}
/// <summary>
/// 流程编号【逗哥逗号分隔】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Flow/RB_Flow_ViewModel.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程设置表视图实体类【退课相关】
/// </summary>
public
class
RB_Flow_ViewModel
:
RB_Flow
{
/// <summary>
/// 流程节点列表
/// </summary>
public
List
<
RB_Flow_Node_ViewModel
>
FlowNodeList
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Log/RB_Flow_Log_ViewModel.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Log
{
/// <summary>
/// 流程修改日志视图实体类
/// </summary>
public
class
RB_Flow_Log_ViewModel
:
RB_Flow_Log
{
/// <summary>
/// 流程编号【查询使用】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Module.Log/FlowLogModule.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Log
;
using
Edu.Repository.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Module.Log
{
/// <summary>
/// 流程修改日志处理类
/// </summary>
public
class
FlowLogModule
{
/// <summary>
/// 流程修改日志仓储层对象
/// </summary>
private
readonly
RB_Flow_LogRepository
flow_LogRepository
=
new
RB_Flow_LogRepository
();
/// <summary>
/// 获取流程修改日志列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogListModule
(
RB_Flow_Log_ViewModel
query
)
{
return
flow_LogRepository
.
GetFlowLogListRepository
(
query
);
}
/// <summary>
/// 获取流程修改日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_Log_ViewModel
query
)
{
return
flow_LogRepository
.
GetFlowLogPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增流程修改日志
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddFlowLog
(
RB_Flow_Log
model
)
{
return
flow_LogRepository
.
AddFlowLogRepository
(
model
);
}
}
}
Edu.Module.System/BasicFlowModule.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.ViewModel.Flow
;
using
Edu.Repository.Flow
;
using
Edu.Repository.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.System
{
/// <summary>
/// 基础相关流程设置
/// </summary>
public
class
BasicFlowModule
{
/// <summary>
/// 流程仓储层对象
/// </summary>
private
readonly
RB_FlowRepository
flowRepository
=
new
RB_FlowRepository
();
/// <summary>
/// 流程节点仓储层对象
/// </summary>
private
readonly
RB_Flow_NodeRepository
flow_NodeRepository
=
new
RB_Flow_NodeRepository
();
/// <summary>
/// 流程节点审核人
/// </summary>
private
readonly
RB_Flow_AduitInfoRepository
flow_AduitInfoRepository
=
new
RB_Flow_AduitInfoRepository
();
/// <summary>
/// 流程修改日志仓储层对象
/// </summary>
private
readonly
RB_Flow_LogRepository
flow_LogRepository
=
new
RB_Flow_LogRepository
();
/// <summary>
/// 获取流程设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_ViewModel
>
GetFlowPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_ViewModel
query
)
{
var
list
=
flowRepository
.
GetFlowPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
return
list
;
}
/// <summary>
/// 获取流程信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Flow_ViewModel
GetFlowModule
(
object
Id
)
{
var
extModel
=
flowRepository
.
GetEntity
<
RB_Flow_ViewModel
>(
Id
);
if
(
extModel
!=
null
)
{
if
(
extModel
.
FlowId
>
0
)
{
var
auditList
=
flow_AduitInfoRepository
.
GetFlowAduitInfoListRepository
(
new
RB_Flow_AduitInfo_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
extModel
.
FlowNodeList
=
flow_NodeRepository
.
GetFlowNodeListRepository
(
new
RB_Flow_Node_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
if
(
extModel
.
FlowNodeList
!=
null
&&
extModel
.
FlowNodeList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
FlowNodeList
)
{
item
.
FlowAduitList
=
auditList
?.
Where
(
qitem
=>
qitem
.
NodeId
==
item
.
NodeId
)?.
ToList
();
}
}
}
}
return
extModel
;
}
/// <summary>
/// 新增修改流程
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
virtual
bool
SetFlowModule
(
RB_Flow_ViewModel
extModel
)
{
bool
flag
=
false
;
string
logContent
=
""
;
RB_Flow_ViewModel
oldModel
=
null
;
if
(
extModel
.
FlowId
>
0
)
{
oldModel
=
GetFlowModule
(
extModel
.
FlowId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Flow_ViewModel
.
FlowName
),
extModel
.
FlowName
},
{
nameof
(
RB_Flow_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Flow_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
};
if
(
oldModel
.
FlowName
!=
extModel
.
FlowName
)
{
logContent
+=
string
.
Format
(
",流程名称由【{0}】修改为【{1}】"
,
oldModel
.
FlowName
,
extModel
.
FlowName
);
}
flag
=
flowRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Flow_ViewModel
.
FlowId
),
extModel
.
FlowId
));
}
else
{
logContent
=
string
.
Format
(
"新增【{0}】流程"
,
extModel
.
FlowName
);
var
newId
=
flowRepository
.
Insert
(
extModel
);
extModel
.
FlowId
=
newId
;
flag
=
newId
>
0
;
}
var
oldauditList
=
flow_AduitInfoRepository
.
GetFlowAduitInfoListRepository
(
new
RB_Flow_AduitInfo_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
var
oldflowNodeList
=
flow_NodeRepository
.
GetFlowNodeListRepository
(
new
RB_Flow_Node_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
//以前没有流程节点(直接新增)
if
(
oldflowNodeList
==
null
)
{
int
SortNum
=
1
;
foreach
(
var
item
in
extModel
.
FlowNodeList
)
{
item
.
FlowId
=
extModel
.
FlowId
;
item
.
SortNum
=
SortNum
;
var
newNodeId
=
flow_NodeRepository
.
Insert
(
item
);
item
.
NodeId
=
newNodeId
;
flag
=
newNodeId
>
0
;
if
(
item
.
FlowAduitList
!=
null
&&
item
.
FlowAduitList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
FlowAduitList
)
{
subItem
.
NodeId
=
item
.
NodeId
;
subItem
.
FlowId
=
extModel
.
FlowId
;
flag
=
flow_AduitInfoRepository
.
Insert
(
subItem
)>
0
;
}
}
SortNum
++;
}
}
else
{
//现在没有节点信息[删除以前的节点和审核人]
if
(
extModel
.
FlowNodeList
==
null
||
(
extModel
.
FlowNodeList
!=
null
&&
extModel
.
FlowNodeList
.
Count
==
0
))
{
flow_NodeRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
extModel
.
FlowId
));
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
extModel
.
FlowId
));
}
else
{
var
deleteList
=
oldflowNodeList
.
Where
(
qitem
=>
!
extModel
.
FlowNodeList
.
Any
(
oldItem
=>
qitem
.
NodeId
==
oldItem
.
NodeId
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
{
if
(
dItem
.
NodeId
>
0
)
{
flow_NodeRepository
.
Delete
(
dItem
.
NodeId
);
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
dItem
.
NodeId
));
logContent
+=
string
.
Format
(
",删除【{0}】节点"
,
dItem
.
NodeName
);
}
}
int
SortNum
=
1
;
foreach
(
var
nItem
in
extModel
.
FlowNodeList
)
{
nItem
.
FlowId
=
extModel
.
FlowId
;
nItem
.
SortNum
=
SortNum
;
if
(
nItem
.
NodeId
==
0
)
{
var
newNodeId
=
flow_NodeRepository
.
Insert
(
nItem
);
nItem
.
NodeId
=
newNodeId
;
flag
=
newNodeId
>
0
;
}
else
{
flag
=
flow_NodeRepository
.
Update
(
nItem
);
}
var
auditDeleteList
=
oldauditList
.
Where
(
qitem
=>
qitem
.
NodeId
==
nItem
.
NodeId
);
if
(
nItem
.
FlowAduitList
!=
null
&&
nItem
.
FlowAduitList
.
Count
>
0
)
{
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
nItem
.
NodeId
));
foreach
(
var
subItem
in
nItem
.
FlowAduitList
)
{
subItem
.
NodeId
=
nItem
.
NodeId
;
subItem
.
FlowId
=
extModel
.
FlowId
;
flag
=
flow_AduitInfoRepository
.
Insert
(
subItem
)>
0
;
}
}
}
}
}
//添加日志
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
flow_LogRepository
.
AddFlowLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Flow_Log
()
{
CreateBy
=
extModel
.
CreateBy
,
Group_Id
=
extModel
.
Group_Id
,
FlowId
=
extModel
.
FlowId
,
LogContent
=
logContent
});
}
return
flag
;
}
}
}
\ No newline at end of file
Edu.Repository/Flow/RB_FlowRepository.cs
0 → 100644
View file @
0918d4aa
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程设置仓储层【退课相关】
/// </summary>
public
class
RB_FlowRepository
:
BaseRepository
<
RB_Flow
>
{
/// <summary>
/// 获取流程设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_ViewModel
>
GetFlowPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
return
GetPage
<
RB_Flow_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Flow/RB_Flow_AduitInfoRepository.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程节点审核信息仓储层
/// </summary>
public
class
RB_Flow_AduitInfoRepository
:
BaseRepository
<
RB_Flow_AduitInfo
>
{
/// <summary>
/// 获取流程节点审核信息列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_AduitInfo_ViewModel
>
GetFlowAduitInfoListRepository
(
RB_Flow_AduitInfo_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_AduitInfo
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
NodeId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
query
.
NodeId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QNodeIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
query
.
QNodeIds
);
}
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
Get
<
RB_Flow_AduitInfo_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Flow/RB_Flow_NodeRepository.cs
0 → 100644
View file @
0918d4aa
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程节点信息仓储层
/// </summary>
public
class
RB_Flow_NodeRepository
:
BaseRepository
<
RB_Flow_Node
>
{
/// <summary>
/// 获取流程节点信息列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Node_ViewModel
>
GetFlowNodeListRepository
(
RB_Flow_Node_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Node
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
builder
.
AppendFormat
(
" ORDER BY {0} ASC "
,
nameof
(
RB_Flow_Node_ViewModel
.
SortNum
));
return
Get
<
RB_Flow_Node_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Log/RB_Flow_LogRepository.cs
0 → 100644
View file @
0918d4aa
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Log
{
/// <summary>
/// 流程修改日志仓储层
/// </summary>
public
class
RB_Flow_LogRepository
:
BaseRepository
<
RB_Flow_Log
>
{
/// <summary>
/// 获取流程修改日志列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogListRepository
(
RB_Flow_Log_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Log
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}=0 "
,
nameof
(
RB_Flow_Log_ViewModel
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
Get
<
RB_Flow_Log_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取流程修改日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_Log_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Log
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}=0 "
,
nameof
(
RB_Flow_Log_ViewModel
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
GetPage
<
RB_Flow_Log_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 细呢子流程日志
/// </summary>
/// <param name="oldModel"></param>
/// <returns></returns>
public
bool
AddFlowLogRepository
(
RB_Flow_Log
oldModel
)
{
var
model
=
new
RB_Flow_Log
()
{
CreateBy
=
oldModel
.
CreateBy
,
FlowId
=
oldModel
.
FlowId
,
Group_Id
=
oldModel
.
Group_Id
,
LogContent
=
oldModel
.
LogContent
.
TrimStart
(
','
).
TrimEnd
(
','
),
CreateTime
=
DateTime
.
Now
,
Status
=
0
,
};
return
base
.
Insert
(
model
)
>
0
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment