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
5e1d10de
Commit
5e1d10de
authored
Jun 01, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室详情设置加载
parent
c94a4c73
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
13 deletions
+54
-13
performance/Performance.Api/Controllers/ComputeController.cs
+3
-0
performance/Performance.DtoModels/Response/UniteDeptDetailResponse.cs
+1
-0
performance/Performance.DtoModels/UniteDeptSetting.cs
+1
-2
performance/Performance.Repository/Repository/PerforCofDeptDetailRepository.cs
+1
-1
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
+48
-10
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
5e1d10de
...
...
@@ -211,6 +211,9 @@ public ApiResponse UniteDeptDetail([FromBody] UniteDeptDetailRequest request)
return
new
ApiResponse
(
ResponseType
.
OK
,
response
);
}
#
region
20230531
即将弃用,由新接口替代
/// <summary>
/// 科室绩效详情
...
...
performance/Performance.DtoModels/Response/UniteDeptDetailResponse.cs
View file @
5e1d10de
...
...
@@ -4,6 +4,7 @@ namespace Performance.DtoModels
{
public
class
UniteDeptDetailResponse
{
public
string
Title
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary> 0 不显示 1 显示 </summary>
...
...
performance/Performance.DtoModels/UniteDeptSetting.cs
View file @
5e1d10de
...
...
@@ -5,13 +5,12 @@ namespace Performance.DtoModels
{
public
class
UniteDeptDetailItem
{
public
int
Type
{
get
;
set
;
}
public
int
SheetType
{
get
;
set
;
}
public
string
Title
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
public
string
Format
{
get
;
set
;
}
public
int
Sort
{
get
;
set
;
}
public
string
Display
{
get
;
set
;
}
public
List
<
UniteDeptDetailItem
>
Items
{
get
;
set
;
}
public
List
<
UniteDeptDetailItem
>
Children
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforCofDeptDetailRepository.cs
View file @
5e1d10de
...
...
@@ -8,7 +8,7 @@
namespace
Performance.Repository
{
/// <summary>
/// cof_
cmi Repository
/// cof_
dept_detail
/// </summary>
public
partial
class
PerforCofDeptDetailRepository
:
PerforRepository
<
cof_dept_detail
>
{
...
...
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
View file @
5e1d10de
...
...
@@ -50,7 +50,13 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
)
??
new
List
<
im_header
>();
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
)
??
new
List
<
im_data
>();
var
response
=
new
UniteDeptDetailResponse
{
UnitType
=
unitType
.
ToString
(),
AccountingUnit
=
accountingUnit
,
DetailItems
=
new
List
<
DeptDetailItem
>()
};
var
response
=
new
UniteDeptDetailResponse
{
Title
=
$"
{
allot
.
Name
??
$"
{
allot
.
Year
}
年
{
allot
.
Month
}
月"
}
{
unitType
}
{
accountingUnit
}
"
,
UnitType
=
unitType
.
ToString
(),
AccountingUnit
=
accountingUnit
,
DetailItems
=
new
List
<
DeptDetailItem
>()
};
// 行政工勤
if
(
UnitTypeUtil
.
IsOffice
(
response
.
UnitType
))
{
...
...
@@ -244,6 +250,16 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
row
.
Add
(
"金额"
,
ValueFormating
(
itemValue
,
""
));
items
.
Add
(
row
);
}
// 保证Key数量一致
var
keys
=
items
.
SelectMany
(
dict
=>
dict
.
Keys
).
Distinct
();
foreach
(
var
k
in
keys
)
{
foreach
(
var
item
in
items
)
{
if
(!
item
.
ContainsKey
(
k
))
item
.
Add
(
k
,
""
);
}
}
items
.
Add
(
new
Dictionary
<
string
,
object
>
{
{
"项目"
,
"核算分值合计"
},
...
...
@@ -431,11 +447,6 @@ private string BeautifulName(string sheetName)
/// <exception cref="PerformanceException"></exception>
public
List
<
UniteDeptDetailItem
>
GetUniteDeptDetailSetting
(
int
allotId
)
{
var
entity
=
_perforCofDeptDetailRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
);
if
(!
string
.
IsNullOrEmpty
(
entity
?.
Settings
))
{
return
JsonHelper
.
Deserialize
<
List
<
UniteDeptDetailItem
>>(
entity
.
Settings
);
}
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效月信息错误"
);
...
...
@@ -484,11 +495,17 @@ public List<UniteDeptDetailItem> GetUniteDeptDetailSetting(int allotId)
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
items
.
Add
(
new
UniteDeptDetailItem
{
Title
=
post
.
Key
.
TypeName
});
}
detail
.
Items
=
items
;
detail
.
Children
=
items
;
}
}
}
#
endregion
var
entity
=
_perforCofDeptDetailRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
);
var
cofDeptDetail
=
string
.
IsNullOrEmpty
(
entity
?.
Settings
)
?
new
List
<
UniteDeptDetailItem
>()
:
JsonHelper
.
Deserialize
<
List
<
UniteDeptDetailItem
>>(
entity
.
Settings
);
var
enumItems
=
EnumHelper
.
GetItems
<
UniteDept
.
Title
>();
foreach
(
var
detail
in
response
)
{
...
...
@@ -496,9 +513,30 @@ public List<UniteDeptDetailItem> GetUniteDeptDetailSetting(int allotId)
var
cfg
=
enumItems
.
FirstOrDefault
(
w
=>
w
.
Name
==
detail
.
Title
);
// 只对右侧设置排序
detail
.
Sort
=
cfg
==
null
?
detail
.
Sort
:
cfg
.
Value
;
}
response
=
response
.
OrderBy
(
w
=>
w
.
Type
).
ThenBy
(
w
=>
w
.
Sort
).
ToList
();
// 读取数据库保存内容
detail
.
Children
??=
new
List
<
UniteDeptDetailItem
>();
var
temp1
=
cofDeptDetail
.
FirstOrDefault
(
w
=>
w
.
Title
==
detail
.
Title
);
if
(
temp1
==
null
)
continue
;
detail
.
SheetType
=
temp1
.
SheetType
;
detail
.
Remark
=
temp1
.
Remark
;
detail
.
Title
=
temp1
.
Title
;
detail
.
Format
=
temp1
.
Format
;
detail
.
Sort
=
temp1
.
Sort
;
detail
.
Display
=
temp1
.
Display
;
foreach
(
var
item
in
detail
.
Children
)
{
var
temp2
=
cofDeptDetail
.
FirstOrDefault
(
w
=>
w
.
Title
==
item
.
Title
);
if
(
temp2
==
null
)
continue
;
detail
.
SheetType
=
temp2
.
SheetType
;
detail
.
Remark
=
temp2
.
Remark
;
detail
.
Title
=
temp2
.
Title
;
detail
.
Format
=
temp2
.
Format
;
detail
.
Sort
=
temp2
.
Sort
;
detail
.
Display
=
temp2
.
Display
;
}
}
response
=
response
.
OrderBy
(
w
=>
w
.
Sort
).
ToList
();
return
response
;
}
...
...
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