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
545565d3
Commit
545565d3
authored
Aug 19, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signalr日志输出,调整
parent
eb6cabe0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
334 additions
and
312 deletions
+334
-312
performance/Performance.Api/Controllers/AllotController.cs
+16
-0
performance/Performance.EntityModels/Entity/log_dbug.cs
+5
-0
performance/Performance.EntityModels/Entity/mod_item.cs
+2
-2
performance/Performance.EntityModels/Entity/mod_module.cs
+2
-2
performance/Performance.EntityModels/Entity/res_account.cs
+2
-1
performance/Performance.EntityModels/Entity/res_accountdoctor.cs
+123
-123
performance/Performance.EntityModels/Entity/res_accountnurse.cs
+118
-118
performance/Performance.Repository/PerforCofdirectorRepository.cs
+1
-0
performance/Performance.Repository/PerforLogdbugRepository.cs
+2
-2
performance/Performance.Services/AllotCompute/CheckDataService.cs
+1
-1
performance/Performance.Services/AllotCompute/ImportDataService.cs
+4
-10
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+10
-10
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+4
-4
performance/Performance.Services/AllotService.cs
+24
-18
performance/Performance.Services/ConfigService.cs
+2
-4
performance/Performance.Services/LogManageService.cs
+4
-3
performance/Performance.Services/NewExtractService.cs
+14
-14
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
545565d3
...
...
@@ -218,5 +218,21 @@ public ApiResponse AllotCheckResult([CustomizeValidator(RuleSet = "Delete"), Fro
var
list
=
_allotService
.
AllotCheckResult
(
allot
);
return
new
ApiResponse
(
ResponseType
.
OK
,
list
);
}
/// <summary>
/// 绩效历史日志
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allotlog"
)]
[
HttpPost
]
public
ApiResponse
AllotLog
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_allotService
.
AllotLog
(
allot
);
return
new
ApiResponse
(
ResponseType
.
OK
,
list
);
}
}
}
performance/Performance.EntityModels/Entity/log_dbug.cs
View file @
545565d3
...
...
@@ -40,5 +40,10 @@ public class log_dbug
///
/// </summary>
public
string
Message
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
Level
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/mod_item.cs
View file @
545565d3
...
...
@@ -40,7 +40,7 @@ public class mod_item
/// 护理系数
/// </summary>
public
Nullable
<
decimal
>
FactorValue2
{
get
;
set
;
}
/// <summary>
/// 医技系数
/// </summary>
...
...
@@ -55,7 +55,7 @@ public class mod_item
/// 用户选定抽取范围
/// </summary>
public
string
SelectionRange
{
get
;
set
;
}
/// <summary>
/// 只读 0、否 1、是
/// </summary>
...
...
performance/Performance.EntityModels/Entity/mod_module.cs
View file @
545565d3
...
...
@@ -45,12 +45,12 @@ public class mod_module
/// 提取脚本ID
/// </summary>
public
Nullable
<
int
>
ExtractId
{
get
;
set
;
}
/// <summary>
/// 只读 0、否 1、是
/// </summary>
public
Nullable
<
int
>
ReadOnly
{
get
;
set
;
}
/// <summary>
/// 是否生成Item 0、否 1、是
/// </summary>
...
...
performance/Performance.EntityModels/Entity/res_account.cs
View file @
545565d3
...
...
@@ -30,7 +30,7 @@ public class res_account
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元类型 1 医生组 2 护理组 3 医技组
/// </summary>
...
...
@@ -135,6 +135,7 @@ public class res_account
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
...
...
performance/Performance.EntityModels/Entity/res_accountdoctor.cs
View file @
545565d3
//
//
-----------------------------------------------------------------------
//
//
<copyright file=" res_accountdoctor.cs">
//
//
* FileName: 医生科室核算结果.cs
//
//
</copyright>
//
//
-----------------------------------------------------------------------
//
using System;
//
using System.ComponentModel.DataAnnotations;
//
using System.ComponentModel.DataAnnotations.Schema;
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: 医生科室核算结果.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
//
namespace Performance.EntityModels
//
{
//
/// <summary>
//
/// 医生科室核算结果
//
/// </summary>
//
[Table("res_accountdoctor")]
//
public class res_accountdoctor
//
{
//
/// <summary>
//
///
//
/// </summary>
//
[Key]
//
public int ID { get; set; }
//
/// <summary>
//
///
//
/// </summary>
//
public Nullable<int> AllotID { get; set; }
//
/// <summary>
//
///
//
/// </summary>
//
public Nullable<int> SheetID { get; set; }
//
/// <summary>
//
/// 核算单元
//
/// </summary>
//
public string AccountingUnit { get; set; }
//
/// <summary>
//
/// 科室
//
/// </summary>
//
public string Department { get; set; }
//
/// <summary>
//
/// 科主任/护士长数量
//
/// </summary>
//
public Nullable<int> ManagerNumber { get; set; }
//
/// <summary>
//
/// 核算单元医生数量
//
/// </summary>
//
public Nullable<decimal> Number { get; set; }
//
/// <summary>
//
/// 医生基础系数
//
/// </summary>
//
public Nullable<decimal> BasicFactor { get; set; }
//
/// <summary>
//
/// 倾斜系数
//
/// </summary>
//
public Nullable<decimal> SlopeFactor { get; set; }
//
/// <summary>
//
/// 其他绩效1
//
/// </summary>
//
public Nullable<decimal> OtherPerfor1 { get; set; }
//
/// <summary>
//
/// 其他绩效2
//
/// </summary>
//
public Nullable<decimal> OtherPerfor2 { get; set; }
//
/// <summary>
//
/// 医院奖罚
//
/// </summary>
//
public Nullable<decimal> Extra { get; set; }
//
/// <summary>
//
/// 考核对分率
//
/// </summary>
//
public Nullable<decimal> ScoringAverage { get; set; }
//
/// <summary>
//
/// 调节系数
//
/// </summary>
//
public Nullable<decimal> AdjustFactor { get; set; }
//
/// <summary>
//
/// 科室业绩
//
/// </summary>
//
public Nullable<decimal> Income { get; set; }
//
/// <summary>
//
/// 业绩绩效
//
/// </summary>
//
public Nullable<decimal> PerforFee { get; set; }
//
/// <summary>
//
/// 工作量绩效
//
/// </summary>
//
public Nullable<decimal> WorkloadFee { get; set; }
//
/// <summary>
//
/// 绩效合计
//
/// </summary>
//
public Nullable<decimal> PerforTotal { get; set; }
//
/// <summary>
//
/// 人均绩效
//
/// </summary>
//
public Nullable<decimal> Avg { get; set; }
//
/// <summary>
//
/// 实发绩效
//
/// </summary>
//
public Nullable<decimal> RealGiveFee { get; set; }
//
/// <summary>
//
/// 变更日志
//
/// </summary>
//
public string ChangeLog { get; set; }
//
}
//
}
namespace
Performance.EntityModels
{
/// <summary>
/// 医生科室核算结果
/// </summary>
[
Table
(
"res_accountdoctor"
)]
public
class
res_accountdoctor
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 科主任/护士长数量
/// </summary>
public
Nullable
<
int
>
ManagerNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数量
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 医生基础系数
/// </summary>
public
Nullable
<
decimal
>
BasicFactor
{
get
;
set
;
}
/// <summary>
/// 倾斜系数
/// </summary>
public
Nullable
<
decimal
>
SlopeFactor
{
get
;
set
;
}
/// <summary>
/// 其他绩效1
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor1
{
get
;
set
;
}
/// <summary>
/// 其他绩效2
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor2
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Extra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
AdjustFactor
{
get
;
set
;
}
/// <summary>
/// 科室业绩
/// </summary>
public
Nullable
<
decimal
>
Income
{
get
;
set
;
}
/// <summary>
/// 业绩绩效
/// </summary>
public
Nullable
<
decimal
>
PerforFee
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
/// <summary>
/// 绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
Nullable
<
decimal
>
Avg
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
/// <summary>
/// 变更日志
/// </summary>
public
string
ChangeLog
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/res_accountnurse.cs
View file @
545565d3
//
//
-----------------------------------------------------------------------
//
//
<copyright file=" res_accountnurse.cs">
//
//
* FileName: 护理科室核算结果.cs
//
//
</copyright>
//
//
-----------------------------------------------------------------------
//
using System;
//
using System.ComponentModel.DataAnnotations;
//
using System.ComponentModel.DataAnnotations.Schema;
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: 护理科室核算结果.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
//
namespace Performance.EntityModels
//
{
//
/// <summary>
//
/// 护理科室核算结果
//
/// </summary>
//
[Table("res_accountnurse")]
//
public class res_accountnurse
//
{
//
/// <summary>
//
///
//
/// </summary>
//
[Key]
//
public int ID { get; set; }
//
/// <summary>
//
///
//
/// </summary>
//
public Nullable<int> AllotID { get; set; }
//
/// <summary>
//
///
//
/// </summary>
//
public Nullable<int> SheetID { get; set; }
//
/// <summary>
//
/// 核算单元
//
/// </summary>
//
public string AccountingUnit { get; set; }
//
/// <summary>
//
/// 科室
//
/// </summary>
//
public string Department { get; set; }
//
/// <summary>
//
/// 科主任/护士长数量
//
/// </summary>
//
public Nullable<int> ManagerNumber { get; set; }
//
/// <summary>
//
/// 护士人数
//
/// </summary>
//
public Nullable<decimal> Number { get; set; }
//
/// <summary>
//
/// 护理基础系数
//
/// </summary>
//
public Nullable<decimal> BasicFactor { get; set; }
//
/// <summary>
//
/// 倾斜系数
//
/// </summary>
//
public Nullable<decimal> SlopeFactor { get; set; }
//
/// <summary>
//
/// 其他绩效1
//
/// </summary>
//
public Nullable<decimal> OtherPerfor1 { get; set; }
//
/// <summary>
//
/// 其他绩效2
//
/// </summary>
//
public Nullable<decimal> OtherPerfor2 { get; set; }
//
/// <summary>
//
/// 医院奖罚
//
/// </summary>
//
public Nullable<decimal> Extra { get; set; }
//
/// <summary>
//
/// 考核对分率
//
/// </summary>
//
public Nullable<decimal> ScoringAverage { get; set; }
//
/// <summary>
//
/// 调节系数
//
/// </summary>
//
public Nullable<decimal> AdjustFactor { get; set; }
//
/// <summary>
//
/// 科室业绩
//
/// </summary>
//
public Nullable<decimal> Income { get; set; }
//
/// <summary>
//
/// 业绩绩效
//
/// </summary>
//
public Nullable<decimal> PerforFee { get; set; }
//
/// <summary>
//
/// 工作量绩效
//
/// </summary>
//
public Nullable<decimal> WorkloadFee { get; set; }
//
/// <summary>
//
/// 绩效合计
//
/// </summary>
//
public Nullable<decimal> PerforTotal { get; set; }
//
/// <summary>
//
/// 人均绩效
//
/// </summary>
//
public Nullable<decimal> Avg { get; set; }
//
/// <summary>
//
/// 实发绩效
//
/// </summary>
//
public Nullable<decimal> RealGiveFee { get; set; }
//
}
//
}
namespace
Performance.EntityModels
{
/// <summary>
/// 护理科室核算结果
/// </summary>
[
Table
(
"res_accountnurse"
)]
public
class
res_accountnurse
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 科主任/护士长数量
/// </summary>
public
Nullable
<
int
>
ManagerNumber
{
get
;
set
;
}
/// <summary>
/// 护士人数
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 护理基础系数
/// </summary>
public
Nullable
<
decimal
>
BasicFactor
{
get
;
set
;
}
/// <summary>
/// 倾斜系数
/// </summary>
public
Nullable
<
decimal
>
SlopeFactor
{
get
;
set
;
}
/// <summary>
/// 其他绩效1
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor1
{
get
;
set
;
}
/// <summary>
/// 其他绩效2
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor2
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Extra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
AdjustFactor
{
get
;
set
;
}
/// <summary>
/// 科室业绩
/// </summary>
public
Nullable
<
decimal
>
Income
{
get
;
set
;
}
/// <summary>
/// 业绩绩效
/// </summary>
public
Nullable
<
decimal
>
PerforFee
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
/// <summary>
/// 绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
Nullable
<
decimal
>
Avg
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
545565d3
...
...
@@ -32,6 +32,7 @@ public int DeleteData(int allotId)
"res_compute"
,
"res_specialunit"
,
"log_check"
,
"log_dbug"
,
};
string
sql
=
""
;
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where allotid=@allotId;"
);
...
...
performance/Performance.Repository/PerforLogdbugRepository.cs
View file @
545565d3
...
...
@@ -13,9 +13,9 @@ public partial class PerforLogdbugRepository
/// <param name="title"></param>
/// <param name="message"></param>
/// <returns></returns>
public
bool
Add
(
int
allotId
,
string
title
,
string
message
)
public
bool
Add
(
int
allotId
,
string
title
,
string
message
,
int
level
)
{
return
Add
(
new
EntityModels
.
log_dbug
{
AllotID
=
allotId
,
CreateTime
=
DateTime
.
Now
,
Titile
=
title
,
Message
=
message
});
return
Add
(
new
EntityModels
.
log_dbug
{
AllotID
=
allotId
,
CreateTime
=
DateTime
.
Now
,
Titile
=
title
,
Message
=
message
,
Level
=
level
});
}
}
}
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
545565d3
...
...
@@ -235,7 +235,7 @@ public void InsertLog(int allotId, int type, int level, string title, string mes
Message
=
message
};
perforLogcheckRepository
.
Add
(
model
);
logManageService
.
WriteMsg
(
"绩效数据校验"
,
$"
{
title
}
-
{
message
}
"
,
allotId
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"绩效数据校验"
,
$"
{
title
}
-
{
message
}
"
,
level
,
allotId
,
"ReceiveMessage"
);
}
#
endregion
}
...
...
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
545565d3
...
...
@@ -89,14 +89,14 @@ private PerExcel Import(per_allot allot)
var
sheet
=
workbook
.
GetSheetAt
(
i
);
var
sheetType
=
perSheetService
.
GetSheetType
(
sheet
.
SheetName
);
//logdbug.Add(allot.ID, "开始读取excel文件", JsonHelper.Serialize(new { sheetType, Description = EnumHelper.GetDescription(sheetType), name = sheet.SheetName }));
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
JsonHelper
.
Serialize
(
new
{
sheetType
,
Description
=
EnumHelper
.
GetDescription
(
sheetType
),
name
=
sheet
.
SheetName
}),
allot
.
ID
,
"ReceiveMessage"
,
true
);
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
{
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
st
=
perSheetService
.
Sheet
(
sheet
);
excel
.
PerSheet
.
Add
(
st
);
}
}
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"excel文件基础数据读取完成!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
return
excel
;
}
}
...
...
@@ -235,31 +235,25 @@ private bool Save(PerExcel excel, int allotId)
{
foreach
(
var
sheet
in
excel
.
PerSheet
)
{
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"开始保存数据 --
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
if
(
sheet
.
SheetType
==
SheetType
.
Employee
)
{
//logdbug.Add(allotId, "开始保存人员数据数据", sheet.SheetName);
logManageService
.
WriteMsg
(
"保存基础数据"
,
"开始保存人员数据数据"
,
allotId
,
"ReceiveMessage"
,
true
);
SaveEmployee
(
sheet
,
allotId
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
AccountBasic
)
{
//logdbug.Add(allotId, "开始保存临床科室医护绩效测算基础数据", sheet.SheetName);
logManageService
.
WriteMsg
(
"保存基础数据"
,
"开始保存临床科室医护绩效测算基础数据"
,
allotId
,
"ReceiveMessage"
,
true
);
SaveAccountBasic
(
sheet
,
allotId
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
SpecialUnit
)
{
//logdbug.Add(allotId, "开始保存特殊核算单元数据", sheet.SheetName);
logManageService
.
WriteMsg
(
"保存基础数据"
,
"开始保存特殊核算单元数据"
,
allotId
,
"ReceiveMessage"
,
true
);
SaveSpecialUnit
(
sheet
,
allotId
);
}
else
{
//logdbug.Add(allotId, "开始保存统一格式数据", sheet.SheetName);
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"开始保存
{
sheet
.
SheetName
}
数据"
,
allotId
,
"ReceiveMessage"
,
true
);
SaveCommon
(
sheet
,
allotId
);
}
}
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"基础数据保存完成!"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
return
true
;
}
}
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
545565d3
...
...
@@ -163,7 +163,7 @@ private void Save(List<PerSheet> perSheets, int allotId)
{
foreach
(
var
sheet
in
perSheets
)
{
logManageService
.
WriteMsg
(
"正在生成绩效"
,
$"保存核算数据 -
{
sheet
.
SheetName
}
"
,
allotId
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
$"保存核算数据 -
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
);
if
(
sheet
.
SheetType
==
SheetType
.
ComputeDoctorAccount
)
{
SaveComputeDoctorAccount
(
sheet
,
allotId
);
...
...
@@ -191,31 +191,31 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
//合并科室收入、支出
var
incomeconfs
=
perforCofincomeRepository
.
GetEntities
();
var
economicCompute
=
new
PerSheetDataComputeEconomic
();
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表"
,
1
,
allotid
,
"ReceiveMessage"
);
var
mergeResult
=
economicCompute
.
MergeCompute
(
excel
,
incomeconfs
);
//一次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第一次计算"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第一次计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
onceEconomic
=
economicCompute
.
OnceCompute
(
mergeResult
);
//二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第二次计算"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第二次计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceEconomicResult
=
economicCompute
.
TwiceCompute
(
onceEconomic
);
twiceEconomicResult
.
Sheet
.
SheetType
=
SheetType
.
ComputeEconomic
;
perSheet
.
Add
(
twiceEconomicResult
.
Sheet
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 计算完成"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 计算完成"
,
1
,
allotid
,
"ReceiveMessage"
);
//工作量
var
workloadCompute
=
new
PerSheetDataComputeWorkload
();
var
workload1
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
Workload
&&
t
.
SheetName
.
Contains
(
"医生组"
));
workload1
.
SheetName
=
"医生组工作量绩效测算表"
;
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"获取药品费用分割比例"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"获取药品费用分割比例"
,
1
,
allotid
,
"ReceiveMessage"
);
var
confs
=
GetDrugConfig
(
excel
,
allotid
);
//医生组 一次计算
//var onceWorkload1 = workloadCompute.OnceCompute(workload1, confs);
//医生组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"医生组工作量计算"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"医生组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult1
=
workloadCompute
.
TwiceCompute
(
workload1
);
twiceWorkloadResult1
.
Sheet
.
SheetType
=
SheetType
.
ComputeDoctorWorkload
;
...
...
@@ -226,7 +226,7 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
//护理组 一次计算
//var onceWorkload2 = workloadCompute.OnceCompute(workload2);
//护理组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"护理组工作量计算"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"护理组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult2
=
workloadCompute
.
TwiceCompute
(
workload2
);
twiceWorkloadResult2
.
Sheet
.
SheetType
=
SheetType
.
ComputeNurseWorkload
;
...
...
@@ -235,10 +235,10 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
var
dataList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算保底绩效参考标准"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算保底绩效参考标准"
,
1
,
allotid
,
"ReceiveMessage"
);
var
baiscnormList
=
ComputeMinimum
(
dataList
,
twiceEconomicResult
.
PerData
,
twiceWorkloadResult1
.
PerData
,
twiceWorkloadResult2
.
PerData
,
allotid
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室绩效"
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室绩效"
,
1
,
allotid
,
"ReceiveMessage"
);
var
sheet
=
Compute
(
dataList
,
twiceEconomicResult
.
PerData
,
twiceWorkloadResult1
.
PerData
,
twiceWorkloadResult2
.
PerData
,
baiscnormList
);
perSheet
.
AddRange
(
sheet
);
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
545565d3
...
...
@@ -54,15 +54,15 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
var
accountbasicList
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算"
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
accountbasicList
,
allot
);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
baiscNormService
.
ComputeAvg
(
baiscnormList
,
accountbasicList
,
computResult
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
accountbasicList
,
perSheets
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"院领导、业务中层、工勤人员 最终绩效数据计算"
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"院领导、业务中层、工勤人员 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
//计算 行政人员 平均值
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult2
,
empolyeeList
);
...
...
@@ -73,7 +73,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
return
baiscnormList
;
...
...
performance/Performance.Services/AllotService.cs
View file @
545565d3
...
...
@@ -24,8 +24,7 @@ public class AllotService : IAutoInjection
private
ImportDataService
importDataService
;
private
ProcessComputService
processComputService
;
private
ResultComputeService
resultComputeService
;
//private PerforLogdbugRepository logdbug;
private
PerforLogdbugRepository
logdbug
;
private
ConfigService
configService
;
private
IHostingEnvironment
_evn
;
private
ILogger
<
AllotService
>
_logger
;
...
...
@@ -45,7 +44,7 @@ public class AllotService : IAutoInjection
ProcessComputService
processComputService
,
ResultComputeService
resultComputeService
,
ConfigService
configService
,
//
PerforLogdbugRepository logdbug,
PerforLogdbugRepository
logdbug
,
IHostingEnvironment
evn
,
ILogger
<
AllotService
>
logger
,
IEmailService
emailService
,
IOptions
<
Application
>
options
,
...
...
@@ -67,7 +66,7 @@ public class AllotService : IAutoInjection
this
.
emailService
=
emailService
;
this
.
options
=
options
;
this
.
configService
=
configService
;
//
this.logdbug = logdbug;
this
.
logdbug
=
logdbug
;
this
.
perforLogcheckRepository
=
perforLogcheckRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
//this.hubContext = hubContext;
...
...
@@ -215,9 +214,7 @@ public void Generate(per_allot allot, string mail)
DateTime
time
=
DateTime
.
Now
;
try
{
//hubContext.Clients.Group("aaaa").SendAsync("ReceiveMessage", "绩效开始执行", "绩效开始执行");
//logdbug.Add(allot.ID, "绩效开始执行", JsonHelper.Serialize(allot));
logManageService
.
WriteMsg
(
"绩效开始执行"
,
JsonHelper
.
Serialize
(
allot
),
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"绩效开始执行"
,
$"正在生成
{
allot
.
Year
}
-
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月份绩效!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
configService
.
Clear
(
allot
.
ID
);
// 导出数据
...
...
@@ -228,39 +225,35 @@ public void Generate(per_allot allot, string mail)
{
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
CheckFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
CheckFail
));
SendEmail
(
allot
,
mail
,
3
,
time
);
//logdbug.Add(allot.ID, "绩效数据校验失败", JsonHelper.Serialize(allot));
logManageService
.
WriteMsg
(
"绩效数据校验失败"
,
JsonHelper
.
Serialize
(
allot
),
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"绩效数据校验失败"
,
"详情可至“更多 -- 查看日志”查看"
,
3
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
return
;
}
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
InGenerate
,
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
));
// 计算合并数据
//logdbug.Add(allot.ID, "计算合并数据", JsonHelper.Serialize(allot));
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算合并数据"
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算合并数据"
,
allot
.
ID
,
1
,
"ReceiveMessage"
,
true
);
List
<
PerSheet
>
list
=
processComputService
.
MergeAndSave
(
excel
,
allot
);
//var baiscnorm = baiscNormService.NurseBaiscnorm(list);
//logdbug.Add(allot.ID, "护士平均绩效", JsonHelper.Serialize(baiscnorm));
// 计算最总数据
//logdbug.Add(allot.ID, "绩效结果计算数据开始", "");
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终绩效数据"
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终绩效数据"
,
allot
.
ID
,
1
,
"ReceiveMessage"
,
true
);
var
baiscnormList
=
resultComputeService
.
Compute
(
allot
,
excel
,
list
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
//发送邮件
SendEmail
(
allot
,
mail
,
1
,
time
);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
logManageService
.
WriteMsg
(
"绩效生成结束"
,
"绩效生成成功"
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"绩效生成结束"
,
"绩效生成成功"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
}
catch
(
Exception
ex
)
{
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
SendEmail
(
allot
,
mail
,
2
,
time
);
//logdbug.Add(allot.ID, "绩效开始执行", ex.ToString());
logManageService
.
WriteMsg
(
"绩效生成失败"
,
ex
.
ToString
(),
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"绩效生成失败"
,
ex
.
ToString
(),
4
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
//throw ex;
}
}
...
...
@@ -348,5 +341,18 @@ public List<log_check> AllotCheckResult(per_allot allot)
list
=
list
.
OrderBy
(
t
=>
t
.
Titile
).
ThenBy
(
t
=>
t
.
ID
).
ToList
();
return
list
;
}
/// <summary>
/// 绩效历史日志
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public
List
<
log_dbug
>
AllotLog
(
per_allot
allot
)
{
var
list
=
logdbug
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
list
!=
null
)
list
=
list
.
OrderBy
(
t
=>
t
.
CreateTime
).
ToList
();
return
list
;
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
545565d3
...
...
@@ -489,8 +489,7 @@ public bool AgainDelete(CofAgainRequest request)
public
void
Clear
(
int
allotId
)
{
var
count
=
_directorRepository
.
DeleteData
(
allotId
);
//logdbug.Add(allotId, "清理无效数据", $"受影响行数:{count}");
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清理无效数据,受影响行数:
{
count
}
"
,
0
,
""
,
true
);
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清理无效数据,受影响行数:
{
count
}
"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
}
/// <summary>
...
...
@@ -500,8 +499,7 @@ public void Clear(int allotId)
public
void
ClearAgain
(
int
againId
)
{
var
count
=
_directorRepository
.
DelAgain
(
againId
);
//logdbug.Add(againId, "清除二次绩效中无效数据", $"受影响行数:{count}");
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清除二次绩效中无效数据,受影响行数:
{
count
}
"
,
0
,
""
,
true
);
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清除二次绩效中无效数据,受影响行数:
{
count
}
"
,
1
,
againId
,
"ReceiveMessage"
,
true
);
}
#
endregion
}
...
...
performance/Performance.Services/LogManageService.cs
View file @
545565d3
...
...
@@ -23,14 +23,15 @@ public class LogManageService : IAutoInjection
/// </summary>
/// <param name="tag">标签</param>
/// <param name="message">内容</param>
/// <param name="level">等级1、信息(info)2、警告(warn)3、错误(error)4、异常(exception)</param>
/// <param name="allotId">绩效Id</param>
/// <param name="method">方法名称</param>
public
void
WriteMsg
(
string
tag
,
string
message
,
int
allotId
,
string
method
,
bool
isDebug
=
false
)
public
void
WriteMsg
(
string
tag
,
string
message
,
int
level
,
int
allotId
,
string
method
,
bool
isDebug
=
false
)
{
hubContext
.
Clients
.
Group
(
allotId
.
ToString
()).
SendAsync
(
method
,
tag
,
message
);
hubContext
.
Clients
.
Group
(
allotId
.
ToString
()).
SendAsync
(
method
,
tag
,
message
,
level
);
if
(
isDebug
)
{
logdbug
.
Add
(
allotId
,
tag
,
message
);
logdbug
.
Add
(
allotId
,
tag
,
message
,
level
);
}
}
}
...
...
performance/Performance.Services/NewExtractService.cs
View file @
545565d3
This diff is collapsed.
Click to expand it.
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