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
c372460a
Commit
c372460a
authored
Jun 21, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作量CMI药占比计算错误问题修复
parent
274357b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
+21
-10
No files found.
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
View file @
c372460a
...
@@ -228,9 +228,9 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -228,9 +228,9 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
var
type
=
TypeConversion
(
account
.
UnitType
);
var
type
=
TypeConversion
(
account
.
UnitType
);
var
workitems
=
cofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
workitems
=
cofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
m
edicineFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadMedicineProp
);
var
baseM
edicineFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadMedicineProp
);
var
c
miFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadCMI
);
var
baseC
miFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadCMI
);
var
i
nclineFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadIncline
);
var
baseI
nclineFactor
=
GetFactors
(
persheet
,
basicData
,
type
,
SheetType
.
WorkloadIncline
);
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
...
@@ -247,9 +247,6 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -247,9 +247,6 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
{
{
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
var
itemValue
=
post
.
Sum
(
group
=>
group
.
IsFactor
==
1
?
(
group
.
CellValue
*
(
group
.
FactorValue
??
0
))
:
group
.
CellValue
);
itemValue
=
itemValue
*
(
medicineFactor
??
1
)
*
(
cmiFactor
??
1
)
*
(
inclineFactor
??
1
);
var
row
=
new
Dictionary
<
string
,
object
>
var
row
=
new
Dictionary
<
string
,
object
>
{
{
{
"项目"
,
post
.
Key
.
TypeName
},
{
"项目"
,
post
.
Key
.
TypeName
},
...
@@ -258,15 +255,29 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -258,15 +255,29 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
{
"药占比系数"
,
""
},
{
"药占比系数"
,
""
},
{
"CMI系数"
,
""
},
{
"CMI系数"
,
""
},
{
"工作量倾斜"
,
""
},
{
"工作量倾斜"
,
""
},
{
"金额"
,
ValueFormating
(
itemValue
,
""
)
}
{
"金额"
,
""
}
};
};
decimal
medicineFactor
=
1
m
,
cmiFactor
=
1
m
,
inclineFactor
=
1
m
;
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
1
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
medicineFactor
!=
null
)
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
1
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
baseMedicineFactor
!=
null
)
{
medicineFactor
=
baseMedicineFactor
.
Value
;
row
.
AddOrUpdate
(
"药占比系数"
,
ValueFormating
(
medicineFactor
,
""
));
row
.
AddOrUpdate
(
"药占比系数"
,
ValueFormating
(
medicineFactor
,
""
));
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
2
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
cmiFactor
!=
null
)
}
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
2
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
baseCmiFactor
!=
null
)
{
cmiFactor
=
baseCmiFactor
.
Value
;
row
.
AddOrUpdate
(
"CMI系数"
,
ValueFormating
(
cmiFactor
,
""
));
row
.
AddOrUpdate
(
"CMI系数"
,
ValueFormating
(
cmiFactor
,
""
));
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
3
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
inclineFactor
!=
null
)
}
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
3
&&
a
.
Item
==
post
.
Key
.
TypeName
)
&&
baseInclineFactor
!=
null
)
{
inclineFactor
=
baseInclineFactor
.
Value
;
row
.
AddOrUpdate
(
"工作量倾斜"
,
ValueFormating
(
inclineFactor
,
""
));
row
.
AddOrUpdate
(
"工作量倾斜"
,
ValueFormating
(
inclineFactor
,
""
));
}
var
itemValue
=
post
.
Sum
(
group
=>
group
.
IsFactor
==
1
?
(
group
.
CellValue
*
(
group
.
FactorValue
??
0
))
:
group
.
CellValue
);
itemValue
=
itemValue
*
medicineFactor
*
cmiFactor
*
inclineFactor
;
row
.
AddOrUpdate
(
"金额"
,
ValueFormating
(
itemValue
,
""
));
items
.
Add
(
row
);
items
.
Add
(
row
);
}
}
...
...
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