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
214aab91
Commit
214aab91
authored
Jun 10, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复考勤BUG
parent
e38a8e2b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
9 deletions
+28
-9
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+11
-3
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+11
-3
src/main/java/cn/timer/api/dto/kqmk/DailyDetailsDto.java
+1
-0
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+5
-3
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
214aab91
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
214aab91
...
@@ -28,9 +28,15 @@ public class ClockInTool {
...
@@ -28,9 +28,15 @@ public class ClockInTool {
* @param numtime
* @param numtime
* @return 1:增加一年、2:增加一天、3:减10天、4:增加一个月
* @return 1:增加一年、2:增加一天、3:减10天、4:增加一个月
*/
*/
public
static
String
requires_extra_times
(
String
timeStr
,
int
num
,
int
numtime
)
{
public
static
String
requires_extra_times
(
String
timeStr
,
int
num
,
int
numtime
,
int
daft
)
{
DateFormat
df
;
if
(
daft
==
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
else
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
}
DateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
null
;
Date
date
=
null
;
try
{
try
{
date
=
df
.
parse
(
timeStr
);
date
=
df
.
parse
(
timeStr
);
...
@@ -46,8 +52,10 @@ public class ClockInTool {
...
@@ -46,8 +52,10 @@ public class ClockInTool {
cal
.
add
(
Calendar
.
DATE
,
num
);
//增加一天
cal
.
add
(
Calendar
.
DATE
,
num
);
//增加一天
}
else
if
(
numtime
==
3
)
{
}
else
if
(
numtime
==
3
)
{
cal
.
add
(
Calendar
.
DATE
,
num
);
//减10天
cal
.
add
(
Calendar
.
DATE
,
num
);
//减10天
}
else
{
}
else
if
(
numtime
==
4
)
{
cal
.
add
(
Calendar
.
MONTH
,
num
);
//增加一个月
cal
.
add
(
Calendar
.
MONTH
,
num
);
//增加一个月
}
else
if
(
numtime
==
5
)
{
cal
.
add
(
Calendar
.
HOUR
,
num
);
}
}
return
df
.
format
(
cal
.
getTime
());
return
df
.
format
(
cal
.
getTime
());
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
214aab91
...
@@ -986,7 +986,7 @@ public class TimeCardController {
...
@@ -986,7 +986,7 @@ public class TimeCardController {
@ApiOperation
(
value
=
"39:删除考勤组"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"39:删除考勤组"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
39
)
@ApiOperationSupport
(
order
=
39
)
public
Result
<
Integer
>
DelAttendanceGroup
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
public
Result
<
Integer
>
DelAttendanceGroup
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
if
(
KqglMainKqz
.
builder
().
id
(
id
).
build
().
deleteById
())
{
List
<
UserAttendanceRel
>
attusers
=
userattendancerelmapper
.
selectAttendanceOfficerByKqzid
(
id
,
userBean
.
getOrgCode
());
//该考勤组人数
List
<
UserAttendanceRel
>
attusers
=
userattendancerelmapper
.
selectAttendanceOfficerByKqzid
(
id
,
userBean
.
getOrgCode
());
//该考勤组人数
//该考勤组所绑定的考勤机
//该考勤组所绑定的考勤机
List
<
KqglAssoKqzdkfs
>
kqjs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
id
).
eq
(
KqglAssoKqzdkfs:
:
getType
,
1
));
List
<
KqglAssoKqzdkfs
>
kqjs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
id
).
eq
(
KqglAssoKqzdkfs:
:
getType
,
1
));
...
@@ -1005,12 +1005,20 @@ public class TimeCardController {
...
@@ -1005,12 +1005,20 @@ public class TimeCardController {
params
.
add
(
"userId"
,
user_id
);
params
.
add
(
"userId"
,
user_id
);
RestTemplate
restTemplate
=
new
RestTemplate
();
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
try
{
System
.
err
.
print
(
request
.
getBody
());
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
print
(
request
.
getBody
());
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错"
);
return
ResultUtil
.
error
(
"删除失败:提示:考勤机服务出错"
);
}
}
}
}
}
}
}
if
(
KqglMainKqz
.
builder
().
id
(
id
).
build
().
deleteById
())
{
userequirelationmapper
.
deleteBykqzid
(
id
);
userequirelationmapper
.
deleteBykqzid
(
id
);
//删除考勤组绑定的打卡方式
//删除考勤组绑定的打卡方式
...
...
src/main/java/cn/timer/api/dto/kqmk/DailyDetailsDto.java
View file @
214aab91
...
@@ -19,6 +19,7 @@ public class DailyDetailsDto {
...
@@ -19,6 +19,7 @@ public class DailyDetailsDto {
private
String
dept
;
// 部门
private
String
dept
;
// 部门
private
String
post
;
// 岗位
private
String
post
;
// 岗位
private
String
attname
;
// 考勤组名称
private
String
attname
;
// 考勤组名称
private
Integer
attpbfs
;
// 排班方式(1:固定排班;2:自由排班;3:自由工时)
private
String
attdate
;
// 考勤日期
private
String
attdate
;
// 考勤日期
private
Integer
userid
;
// 用户ID
private
Integer
userid
;
// 用户ID
private
String
data
;
// 日期
private
String
data
;
// 日期
...
...
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
214aab91
...
@@ -167,6 +167,7 @@
...
@@ -167,6 +167,7 @@
<result
column=
"bcxbdk3"
property=
"bcxbdk3"
/>
<result
column=
"bcxbdk3"
property=
"bcxbdk3"
/>
<result
column=
"attname"
property=
"attname"
/>
<result
column=
"attname"
property=
"attname"
/>
<result
column=
"attpbfs"
property=
"attpbfs"
/>
<result
column=
"attdate"
property=
"attdate"
/>
<result
column=
"attdate"
property=
"attdate"
/>
<result
column=
"userid"
property=
"userid"
/>
<result
column=
"userid"
property=
"userid"
/>
<result
column=
"data"
property=
"data"
/>
<result
column=
"data"
property=
"data"
/>
...
@@ -249,7 +250,8 @@
...
@@ -249,7 +250,8 @@
<select
id=
"Dailydetails"
resultMap=
"DailyDetailsMap"
>
<select
id=
"Dailydetails"
resultMap=
"DailyDetailsMap"
>
select sum.`name`,sum.num,sum.dept,sum.post,
select sum.`name`,sum.num,sum.dept,sum.post,
(select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group) as attname,
IFNULL((select kqz.name from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') as attname,
IFNULL((select kqz.pbfs from kqgl_main_kqz kqz where kqz.id = sum.att_group),'') as attpbfs,
'' address,
'' address,
'' remarks,
'' remarks,
'' cardtype,
'' cardtype,
...
@@ -296,8 +298,8 @@
...
@@ -296,8 +298,8 @@
sum.working_transfer_overtime as workingtransferovertime,
sum.working_transfer_overtime as workingtransferovertime,
sum.rest_transfer_overtime as resttransferovertime,
sum.rest_transfer_overtime as resttransferovertime,
sum.holiday_transfer_overtime as holidaytransferovertime,
sum.holiday_transfer_overtime as holidaytransferovertime,
mrtj.
leaverulesid,
IFNULL(mrtj.leaverulesid,'') as
leaverulesid,
mrtj.duration
as balancedays
IFNULL(mrtj.duration,'')
as balancedays
from kqgl_asso_month_punch_summary sum
from kqgl_asso_month_punch_summary sum
LEFT JOIN (
LEFT JOIN (
select DISTINCT info.`name` as username ,
select DISTINCT info.`name` as username ,
...
...
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