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
0033c1fc
Commit
0033c1fc
authored
Sep 20, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室详情
parent
7da95f8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
4 deletions
+91
-4
performance/Performance.Api/Controllers/ComputeController.cs
+4
-3
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
+28
-0
performance/Performance.Services/ComputeService.cs
+59
-1
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
0033c1fc
...
...
@@ -101,14 +101,15 @@ public ApiResponse<List<DeptResponse>> GetNurse([FromBody]ComputerRequest reques
/// <returns></returns>
[
Route
(
"deptdetail"
)]
[
HttpPost
]
public
ApiResponse
<
DeptD
etailResponse
>
DeptDetail
([
FromBody
]
DeptDetailRequest
request
)
public
ApiResponse
<
DeptD
ataDetails
>
DeptDetail
([
FromBody
]
DeptDetailRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
DeptDetailResponse
response
=
_computeService
.
GetDepartmentDetail
(
request
.
AllotId
,
request
.
AccountID
,
request
.
Type
);
return
new
ApiResponse
<
DeptDetailResponse
>(
ResponseType
.
OK
,
response
);
//DeptDetailResponse response = _computeService.GetDepartmentDetail(request.AllotId, request.AccountID, request.Type);
var
response
=
_computeService
.
DeptDetail
(
request
.
AllotId
,
request
.
AccountID
,
request
.
Type
);
return
new
ApiResponse
<
DeptDataDetails
>(
ResponseType
.
OK
,
response
);
}
/// <summary>
...
...
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
View file @
0033c1fc
...
...
@@ -16,4 +16,32 @@ public class DeptDetail
public
string
ItemName
{
get
;
set
;
}
public
decimal
ItemValue
{
get
;
set
;
}
}
public
class
DeptDataDetails
{
public
PerDataAccountBaisc
Pandect
{
get
;
set
;
}
public
List
<
DetailDtos
>
Detail
{
get
;
set
;
}
}
public
class
DetailDtos
{
public
string
ItemName
{
get
;
set
;
}
public
decimal
Amount
{
get
;
set
;
}
public
List
<
DetailModule
>
Items
{
get
;
set
;
}
}
public
class
DetailModule
{
public
string
ItemName
{
get
;
set
;
}
public
decimal
?
CellValue
{
get
;
set
;
}
public
decimal
?
Factor
{
get
;
set
;
}
public
decimal
?
ItemValue
{
get
;
set
;
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
0033c1fc
...
...
@@ -7,6 +7,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text.RegularExpressions
;
namespace
Performance.Services
{
...
...
@@ -22,6 +23,7 @@ public class ComputeService : IAutoInjection
private
readonly
PerforUserRepository
_perforUserRepository
;
private
readonly
PerforAgemployeeRepository
_perforAgemployeeRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
readonly
PerforCofincomeRepository
_perforCofincomeRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
...
...
@@ -32,7 +34,8 @@ public class ComputeService : IAutoInjection
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforUserRepository
perforUserRepository
,
PerforAgemployeeRepository
perforAgemployeeRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
)
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforCofincomeRepository
perforCofincomeRepository
)
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
...
...
@@ -44,6 +47,7 @@ public class ComputeService : IAutoInjection
this
.
_perforUserRepository
=
perforUserRepository
;
this
.
_perforAgemployeeRepository
=
perforAgemployeeRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
_perforCofincomeRepository
=
perforCofincomeRepository
;
}
/// <summary>
...
...
@@ -279,5 +283,59 @@ public List<res_baiscnorm> GetBaiscnorm(int allotId)
{
return
perforResbaiscnormRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
).
OrderBy
(
t
=>
t
.
PositionName
).
ToList
();
}
/// <summary>
/// 返回科室详情
/// </summary>
/// <param name="allotId"></param>
/// <param name="accountId"></param>
/// <param name="type"></param>
/// <returns></returns>
public
DeptDataDetails
DeptDetail
(
int
allotId
,
int
accountId
,
int
type
)
{
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
};
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
==
type
&&
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
doctor
),
Detail
=
new
List
<
DetailDtos
>()
};
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
UnitType
==
type
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
string
typeValue
=
type
==
1
?
"医生组"
:
"护理组"
;
var
incomeconfs
=
_perforCofincomeRepository
.
GetEntities
(
t
=>
t
.
UnitName
==
typeValue
);
//科室经济
var
sheetEconomic
=
persheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
var
dataEconomicList
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheetEconomic
?.
ID
&&
t
.
UnitType
==
type
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
).
ToList
();
var
economic
=
dataEconomicList
?.
Select
(
t
=>
new
DeptDetail
{
ItemName
=
t
.
TypeName
.
Replace
(
$"(
{
typeValue
}
)"
,
""
),
ItemValue
=
t
.
CellValue
??
0
});
Regex
reg
=
new
Regex
(
"[0-9]*"
);
foreach
(
var
stype
in
sheetType
)
{
foreach
(
var
sheet
in
persheet
.
Where
(
t
=>
t
.
SheetType
==
stype
))
{
var
sheetName
=
reg
.
Replace
(
sheet
.
SheetName
,
""
,
5
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
);
var
sheetData
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
).
ToList
();
if
(
sheetData
==
null
||
!
sheetData
.
Any
())
continue
;
var
item
=
new
DetailDtos
{
ItemName
=
sheetName
,
Amount
=
(
sheetName
.
Contains
(
"工作量"
)
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
))?.
ItemValue
)
??
0
m
,
Items
=
sheetData
?.
Select
(
t
=>
new
DetailModule
{
ItemName
=
t
.
TypeName
,
CellValue
=
t
.
CellValue
,
Factor
=
t
.
FactorValue
,
ItemValue
=
t
.
IsFactor
==
1
?
(
t
.
CellValue
*
(
t
.
FactorValue
??
0
))
:
t
.
CellValue
}).
ToList
()
};
deptDetails
.
Detail
.
Add
(
item
);
}
}
return
deptDetails
;
}
}
}
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