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
6d04d320
Commit
6d04d320
authored
Sep 01, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
提交 See merge request 8timerv2/8timerapiv200!471
parents
cf50d444
01940151
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+34
-3
No files found.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
6d04d320
...
...
@@ -95,9 +95,11 @@ import cn.timer.api.dao.kqgl.ShiftManagementMapper;
import
cn.timer.api.dao.kqgl.SpecialDateMapper
;
import
cn.timer.api.dao.kqgl.UserAttendanceRelMapper
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.Result
;
...
...
@@ -314,6 +316,10 @@ public class AttController {
return
ResultUtil
.
data
(
shifs
);
}
@Autowired
private
KqglAssoPbmxMapper
kqglassopbmxmapper
;
/**
* 修改考勤组排班(修改排班后,需判断是否有打卡记录,有则匹配当天修改后的班次,无则不需要修改)
*/
...
...
@@ -327,12 +333,35 @@ public class AttController {
int
qyid
=
userBean
.
getOrgCode
();
//坏小孩【企业id】
int
userid
=
userBean
.
getEmpNum
();
//用户id
AttendanceGroup
qttgrop
=
attendancegroupservice
.
selectByPrimaryKey
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
String
dastr
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
AttendanceGroup
qttgrop
=
attendancegroupservice
.
selectByPrimaryKey
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
boolean
xiugai
=
true
;
//记录排班(排班制)
List
<
Schedule
>
schlist
=
new
ArrayList
<
Schedule
>();
Schedule
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
if
(
schedules
.
length
>
0
&&
attass
.
getAtttype
()
==
2
){
String
date
=
String
.
valueOf
(
schedules
[
0
].
getData
());
Date
dt
=
new
Date
(
date
);
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
System
.
out
.
println
(
famt
.
format
(
dt
));
if
(!(
famt
.
format
(
dt
)).
equals
(
dastr
))
{
xiugai
=
false
;
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
Schedule
sch
=
new
Schedule
();
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
//用户id
sch
.
setData
(
schedules
[
p
].
getData
());
//排班日期 格式:yyyy-MM-dd
sch
.
setBcid
(
schedules
[
p
].
getBcid
());
//班次id 0为休息
sch
.
setKqzid
(
Integer
.
valueOf
(
attass
.
getAttgroupid
()));
//考勤组id
schlist
.
add
(
sch
);
}
if
(
schlist
.
size
()>
0
){
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
}
}
else
{
xiugai
=
true
;
for
(
int
p
=
0
;
p
<
schedules
.
length
;
p
++){
Schedule
sch
=
new
Schedule
();
sch
.
setUserid
(
schedules
[
p
].
getUserid
());
//用户id
...
...
@@ -1102,15 +1131,17 @@ public class AttController {
/***********************/
}
}
//判断新增或修改
}
if
(
schlist
.
size
()>
0
){
if
(
schlist
.
size
()>
0
&&
xiugai
){
//删除排班明细表(自由排班)
scheduleservice
.
deleteByPrimaryBykqzid
(
id
);
scheduleservice
.
insertKqglAssoPbmxList
(
schlist
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
}
return
ResultUtil
.
error
(
"修改考勤组排班失败"
);
return
ResultUtil
.
data
(
schlist
,
"修改考勤组排班成功"
);
// return ResultUtil.error("修改考勤组排班失败");
}
/**
...
...
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