Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
8timerv2
8timerapiv200
Commits
7bfbbfe2
Commit
7bfbbfe2
authored
Jun 19, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
67523e39
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
2 deletions
+71
-2
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+34
-1
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+2
-0
src/main/java/cn/timer/api/dto/kqmk/CalendarTableDataDto.java
+28
-0
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+7
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
7bfbbfe2
...
...
@@ -87,6 +87,7 @@ import cn.timer.api.dao.kqmk.KqglAssoMonthPunchSummaryMapper;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRangeMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoTeshuMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoYhkqzMapper
;
...
...
@@ -103,6 +104,7 @@ import cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.CalendarDetailsDto
;
import
cn.timer.api.dto.kqmk.CalendarPunchDetailsDto
;
import
cn.timer.api.dto.kqmk.CalendarTableDataDto
;
import
cn.timer.api.dto.kqmk.ChangePunchResultsDto
;
import
cn.timer.api.dto.kqmk.CompensateDto
;
import
cn.timer.api.dto.kqmk.DailyDetailsDto
;
...
...
@@ -3005,17 +3007,48 @@ public class TimeCardController {
return
ResultUtil
.
data
(
ils
,
"操作成功!"
);
}
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
@GetMapping
(
value
=
"/worktable_attendance_from"
)
@ApiOperation
(
value
=
"999:工作台考勤表格"
,
httpMethod
=
"GET"
,
notes
=
"查询数据"
)
public
Result
<
Object
>
worktable_attendance_from
(
@CurrentUser
UserBean
userBean
)
throws
ParseException
{
CalendarTableDataDto
tabl
=
CalendarTableDataDto
.
builder
().
build
();
String
belongyear
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
());
String
belongmonth
=
new
SimpleDateFormat
(
"MM"
).
format
(
new
Date
());
String
ttstr
=
new
SimpleDateFormat
(
"yyyy-MM"
).
format
(
new
Date
()).
toString
();
//
//1:加班 2:请假 3:出差 4:外出 5:补卡
KqglAssoRelationSummary
sums
=
kqglassorelationsummarymapper
.
selectTabledata
(
userBean
.
getEmpNum
(),
1
,
ttstr
);
KqglAssoRelationSummary
qjj
=
kqglassorelationsummarymapper
.
selectTabledata
(
userBean
.
getEmpNum
(),
2
,
ttstr
);
KqglAssoRelationSummary
cxx
=
kqglassorelationsummarymapper
.
selectTabledata
(
userBean
.
getEmpNum
(),
3
,
ttstr
);
KqglAssoMonthPunchSummary
punsum
=
KqglAssoMonthPunchSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getNum
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
belongyear
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
belongmonth
));
Double
compensatoryleave
=
0
d
;
if
(
punsum
!=
null
)
{
compensatoryleave
=
punsum
.
getWorkingTurnCompenLeave
()
+
punsum
.
getRestTurnCompenLeave
()
+
punsum
.
getHolidayTurnCompenLeave
();
}
tabl
.
setAttendance
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getDaysOnDuty
()));
// 应出勤
tabl
.
setAttended
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getActualAttDays
()));
// 已出勤
tabl
.
setLeave
(
qjj
==
null
?
""
:
String
.
valueOf
(
qjj
.
getDuration
()));
// 请假
tabl
.
setLackworkcard
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberWorkCardShortage
()));
// 上班缺卡
tabl
.
setWorkovertime
(
sums
==
null
?
""
:
String
.
valueOf
(
sums
.
getDuration
()));
// 加班
tabl
.
setCompensatoryleave
(
String
.
valueOf
(
compensatoryleave
));
// 调休
tabl
.
setEvection
(
cxx
==
null
?
""
:
String
.
valueOf
(
cxx
.
getDuration
()));
// 出差
tabl
.
setOffdutycardshortage
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberDutyCardShortage
()));
// 下班缺卡
return
ResultUtil
.
data
(
punsum
,
"操作成功!"
);
return
ResultUtil
.
data
(
tabl
,
"操作成功!"
);
}
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
7bfbbfe2
...
...
@@ -21,4 +21,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
List
<
KqglAssoRelationSummary
>
SpecificLeave
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
}
src/main/java/cn/timer/api/dto/kqmk/CalendarTableDataDto.java
0 → 100644
View file @
7bfbbfe2
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CalendarTableDataDto
{
private
String
attendance
;
// 应出勤
private
String
attended
;
// 已出勤
private
String
leave
;
// 请假
private
String
lackworkcard
;
// 上班缺卡
private
String
workovertime
;
// 加班
private
String
compensatoryleave
;
// 调休
private
String
evection
;
// 出差
private
String
offdutycardshortage
;
// 下班缺卡
}
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
7bfbbfe2
...
...
@@ -64,7 +64,13 @@
GROUP BY res.start_time,res.end_time;
</select>
<select
id=
"selectTabledata"
resultMap=
"BaseResultMap"
>
select SUM(res.duration) as duration
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
...
...
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