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
28e2c18b
Commit
28e2c18b
authored
Jun 10, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配结构加载,数据未加载
parent
e743ba6d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
20 deletions
+68
-20
performance/Performance.Api/Controllers/SecondAllotController.cs
+18
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+10
-5
performance/Performance.DtoModels/HandsonTable.cs
+22
-10
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
+8
-0
performance/Performance.DtoModels/TitleValue.cs
+10
-4
performance/Performance.Services/RedistributionService.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
28e2c18b
...
@@ -23,18 +23,21 @@ public class SecondAllotController : ControllerBase
...
@@ -23,18 +23,21 @@ public class SecondAllotController : ControllerBase
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
private
readonly
RedistributionService
_redistributionService
;
public
SecondAllotController
(
public
SecondAllotController
(
ClaimService
claimService
,
ClaimService
claimService
,
SecondAllotService
secondAllotService
,
SecondAllotService
secondAllotService
,
ResultComputeService
resultComputeService
,
ResultComputeService
resultComputeService
,
SecondAllotDetails
secondAllotDetails
SecondAllotDetails
secondAllotDetails
,
RedistributionService
redistributionService
)
)
{
{
this
.
claimService
=
claimService
;
this
.
claimService
=
claimService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
secondAllotDetails
=
secondAllotDetails
;
this
.
secondAllotDetails
=
secondAllotDetails
;
_redistributionService
=
redistributionService
;
}
}
#
region
二次绩效列表、录入数据展示,保存数据
#
region
二次绩效列表、录入数据展示,保存数据
...
@@ -530,5 +533,19 @@ public ApiResponse AutoCompleteBodyData([FromRoute] int secondId, SecondEmployee
...
@@ -530,5 +533,19 @@ public ApiResponse AutoCompleteBodyData([FromRoute] int secondId, SecondEmployee
var
result
=
secondAllotService
.
AutoComplete
(
secondId
,
request
);
var
result
=
secondAllotService
.
AutoComplete
(
secondId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
/// <summary>
/// 二次绩效录入页面
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution"
)]
[
HttpGet
]
public
ApiResponse
Redistribution
([
FromRoute
]
SecondLoadRequest
request
)
{
var
result
=
_redistributionService
.
Load
(
request
.
SecondId
,
request
.
ComputeMode
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
}
}
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
28e2c18b
...
@@ -3810,24 +3810,29 @@
...
@@ -3810,24 +3810,29 @@
数据集合
数据集合
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.DtoModels.TitleValue`
1
"
>
<member
name=
"T:Performance.DtoModels.TitleValue`
2
"
>
<summary>
<summary>
title value
title value
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.TitleValue`
1
.Title"
>
<member
name=
"P:Performance.DtoModels.TitleValue`
2
.Title"
>
<summary>
<summary>
Title
Title
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.TitleValue`
1
.Value"
>
<member
name=
"P:Performance.DtoModels.TitleValue`
2
.Value"
>
<summary>
<summary>
Value
Value
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.TitleValue`1.State"
>
<member
name=
"P:Performance.DtoModels.TitleValue`2.State"
>
<summary>
存储数据
</summary>
</member>
<member
name=
"T:Performance.DtoModels.TitleValue`1"
>
<summary>
<summary>
1、已选,2、未选,3、已被选择
title value
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.DtoModels.TitleValue"
>
<member
name=
"T:Performance.DtoModels.TitleValue"
>
...
...
performance/Performance.DtoModels/HandsonTable.cs
View file @
28e2c18b
...
@@ -6,23 +6,35 @@
...
@@ -6,23 +6,35 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
HandsonTable
public
class
HandsonTableBase
{
public
HandsonTableBase
()
{
ColHeaders
=
new
List
<
string
>();
Columns
=
new
List
<
HandsonColumn
>();
Data
=
new
List
<
Dictionary
<
string
,
string
>>();
NestedHeadersArray
=
new
List
<
List
<
string
>>();
}
public
List
<
string
>
ColHeaders
{
get
;
set
;
}
public
List
<
Dictionary
<
string
,
string
>>
Data
{
get
;
set
;
}
public
List
<
HandsonColumn
>
Columns
{
get
;
set
;
}
public
List
<
List
<
string
>>
NestedHeadersArray
{
get
;
set
;
}
}
public
class
HandsonTable
:
HandsonTableBase
{
{
private
IEnumerable
<
collect_permission
>
_permissions
;
private
IEnumerable
<
collect_permission
>
_permissions
;
private
List
<
Dictionary
<
string
,
string
>>
_data
;
public
HandsonTable
(
int
sheetType
,
string
[]
cols
,
List
<
collect_permission
>
permissions
)
public
HandsonTable
(
int
sheetType
,
string
[]
cols
,
List
<
collect_permission
>
permissions
)
:
base
()
{
{
_permissions
=
permissions
;
_permissions
=
permissions
;
_data
=
new
List
<
Dictionary
<
string
,
string
>>();
InitColHeaders
(
sheetType
,
cols
);
InitColHeaders
(
sheetType
,
cols
);
InitColumns
(
permissions
);
InitColumns
(
permissions
);
}
}
public
string
[]
ColHeaders
{
get
;
private
set
;
}
public
List
<
Dictionary
<
string
,
string
>>
Data
=>
_data
;
public
HandsonColumn
[]
Columns
{
get
;
private
set
;
}
/// <summary>
/// <summary>
///
///
...
@@ -43,7 +55,7 @@ public void SetRowData(IEnumerable<HandsonRowData> datas, bool isTypein)
...
@@ -43,7 +55,7 @@ public void SetRowData(IEnumerable<HandsonRowData> datas, bool isTypein)
else
if
(
dic
.
ContainsKey
(
item
.
Name
.
ToLower
())
&&
_permissions
.
Any
(
w
=>
w
.
HeadName
.
ToLower
()
==
item
.
Name
.
ToLower
()))
else
if
(
dic
.
ContainsKey
(
item
.
Name
.
ToLower
())
&&
_permissions
.
Any
(
w
=>
w
.
HeadName
.
ToLower
()
==
item
.
Name
.
ToLower
()))
dic
[
item
.
Name
.
ToLower
()]
=
item
.
Value
?.
ToString
()
??
""
;
dic
[
item
.
Name
.
ToLower
()]
=
item
.
Value
?.
ToString
()
??
""
;
}
}
_d
ata
.
Add
(
dic
);
D
ata
.
Add
(
dic
);
}
}
}
}
...
@@ -68,7 +80,7 @@ private void InitColHeaders(int sheetType, string[] cols)
...
@@ -68,7 +80,7 @@ private void InitColHeaders(int sheetType, string[] cols)
if
(!
_permissions
.
Any
(
w
=>
w
.
HeadName
.
ToLower
()
==
item
&&
w
.
Visible
==
1
))
if
(!
_permissions
.
Any
(
w
=>
w
.
HeadName
.
ToLower
()
==
item
&&
w
.
Visible
==
1
))
necessitys
.
Remove
(
item
);
necessitys
.
Remove
(
item
);
}
}
ColHeaders
=
necessitys
.
ToArray
()
;
ColHeaders
=
necessitys
;
}
}
private
void
InitColumns
(
List
<
collect_permission
>
permissions
)
private
void
InitColumns
(
List
<
collect_permission
>
permissions
)
...
@@ -80,7 +92,7 @@ private void InitColumns(List<collect_permission> permissions)
...
@@ -80,7 +92,7 @@ private void InitColumns(List<collect_permission> permissions)
var
readnoly
=
_permissions
.
FirstOrDefault
(
f
=>
f
.
HeadName
==
item
)?.
Readnoly
==
1
;
var
readnoly
=
_permissions
.
FirstOrDefault
(
f
=>
f
.
HeadName
==
item
)?.
Readnoly
==
1
;
columns
.
Add
(
new
HandsonColumn
(
item
.
ToLower
(),
readnoly
));
columns
.
Add
(
new
HandsonColumn
(
item
.
ToLower
(),
readnoly
));
}
}
Columns
=
columns
.
ToArray
()
;
Columns
=
columns
;
}
}
private
Dictionary
<
string
,
string
>
CreateDataRow
(
string
key
,
string
value
)
private
Dictionary
<
string
,
string
>
CreateDataRow
(
string
key
,
string
value
)
...
@@ -124,7 +136,7 @@ public HandsonColumn(string data, bool readOnly = false, DataFormat format = Dat
...
@@ -124,7 +136,7 @@ public HandsonColumn(string data, bool readOnly = false, DataFormat format = Dat
public
bool
ReadOnly
{
get
;
set
;
}
public
bool
ReadOnly
{
get
;
set
;
}
public
string
Type
{
get
;
set
;
}
public
string
Type
{
get
;
set
;
}
public
string
[]
Source
{
get
;
set
;
}
public
string
[]
Source
{
get
;
set
;
}
public
bool
Strict
{
get
;
set
;
}
=
false
;
public
bool
Strict
{
get
;
set
;
}
=
false
;
public
NumericFormat
NumericFormat
{
get
;
set
;
}
public
NumericFormat
NumericFormat
{
get
;
set
;
}
}
}
...
...
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
View file @
28e2c18b
...
@@ -5,6 +5,14 @@
...
@@ -5,6 +5,14 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
SecondLoadRequest
{
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 计算方式:1 不计算 2 横向计算 3 纵向计算
/// </summary>
public
int
ComputeMode
{
get
;
set
;
}
}
public
class
SecondEmployeeRequest
public
class
SecondEmployeeRequest
{
{
public
string
EmployeeName
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/TitleValue.cs
View file @
28e2c18b
...
@@ -7,7 +7,7 @@ namespace Performance.DtoModels
...
@@ -7,7 +7,7 @@ namespace Performance.DtoModels
/// <summary>
/// <summary>
/// title value
/// title value
/// </summary>
/// </summary>
public
class
TitleValue
<
T
>
public
class
TitleValue
<
T
V
,
TS
>
{
{
/// <summary>
/// <summary>
/// Title
/// Title
...
@@ -16,11 +16,17 @@ public class TitleValue<T>
...
@@ -16,11 +16,17 @@ public class TitleValue<T>
/// <summary>
/// <summary>
/// Value
/// Value
/// </summary>
/// </summary>
public
T
Value
{
get
;
set
;
}
public
T
V
Value
{
get
;
set
;
}
/// <summary>
/// <summary>
///
1、已选,2、未选,3、已被选择
///
存储数据
/// </summary>
/// </summary>
public
int
State
{
get
;
set
;
}
public
TS
State
{
get
;
set
;
}
}
/// <summary>
/// title value
/// </summary>
public
class
TitleValue
<
T
>
:
TitleValue
<
T
,
int
>
{
}
}
/// <summary>
/// <summary>
/// title value
/// title value
...
...
performance/Performance.Services/RedistributionService.cs
0 → 100644
View file @
28e2c18b
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