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
c34a9b52
Commit
c34a9b52
authored
Mar 08, 2024
by
gzq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
护理部审核列表更新(查视图)
parent
d80ba249
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
performance/Performance.Services/DapperService.cs
+27
-0
performance/Performance.Services/SecondAllotService.cs
+6
-4
No files found.
performance/Performance.Services/DapperService.cs
View file @
c34a9b52
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Dapper
;
using
Dapper
;
using
Google.Protobuf.WellKnownTypes
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Microsoft.Extensions.Options
;
using
MySql.Data.MySqlClient
;
using
MySql.Data.MySqlClient
;
...
@@ -563,6 +564,32 @@ public IEnumerable<dynamic> QueryAttendanceDeptReportCompute(int allotId, string
...
@@ -563,6 +564,32 @@ public IEnumerable<dynamic> QueryAttendanceDeptReportCompute(int allotId, string
}
}
}
}
public
List
<
ag_secondallot
>
QueryNursingSecond
(
int
allotId
)
{
try
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select * from view_second_nursing where AllotID = @allotId"
;
DynamicParameters
parameters
=
new
DynamicParameters
();
parameters
.
Add
(
"@allotId"
,
allotId
);
var
result
=
connection
.
Query
<
ag_secondallot
>(
sql
,
parameters
,
commandTimeout
:
60
*
60
);
var
enums
=
UnitTypeUtil
.
GetUnitTypeFromEnum
();
return
result
.
Where
(
w
=>
w
.
RealGiveFee
.
HasValue
&&
w
.
RealGiveFee
!=
0
)
.
OrderBy
(
t
=>
t
.
Status
==
4
?
2
:
t
.
Status
)
.
ThenBy
(
t
=>
enums
.
FirstOrDefault
(
f
=>
f
.
Name
==
t
.
UnitType
)?.
Value
)
.
ThenBy
(
t
=>
t
.
Department
)
.
ToList
();
}
}
catch
(
Exception
ex
)
{
_logger
.
LogError
(
$"SQL执行异常:
{
ex
}
"
);
throw
;
}
}
}
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
c34a9b52
...
@@ -1675,10 +1675,12 @@ public List<ag_secondallot> NursingDeptlist(int allotId)
...
@@ -1675,10 +1675,12 @@ public List<ag_secondallot> NursingDeptlist(int allotId)
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
if
(
allot
==
null
)
if
(
allot
==
null
)
throw
new
PerformanceException
(
"所选绩效不存在!"
);
throw
new
PerformanceException
(
"所选绩效不存在!"
);
var
types
=
new
int
[]
{
(
int
)
UnitType
.
其他护理组
,
(
int
)
UnitType
.
护理组
};
//var types = new int[] { (int)UnitType.其他护理组, (int)UnitType.护理组 };
var
accountUnit
=
resaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
types
.
Contains
(
t
.
UnitType
.
Value
));
//var accountUnit = resaccountRepository.GetEntities(t => t.AllotID == allotId && types.Contains(t.UnitType.Value));
var
specialunit
=
resspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
//var specialunit = resspecialunitRepository.GetEntities(t => t.AllotID == allot.ID);
return
SecondList
(
allot
,
accountUnit
,
specialunit
);
//return SecondList(allot, accountUnit, specialunit);
return
_service
.
QueryNursingSecond
(
allot
.
ID
);
}
}
/// <summary>
/// <summary>
...
...
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