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
52272462
Commit
52272462
authored
Apr 02, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/v2020morge-graphql' into v2020morge-graphql
parents
5dee82b1
e302b475
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
3 deletions
+74
-3
performance/Performance.Api/Controllers/SecondAllotController.cs
+2
-2
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
+5
-0
performance/Performance.Services/Details/SecondAllotDetails.cs
+1
-1
performance/Performance.Services/SecondAllotService.cs
+61
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
52272462
...
...
@@ -80,7 +80,7 @@ public ApiResponse SaveValue(int secondid, [FromBody] List<ag_fixatitem> request
if
(
unitTypeCount
!=
1
||
request
.
Any
(
t
=>
string
.
IsNullOrEmpty
(
t
.
UnitType
)))
throw
new
PerformanceException
(
"科室类型错误"
);
var
repetition
=
request
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
}).
Where
(
t
=>
t
.
Count
()
>
1
);
var
repetition
=
request
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
,
WorkType
=
t
.
WorkType
??
0
}).
Where
(
t
=>
t
.
Count
()
>
1
);
if
(
repetition
.
Any
())
throw
new
PerformanceException
(
string
.
Join
(
";"
,
repetition
.
Select
(
t
=>
$"行
{
t
.
Key
.
RowNumber
}
项‘
{
t
.
Key
.
ItemName
}
’重复录入"
)));
...
...
@@ -405,7 +405,7 @@ public ApiResponse OtherList([FromBody] AgOtherRequest request)
//var result = secondAllotDetails.GetOtherTempData(claimService.GetUserId(), request.SecondId, request.IsArchive, request.EmployeeSource, out decimal? realAmount);
var
obj
=
new
{
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
result
?.
Sum
(
t
=>
t
.
RealAmount
)),
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
result
?.
Sum
(
t
=>
t
.
RealAmount
)),
body
=
result
,
};
return
new
ApiResponse
(
ResponseType
.
OK
,
obj
);
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
52272462
...
...
@@ -686,6 +686,11 @@
1 value相加值为1
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.WorkType"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_header"
>
<summary>
二次分配不固定列头数据
...
...
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
View file @
52272462
...
...
@@ -75,5 +75,10 @@ public class ag_fixatitem
/// 1 value相加值为1
/// </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
WorkType
{
get
;
set
;
}
}
}
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
52272462
...
...
@@ -254,7 +254,7 @@ public List<BodyItem> GetEmployeeFromSavedData(int userId, ag_secondallot second
foreach
(
var
column
in
otherShowColumns
)
{
var
tableFixedData
=
new
BodyItem
(
column
);
var
savedData
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
Type
==
column
.
Type
&&
w
.
ItemName
==
column
.
FiledName
);
var
savedData
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
Type
==
column
.
Type
&&
w
.
ItemName
==
column
.
FiledName
&&
w
.
WorkType
==
column
.
WorkType
);
if
(
savedData
!=
null
)
{
tableFixedData
.
Value
=
savedData
.
ItemValue
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
52272462
...
...
@@ -145,6 +145,17 @@ public List<SecondListResponse> GetSecondList(int userId)
t
.
ShowFormula
=
allot
.
ShowFormula
;
}
});
// 暂时在加载列表时补充信息
if
(
secondList
!=
null
&&
secondList
.
Any
())
{
var
worktypes
=
perforAgworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospital
.
HospitalID
&&
t
.
Department
==
secondList
.
First
().
Department
&&
t
.
UnitType
==
secondList
.
First
().
UnitType
);
if
(
worktypes
!=
null
&&
worktypes
.
Any
())
{
worktypes
.
ForEach
(
t
=>
AddWorkTypeDefaultValues
(
t
));
}
}
return
list
;
}
...
...
@@ -1140,6 +1151,7 @@ public ag_workload_type SaveWorkType(ag_workload_type request, int userId)
};
perforAgworkloadtypeRepository
.
Add
(
entity
);
}
AddWorkTypeDefaultValues
(
entity
);
return
entity
;
}
else
if
(
request
.
Id
!=
entity
.
Id
)
...
...
@@ -1148,6 +1160,55 @@ public ag_workload_type SaveWorkType(ag_workload_type request, int userId)
return
request
;
}
private
void
AddWorkTypeDefaultValues
(
ag_workload_type
type
)
{
List
<(
string
,
string
,
int
)>
defaultValues
=
new
List
<(
string
,
string
,
int
)>
{
(
"工作量得分"
,
"WorkloadScore"
,
1
),
(
"考核得分"
,
"AssessmentScore"
,
2
),
(
"工作量绩效工资"
,
"WorkPerformance"
,
3
)
};
List
<
ag_workload
>
insertData
=
new
List
<
ag_workload
>();
var
workItems
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
WorkTypeId
==
type
.
Id
);
if
(
workItems
==
null
||
!
workItems
.
Any
(
t
=>
defaultValues
.
Select
(
q
=>
q
.
Item1
).
Contains
(
t
.
ItemName
)))
{
insertData
=
defaultValues
.
Select
(
t
=>
new
ag_workload
{
HospitalId
=
type
.
HospitalId
,
Department
=
type
.
Department
,
UnitType
=
type
.
UnitType
,
ItemId
=
t
.
Item2
+
type
.
Id
,
ItemName
=
t
.
Item1
,
FactorValue
=
null
,
Sort
=
100
+
t
.
Item3
,
WorkTypeId
=
type
.
Id
}).
ToList
();
}
else
{
foreach
(
var
item
in
defaultValues
)
{
var
data
=
workItems
.
FirstOrDefault
(
t
=>
t
.
ItemName
==
item
.
Item1
);
if
(
data
==
null
)
{
insertData
.
Add
(
new
ag_workload
{
HospitalId
=
type
.
HospitalId
,
Department
=
type
.
Department
,
UnitType
=
type
.
UnitType
,
ItemId
=
item
.
Item2
+
type
.
Id
,
ItemName
=
item
.
Item1
,
FactorValue
=
null
,
Sort
=
100
+
item
.
Item3
,
WorkTypeId
=
type
.
Id
});
}
}
}
perforAgworkloadRepository
.
AddRange
(
insertData
.
ToArray
());
}
/// <summary>
/// 获取工作量类型列表
/// </summary>
...
...
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