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
c20a181b
Commit
c20a181b
authored
Dec 02, 2021
by
纪旭 韦
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 手工录入_
parents
4029533d
06e22d87
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
18 deletions
+48
-18
performance/Performance.Api/Controllers/ConfigController.cs
+1
-1
performance/Performance.Api/Properties/PublishProfiles/FolderProfile1.pubxml
+17
-0
performance/Performance.Services/ConfigService.cs
+24
-14
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+3
-2
performance/Performance.Services/PersonService.cs
+3
-1
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
c20a181b
...
...
@@ -846,7 +846,7 @@ public ApiResponse CopyDropDown()
new
CopyDrop
{
Label
=
"收入费用类别"
,
Value
=
"drugTypes"
},
new
CopyDrop
{
Label
=
"支出费用类别"
,
Value
=
"drugTypeDisburses"
},
new
CopyDrop
{
Label
=
"费用类别系数"
,
Value
=
"drugTypeFactors"
},
new
CopyDrop
{
Label
=
"科室类型"
,
Value
=
"deptTypes"
},
/* new CopyDrop{Label="科室类型",Value="deptTypes"},*/
new
CopyDrop
{
Label
=
"二次绩效配置"
,
Value
=
"agains"
},
new
CopyDrop
{
Label
=
"核算单元及组别"
,
Value
=
"accountings"
},
};
;
...
...
performance/Performance.Api/Properties/PublishProfiles/FolderProfile1.pubxml
0 → 100644
View file @
c20a181b
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>False</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\publish</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
</PropertyGroup>
</Project>
\ No newline at end of file
performance/Performance.Services/ConfigService.cs
View file @
c20a181b
...
...
@@ -1091,47 +1091,55 @@ public void NewCopy(CopyRequest request)
case
"workItems"
:
logger
.
LogInformation
(
$"copy workItems"
);
var
workItems
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
workItems
==
null
||
!
workItems
.
Any
())
//先判断是否为空,不为空删除再执行下面的代码
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
());
}
}
break
;
case
"drugTypes"
:
logger
.
LogInformation
(
$"copy drugTypes"
);
var
drugTypes
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
drugTypes
==
null
||
!
drugTypes
.
Any
()
)
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
());
}
}
break
;
case
"drugTypeDisburses"
:
logger
.
LogInformation
(
$"copy drugTypeDisburses"
);
var
drugTypeDisburses
=
drugtypeDisburseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
drugTypeDisburses
==
null
||
!
drugTypeDisburses
.
Any
()
)
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
());
}
}
break
;
case
"drugTypeFactors"
:
logger
.
LogInformation
(
$"copy drugTypeFactors"
);
var
drugTypeFactors
=
cofdrugtypefactorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
drugTypeFactors
==
null
||
!
drugTypeFactors
.
Any
()
)
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
())
{
...
...
@@ -1147,26 +1155,28 @@ public void NewCopy(CopyRequest request)
});
cofdrugtypefactorRepository
.
AddRange
(
newDrugtypeFactors
.
ToArray
());
}
}
break
;
case
"deptTypes"
:
logger
.
LogInformation
(
$"copy deptTypes"
);
var
deptTypes
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
deptTypes
==
null
||
!
deptTypes
.
Any
()
)
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
());
}
}
break
;
case
"agains"
:
logger
.
LogInformation
(
$"copy agains"
);
var
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
agains
==
null
||
!
agains
.
Any
()
)
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
())
{
...
...
@@ -1174,20 +1184,20 @@ public void NewCopy(CopyRequest request)
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
||
!
accountings
.
Any
()
)
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
());
}
}
break
;
default
:
break
;
...
...
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
c20a181b
...
...
@@ -134,7 +134,7 @@ private void Employee(per_allot allot, List<sys_hospitalconfig> configs, IEnumer
{
data
=
data
.
GroupJoin
(
hrpDepartments
,
outer
=>
new
{
department
=
outer
.
Department
},
inner
=>
new
{
department
=
inner
.
HRPDepartment
},
(
outer
,
inner
)
=>
new
{
outer
,
inner
}).
Select
(
t
=>
{
t
.
outer
.
AccountingUnit
=
t
.
inner
?.
FirstOrDefault
()?.
AccountingUnit
;
t
.
outer
.
AccountingUnit
=
t
.
inner
?.
FirstOrDefault
()?.
AccountingUnit
??
t
.
outer
.
AccountingUnit
;
return
t
.
outer
;
}).
ToList
();
}
...
...
@@ -191,7 +191,8 @@ private void JudgeDataEqual(List<string> columns, List<per_employee> emps, List<
{
nameof
(
per_employee
.
BankCard
),
(
t
)
=>
t
.
BankCard
},
};
if
(
columns
.
Contains
(
nameof
(
per_employee
.
PersonnelNumber
)))
columns
.
Remove
(
nameof
(
per_employee
.
PersonnelNumber
));
if
(
columns
.
Contains
(
nameof
(
per_employee
.
PersonnelNumber
).
ToLower
()))
columns
.
Remove
(
nameof
(
per_employee
.
PersonnelNumber
).
ToLower
());
if
(!
columns
.
Contains
(
nameof
(
per_employee
.
AccountingUnit
).
ToLower
()))
columns
.
Add
(
nameof
(
per_employee
.
AccountingUnit
).
ToLower
());
List
<
per_employee
>
updateData
=
new
List
<
per_employee
>();
foreach
(
var
emp
in
emps
)
...
...
performance/Performance.Services/PersonService.cs
View file @
c20a181b
...
...
@@ -89,7 +89,9 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效信息错误!"
);
var
isExist
=
(
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
allotId
)?.
Count
??
0
)
>
0
;
if
(
isExist
)
return
;
//如果为空则先删除在执行下面的代码
if
(
isExist
)
{
peremployeeRepository
.
DeleteFromQuery
(
u
=>
u
.
HospitalId
==
hospitalId
&&
u
.
AllotId
==
allotId
);}
List
<
per_employee
>
persons
=
new
List
<
per_employee
>();
if
(!
new
int
[]
{
-
1
,
0
}.
Contains
(
prevAllotId
))
...
...
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