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
eb6cabe0
Commit
eb6cabe0
authored
Aug 19, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/signalr
# Conflicts: # performance/Performance.Services/NewExtractService.cs
parents
cfc49e03
372166f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
15 deletions
+33
-15
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+2
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+12
-3
performance/Performance.Services/Hubs/AllotLogHub.cs
+16
-9
performance/Performance.Services/NewExtractService.cs
+3
-3
No files found.
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
eb6cabe0
...
...
@@ -21,6 +21,8 @@ public enum UnitType
护理组
=
2
,
[
Description
(
"医技组"
)]
医技组
=
3
,
[
Description
(
"专家组"
)]
专家组
=
4
,
}
public
enum
SheetType
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
eb6cabe0
...
...
@@ -256,8 +256,9 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
{
var
pairs
=
new
[]
{
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
}
},
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
}
},
new
{
Name
=
"专家核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
专家组
}
},
};
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
foreach
(
var
info
in
pairs
)
...
...
@@ -266,13 +267,19 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
foreach
(
var
unitType
in
info
.
UnitTypes
)
{
var
atDataList
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
());
if
(
atDataList
==
null
||
!
atDataList
.
Any
())
continue
;
foreach
(
var
dept
in
dataList
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()))
{
if
(
string
.
IsNullOrEmpty
(
dept
.
AccountingUnit
))
continue
;
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
if
(
UnitType
.
专家组
==
unitType
)
{
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
}
//保底绩效
var
minimum
=
baiscnormList
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
dept
.
MinimumReference
);
if
(!
string
.
IsNullOrEmpty
(
dept
.
MinimumReference
)
&&
minimum
!=
null
)
...
...
@@ -312,9 +319,11 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
}
}
}
sheet
.
PerData
.
AddRange
(
atDataList
);
}
if
(
"专家核算表"
==
info
.
Name
&&
(
sheet
.
PerData
==
null
||
sheet
.
PerData
.
Any
()))
continue
;
result
.
Add
(
sheet
);
}
return
result
;
...
...
performance/Performance.Services/Hubs/AllotLogHub.cs
View file @
eb6cabe0
...
...
@@ -7,6 +7,7 @@
namespace
Performance.Services
{
//[Authorize(Policy = "allotLogHub")]
public
class
AllotLogHub
:
Hub
{
public
override
Task
OnConnectedAsync
()
...
...
@@ -15,33 +16,39 @@ public override Task OnConnectedAsync()
}
public
override
Task
OnDisconnectedAsync
(
Exception
exception
)
{
var
connectionId
=
Context
.
ConnectionId
;
//1 查询用户分组信息
var
groupName
=
"
aaaa
"
;
var
groupName
=
""
;
//2 删除数据库中用户分组数据
if
(
RedisHelper
.
HExists
(
"MyGroup"
,
groupName
))
if
(
RedisHelper
.
HExists
(
"MyGroup"
,
connectionId
))
{
var
connectionId
=
Context
.
ConnectionId
;
RedisHelper
.
HDel
(
"MyGroup"
,
groupName
);
groupName
=
RedisHelper
.
HGet
(
"MyGroup"
,
connectionId
)
;
RedisHelper
.
HDel
(
"MyGroup"
,
connectionId
);
}
//3 分组中删除用户
Groups
.
RemoveFromGroupAsync
(
Context
.
C
onnectionId
,
groupName
);
Groups
.
RemoveFromGroupAsync
(
c
onnectionId
,
groupName
);
return
base
.
OnDisconnectedAsync
(
exception
);
}
public
async
Task
AddGroup
(
string
token
,
string
groupName
)
{
if
(!
RedisHelper
.
HExists
(
"MyGroup"
,
groupName
))
var
connectionId
=
Context
.
ConnectionId
;
if
(!
RedisHelper
.
HExists
(
"MyGroup"
,
connectionId
))
{
//1 向数据库中插入用户及分组信息
var
connectionId
=
Context
.
ConnectionId
;
RedisHelper
.
HSet
(
"MyGroup"
,
groupName
,
connectionId
);
RedisHelper
.
HSet
(
"MyGroup"
,
connectionId
,
groupName
);
//2 将用户插入分组
await
Groups
.
AddToGroupAsync
(
Context
.
C
onnectionId
,
groupName
);
await
Groups
.
AddToGroupAsync
(
c
onnectionId
,
groupName
);
}
}
public
async
Task
SendMessage
(
string
groupName
,
string
message
)
{
await
Clients
.
Group
(
groupName
).
SendAsync
(
"ReceiveMessage"
,
"测试"
,
message
);
}
}
}
performance/Performance.Services/NewExtractService.cs
View file @
eb6cabe0
...
...
@@ -471,7 +471,7 @@ private void WriteWorkload(ISheet sheet, int hospitalId, List<AccountUnitEntity>
private
List
<
ExtractDto
>
QueryDatabase
(
List
<
sys_hospitalconfig
>
hospitalConfigList
,
mod_extract
extract
,
per_allot
allot
,
string
category
=
null
)
{
var
config
=
hospitalConfigList
.
FirstOrDefault
(
t
=>
t
.
Type
==
extract
.
SourceType
);
var
executeScript
=
extract
.
ExecuteScript
;
string
executeScript
=
extract
.
ExecuteScript
;
var
parameters
=
GetParameters
(
allot
);
using
(
var
connection
=
ConnectionBuilder
.
Create
(
DatabaseType
.
SqlServer
,
config
.
DbSource
,
config
.
DbName
,
config
.
DbUser
,
config
.
DbPassword
))
{
...
...
@@ -567,7 +567,7 @@ private void WriteEmployee(ISheet sheet, int allotLastId, IPerSheetDataRead shee
logManageService
.
WriteMsg
(
"提取绩效数据"
,
$"填充数据 -- 人员信息"
,
AllotId
,
"ReceiveMessage"
);
LogHelper
.
Information
(
$"填充数据 -- 人员信息"
,
"提取绩效数据"
);
var
dataList
=
perforImemployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotLastId
);
var
dataList
=
perforImemployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotLastId
)
?.
OrderBy
(
t
=>
t
.
AccountType
).
ToList
()
;
for
(
int
i
=
0
;
i
<
dataList
.
Count
;
i
++)
{
var
headIndex
=
sheetRead
.
Point
.
HeaderFirstRowNum
;
...
...
@@ -693,7 +693,7 @@ private void WriteAccountBasic(ISheet sheet, int allotLastId, IPerSheetDataRead
logManageService
.
WriteMsg
(
"提取绩效数据"
,
$"填充数据 -- 临床科室医护绩效测算表"
,
AllotId
,
"ReceiveMessage"
);
LogHelper
.
Information
(
$"填充数据 -- 临床科室医护绩效测算表"
,
"提取绩效数据"
);
var
dataList
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotLastId
);
var
dataList
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotLastId
)
?.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
DoctorAccountingUnit
).
ToList
()
;
for
(
int
i
=
0
;
i
<
dataList
.
Count
;
i
++)
{
var
headIndex
=
sheetRead
.
Point
.
HeaderFirstRowNum
;
...
...
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