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
f6b15eac
Commit
f6b15eac
authored
Aug 30, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成错误
parent
7df0eac0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
69 deletions
+63
-69
performance/Performance.Repository/PerforPerapramountRepository.cs
+63
-69
No files found.
performance/Performance.Repository/PerforPerapramountRepository.cs
View file @
f6b15eac
...
...
@@ -17,82 +17,76 @@ namespace Performance.Repository
/// </summary>
public
partial
class
PerforPerapramountRepository
:
PerforRepository
<
per_apr_amount
>
{
//public List<view_per_apr_amount> GetFullAmount(Expression<Func<per_apr_amount, bool>> predicate)
//{
// var amounts = GetEntities(predicate);
// if (amounts == null || !amounts.Any())
// return new List<view_per_apr_amount>();
/// <summary>
/// per_apr_amount Repository
/// </summary>
public
partial
class
PerforPerapramountRepository
:
PerforRepository
<
per_apr_amount
>
{
//public List<view_per_apr_amount> GetFullAmount(Expression<Func<per_apr_amount, bool>> predicate)
//{
// var amounts = GetEntities(predicate);
// if (amounts == null || !amounts.Any())
// return new List<view_per_apr_amount>();
// var ids = amounts.Select(w => w.AllotId).Distinct().ToList();
// var employees = this.context.Set<per_employee>()
// .Where(w => w.AllotId.HasValue && ids.Contains(w.AllotId.Value))
// .Select(w => new
// {
// UnitType = w.UnitType,
// AccountingUnit = w.AccountingUnit,
// AllotId = w.AllotId,
// PersonnelNumber = w.PersonnelNumber,
// DoctorName = w.DoctorName,
// });
// var ids = amounts.Select(w => w.AllotId).Distinct().ToList();
// var res = from outer in amounts
// join inner in employees
// on new { outer.AllotId, outer.PersonnelNumber } equals new { AllotId = inner.AllotId ?? 0, inner.PersonnelNumber } into temp
// from tt in temp.DefaultIfEmpty()
// select new view_per_apr_amount
// {
// Id = outer.Id,
// AllotId = outer.AllotId,
// PersonnelNumber = outer.PersonnelNumber,
// PerforType = outer.PerforType,
// Amount = outer.Amount,
// DoctorName = tt?.DoctorName ?? "",
// AccountingUnit = tt?.AccountingUnit ?? "",
// UnitType = tt?.UnitType ?? "",
// TypeInDepartment = outer.TypeInDepartment,
// Status = outer.Status,
// AuditTime = outer.AuditTime,
// AuditUser = outer.AuditUser,
// CreateDate = outer.CreateDate,
// CreateUser = outer.CreateUser,
// Remark = outer.Remark,
// IsVerify = outer.IsVerify,
// VerifyMessage = outer.VerifyMessage,
// };
// return res.ToList() ?? new List<view_per_apr_amount>();
//}
// var employees = this.context.Set<per_employee>()
// .Where(w => w.AllotId.HasValue && ids.Contains(w.AllotId.Value))
// .Select(w => new
// {
// UnitType = w.UnitType,
// AccountingUnit = w.AccountingUnit,
// AllotId = w.AllotId,
// PersonnelNumber = w.PersonnelNumber,
// DoctorName = w.DoctorName,
// });
// var res = from outer in amounts
// join inner in employees
// on new { outer.AllotId, outer.PersonnelNumber } equals new { AllotId = inner.AllotId ?? 0, inner.PersonnelNumber } into temp
// from tt in temp.DefaultIfEmpty()
// select new view_per_apr_amount
// {
// Id = outer.Id,
// AllotId = outer.AllotId,
// PersonnelNumber = outer.PersonnelNumber,
// PerforType = outer.PerforType,
// Amount = outer.Amount,
// DoctorName = tt?.DoctorName ?? "",
// AccountingUnit = tt?.AccountingUnit ?? "",
// UnitType = tt?.UnitType ?? "",
// TypeInDepartment = outer.TypeInDepartment,
// Status = outer.Status,
// AuditTime = outer.AuditTime,
// AuditUser = outer.AuditUser,
// CreateDate = outer.CreateDate,
// CreateUser = outer.CreateUser,
// Remark = outer.Remark,
// IsVerify = outer.IsVerify,
// VerifyMessage = outer.VerifyMessage,
// };
// return res.ToList() ?? new List<view_per_apr_amount>();
//}
public
List
<
view_per_apr_amount
>
GetFullAmount
(
int
?
allotId
,
int
?
status
,
string
typeInDepartment
=
""
)
{
string
sql
=
"select * from view_per_apr_amount where ifnull(amount,0)<>0 "
;
DynamicParameters
parameters
=
new
DynamicParameters
();
public
List
<
view_per_apr_amount
>
GetFullAmount
(
int
?
allotId
,
int
?
status
,
string
typeInDepartment
=
""
)
{
string
sql
=
"select * from view_per_apr_amount where ifnull(amount,0)<>0 "
;
if
(
allotId
.
HasValue
&&
allotId
>
0
)
{
sql
+=
" and allotId = @allotId"
;
parameters
.
Add
(
"allotId"
,
allotId
);
}
if
(
status
.
HasValue
&&
status
>
0
)
{
sql
+=
" and status = @status"
;
parameters
.
Add
(
name
:
"status"
,
status
);
}
if
(!
string
.
IsNullOrEmpty
(
typeInDepartment
))
{
sql
+=
" and typeInDepartment = @typeInDepartment"
;
parameters
.
Add
(
name
:
"typeInDepartment"
,
typeInDepartment
);
}
DynamicParameters
parameters
=
new
DynamicParameters
();
return
DapperQuery
<
view_per_apr_amount
>(
sql
,
parameters
).
ToList
();
if
(
allotId
.
HasValue
&&
allotId
>
0
)
{
sql
+=
" and allotId = @allotId"
;
parameters
.
Add
(
"allotId"
,
allotId
);
}
if
(
status
.
HasValue
&&
status
>
0
)
{
sql
+=
" and status = @status"
;
parameters
.
Add
(
name
:
"status"
,
status
);
}
if
(!
string
.
IsNullOrEmpty
(
typeInDepartment
))
{
sql
+=
" and typeInDepartment = @typeInDepartment"
;
parameters
.
Add
(
name
:
"typeInDepartment"
,
typeInDepartment
);
}
return
DapperQuery
<
view_per_apr_amount
>(
sql
,
parameters
).
ToList
();
}
}
}
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