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
e8433753
Commit
e8433753
authored
Mar 28, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微调
parent
2cfc4b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
28 deletions
+17
-28
performance/Performance.Services/ConfigService.cs
+17
-28
No files found.
performance/Performance.Services/ConfigService.cs
View file @
e8433753
...
@@ -293,40 +293,29 @@ public void Clear(int allotId)
...
@@ -293,40 +293,29 @@ public void Clear(int allotId)
/// <param name="iD"></param>
/// <param name="iD"></param>
public
void
Copy
(
per_allot
allot
)
public
void
Copy
(
per_allot
allot
)
{
{
var
list
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
).
OrderByDescending
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
ToList
();
var
list
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
.
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
ToList
();
int
allotId
=
0
;
int
allotId
=
0
;
for
(
int
i
=
0
;
i
<
list
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
list
.
Count
;
i
++)
{
{
if
(
list
[
i
].
ID
==
allot
.
ID
&&
(
i
-
1
)
>=
0
)
if
(
list
[
i
].
ID
==
allot
.
ID
&&
(
i
-
1
)
>=
0
)
allotId
=
list
[
i
-
1
].
ID
;
allotId
=
list
[
i
-
1
].
ID
;
}
}
if
(
allotId
>
0
)
var
director
=
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
{
var
newDirectors
=
director
.
Select
(
t
=>
new
cof_director
{
AllotID
=
allot
.
ID
,
JobTitle
=
t
.
JobTitle
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
var
director
=
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
_directorRepository
.
AddRange
(
newDirectors
.
ToArray
());
if
(
director
!=
null
)
{
var
durgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
addData
=
director
.
Select
(
t
=>
new
cof_director
{
AllotID
=
allot
.
ID
,
JobTitle
=
t
.
JobTitle
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
var
newDurgprops
=
durgprop
.
Select
(
t
=>
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
_directorRepository
.
AddRange
(
addData
.
ToArray
());
_drugpropRepository
.
AddRange
(
newDurgprops
.
ToArray
());
}
var
durgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
income
=
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
durgprop
!=
null
)
var
newIncomes
=
income
.
Select
(
t
=>
new
cof_income
{
AllotID
=
allot
.
ID
,
SheetNameKeyword
=
t
.
SheetNameKeyword
,
UnitName
=
t
.
UnitName
,
Value
=
t
.
Value
});
{
_incomeRepository
.
AddRange
(
newIncomes
.
ToArray
());
var
addData
=
durgprop
.
Select
(
t
=>
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
_drugpropRepository
.
AddRange
(
addData
.
ToArray
());
var
workyear
=
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
}
var
newWorkyears
=
workyear
.
Select
(
t
=>
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
var
income
=
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
_workyearRepository
.
AddRange
(
newWorkyears
.
ToArray
());
if
(
income
!=
null
)
{
var
addData
=
income
.
Select
(
t
=>
new
cof_income
{
AllotID
=
allot
.
ID
,
SheetNameKeyword
=
t
.
SheetNameKeyword
,
UnitName
=
t
.
UnitName
,
Value
=
t
.
Value
});
_incomeRepository
.
AddRange
(
addData
.
ToArray
());
}
var
workyear
=
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
workyear
!=
null
)
{
var
addData
=
workyear
.
Select
(
t
=>
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
_workyearRepository
.
AddRange
(
addData
.
ToArray
());
}
}
}
}
}
}
}
}
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