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
c95e8999
Commit
c95e8999
authored
Mar 23, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e36acb62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
+26
-13
performance/Performance.Services/AllotCompute/QueryDataService.cs
+8
-6
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+7
-7
performance/Performance.Services/Hubs/NotificationsService.cs
+11
-0
No files found.
performance/Performance.Services/AllotCompute/QueryDataService.cs
View file @
c95e8999
...
...
@@ -12,7 +12,7 @@ namespace Performance.Services.AllotCompute
{
public
class
QueryDataService
:
IAutoInjection
{
private
readonly
LogManageService
logManage
Service
;
private
readonly
NotificationsService
notifications
Service
;
private
readonly
PerforPersheetRepository
persheetRepository
;
private
readonly
PerforImemployeeRepository
imemployeeRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
...
...
@@ -21,16 +21,18 @@ public class QueryDataService : IAutoInjection
private
readonly
PerforImdataRepository
imdataRepository
;
private
readonly
PerforImheaderRepository
imheaderRepository
;
public
QueryDataService
(
LogManageService
logManageService
,
public
QueryDataService
(
NotificationsService
notificationsService
,
PerforPersheetRepository
persheetRepository
,
PerforImemployeeRepository
imemployeeRepository
,
PerforImemployeeclinicRepository
imemployeeclinicRepository
,
PerforImaccountbasicRepository
imaccountbasicRepository
,
PerforImspecialunitRepository
imspecialunitRepository
,
PerforImdataRepository
imdataRepository
,
PerforImheaderRepository
imheaderRepository
)
PerforImheaderRepository
imheaderRepository
)
{
this
.
logManageService
=
logManage
Service
;
this
.
notificationsService
=
notifications
Service
;
this
.
persheetRepository
=
persheetRepository
;
this
.
imemployeeRepository
=
imemployeeRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
...
...
@@ -87,7 +89,7 @@ private PerExcel Query(List<per_sheet> sheets, int allotId)
foreach
(
var
sheet
in
perExcel
.
PerSheet
)
{
var
imSheet
=
sheets
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
SheetType
==
(
int
)
sheet
.
SheetType
);
logManageService
.
WriteMsg
(
"获取基础数据"
,
$"开始查询数据 --
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
notificationsService
.
SendGenerateMessage
(
allotId
,
$"获取基础数据:开始查询数据 --
{
sheet
.
SheetName
}
。"
);
if
(
sheet
.
SheetType
==
SheetType
.
Employee
)
{
QueryHeader
(
allotId
,
imSheet
.
ID
,
allheader
,
sheet
);
...
...
@@ -114,7 +116,7 @@ private PerExcel Query(List<per_sheet> sheets, int allotId)
QueryCommon
(
allotId
,
imSheet
.
ID
,
sheet
);
}
}
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"基础数据保存完成!"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
notificationsService
.
SendGenerateMessage
(
allotId
,
$"保存基础数据:基础数据保存完成。"
);
return
perExcel
;
}
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
c95e8999
...
...
@@ -30,7 +30,7 @@ public class ResultComputeService : IAutoInjection
private
readonly
PerforResspecialunitRepository
perforResspecialunitRepository
;
private
readonly
PerforImaccountbasicRepository
perforImaccountbasicRepository
;
private
readonly
PerforResaccountRepository
perforResaccountRepository
;
private
readonly
LogManageService
logManage
Service
;
private
readonly
NotificationsService
notifications
Service
;
private
readonly
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
readonly
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
;
...
...
@@ -43,7 +43,7 @@ public class ResultComputeService : IAutoInjection
PerforImaccountbasicRepository
perforImaccountbasicRepository
,
PerforResaccountRepository
perforResaccountRepository
,
BaiscNormService
baiscNormService
,
ComputeDirector
computeDirector
,
LogManageService
logManage
Service
,
BudgetService
budgetService
,
NotificationsService
notifications
Service
,
BudgetService
budgetService
,
PerforPeremployeeRepository
perforPeremployeeRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
...
...
@@ -61,7 +61,7 @@ public class ResultComputeService : IAutoInjection
this
.
perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
this
.
perforResaccountRepository
=
perforResaccountRepository
;
this
.
logManageService
=
logManage
Service
;
this
.
notificationsService
=
notifications
Service
;
this
.
budgetService
=
budgetService
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
this
.
perforPerallotRepository
=
perforPerallotRepository
;
...
...
@@ -84,7 +84,7 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室主任、护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage
"
);
notificationsService
.
SendGenerateMessage
(
allot
.
ID
,
$"正在生成绩效:科室主任、护士长 最终绩效数据计算。
"
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
accountSheet
,
allot
);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
...
...
@@ -93,12 +93,12 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
var
empolyeeList2
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees2
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList2
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政中高层 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage
"
);
notificationsService
.
SendGenerateMessage
(
allot
.
ID
,
$"正在生成绩效:行政中高层 最终绩效数据计算。
"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees2
,
allot
,
baiscnormList
);
var
empolyeeList3
=
perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees3
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList3
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政后勤 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage
"
);
notificationsService
.
SendGenerateMessage
(
allot
.
ID
,
$"正在生成绩效:行政后勤 最终绩效数据计算。
"
);
var
computResult3
=
computeDirector
.
Compute
(
computeEmployees3
,
allot
,
baiscnormList
);
//计算 行政中高层 平均值
...
...
@@ -113,7 +113,7 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage
"
);
notificationsService
.
SendGenerateMessage
(
allot
.
ID
,
$"正在生成绩效:保存最终绩效数据。
"
);
return
baiscnormList
;
}
...
...
performance/Performance.Services/Hubs/NotificationsService.cs
View file @
c95e8999
...
...
@@ -33,6 +33,7 @@ PerforLogdsignalrRepository repository
}
public
const
string
AllotGenerateKeyPrefix
=
"Allot-Generate-"
;
public
const
string
AllotExtractKeyPrefix
=
"Allot-Extract-"
;
public
void
SendGenerateMessage
(
int
allotId
,
string
message
,
ComponentType
type
=
ComponentType
.
info
)
{
...
...
@@ -44,6 +45,16 @@ public void SendGenerateMessage(int allotId, string message, ComponentType type
SendMessage
(
data
.
UserId
,
info
);
}
public
void
SendExtractMessage
(
int
allotId
,
string
message
,
ComponentType
type
=
ComponentType
.
info
)
{
var
data
=
GetCache
<
SingleData
>(
AllotExtractKeyPrefix
+
allotId
);
if
(
data
==
null
||
data
.
UserId
==
0
)
return
;
var
info
=
new
MessageInfo
(
data
.
Uuid
,
allotId
,
"提取数据"
,
message
,
Component
.
Notification
,
type
);
SendMessage
(
data
.
UserId
,
info
);
}
public
void
SendMessage
(
int
userId
,
MessageInfo
data
)
{
string
key
=
userId
.
ToString
();
...
...
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