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
d74bb436
Commit
d74bb436
authored
Dec 13, 2021
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情接口增加科室来源
parent
18253a0a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
20 deletions
+30
-20
performance/Performance.Api/Controllers/EmployeeController.cs
+2
-3
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
+1
-0
performance/Performance.DtoModels/Response/GatherResponse.cs
+1
-0
performance/Performance.Services/EmployeeService.cs
+26
-17
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
d74bb436
...
@@ -770,7 +770,6 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
...
@@ -770,7 +770,6 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
{
{
if
(
allotId
<=
0
)
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
relust
=
employeeService
.
GetGatherHands
(
allotId
,
request
);
var
relust
=
employeeService
.
GetGatherHands
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
}
...
@@ -783,12 +782,12 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
...
@@ -783,12 +782,12 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
/// <returns></returns>
/// <returns></returns>
[
Route
(
"savegatherhands/{allotId}"
)]
[
Route
(
"savegatherhands/{allotId}"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
SaveGatherHands
(
int
allotId
,
[
FromBody
]
SaveGatherData
request
)
public
ApiResponse
SaveGatherHands
(
[
FromRoute
]
int
allotId
,
[
FromBody
]
SaveGatherData
request
)
{
{
if
(
allotId
<=
0
)
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
if
(
string
.
IsNullOrEmpty
(
request
.
Source
)
||
string
.
IsNullOrEmpty
(
request
.
Category
))
if
(
string
.
IsNullOrEmpty
(
request
.
Source
)
||
string
.
IsNullOrEmpty
(
request
.
Category
))
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
Fail
);
employeeService
.
SaveGatherHands
(
allotId
,
request
);
employeeService
.
SaveGatherHands
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
...
...
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
View file @
d74bb436
...
@@ -94,6 +94,7 @@ public class ColumnHeadsConfig
...
@@ -94,6 +94,7 @@ public class ColumnHeadsConfig
{
{
public
static
List
<
Heads
>
GatherHeads
{
get
;
}
=
new
List
<
Heads
>
public
static
List
<
Heads
>
GatherHeads
{
get
;
}
=
new
List
<
Heads
>
{
{
new
Heads
{
Column
=
"来源"
,
Name
=
nameof
(
GatherInfoRequest
.
Source
)},
new
Heads
{
Column
=
"科室"
,
Name
=
nameof
(
GatherInfoRequest
.
Department
)},
new
Heads
{
Column
=
"科室"
,
Name
=
nameof
(
GatherInfoRequest
.
Department
)},
new
Heads
{
Column
=
"医生姓名"
,
Name
=
nameof
(
GatherInfoRequest
.
DoctorName
)},
new
Heads
{
Column
=
"医生姓名"
,
Name
=
nameof
(
GatherInfoRequest
.
DoctorName
)},
new
Heads
{
Column
=
"人员工号"
,
Name
=
nameof
(
GatherInfoRequest
.
PersonnelNumber
)},
new
Heads
{
Column
=
"人员工号"
,
Name
=
nameof
(
GatherInfoRequest
.
PersonnelNumber
)},
...
...
performance/Performance.DtoModels/Response/GatherResponse.cs
View file @
d74bb436
...
@@ -48,6 +48,7 @@ public class GatherTotalRequest
...
@@ -48,6 +48,7 @@ public class GatherTotalRequest
}
}
public
class
GatherInfoRequest
public
class
GatherInfoRequest
{
{
public
string
Source
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
...
...
performance/Performance.Services/EmployeeService.cs
View file @
d74bb436
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Linq.Expressions
;
using
System.Text.RegularExpressions
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -1165,8 +1166,8 @@ public List<GatherDropResponse> GetGatherDrop(int allotId)
...
@@ -1165,8 +1166,8 @@ public List<GatherDropResponse> GetGatherDrop(int allotId)
{
{
var
drop
=
new
GatherDropResponse
();
var
drop
=
new
GatherDropResponse
();
var
header
=
imHeaders
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
!
cellValue
.
Contains
(
t
.
CellValue
)).
Select
(
t
=>
t
.
CellValue
).
Distinct
();
var
header
=
imHeaders
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
!
cellValue
.
Contains
(
t
.
CellValue
)).
Select
(
t
=>
t
.
CellValue
).
Distinct
();
drop
.
Label
=
sheet
.
SheetName
.
Split
(
' '
)[
1
]
;
drop
.
Label
=
Regex
.
Replace
(
sheet
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
)
/*sheet.SheetName.Split(' ')[1]*/
;
drop
.
Value
=
sheet
.
SheetName
.
Split
(
' '
)[
1
]
;
drop
.
Value
=
Regex
.
Replace
(
sheet
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
)
/*sheet.SheetName.Split(' ')[1]*/
;
drop
.
Children
=
header
.
Select
(
t
=>
new
GatherDropResponse
()
{
Label
=
t
,
Value
=
t
}).
ToList
();
drop
.
Children
=
header
.
Select
(
t
=>
new
GatherDropResponse
()
{
Label
=
t
,
Value
=
t
}).
ToList
();
result
.
Add
(
drop
);
result
.
Add
(
drop
);
}
}
...
@@ -1182,6 +1183,7 @@ public HandsonTable GetGatherHands(int AllotId, GatherRequest request)
...
@@ -1182,6 +1183,7 @@ public HandsonTable GetGatherHands(int AllotId, GatherRequest request)
HeadName
=
t
.
Value
,
HeadName
=
t
.
Value
,
Visible
=
1
Visible
=
1
}).
ToList
());
}).
ToList
());
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
{
{
...
@@ -1196,8 +1198,12 @@ public HandsonTable GetGatherHands(int AllotId, GatherRequest request)
...
@@ -1196,8 +1198,12 @@ public HandsonTable GetGatherHands(int AllotId, GatherRequest request)
column
.
Type
=
"text"
;
column
.
Type
=
"text"
;
}
}
}
}
List
<
ex_result_gather
>
data
=
new
List
<
ex_result_gather
>();
var
data
=
exresultgatherRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
AllotId
&&
t
.
Source
.
Contains
(
request
.
Source
)
&&
t
.
Category
.
Contains
(
request
.
Category
));
if
(!
string
.
IsNullOrEmpty
(
request
.
Source
)
&&
!
string
.
IsNullOrEmpty
(
request
.
Category
))
{
data
=
exresultgatherRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
AllotId
&&
t
.
Source
.
Contains
(
request
.
Source
)
&&
t
.
Category
.
Contains
(
request
.
Category
));
}
if
(
data
==
null
)
if
(
data
==
null
)
return
result
;
return
result
;
...
@@ -1243,15 +1249,16 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
...
@@ -1243,15 +1249,16 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
public
GatherInfo
GetGather
(
int
allotId
,
string
department
,
string
source
,
PersonParamsRequest
request
)
public
GatherInfo
GetGather
(
int
allotId
,
string
department
,
string
source
,
PersonParamsRequest
request
)
{
{
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
department
)
&&
t
.
Source
.
Contains
(
source
)
&&
(
t
.
PersonnelNumber
!=
""
||
t
.
DoctorName
!=
""
)
;
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
department
)
&&
t
.
Source
.
Contains
(
source
);
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
exp
=
exp
.
And
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
department
)
&&
t
.
Source
.
Contains
(
source
)
&&
(
t
.
PersonnelNumber
!=
""
||
t
.
DoctorName
!=
""
)
&&
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
));
exp
=
exp
.
And
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
department
)
&&
t
.
Source
.
Contains
(
source
)
&&
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
));
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
Department
,
a
.
DoctorName
,
a
.
PersonnelNumber
}).
Select
(
t
=>
new
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
Source
,
a
.
Department
,
a
.
DoctorName
,
a
.
PersonnelNumber
}).
Select
(
t
=>
new
{
{
Source
=
t
.
Key
.
Source
,
Department
=
t
.
Key
.
Department
,
Department
=
t
.
Key
.
Department
,
DoctorName
=
t
.
Key
.
DoctorName
,
DoctorName
=
t
.
Key
.
DoctorName
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
...
@@ -1267,6 +1274,7 @@ public GatherInfo GetGather(int allotId,string department,string source, PersonP
...
@@ -1267,6 +1274,7 @@ public GatherInfo GetGather(int allotId,string department,string source, PersonP
{
{
GatherInfoRequest
gatherInfoRequest
=
new
GatherInfoRequest
()
GatherInfoRequest
gatherInfoRequest
=
new
GatherInfoRequest
()
{
{
Source
=
Regex
.
Replace
(
item
.
Source
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
),
Department
=
item
.
Department
,
Department
=
item
.
Department
,
DoctorName
=
item
.
DoctorName
,
DoctorName
=
item
.
DoctorName
,
PersonnelNumber
=
item
.
PersonnelNumber
,
PersonnelNumber
=
item
.
PersonnelNumber
,
...
@@ -1329,17 +1337,20 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
...
@@ -1329,17 +1337,20 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
TotalPages = data.TotalPages
TotalPages = data.TotalPages
};*/
};*/
#
endregion
#
endregion
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
DoctorName
!=
""
||
t
.
PersonnelNumber
!=
""
);
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
;
//var datas = exresultgatherRepository.GetEntities(t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != ""));
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
{
{
exp
=
exp
.
And
(
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
DoctorName
!=
""
||
t
.
PersonnelNumber
!=
""
)
&&
t
.
Department
.
Contains
(
request
.
SearchQuery
)
||
t
.
Source
.
Contains
(
request
.
SearchQuery
));
exp
=
exp
.
And
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
request
.
SearchQuery
)
||
t
.
Source
.
Contains
(
request
.
SearchQuery
));
//datas = exresultgatherRepository.GetEntities(t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != "") && t.Department.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
try
try
{
{
Convert
.
ToDecimal
(
request
.
SearchQuery
);
Convert
.
ToDecimal
(
request
.
SearchQuery
);
exp
=
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
DoctorName
!=
""
||
t
.
PersonnelNumber
!=
""
);
exp
=
t
=>
t
.
AllotId
==
allotId
;
//datas = exresultgatherRepository.GetEntities(t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != ""));
}
}
catch
catch
{
{
...
@@ -1347,15 +1358,13 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
...
@@ -1347,15 +1358,13 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
}
}
}
}
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
AllotId
,
a
.
Department
,
a
.
Source
}).
Select
(
t
=>
new
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
AllotId
,
a
.
Department
,
a
.
Source
}).
Select
(
t
=>
new
{
{
ID
=
t
.
Key
.
AllotId
,
ID
=
t
.
Key
.
AllotId
,
Department
=
t
.
Key
.
Department
,
Department
=
t
.
Key
.
Department
,
Source
=
t
.
Key
.
Source
.
Split
(
' '
)[
1
]
,
Source
=
t
.
Key
.
Source
,
Fee
=
t
.
Sum
(
a
=>
a
.
Fee
)
Fee
=
t
.
Sum
(
a
=>
a
.
Fee
)
});
});
...
@@ -1368,7 +1377,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
...
@@ -1368,7 +1377,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
{
{
ID
=
item
.
ID
,
ID
=
item
.
ID
,
Department
=
item
.
Department
,
Department
=
item
.
Department
,
Source
=
item
.
Source
,
Source
=
Regex
.
Replace
(
item
.
Source
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
)
/*item.Source.Split(' ')[1]*/
,
Fee
=
item
.
Fee
Fee
=
item
.
Fee
};
};
gatherTotalRequests
.
Add
(
gatherTotalRequest
);
gatherTotalRequests
.
Add
(
gatherTotalRequest
);
...
...
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