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
b4901199
Commit
b4901199
authored
Mar 01, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并
parent
b4b7c994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
performance/Performance.Services/ConfigService.cs
+16
-7
No files found.
performance/Performance.Services/ConfigService.cs
View file @
b4901199
...
@@ -1061,12 +1061,12 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -1061,12 +1061,12 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
}
}
logger
.
LogInformation
(
$"copy drugTypes"
);
logger
.
LogInformation
(
$"copy drugTypes"
);
var
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
delHistotyData
&&
drugTypes
!=
null
&&
drugTypes
.
Any
())
if
(
delHistotyData
&&
drugTypes
!=
null
&&
drugTypes
.
Any
())
flag
=
_drugtypeRepository
.
RemoveRange
(
drugTypes
.
ToArray
());
flag
=
_drugtypeRepository
.
RemoveRange
(
drugTypes
.
ToArray
());
if
(
flag
||
drugTypes
==
null
||
!
drugTypes
.
Any
())
if
(
flag
||
drugTypes
==
null
||
!
drugTypes
.
Any
())
{
{
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
&&
t
.
HospitalId
==
allot
.
HospitalId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
drugTypes
!=
null
&&
drugTypes
.
Any
())
if
(
drugTypes
!=
null
&&
drugTypes
.
Any
())
{
{
var
newDrugTypes
=
drugTypes
.
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
var
newDrugTypes
=
drugTypes
.
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
...
@@ -1075,12 +1075,13 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -1075,12 +1075,13 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
}
}
logger
.
LogInformation
(
$"copy drugTypeDisburses"
);
logger
.
LogInformation
(
$"copy drugTypeDisburses"
);
var
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
delHistotyData
&&
drugTypeDisburses
!=
null
&&
drugTypeDisburses
.
Any
())
if
(
delHistotyData
&&
drugTypeDisburses
!=
null
&&
drugTypeDisburses
.
Any
())
flag
=
drugtypeDisburseRepository
.
RemoveRange
(
drugTypeDisburses
.
ToArray
());
flag
=
drugtypeDisburseRepository
.
RemoveRange
(
drugTypeDisburses
.
ToArray
());
if
(
flag
||
drugTypeDisburses
==
null
||
!
drugTypeDisburses
.
Any
())
if
(
flag
||
drugTypeDisburses
==
null
||
!
drugTypeDisburses
.
Any
())
{
{
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
)
??
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
&&
t
.
HospitalId
==
allot
.
HospitalId
)
??
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
drugTypeDisburses
!=
null
&&
drugTypeDisburses
.
Any
())
if
(
drugTypeDisburses
!=
null
&&
drugTypeDisburses
.
Any
())
{
{
var
newDrugTypeDisburses
=
drugTypeDisburses
.
Select
(
t
=>
new
cof_drugtype_disburse
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
var
newDrugTypeDisburses
=
drugTypeDisburses
.
Select
(
t
=>
new
cof_drugtype_disburse
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
...
@@ -1089,12 +1090,13 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -1089,12 +1090,13 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
}
}
logger
.
LogInformation
(
$"copy drugTypeFactors"
);
logger
.
LogInformation
(
$"copy drugTypeFactors"
);
var
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
delHistotyData
&&
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
if
(
delHistotyData
&&
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
flag
=
cofdrugtypefactorRepository
.
RemoveRange
(
drugTypeFactors
.
ToArray
());
flag
=
cofdrugtypefactorRepository
.
RemoveRange
(
drugTypeFactors
.
ToArray
());
if
(
flag
||
drugTypeFactors
==
null
||
!
drugTypeFactors
.
Any
())
if
(
flag
||
drugTypeFactors
==
null
||
!
drugTypeFactors
.
Any
())
{
{
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
)
??
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
&&
t
.
HospitalId
==
allot
.
HospitalId
)
??
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
if
(
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
{
{
var
newDrugtypeFactors
=
drugTypeFactors
.
Select
(
t
=>
new
cof_drugtype_factor
var
newDrugtypeFactors
=
drugTypeFactors
.
Select
(
t
=>
new
cof_drugtype_factor
...
@@ -1135,7 +1137,14 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -1135,7 +1137,14 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
if
(
agains
!=
null
&&
agains
.
Any
())
if
(
agains
!=
null
&&
agains
.
Any
())
{
{
var
days
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
days
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
newAgains
=
agains
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Department
=
t
.
Department
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
TypeName
==
"满勤天数"
?
days
:
t
.
Value
});
var
newAgains
=
agains
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Department
=
t
.
Department
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
TypeName
==
"满勤天数"
?
days
:
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
_againRepository
.
AddRange
(
newAgains
.
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