Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
basisProjectPlatform
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yiyuan_database
basisProjectPlatform
Commits
d6a7546a
Commit
d6a7546a
authored
Jun 04, 2026
by
PC-20251223ZVQQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实际工作天数计算
parent
80bbcc19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
workhour.controller.ts
backend/src/controllers/workhour.controller.ts
+2
-8
No files found.
backend/src/controllers/workhour.controller.ts
View file @
d6a7546a
...
@@ -217,13 +217,6 @@ export const exportWorkhours = async (req: AuthRequest, res: Response): Promise<
...
@@ -217,13 +217,6 @@ export const exportWorkhours = async (req: AuthRequest, res: Response): Promise<
p.id as project_id, p.project_name, p.project_no,
p.id as project_id, p.project_name, p.project_no,
pm.name as manager_name,
pm.name as manager_name,
o.id as overtime_id, o.hours as overtime_hours, o.description as overtime_description,
o.id as overtime_id, o.hours as overtime_hours, o.description as overtime_description,
(SELECT COUNT(DISTINCT wh2.work_date)
FROM workhours wh2
WHERE wh2.employee_id = w.employee_id
AND wh2.project_id = w.project_id
${
start_date
?
' AND wh2.work_date >= ?'
:
''
}
${
end_date
?
' AND wh2.work_date <= ?'
:
''
}
) as work_day_count,
(SELECT ol.operator_name
(SELECT ol.operator_name
FROM operation_logs ol
FROM operation_logs ol
WHERE ol.module = '加班管理'
WHERE ol.module = '加班管理'
...
@@ -272,7 +265,8 @@ export const exportWorkhours = async (req: AuthRequest, res: Response): Promise<
...
@@ -272,7 +265,8 @@ export const exportWorkhours = async (req: AuthRequest, res: Response): Promise<
''
,
// 审核人2(暂留空)
''
,
// 审核人2(暂留空)
row
.
hours
!=
null
?
Number
(
row
.
hours
)
:
''
,
// 实际工作量
row
.
hours
!=
null
?
Number
(
row
.
hours
)
:
''
,
// 实际工作量
row
.
overtime_hours
!=
null
?
Number
(
row
.
overtime_hours
)
:
''
,
// 实际加班
row
.
overtime_hours
!=
null
?
Number
(
row
.
overtime_hours
)
:
''
,
// 实际加班
row
.
work_day_count
||
''
,
// 实际工作天数
// 实际工作天数 = 实际工作量/8 + 实际加班/8
((
row
.
hours
!=
null
?
Number
(
row
.
hours
)
:
0
)
+
(
row
.
overtime_hours
!=
null
?
Number
(
row
.
overtime_hours
)
:
0
))
/
8
,
]);
]);
}
}
...
...
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