Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
56da633d
Commit
56da633d
authored
Mar 10, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改信息类
parent
4433472b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
34 deletions
+110
-34
performance/Performance.DtoModels/Hubs/Enum.cs
+2
-2
performance/Performance.DtoModels/Hubs/MessageInfo.cs
+104
-22
performance/Performance.Services/AllotService.cs
+2
-2
performance/Performance.Services/Hubs/NotificationsService.cs
+2
-8
No files found.
performance/Performance.DtoModels/Hubs/Enum.cs
View file @
56da633d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
enum
C
lassify
public
enum
C
omponent
{
{
/// <summary>
/// <summary>
/// 通知
/// 通知
...
@@ -20,7 +20,7 @@ public enum Classify
...
@@ -20,7 +20,7 @@ public enum Classify
Progress
=
1
,
Progress
=
1
,
}
}
public
enum
Notice
Type
public
enum
Component
Type
{
{
/// <summary>
/// <summary>
/// 成功
/// 成功
...
...
performance/Performance.DtoModels/Hubs/MessageInfo.cs
View file @
56da633d
...
@@ -5,56 +5,138 @@
...
@@ -5,56 +5,138 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
MessageInfo
public
class
MessageInfo
:
MessageInfo
<
string
>
{
{
public
MessageInfo
(
NoticeType
typeValue
,
string
uuid
=
null
,
Classify
classify
=
Classify
.
Notification
)
public
MessageInfo
()
:
this
(
default
,
string
.
Empty
,
string
.
Empty
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
string
message
)
:
this
(
allotId
,
title
,
message
,
Component
.
Notification
,
ComponentType
.
info
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
string
message
,
ComponentType
type
)
:
this
(
allotId
,
title
,
message
,
Component
.
Notification
,
type
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
string
message
,
Component
component
)
:
this
(
allotId
,
title
,
message
,
component
,
ComponentType
.
info
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
string
message
,
Component
component
,
ComponentType
type
)
:
this
(
Guid
.
NewGuid
().
ToString
(
"N"
),
allotId
,
title
,
message
,
component
,
type
)
{
}
public
MessageInfo
(
string
uuid
,
int
allotId
,
string
title
,
string
message
,
Component
component
,
ComponentType
type
)
{
{
TypeValue
=
typeValue
;
Uuid
=
uuid
;
Uuid
=
uuid
;
Classify
=
classify
;
AllotId
=
allotId
;
Title
=
title
;
Message
=
message
;
Component
=
component
;
Status
=
type
;
}
}
}
public
class
MessageInfo
<
TData
>
:
IMessageInfo
<
TData
>
{
public
string
Uuid
{
get
;
set
;
}
public
string
Uuid
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
/// <summary>
public
string
Title
{
get
;
set
;
}
/// 分类
/// </summary>
public
TData
Message
{
get
;
set
;
}
public
Classify
Classify
{
get
;
set
;
}
public
Component
Component
{
get
;
set
;
}
[
JsonIgnore
]
public
ComponentType
Status
{
get
;
set
;
}
/// <summary>
/// 类型
/// </summary>
public
string
Type
public
string
Type
{
{
get
get
{
{
return
TypeValue
.
ToString
();
return
Status
.
ToString
();
}
}
}
}
public
MessageInfo
()
:
this
(
default
,
string
.
Empty
,
default
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
TData
message
)
:
this
(
allotId
,
title
,
message
,
Component
.
Notification
,
ComponentType
.
info
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
TData
message
,
ComponentType
type
)
:
this
(
allotId
,
title
,
message
,
Component
.
Notification
,
type
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
TData
message
,
Component
component
)
:
this
(
allotId
,
title
,
message
,
component
,
ComponentType
.
info
)
{
}
public
MessageInfo
(
int
allotId
,
string
title
,
TData
message
,
Component
component
,
ComponentType
type
)
:
this
(
Guid
.
NewGuid
().
ToString
(
"N"
),
allotId
,
title
,
message
,
component
,
type
)
{
}
public
MessageInfo
(
string
uuid
,
int
allotId
,
string
title
,
TData
message
,
Component
component
,
ComponentType
type
)
{
Uuid
=
uuid
;
AllotId
=
allotId
;
Title
=
title
;
Message
=
message
;
Component
=
component
;
Status
=
type
;
}
}
public
interface
IMessageInfo
<
TData
>
{
/// <summary>
/// 唯一编码
/// </summary>
string
Uuid
{
get
;
set
;
}
/// <summary>
/// 绩效Id
/// </summary>
int
AllotId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 标题
/// 标题
/// </summary>
/// </summary>
public
string
Title
{
get
;
set
;
}
string
Title
{
get
;
set
;
}
/// <summary>
/// <summary>
///
消息
///
内容
/// </summary>
/// </summary>
public
string
Message
{
get
;
set
;
}
TData
Message
{
get
;
set
;
}
/// <summary>
/// <summary>
///
百分比
///
控件类型
/// </summary>
/// </summary>
public
decimal
Percentage
{
get
;
set
;
}
Component
Component
{
get
;
set
;
}
/// <summary>
/// <summary>
///
类型值
///
状态(完成、警告、错误、信息)
/// </summary>
/// </summary>
[
JsonIgnore
]
ComponentType
Status
{
get
;
set
;
}
public
NoticeType
TypeValue
{
get
;
set
;
}
/// <summary>
/// 状态文本值
/// </summary>
string
Type
{
get
;
}
}
}
}
}
performance/Performance.Services/AllotService.cs
View file @
56da633d
...
@@ -454,11 +454,11 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
...
@@ -454,11 +454,11 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time);
//SendEmail(allot, mail, 1, time);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
notificationsService
.
SendGenerateMessage
(
userId
,
allot
,
uuid
,
"绩效生成成功"
,
Notice
Type
.
success
);
notificationsService
.
SendGenerateMessage
(
userId
,
allot
,
uuid
,
"绩效生成成功"
,
Component
Type
.
success
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
notificationsService
.
SendGenerateMessage
(
userId
,
allot
,
uuid
,
"绩效生成失败"
,
Notice
Type
.
error
);
notificationsService
.
SendGenerateMessage
(
userId
,
allot
,
uuid
,
"绩效生成失败"
,
Component
Type
.
error
);
logdbug
.
Add
(
allot
.
ID
,
"绩效生成失败"
,
ex
.
ToString
(),
4
,
1
);
logdbug
.
Add
(
allot
.
ID
,
"绩效生成失败"
,
ex
.
ToString
(),
4
,
1
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
//SendEmail(allot, mail, 2, time);
//SendEmail(allot, mail, 2, time);
...
...
performance/Performance.Services/Hubs/NotificationsService.cs
View file @
56da633d
...
@@ -32,15 +32,9 @@ PerforLogdsignalrRepository repository
...
@@ -32,15 +32,9 @@ PerforLogdsignalrRepository repository
this
.
repository
=
repository
;
this
.
repository
=
repository
;
}
}
public
void
SendGenerateMessage
(
int
userId
,
per_allot
allot
,
string
uuid
,
string
message
,
NoticeType
typeValue
=
Notice
Type
.
info
)
public
void
SendGenerateMessage
(
int
userId
,
string
uuid
,
int
allotId
,
string
message
,
ComponentType
type
=
Component
Type
.
info
)
{
{
var
info
=
new
MessageInfo
(
typeValue
,
uuid
,
Classify
.
Notification
)
var
info
=
new
MessageInfo
(
uuid
,
allotId
,
"生成绩效"
,
message
,
Component
.
Notification
,
type
);
{
HospitalId
=
allot
.
HospitalId
,
AllotId
=
allot
.
ID
,
Title
=
"生成绩效"
,
Message
=
message
};
SendMessage
(
userId
,
info
);
SendMessage
(
userId
,
info
);
}
}
...
...
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