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
0533f446
Commit
0533f446
authored
Apr 12, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效基础配置copy修改
parent
1827f5d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
31 deletions
+8
-31
performance/Performance.Api/Controllers/AgainAllotController.cs
+0
-1
performance/Performance.Services/ConfigService.cs
+8
-30
No files found.
performance/Performance.Api/Controllers/AgainAllotController.cs
View file @
0533f446
...
@@ -108,7 +108,6 @@ public ApiResponse Import([FromForm] IFormCollection form)
...
@@ -108,7 +108,6 @@ public ApiResponse Import([FromForm] IFormCollection form)
if
(!
againAllotService
.
Update
(
allot
,
againid
))
if
(!
againAllotService
.
Update
(
allot
,
againid
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传成功,修改状态失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传成功,修改状态失败"
);
configService
.
ClearAgain
(
againid
);
configService
.
ClearAgain
(
againid
);
configService
.
CopyAgain
(
allot
.
ID
);
}
}
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
...
...
performance/Performance.Services/ConfigService.cs
View file @
0533f446
...
@@ -337,6 +337,14 @@ public void Copy(per_allot allot)
...
@@ -337,6 +337,14 @@ public void Copy(per_allot allot)
newWorkyears
=
workyear
.
Select
(
t
=>
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
1
});
newWorkyears
=
workyear
.
Select
(
t
=>
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
1
});
_workyearRepository
.
AddRange
(
newWorkyears
.
ToArray
());
_workyearRepository
.
AddRange
(
newWorkyears
.
ToArray
());
}
}
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
data
==
null
||
data
.
Count
==
0
)
{
var
again
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
}
#
endregion
#
endregion
...
@@ -408,35 +416,5 @@ public void ClearAgain(int againId)
...
@@ -408,35 +416,5 @@ public void ClearAgain(int againId)
var
count
=
_directorRepository
.
DelAgain
(
againId
);
var
count
=
_directorRepository
.
DelAgain
(
againId
);
logdbug
.
Add
(
againId
,
"清除二次绩效中无效数据"
,
$"受影响行数:
{
count
}
"
);
logdbug
.
Add
(
againId
,
"清除二次绩效中无效数据"
,
$"受影响行数:
{
count
}
"
);
}
}
#
region
CopyAgain
/// <summary>
/// 复制报表基础配置
/// </summary>
/// <param name="iD"></param>
public
void
CopyAgain
(
int
allotId
)
{
var
allot
=
perforPerAllotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效不存在"
);
var
list
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
.
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
ToList
();
for
(
int
i
=
0
;
i
<
list
.
Count
;
i
++)
{
if
(
list
[
i
].
ID
==
allot
.
ID
&&
(
i
-
1
)
>=
0
)
allot
=
list
[
i
-
1
];
}
List
<
cof_again
>
record
=
new
List
<
cof_again
>();
//根据上月绩效获取二次绩效信息
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
data
==
null
||
data
.
Count
==
0
)
{
var
again
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
#
endregion
}
}
}
}
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