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
b3f25e0e
Commit
b3f25e0e
authored
Dec 02, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码格式化
parent
c6911236
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
65 deletions
+65
-65
performance/Performance.Services/ConfigService.cs
+65
-65
No files found.
performance/Performance.Services/ConfigService.cs
View file @
b3f25e0e
...
...
@@ -1096,112 +1096,112 @@ public void NewCopy(CopyRequest request)
logger
.
LogInformation
(
$"copy workItems"
);
var
workItems
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
//先判断是否为空,不为空删除再执行下面的代码
if
(
workItems
!=
null
)
if
(
workItems
!=
null
)
{
_workitemRepository
.
RemoveRange
(
workItems
.
ToArray
());
}
workItems
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
workItems
!=
null
&&
workItems
.
Any
())
{
var
newWorkItems
=
workItems
.
Select
(
t
=>
new
cof_workitem
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Item
=
t
.
Item
});
_workitemRepository
.
AddRange
(
newWorkItems
.
ToArray
());
}
}
workItems
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
workItems
!=
null
&&
workItems
.
Any
())
{
var
newWorkItems
=
workItems
.
Select
(
t
=>
new
cof_workitem
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Item
=
t
.
Item
});
_workitemRepository
.
AddRange
(
newWorkItems
.
ToArray
());
}
break
;
case
"drugTypes"
:
logger
.
LogInformation
(
$"copy drugTypes"
);
var
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
drugTypes
!=
null
)
if
(
drugTypes
!=
null
)
{
_drugtypeRepository
.
RemoveRange
(
drugTypes
.
ToArray
());
}
var
Types
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
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
});
_drugtypeRepository
.
AddRange
(
newDrugTypes
.
ToArray
());
}
var
Types
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
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
});
_drugtypeRepository
.
AddRange
(
newDrugTypes
.
ToArray
());
}
break
;
case
"drugTypeDisburses"
:
logger
.
LogInformation
(
$"copy drugTypeDisburses"
);
var
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
drugTypeDisburses
!=
null
)
if
(
drugTypeDisburses
!=
null
)
{
drugtypeDisburseRepository
.
RemoveRange
(
drugTypeDisburses
.
ToArray
());
}
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
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
});
drugtypeDisburseRepository
.
AddRange
(
newDrugTypeDisburses
.
ToArray
());
}
}
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
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
});
drugtypeDisburseRepository
.
AddRange
(
newDrugTypeDisburses
.
ToArray
());
}
break
;
case
"drugTypeFactors"
:
logger
.
LogInformation
(
$"copy drugTypeFactors"
);
var
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
drugTypeFactors
!=
null
)
if
(
drugTypeFactors
!=
null
)
{
cofdrugtypefactorRepository
.
RemoveRange
(
drugTypeFactors
.
ToArray
());
}
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
}
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
drugTypeFactors
!=
null
&&
drugTypeFactors
.
Any
())
{
var
newDrugtypeFactors
=
drugTypeFactors
.
Select
(
t
=>
new
cof_drugtype_factor
{
var
newDrugtypeFactors
=
drugTypeFactors
.
Select
(
t
=>
new
cof_drugtype_factor
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
ExModuleId
=
t
.
ExModuleId
,
Charge
=
t
.
Charge
,
YSZ
=
t
.
YSZ
,
HLZ
=
t
.
HLZ
,
YJZ
=
t
.
YJZ
});
cofdrugtypefactorRepository
.
AddRange
(
newDrugtypeFactors
.
ToArray
());
}
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
ExModuleId
=
t
.
ExModuleId
,
Charge
=
t
.
Charge
,
YSZ
=
t
.
YSZ
,
HLZ
=
t
.
HLZ
,
YJZ
=
t
.
YJZ
});
cofdrugtypefactorRepository
.
AddRange
(
newDrugtypeFactors
.
ToArray
());
}
break
;
case
"deptTypes"
:
logger
.
LogInformation
(
$"copy deptTypes"
);
var
deptTypes
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
deptTypes
!=
null
)
if
(
deptTypes
!=
null
)
{
perforCofdepttypeRepository
.
RemoveRange
(
deptTypes
.
ToArray
());
}
deptTypes
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
deptTypes
!=
null
&&
deptTypes
.
Any
())
{
var
newDeptTypes
=
deptTypes
.
Select
(
t
=>
new
cof_depttype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
perforCofdepttypeRepository
.
AddRange
(
newDeptTypes
.
ToArray
());
}
}
deptTypes
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
deptTypes
!=
null
&&
deptTypes
.
Any
())
{
var
newDeptTypes
=
deptTypes
.
Select
(
t
=>
new
cof_depttype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
perforCofdepttypeRepository
.
AddRange
(
newDeptTypes
.
ToArray
());
}
break
;
case
"agains"
:
logger
.
LogInformation
(
$"copy agains"
);
var
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
agains
!=
null
)
if
(
agains
!=
null
)
{
_againRepository
.
RemoveRange
(
agains
.
ToArray
());
}
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
agains
!=
null
&&
agains
.
Any
())
{
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
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
agains
!=
null
&&
agains
.
Any
())
{
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
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
break
;
case
"accountings"
:
logger
.
LogInformation
(
$"copy accountings"
);
var
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
accountings
!=
null
)
if
(
accountings
!=
null
)
{
cofaccountingRepository
.
RemoveRange
(
accountings
.
ToArray
());
}
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
accountings
!=
null
&&
accountings
.
Any
())
{
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
});
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
}
}
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
accountings
!=
null
&&
accountings
.
Any
())
{
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
});
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
}
break
;
default
:
break
;
...
...
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