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
cc249204
Commit
cc249204
authored
May 08, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算药占比时,费用类别判断;药占比费用类别(drugtype)相关功能
parent
a58751ff
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
226 additions
and
22 deletions
+226
-22
performance/Performance.Api/Controllers/ConfigController.cs
+61
-5
performance/Performance.DtoModels/Request/CofAgainRequest.cs
+5
-0
performance/Performance.DtoModels/Request/DirectorRequest.cs
+5
-0
performance/Performance.DtoModels/Request/DrugpropRequest.cs
+6
-1
performance/Performance.DtoModels/Request/IncomeRequest.cs
+5
-0
performance/Performance.DtoModels/Request/WorkyearRequest.cs
+5
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/cof_drugprop.cs
+0
-5
performance/Performance.EntityModels/Entity/cof_drugtype.cs
+34
-0
performance/Performance.Repository/Repository/PerforCofdrugtypeRepository.cs
+20
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+5
-5
performance/Performance.Services/ConfigService.cs
+73
-1
performance/Performance.Services/PerExcelService/PerSheetService.cs
+5
-5
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
cc249204
...
...
@@ -46,7 +46,7 @@ public ApiResponse<List<DirectorResponse>> GetDireList([CustomizeValidator(RuleS
/// <returns></returns>
[
Route
(
"direinsert"
)]
[
HttpPost
]
public
ApiResponse
<
DirectorResponse
>
DireInsert
([
FromBody
]
DirectorRequest
request
)
public
ApiResponse
<
DirectorResponse
>
DireInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DirectorRequest
request
)
{
var
director
=
_configService
.
DireInsert
(
request
);
return
new
ApiResponse
<
DirectorResponse
>(
ResponseType
.
OK
,
director
);
...
...
@@ -101,7 +101,7 @@ public ApiResponse<List<DrugpropResponse>> GetDrugList([CustomizeValidator(RuleS
/// <returns></returns>
[
Route
(
"druginsert"
)]
[
HttpPost
]
public
ApiResponse
<
DrugpropResponse
>
DrugInsert
([
FromBody
]
DrugpropRequest
request
)
public
ApiResponse
<
DrugpropResponse
>
DrugInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugInsert
(
request
);
return
new
ApiResponse
<
DrugpropResponse
>(
ResponseType
.
OK
,
drugprop
);
...
...
@@ -135,6 +135,62 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Drug
}
#
endregion
#
region
drugprop
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypelist"
)]
[
HttpPost
]
public
ApiResponse
GetDrugtypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugtypeList
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeinsert"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeupdate"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeUpdate
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypedelete"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DrugtypeDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
income
/// <summary>
/// 获取ICU有效收入配置列表
...
...
@@ -156,7 +212,7 @@ public ApiResponse<List<IncomeResponse>> GetIncomeList([CustomizeValidator(RuleS
/// <returns></returns>
[
Route
(
"incomeinsert"
)]
[
HttpPost
]
public
ApiResponse
<
IncomeResponse
>
Insert
([
FromBody
]
IncomeRequest
request
)
public
ApiResponse
<
IncomeResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
IncomeRequest
request
)
{
var
income
=
_configService
.
IncomeInsert
(
request
);
return
new
ApiResponse
<
IncomeResponse
>(
ResponseType
.
OK
,
income
);
...
...
@@ -211,7 +267,7 @@ public ApiResponse<List<WorkyearResponse>> GetWorkList([CustomizeValidator(RuleS
/// <returns></returns>
[
Route
(
"workinsert"
)]
[
HttpPost
]
public
ApiResponse
<
WorkyearResponse
>
WorkyearInsert
([
FromBody
]
WorkyearRequest
request
)
public
ApiResponse
<
WorkyearResponse
>
WorkyearInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
WorkyearRequest
request
)
{
var
workyear
=
_configService
.
WorkInsert
(
request
);
return
new
ApiResponse
<
WorkyearResponse
>(
ResponseType
.
OK
,
workyear
);
...
...
@@ -266,7 +322,7 @@ public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBod
/// <returns></returns>
[
Route
(
"cofagaininsert"
)]
[
HttpPost
]
public
ApiResponse
AgainInsert
([
FromBody
]
CofAgainRequest
request
)
public
ApiResponse
AgainInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
CofAgainRequest
request
)
{
var
workyear
=
_configService
.
AgainInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
workyear
);
...
...
performance/Performance.DtoModels/Request/CofAgainRequest.cs
View file @
cc249204
...
...
@@ -36,6 +36,11 @@ public CofAgainRequestValidator()
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
...
...
performance/Performance.DtoModels/Request/DirectorRequest.cs
View file @
cc249204
...
...
@@ -33,6 +33,11 @@ public DirectorRequestValidator()
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
...
...
performance/Performance.DtoModels/Request/DrugpropRequest.cs
View file @
cc249204
...
...
@@ -25,7 +25,7 @@ public class DrugpropRequest : ApiRequest
/// <summary>
/// 费用名称
/// </summary>
public
string
Charge
Type
{
get
;
set
;
}
public
string
Charge
{
get
;
set
;
}
public
class
DrugpropRequestValidator
:
AbstractValidator
<
DrugpropRequest
>
...
...
@@ -37,6 +37,11 @@ public DrugpropRequestValidator()
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
...
...
performance/Performance.DtoModels/Request/IncomeRequest.cs
View file @
cc249204
...
...
@@ -33,6 +33,11 @@ public IncomeRequestValidator()
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
...
...
performance/Performance.DtoModels/Request/WorkyearRequest.cs
View file @
cc249204
...
...
@@ -34,6 +34,11 @@ public WorkyearRequestValidator()
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
cc249204
...
...
@@ -38,6 +38,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
cof_director
>
cof_director
{
get
;
set
;
}
/// <summary> 工作量门诊药占比系数 <summary>
public
virtual
DbSet
<
cof_drugprop
>
cof_drugprop
{
get
;
set
;
}
/// <summary> 药占比费用列头名称 <summary>
public
virtual
DbSet
<
cof_drugtype
>
cof_drugtype
{
get
;
set
;
}
/// <summary> ICU医生护士有效收入汇总计算系数 <summary>
public
virtual
DbSet
<
cof_income
>
cof_income
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 <summary>
...
...
performance/Performance.EntityModels/Entity/cof_drugprop.cs
View file @
cc249204
...
...
@@ -40,10 +40,5 @@ public class cof_drugprop
/// 药占比对应系数
/// </summary>
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
/// <summary>
/// 费用名称
/// </summary>
public
string
ChargeType
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/cof_drugtype.cs
0 → 100644
View file @
cc249204
//-----------------------------------------------------------------------
// <copyright file=" cof_drugtype.cs">
// * FileName: 药占比费用列头名称.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 药占比费用列头名称
/// </summary>
[
Table
(
"cof_drugtype"
)]
public
class
cof_drugtype
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// 费用名称
/// </summary>
public
string
Charge
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforCofdrugtypeRepository.cs
0 → 100644
View file @
cc249204
//-----------------------------------------------------------------------
// <copyright file=" cof_drugtype.cs">
// * FileName: cof_drugtype.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// cof_drugtype Repository
/// </summary>
public
partial
class
PerforCofdrugtypeRepository
:
PerforRepository
<
cof_drugtype
>
{
public
PerforCofdrugtypeRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
cc249204
...
...
@@ -23,6 +23,7 @@ public class ProcessComputService : IAutoInjection
private
PerforImemployeeRepository
perforImEmployeeRepository
;
private
PerforResaccountdoctorRepository
perforResAccountdoctorRepository
;
private
PerforResaccountnurseRepository
perforResAccountnurseRepository
;
private
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
;
public
ProcessComputService
(
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
...
...
@@ -30,7 +31,8 @@ public class ProcessComputService : IAutoInjection
PerforImheaderRepository
perforImHeaderRepository
,
PerforImemployeeRepository
perforImEmployeeRepository
,
PerforResaccountdoctorRepository
perforResAccountdoctorRepository
,
PerforResaccountnurseRepository
perforResAccountnurseRepository
)
PerforResaccountnurseRepository
perforResAccountnurseRepository
,
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
)
{
this
.
perforCofincomeRepository
=
perforCofincomeRepository
;
this
.
perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
...
...
@@ -40,6 +42,7 @@ public class ProcessComputService : IAutoInjection
this
.
perforImEmployeeRepository
=
perforImEmployeeRepository
;
this
.
perforResAccountdoctorRepository
=
perforResAccountdoctorRepository
;
this
.
perforResAccountnurseRepository
=
perforResAccountnurseRepository
;
this
.
perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
}
/// <summary>
...
...
@@ -264,10 +267,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
var
incomeSheet
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
Income
&&
t
.
SheetName
.
Contains
(
"门诊"
)
&&
t
.
SheetName
.
Contains
(
"就诊"
));
var
datalist
=
incomeSheet
.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
chargeType
=
perforCofdrugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
)?.
FirstOrDefault
().
ChargeType
;
List
<
string
>
drugtype
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
chargeType
))
drugtype
=
JArray
.
Parse
(
chargeType
).
ToObject
<
List
<
string
>>();
var
drugtype
=
perforCofdrugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
)?.
Select
(
t
=>
t
.
Charge
).
ToList
();
var
drugData
=
datalist
.
Where
(
t
=>
drugtype
.
Contains
(
t
.
TypeName
)).
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
var
allData
=
datalist
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
...
...
performance/Performance.Services/ConfigService.cs
View file @
cc249204
...
...
@@ -18,6 +18,7 @@ public class ConfigService : IAutoInjection
private
PerforCofincomeRepository
_incomeRepository
;
private
PerforCofworkyearRepository
_workyearRepository
;
private
PerforCofagainRepository
_againRepository
;
private
PerforCofdrugtypeRepository
_drugtypeRepository
;
private
PerforPerallotRepository
perforPerAllotRepository
;
private
PerforPeragainallotRepository
perforPeragainallotRepository
;
private
PerforHospitalRepository
perforHospitalRepository
;
...
...
@@ -27,6 +28,7 @@ public class ConfigService : IAutoInjection
PerforCofincomeRepository
cofincomeRepository
,
PerforCofworkyearRepository
cofworkyearRepository
,
PerforCofagainRepository
againRepository
,
PerforCofdrugtypeRepository
drugtypeRepository
,
PerforPerallotRepository
perforPerAllotRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforHospitalRepository
perforHospitalRepository
,
...
...
@@ -37,6 +39,7 @@ public class ConfigService : IAutoInjection
this
.
_incomeRepository
=
cofincomeRepository
;
this
.
_workyearRepository
=
cofworkyearRepository
;
this
.
_againRepository
=
againRepository
;
this
.
_drugtypeRepository
=
drugtypeRepository
;
this
.
perforPerAllotRepository
=
perforPerAllotRepository
;
this
.
perforPeragainallotRepository
=
perforPeragainallotRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
...
...
@@ -140,7 +143,6 @@ public DrugpropResponse DrugUpdate(DrugpropRequest request)
drugprop
.
MaxRange
=
request
.
MaxRange
;
drugprop
.
MinRange
=
request
.
MinRange
;
drugprop
.
Value
=
request
.
Value
;
drugprop
.
ChargeType
=
request
.
ChargeType
;
if
(!
_drugpropRepository
.
Update
(
drugprop
))
throw
new
PerformanceException
(
"保存失败"
);
...
...
@@ -162,6 +164,67 @@ public bool DrugDelete(DrugpropRequest request)
}
#
endregion
#
region
cof_drugtype
药占比类别配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
/// <returns></returns>
public
List
<
cof_drugtype
>
GetDrugtypeList
(
int
allotId
)
{
var
list
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
list
;
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_drugtype
DrugtypeInsert
(
DrugpropRequest
request
)
{
var
entity
=
new
cof_drugtype
{
AllotID
=
request
.
AllotID
,
Charge
=
request
.
Charge
};
if
(!
_drugtypeRepository
.
Add
(
entity
))
throw
new
PerformanceException
(
"保存失败"
);
return
entity
;
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_drugtype
DrugtypeUpdate
(
DrugpropRequest
request
)
{
var
entity
=
_drugtypeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
entity
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
entity
.
Charge
=
request
.
Charge
;
if
(!
_drugtypeRepository
.
Update
(
entity
))
throw
new
PerformanceException
(
"保存失败"
);
return
entity
;
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
DrugtypeDelete
(
DrugpropRequest
request
)
{
var
entity
=
_drugtypeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
entity
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
return
_drugtypeRepository
.
Remove
(
entity
);
}
#
endregion
#
region
cof_income
ICU
有效收入配置
/// <summary>
/// 获取cof_income列表
...
...
@@ -346,6 +409,14 @@ public void Copy(per_allot allot)
_workyearRepository
.
AddRange
(
newWorkyears
.
ToArray
());
}
var
cofDrugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
{
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
});
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
data
==
null
||
data
.
Count
==
0
)
{
...
...
@@ -415,6 +486,7 @@ public bool AgainDelete(CofAgainRequest request)
}
#
endregion
/// <summary>
/// 清除二次绩效中无效数据
/// </summary>
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
cc249204
...
...
@@ -16,13 +16,16 @@ public class PerSheetService : IAutoInjection
private
PerHeaderService
_perHeader
;
private
PerforCofincomeRepository
_perforCofincomeRepository
;
private
PerforCofdrugpropRepository
_perforCofdrugpropRepository
;
private
PerforCofdrugtypeRepository
_perforCofdrugtypeRepository
;
public
PerSheetService
(
PerHeaderService
perHeader
,
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
)
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
)
{
_perHeader
=
perHeader
;
_perforCofincomeRepository
=
perforCofincomeRepository
;
_perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
_perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
}
/// <summary>
...
...
@@ -155,10 +158,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
var
incomeSheet
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
Income
&&
t
.
SheetName
.
Contains
(
"门诊"
)
&&
t
.
SheetName
.
Contains
(
"就诊"
));
var
datalist
=
incomeSheet
.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
chargeType
=
_perforCofdrugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
)?.
FirstOrDefault
().
ChargeType
;
List
<
string
>
drugtype
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
chargeType
))
drugtype
=
JArray
.
Parse
(
chargeType
).
ToObject
<
List
<
string
>>();
var
drugtype
=
_perforCofdrugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
)?.
Select
(
t
=>
t
.
Charge
).
ToList
();
var
drugData
=
datalist
.
Where
(
t
=>
drugtype
.
Contains
(
t
.
TypeName
)).
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
var
allData
=
datalist
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
...
...
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