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
e3c9496d
Commit
e3c9496d
authored
4 years ago
by
ilal
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
23f33d7d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
7 deletions
+53
-7
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
+2
-0
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+22
-3
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+22
-0
src/main/java/cn/timer/api/dao/kqgl/ScheduleMapper.java
+2
-2
src/main/resources/mapping/kqgl/ScheduleMapper.xml
+5
-2
No files found.
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
View file @
e3c9496d
...
@@ -54,4 +54,6 @@ public class AttendanceAssistant implements Serializable{
...
@@ -54,4 +54,6 @@ public class AttendanceAssistant implements Serializable{
int
fieldpersonnel
;
//外勤
int
fieldpersonnel
;
//外勤
int
restdayclock
;
//休息日打卡
int
restdayclock
;
//休息日打卡
String
PagetransferDate
;
//页面传输修改日期
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
e3c9496d
...
@@ -340,8 +340,13 @@ public class AttController {
...
@@ -340,8 +340,13 @@ public class AttController {
//记录排班(排班制)
//记录排班(排班制)
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
String
date_scmx
=
null
;
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
date_scmx
=
ClockInTool
.
SunNovCSTYM
(
schedules
[
0
].
getData
());
String
date
=
String
.
valueOf
(
schedules
[
0
].
getData
());
String
date
=
String
.
valueOf
(
schedules
[
0
].
getData
());
Date
dt
=
new
Date
(
date
);
Date
dt
=
new
Date
(
date
);
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM"
);
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM"
);
...
@@ -1135,7 +1140,10 @@ public class AttController {
...
@@ -1135,7 +1140,10 @@ public class AttController {
}
}
if
(
schlist
.
size
()>
0
&&
xiugai
){
if
(
schlist
.
size
()>
0
&&
xiugai
){
//删除排班明细表(自由排班)
//删除排班明细表(自由排班)
scheduleservice
.
deleteByPrimaryBykqzid
(
id
);
// scheduleservice.deleteByPrimaryBykqzid(id);
scheduleservice
.
deleteByPrimaryBykqzid
(
id
,
date_scmx
);
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
}
}
...
@@ -1458,7 +1466,13 @@ public class AttController {
...
@@ -1458,7 +1466,13 @@ public class AttController {
for
(
int
u
=
0
;
u
<
attser
.
length
;
u
++){
for
(
int
u
=
0
;
u
<
attser
.
length
;
u
++){
if
(
attass
.
getAtttype
()
==
2
){
//排班制 考勤组与用户、用户排班
if
(
attass
.
getAtttype
()
==
2
){
//排班制 考勤组与用户、用户排班
scheduleservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]));
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
if
(
schedules
.
length
>
0
)
{
String
date
=
ClockInTool
.
SunNovCSTYM
(
schedules
[
0
].
getData
());
scheduleservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]),
attgrpid
,
date
);
}
// scheduleservice.deleteByPrimaryByUserid(Integer.valueOf(attser[u]));
}
}
userattendancerelservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]),
qyid
);
userattendancerelservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]),
qyid
);
...
@@ -1581,12 +1595,17 @@ public class AttController {
...
@@ -1581,12 +1595,17 @@ public class AttController {
}
}
/**********/
/**********/
scheduleservice
.
deleteByPrimaryBykqzid
(
attgrpid
);
//
scheduleservice.deleteByPrimaryBykqzid(attgrpid);
/***********/
/***********/
//记录排班(排班制)
//记录排班(排班制)
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
String
date
=
ClockInTool
.
SunNovCSTYM
(
schedules
[
0
].
getData
());
scheduleservice
.
deleteByPrimaryBykqzid
(
attgrpid
,
date
);
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
Schedule
sch
=
new
Schedule
();
Schedule
sch
=
new
Schedule
();
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
e3c9496d
...
@@ -728,5 +728,27 @@ public class ClockInTool {
...
@@ -728,5 +728,27 @@ public class ClockInTool {
}
}
return
sdf
.
format
(
date2
);
return
sdf
.
format
(
date2
);
}
}
/**
* Sun Nov 01 00:00:00 CST 2020
*/
public
static
String
SunNovCST
(
String
s
){
String
cst
;
Date
date
=
new
Date
(
s
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
cst
=
simpleDateFormat
.
format
(
date
);
return
cst
;
}
/**
* Sun Nov 01 00:00:00 CST 2020
*/
public
static
String
SunNovCSTYM
(
Date
date2
){
String
cst
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
cst
=
simpleDateFormat
.
format
(
date2
);
return
cst
;
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqgl/ScheduleMapper.java
View file @
e3c9496d
...
@@ -23,11 +23,11 @@ public interface ScheduleMapper {
...
@@ -23,11 +23,11 @@ public interface ScheduleMapper {
int
insertKqglAssoPbmxList
(
List
<
Schedule
>
schedule
);
int
insertKqglAssoPbmxList
(
List
<
Schedule
>
schedule
);
int
deleteByPrimaryBykqzid
(
Integer
kqzid
);
int
deleteByPrimaryBykqzid
(
Integer
kqzid
,
String
date
);
List
<
Schedule
>
selectAttGroupScheduling
(
AttScheduling
attscheduling
);
List
<
Schedule
>
selectAttGroupScheduling
(
AttScheduling
attscheduling
);
int
deleteByPrimaryByUserid
(
Integer
userid
);
int
deleteByPrimaryByUserid
(
Integer
userid
,
Integer
kqzid
,
String
date
);
List
<
Schedule
>
getAttendanceShouldList
(
Integer
userid
,
Long
start
,
Long
end
);
List
<
Schedule
>
getAttendanceShouldList
(
Integer
userid
,
Long
start
,
Long
end
);
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqgl/ScheduleMapper.xml
View file @
e3c9496d
...
@@ -147,9 +147,10 @@
...
@@ -147,9 +147,10 @@
</foreach>
</foreach>
</insert>
</insert>
<delete
id=
"deleteByPrimaryBykqzid"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryBykqzid"
>
delete from kqgl_asso_pbmx
delete from kqgl_asso_pbmx
where kqzid = #{kqzid,jdbcType=INTEGER}
where kqzid = #{kqzid,jdbcType=INTEGER}
and SUBSTR(data,1,7) = #{date,jdbcType=VARCHAR}
</delete>
</delete>
<select
id=
"selectAttGroupScheduling"
resultMap=
"BaseResultMap"
>
<select
id=
"selectAttGroupScheduling"
resultMap=
"BaseResultMap"
>
...
@@ -168,9 +169,11 @@
...
@@ -168,9 +169,11 @@
and pbmx.kqzid = #{kqzid,jdbcType=INTEGER}
and pbmx.kqzid = #{kqzid,jdbcType=INTEGER}
</select>
</select>
<delete
id=
"deleteByPrimaryByUserid"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryByUserid"
>
delete from kqgl_asso_pbmx
delete from kqgl_asso_pbmx
where userid = #{userid,jdbcType=INTEGER}
where userid = #{userid,jdbcType=INTEGER}
and SUBSTR(data,1,7) = #{date,jdbcType=VARCHAR}
and kqzid = #{kqzid,jdbcType=INTEGER}
</delete>
</delete>
<select
id=
"getAttendanceShouldList"
resultMap=
"BaseResultMap"
>
<select
id=
"getAttendanceShouldList"
resultMap=
"BaseResultMap"
>
...
...
This diff is collapsed.
Click to expand it.
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