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
4c9a4cd0
Commit
4c9a4cd0
authored
Dec 13, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加载上月补充
parent
b9240f81
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
performance/Performance.Services/CopyService.cs
+31
-10
No files found.
performance/Performance.Services/CopyService.cs
View file @
4c9a4cd0
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
AngleSharp.Dom.Events
;
using
K4os.Hash.xxHash
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.Extensions.Logging
;
using
OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime
;
using
Microsoft.Extensions.Logging
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.EntityModels.Entity
;
using
Performance.Repository
;
using
Performance.Repository.Repository
;
using
static
Performance
.
Services
.
ExtractExcelService
.
WriteDataHelper
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
namespace
Performance.Services
{
...
...
@@ -490,6 +485,33 @@ public void Copy_AssessType(per_allot allot, int prevAllotId)
#
endregion
//查询插入的考核方案指标项
var
newperAssSchemeItems
=
_perforPerAssessSchemeItemsRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
#
region
被考核对象加载上月
var
perAssSchemeTargets
=
_perforPerAssessSchemeTargetRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
||
t
.
AllotId
==
allot
.
ID
);
var
prevAssSchemeTargets
=
perAssSchemeTargets
.
Where
(
w
=>
w
.
AllotId
==
prevAllotId
).
ToList
();
if
(!
prevAssSchemeItems
.
Any
())
return
;
var
assSchemeTargets
=
perAssSchemeTargets
.
Where
(
w
=>
w
.
AllotId
==
allot
.
ID
).
ToList
();
if
(
assSchemeTargets
.
Any
())
{
assSchemeTargets
.
ForEach
(
w
=>
{
w
.
AllotId
=
-
1
;
w
.
UpdateTime
=
operatingTime
;
});
_perforPerAssessSchemeTargetRepository
.
UpdateRange
(
assSchemeTargets
.
ToArray
());
}
var
newaSchemeTarget
=
prevAssSchemeTargets
.
Select
(
t
=>
new
per_assess_scheme_target
{
Id
=
0
,
AllotId
=
allot
.
ID
,
AssessId
=
newperAssCategorys
.
Find
(
w
=>
w
.
AssessCode
==
prevassCategorys
.
Find
(
s
=>
s
.
Id
==
t
.
AssessId
)?.
AssessCode
&&
w
.
AllotId
==
allot
.
ID
).
Id
,
SchemeId
=
newperAssSchemes
.
Find
(
w
=>
w
.
SchemeCode
==
prevAssSchemes
.
Find
(
s
=>
s
.
Id
==
t
.
SchemeId
)?.
SchemeCode
&&
w
.
AllotId
==
allot
.
ID
).
Id
,
UnitCode
=
t
.
UnitCode
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
,
CreateBy
=
t
.
CreateBy
,
CreateTime
=
operatingTime
,
UpdateBy
=
t
.
UpdateBy
,
UpdateTime
=
operatingTime
,
});
_perforPerAssessSchemeTargetRepository
.
AddRange
(
newaSchemeTarget
.
ToArray
());
#
endregion
#
region
考核方案下发到责任科室指标清单加载上月
var
perAssIssueSchemes
=
_perforPerAssessIssueSchemeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
||
t
.
AllotId
==
allot
.
ID
);
var
prevAssIssueSchemes
=
perAssIssueSchemes
.
Where
(
w
=>
w
.
AllotId
==
prevAllotId
).
ToList
();
...
...
@@ -539,7 +561,6 @@ public void Copy_AssessType(per_allot allot, int prevAllotId)
}).
ToArray
();
_perforPerAssessIssueSchemeRepository
.
AddRange
(
newaIssueSchemess
);
#
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