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
42cc5fc5
Commit
42cc5fc5
authored
Apr 21, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤上报结果动态计算
parent
0e7acd0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
8 deletions
+58
-8
performance/Performance.Api/Controllers/AttendanceController.cs
+54
-4
performance/Performance.Api/wwwroot/Performance.Api.xml
+3
-3
performance/Performance.Services/AttendanceService.cs
+1
-1
No files found.
performance/Performance.Api/Controllers/AttendanceController.cs
View file @
42cc5fc5
...
...
@@ -15,6 +15,7 @@
using
static
Performance
.
Services
.
ExtractExcelService
.
WriteDataHelper
;
using
System.Linq
;
using
Performance.Infrastructure
;
using
System.ComponentModel
;
namespace
Performance.Api.Controllers
{
...
...
@@ -662,17 +663,66 @@ public ApiResponse DeptSave(int allotId, string unitType, [FromBody] List<Attend
/// <param name="unitType">核算组别</param>
/// <param name="accountingUnit">核算单元</param>
/// <param name="searchTxet">工号/姓名</param>
/// <param name="datas"></param>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"dept/compute"
)]
public
ApiResponse
<
List
<
AttendanceStatistics
>>
DeptCompute
(
int
allotId
,
string
unitType
,
string
accountingUnit
,
string
searchTxet
)
public
ApiResponse
<
List
<
AttendanceStatistics
>>
DeptCompute
(
int
allotId
,
string
unitType
,
string
accountingUnit
,
string
searchTxet
,
[
FromBody
]
List
<
AttendanceDept
>
datas
)
{
if
(!
Enum
.
TryParse
(
unitType
,
out
UnitType
unitType1
))
throw
new
PerformanceException
(
"核算组别错误"
);
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
throw
new
PerformanceException
(
"核算单元错误"
);
var
deptDetail
=
_attendanceService
.
DeptDetail
(
allotId
,
unitType
,
accountingUnit
,
searchTxet
)?.
Data
?.
Data
??
new
List
<
AttendanceDeptMore
>();
List
<
AttendanceDeptMore
>
deptDetail
=
new
List
<
AttendanceDeptMore
>();
if
(
datas
?.
Any
()
!=
true
)
{
deptDetail
=
_attendanceService
.
DeptDetail
(
allotId
,
unitType
,
accountingUnit
,
searchTxet
)?.
Data
?.
Data
??
new
List
<
AttendanceDeptMore
>();
}
else
{
deptDetail
=
datas
.
Select
(
w
=>
new
AttendanceDeptMore
{
AllotId
=
allotId
,
Code
=
""
,
UnitType
=
unitType
,
AccountingUnit
=
accountingUnit
,
PersonnelNumber
=
w
.
PersonnelNumber
,
PersonnelName
=
w
.
PersonnelName
,
PermanentStaff
=
w
.
PermanentStaff
,
AuditTime
=
DateTime
.
Now
,
AuditUser
=
""
,
Day01
=
w
.
Day01
,
Day02
=
w
.
Day02
,
Day03
=
w
.
Day03
,
Day04
=
w
.
Day04
,
Day05
=
w
.
Day05
,
Day06
=
w
.
Day06
,
Day07
=
w
.
Day07
,
Day08
=
w
.
Day08
,
Day09
=
w
.
Day09
,
Day10
=
w
.
Day10
,
Day11
=
w
.
Day11
,
Day12
=
w
.
Day12
,
Day13
=
w
.
Day13
,
Day14
=
w
.
Day14
,
Day15
=
w
.
Day15
,
Day16
=
w
.
Day16
,
Day17
=
w
.
Day17
,
Day18
=
w
.
Day18
,
Day19
=
w
.
Day19
,
Day20
=
w
.
Day20
,
Day21
=
w
.
Day21
,
Day22
=
w
.
Day22
,
Day23
=
w
.
Day23
,
Day24
=
w
.
Day24
,
Day25
=
w
.
Day25
,
Day26
=
w
.
Day26
,
Day27
=
w
.
Day27
,
Day28
=
w
.
Day28
,
Day29
=
w
.
Day29
,
Day30
=
w
.
Day30
,
Day31
=
w
.
Day31
,
}).
ToList
();
}
return
_attendanceService
.
DeptCompute
(
allotId
,
deptDetail
);
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
42cc5fc5
...
...
@@ -544,7 +544,7 @@
<param
name=
"datas"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptCompute(System.Int32,System.String,System.String,System.String)"
>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptCompute(System.Int32,System.String,System.String,System.String
,System.Collections.Generic.List{Performance.DtoModels.Request.AttendanceDept}
)"
>
<summary>
科室考勤上报录入结果统计
</summary>
...
...
@@ -552,6 +552,7 @@
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"accountingUnit"
>
核算单元
</param>
<param
name=
"searchTxet"
>
工号/姓名
</param>
<param
name=
"datas"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DownloadDeptCompute(System.Int32,System.String,System.String,System.String)"
>
...
...
@@ -601,7 +602,7 @@
<param
name=
"searchTxet"
>
工号/姓名
</param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptDetailDownload(System.Int32,System.String,System.String,System.String
,System.String
)"
>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptDetailDownload(System.Int32,System.String,System.String,System.String)"
>
<summary>
科室考勤上报结果详情下载
</summary>
...
...
@@ -609,7 +610,6 @@
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"accountingUnit"
>
核算单元
</param>
<param
name=
"searchTxet"
>
工号/姓名
</param>
<param
name=
"fileName"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptReport(System.Int32,System.String,System.String,System.String)"
>
...
...
performance/Performance.Services/AttendanceService.cs
View file @
42cc5fc5
...
...
@@ -1319,7 +1319,7 @@ public ApiResponse ChooseStatistics(AttendanceIssueChoose attendanceIssueChoose,
public
ApiResponse
<
List
<
AttendanceDeptAuditList
>>
DeptAuditList
(
int
allotId
,
string
unitType
,
string
accountingUnit
,
int
?
state
=
-
1
)
{
var
attendanceDepts
=
_attendanceDeptRepository
.
GetEntities
((
w
)
=>
w
.
AllotId
==
allotId
);
var
stateOrders
=
new
int
[]
{
(
int
)
Attendance
.
Report
.
未提交
,
(
int
)
Attendance
.
Report
.
提交
,
(
int
)
Attendance
.
Report
.
驳回
,
(
int
)
Attendance
.
Report
.
通过
};
var
stateOrders
=
new
int
[]
{
(
int
)
Attendance
.
Report
.
提交
,
(
int
)
Attendance
.
Report
.
驳回
,
(
int
)
Attendance
.
Report
.
通过
,
(
int
)
Attendance
.
Report
.
未提交
};
var
items
=
attendanceDepts
.
GroupBy
(
w
=>
new
{
w
.
Code
,
w
.
UnitType
,
w
.
AccountingUnit
})
.
Select
(
w
=>
new
AttendanceDeptAuditList
{
...
...
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