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
cdb40172
Commit
cdb40172
authored
Jan 14, 2020
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效更改、orcale修改
parent
05853650
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
performance/Performance.EntityModels/Entity/sys_hospitalconfig.cs
+13
-8
performance/Performance.Repository/Common/DatabaseType.cs
+3
-3
performance/Performance.Services/SecondAllotService.cs
+11
-9
No files found.
performance/Performance.EntityModels/Entity/sys_hospitalconfig.cs
View file @
cdb40172
...
@@ -13,42 +13,47 @@ namespace Performance.EntityModels
...
@@ -13,42 +13,47 @@ namespace Performance.EntityModels
///
///
/// </summary>
/// </summary>
[
Table
(
"sys_hospitalconfig"
)]
[
Table
(
"sys_hospitalconfig"
)]
public
class
sys_hospitalconfig
public
class
sys_hospitalconfig
{
{
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
[
Key
]
[
Key
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
DbSource
{
get
;
set
;
}
public
string
DbSource
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
DbName
{
get
;
set
;
}
public
string
DbName
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
DbUser
{
get
;
set
;
}
public
string
DbUser
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
DbPassword
{
get
;
set
;
}
public
string
DbPassword
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 1 标准库 2 绩效库
/// 1 标准库 2 绩效库
/// </summary>
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 1、Sql Server 2、Orcale
/// </summary>
public
int
DataBaseType
{
get
;
set
;}
}
}
}
}
performance/Performance.Repository/Common/DatabaseType.cs
View file @
cdb40172
...
@@ -6,8 +6,8 @@ namespace Performance.Repository
...
@@ -6,8 +6,8 @@ namespace Performance.Repository
{
{
public
enum
DatabaseType
public
enum
DatabaseType
{
{
MySql
,
MySql
=
0
,
SqlServer
,
SqlServer
=
1
,
Oracle
Oracle
=
2
}
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
cdb40172
...
@@ -136,17 +136,19 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -136,17 +136,19 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
usetemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
var
usetemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
if
(
usetemp
==
null
)
if
(
usetemp
==
null
)
throw
new
PerformanceException
(
"当前科室暂未配置绩效模板"
);
throw
new
PerformanceException
(
"当前科室暂未配置绩效模板"
);
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
//获取固定模板列 + 工作量列
//获取固定模板列 + 工作量列
var
headItems
=
GetHeadItems
(
usetemp
.
UseTempId
.
Value
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
headItems
=
GetHeadItems
(
usetemp
.
UseTempId
.
Value
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
//获取已录入数据
//获取已录入数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
if
(
request
.
IsArchive
==
1
)
//归档
if
(
request
.
IsArchive
==
1
||
new
List
<
int
>
{
2
,
3
}.
Contains
(
second
.
Status
??
1
))
//归档 等待审核、审核通过
{
{
#
region
已归档数据,根据数据获取
列
#
region
已归档数据,根据数据获取
列
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
throw
new
PerformanceException
(
"
绩效归档时,尚
未添加数据。"
);
throw
new
PerformanceException
(
"
提交时
未添加数据。"
);
else
else
{
{
var
existHead
=
fixatList
.
Select
(
t
=>
new
{
FiledName
=
t
.
ItemName
,
Sort
=
t
.
Sort
.
Value
,
SourceType
=
t
.
SourceType
.
Value
,
Type
=
t
.
Type
.
Value
,
FactorValue
=
t
.
FactorValue
.
Value
}).
Distinct
().
ToList
();
var
existHead
=
fixatList
.
Select
(
t
=>
new
{
FiledName
=
t
.
ItemName
,
Sort
=
t
.
Sort
.
Value
,
SourceType
=
t
.
SourceType
.
Value
,
Type
=
t
.
Type
.
Value
,
FactorValue
=
t
.
FactorValue
.
Value
}).
Distinct
().
ToList
();
...
@@ -154,11 +156,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -154,11 +156,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
{
{
FiledId
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
FiledName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
??
"无FiledId"
,
FiledId
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
FiledName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
??
"无FiledId"
,
FiledName
=
t
.
FiledName
,
FiledName
=
t
.
FiledName
,
Sort
=
t
.
Sort
,
Sort
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
FiledName
&&
h
.
Type
==
t
.
Type
)?.
Sort
??
0
,
SourceType
=
t
.
SourceType
,
SourceType
=
t
.
SourceType
,
Type
=
t
.
Type
,
Type
=
t
.
Type
,
FactorValue
=
t
.
FactorValue
FactorValue
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
FiledName
&&
h
.
Type
==
t
.
Type
)?.
FactorValue
??
0
}).
Where
(
t
=>
t
.
FiledId
!=
"无FiledId"
).
ToList
();
}).
ToList
();
result
.
HeadItems
=
headItems
;
result
.
HeadItems
=
headItems
;
}
}
#
endregion
#
endregion
...
@@ -200,7 +202,6 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -200,7 +202,6 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
}
}
if
(
fixatList
==
null
||
(
fixatList
!=
null
&&
fixatList
.
Where
(
t
=>
t
.
RowNumber
==
-
1
).
Count
()
==
0
))
if
(
fixatList
==
null
||
(
fixatList
!=
null
&&
fixatList
.
Where
(
t
=>
t
.
RowNumber
==
-
1
).
Count
()
==
0
))
{
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
#
region
补充顶部数据
#
region
补充顶部数据
...
@@ -353,10 +354,11 @@ public bool UseTemp(UseTempRequest request)
...
@@ -353,10 +354,11 @@ public bool UseTemp(UseTempRequest request)
var
addList
=
new
List
<
ag_fixatitem
>();
var
addList
=
new
List
<
ag_fixatitem
>();
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
secondList
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)));
var
secondList
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
t
.
Status
??
1
)
));
secondList
?.
ForEach
(
t
=>
t
.
IsArchive
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
).
States
==
8
?
1
:
0
);
secondList
?.
ForEach
(
t
=>
t
.
IsArchive
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
).
States
==
8
?
1
:
0
);
var
secondId
=
secondList
.
Where
(
s
=>
s
.
IsArchive
==
0
)?.
Select
(
s
=>
s
.
Id
);
//获取未归档的二次绩效
//获取未归档 未提交 驳回 的二次绩效
var
secondId
=
secondList
.
Where
(
s
=>
s
.
IsArchive
==
0
)?.
Select
(
s
=>
s
.
Id
);
if
(
secondId
==
null
||
secondId
.
Count
()
<=
0
)
if
(
secondId
==
null
||
secondId
.
Count
()
<=
0
)
return
result
;
return
result
;
...
@@ -367,7 +369,7 @@ public bool UseTemp(UseTempRequest request)
...
@@ -367,7 +369,7 @@ public bool UseTemp(UseTempRequest request)
{
{
foreach
(
var
head
in
headItems
)
foreach
(
var
head
in
headItems
)
{
{
if
(
second
.
IsArchive
==
0
)
if
(
second
.
IsArchive
==
0
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
second
.
Status
??
1
)
)
{
{
var
exist
=
fixatList
?.
Where
(
t
=>
t
.
ItemName
==
head
.
FiledName
&&
t
.
Type
==
head
.
Type
&&
t
.
SecondId
==
second
.
Id
);
var
exist
=
fixatList
?.
Where
(
t
=>
t
.
ItemName
==
head
.
FiledName
&&
t
.
Type
==
head
.
Type
&&
t
.
SecondId
==
second
.
Id
);
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
...
...
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