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
303c6055
Commit
303c6055
authored
Sep 07, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
fc7a8ea8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
187 additions
and
51 deletions
+187
-51
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+187
-51
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
303c6055
...
@@ -1497,6 +1497,8 @@ public class ClockInController {
...
@@ -1497,6 +1497,8 @@ public class ClockInController {
int
sbyf
=
1
;
//0:失败;1:成功
int
sbyf
=
1
;
//0:失败;1:成功
int
status_
=
0
;
int
status_
=
0
;
int
xiuxidaka
=
0
;
//休息并打卡
YgglMainEmp
user
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
clock
.
getUserid
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
YgglMainEmp
user
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
clock
.
getUserid
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
int
qyid
=
user
.
getOrgCode
();
int
qyid
=
user
.
getOrgCode
();
...
@@ -1534,10 +1536,14 @@ public class ClockInController {
...
@@ -1534,10 +1536,14 @@ public class ClockInController {
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
List
<
AttSchedule
>
checknextday
=
attdate
.
getAttsch
();
List
<
AttSchedule
>
checknextday
=
attdate
.
getAttsch
();
if
(
checknextday
.
size
()
>
0
)
{
for
(
int
c
=
0
;
c
<
checknextday
.
size
();
c
++)
{
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
checknextday
.
get
(
0
).
getId
()
!=
0
)
{
if
(
checknextday
.
get
(
c
).
getNextday
()
==
2
)
{
chenexday
=
true
;
if
(
checknextday
.
size
()
>
0
)
{
for
(
int
c
=
0
;
c
<
checknextday
.
size
();
c
++)
{
if
(
checknextday
.
get
(
c
).
getNextday
()
==
2
)
{
chenexday
=
true
;
}
}
}
}
}
}
}
...
@@ -2290,9 +2296,92 @@ public class ClockInController {
...
@@ -2290,9 +2296,92 @@ public class ClockInController {
status_
=
2
;
status_
=
2
;
}
}
}
else
{
}
else
{
msg
=
"当前是休息时间"
;
// msg = "当前是休息时间";
sbyf
=
0
;
// sbyf = 0;
status_
=
2
;
// status_ = 2;
KqglAssoDkmx
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
if
(
zydkmc
==
null
)
{
//新增
KqglAssoDkmx
pcd
=
KqglAssoDkmx
.
builder
().
build
();
pcd
=
KqglAssoDkmx
.
builder
().
userid
(
userid
).
data
(
putime
).
sbdk1
(
time_
).
sbdk1jg
(
0
).
ydkcs
(
0
).
qyid
(
qyid
).
dksj
(
startDate
).
yzcdcs
(
0
).
yzcdsc
(
Double
.
valueOf
(
0
)).
kgcdfzs
(
0
).
build
();
if
(!
pcd
.
insert
())
{
throw
new
CustomException
(
"打卡明细-新增异常-1"
);
}
dkmx
=
pcd
.
getId
();
atttype
=
1
;
xiuxidaka
=
1
;
}
else
{
//修改
dkmx
=
zydkmc
.
getId
();
KqglAssoDkmx
zypcd
=
KqglAssoDkmx
.
builder
().
build
();
kskd
=
false
;
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
==
null
)){
//下班1
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk1
(
time_
);
//下班1打卡时间
if
(
zydkmc
.
getSbdk1
()
!=
null
){
Long
time
=
(
time_
-
zydkmc
.
getSbdk1
())/
1000
/
60
;
zypcd
.
setGzsc
(
Math
.
abs
(
Double
.
valueOf
(
time
.
toString
())));
//只打一次卡时计算工作时长
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
atttype
=
2
;
xiuxidaka
=
1
;
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
==
null
)){
//上班2
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setSbdk2
(
time_
);
//上班1打卡时间
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
atttype
=
3
;
xiuxidaka
=
1
;
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getXbdk2
())
||
zydkmc
.
getXbdk2
()
==
null
)){
//下班2
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk2
(
time_
);
//下班1打卡时间
//班次为4次时,计算工作时长
if
(
zydkmc
.
getSbdk2
()
!=
null
){
Long
time
=
(
time_
-
zydkmc
.
getSbdk2
())/
1000
/
60
;
BigDecimal
om
=
new
BigDecimal
(
zydkmc
.
getGzsc
());
BigDecimal
on
=
new
BigDecimal
(
time
);
double
worktime
=
Math
.
abs
(
om
.
add
(
on
).
doubleValue
());
zypcd
.
setGzsc
(
worktime
);
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
atttype
=
4
;
xiuxidaka
=
1
;
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk2
())
||
zydkmc
.
getXbdk2
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getSbdk3
())
||
zydkmc
.
getSbdk3
()
==
null
)){
//上班3
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setSbdk3
(
time_
);
//上班1打卡时间
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
atttype
=
5
;
xiuxidaka
=
1
;
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk2
())
||
zydkmc
.
getXbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk3
())
||
zydkmc
.
getSbdk3
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getXbdk3
())
||
zydkmc
.
getXbdk3
()
==
null
)){
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk3
(
time_
);
//下班1打卡时间
//班次为6次时,计算工作时长
if
(
zydkmc
.
getSbdk3
()
!=
null
){
Long
time
=
(
time_
-
zydkmc
.
getSbdk3
())/
1000
/
60
;
BigDecimal
om
=
new
BigDecimal
(
zydkmc
.
getGzsc
());
//第二次
BigDecimal
on
=
new
BigDecimal
(
time
);
double
worktime
=
Math
.
abs
(
om
.
add
(
on
).
doubleValue
());
zypcd
.
setGzsc
(
worktime
);
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
atttype
=
6
;
xiuxidaka
=
1
;
}
else
{
atttype
=
7
;
xiuxidaka
=
1
;
}
}
}
}
}
}
}
}
...
@@ -2467,62 +2556,76 @@ public class ClockInController {
...
@@ -2467,62 +2556,76 @@ public class ClockInController {
if
(
atttype
>
0
)
{
if
(
atttype
>
0
)
{
if
((
atttype
)%
2
>
0
){
if
((
atttype
)%
2
>
0
){
type
=
1
;
// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
type
=
1
;
// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
if
(
xiuxidaka
>
0
)
{
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
!=
0
){
status
=
1
;
status
=
1
;
}
else
{
}
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
==
0
)
{
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
status
=
2
;
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
}
else
{
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
!=
0
){
if
(
isRange
)
{
// 状态(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休)
status
=
1
;
if
(
time
>
0
){
}
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
==
0
)
{
status
=
3
;
}
else
if
(
results
==
0
){
status
=
1
;
}
}
else
{
status
=
2
;
status
=
2
;
}
else
{
if
(
isRange
)
{
// 状态(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休)
if
(
time
>
0
){
status
=
3
;
}
else
if
(
results
==
0
){
status
=
1
;
}
}
else
{
status
=
2
;
}
}
}
}
else
if
(
EmptyUtil
.
isEmpty
(
attdate
.
getAttsch
()))
{
status
=
2
;
}
}
}
else
if
(
EmptyUtil
.
isEmpty
(
attdate
.
getAttsch
()))
{
status
=
2
;
}
}
else
{
if
(
sbyf
==
1
)
{
status
=
1
;
}
else
{
}
else
{
status
=
2
;
if
(
sbyf
==
1
)
{
status
=
1
;
}
else
{
status
=
2
;
}
}
}
}
}
}
else
{
}
else
{
type
=
2
;
// 类型(类型 0:无排班打卡 1:上班 2:下班)
type
=
2
;
// 类型(类型 0:无排班打卡 1:上班 2:下班)
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
if
(
xiuxidaka
>
0
)
{
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
status
=
1
;
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
!=
0
){
}
else
{
status
=
1
;
}
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
==
0
)
{
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
status
=
2
;
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
}
else
{
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
!=
0
){
if
(
isRange
)
{
status
=
1
;
if
(
time
<
0
){
}
if
(
punchcardtime
==
0
&&
clockt
.
getShifid
()
==
0
)
{
status
=
4
;
}
else
if
(
results
==
0
){
status
=
1
;
}
}
else
{
status
=
2
;
status
=
2
;
}
else
{
if
(
isRange
)
{
if
(
time
<
0
){
status
=
4
;
}
else
if
(
results
==
0
){
status
=
1
;
}
}
else
{
status
=
2
;
}
}
}
}
else
if
(
EmptyUtil
.
isEmpty
(
attdate
.
getAttsch
()))
{
status
=
2
;
}
}
}
else
if
(
EmptyUtil
.
isEmpty
(
attdate
.
getAttsch
()))
{
status
=
2
;
}
}
else
{
if
(
sbyf
==
1
)
{
status
=
1
;
}
else
{
}
else
{
status
=
2
;
if
(
sbyf
==
1
)
{
status
=
1
;
}
else
{
status
=
2
;
}
}
}
}
}
}
}
}
}
...
@@ -3360,8 +3463,41 @@ public class ClockInController {
...
@@ -3360,8 +3463,41 @@ public class ClockInController {
}
else
{
}
else
{
//休息的时候
//休息的时候
// List<AttSchedule> attsch_ = new ArrayList<AttSchedule>();
// attdate.setAttsch(attsch_);
List
<
AttSchedule
>
attsch_
=
new
ArrayList
<
AttSchedule
>();
List
<
AttSchedule
>
attsch_
=
new
ArrayList
<
AttSchedule
>();
attdate
.
setAttsch
(
attsch_
);
if
(
dajllist_
.
size
()
>
0
)
{
for
(
int
i
=
1
;
i
<=
dajllist_
.
size
();
i
++){
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
BeanUtil
.
copyProperties
(
dajllist_
.
get
(
i
-
1
),
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
ast
.
setId
(
0
);
ast
.
setIsdk
(
1
);
ast
.
setDajl
(
dkjl
);
ast
.
setSort
(
i
);
attsch_
.
add
(
ast
);
attdate
.
setAttsch
(
attsch_
);
}
KqglAssoDkjl
dkjj_
=
KqglAssoDkjl
.
builder
().
build
();
AttSchedule
ast_
=
AttSchedule
.
builder
().
build
();
ast_
.
setId
(
0
);
ast_
.
setIsdk
(
0
);
ast_
.
setDajl
(
dkjj_
);
ast_
.
setSort
(
dajllist_
.
size
()
+
1
);
attsch_
.
add
(
ast_
);
attdate
.
setAttsch
(
attsch_
);
}
else
{
KqglAssoDkjl
dkjj
=
KqglAssoDkjl
.
builder
().
build
();
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
ast
.
setId
(
0
);
ast
.
setIsdk
(
0
);
ast
.
setDajl
(
dkjj
);
ast
.
setSort
(
1
);
attsch_
.
add
(
ast
);
attdate
.
setAttsch
(
attsch_
);
}
}
}
...
@@ -3404,7 +3540,7 @@ public class ClockInController {
...
@@ -3404,7 +3540,7 @@ public class ClockInController {
List
<
TransactionApprovalDto
>
tranappr
=
new
ArrayList
<
TransactionApprovalDto
>();
List
<
TransactionApprovalDto
>
tranappr
=
new
ArrayList
<
TransactionApprovalDto
>();
//事务审批单
//事务审批单
List
<
KqglAssoRelationSummary
>
trap
=
KqglAssoRelationSummary
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
List
<
KqglAssoRelationSummary
>
trap
=
KqglAssoRelationSummary
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
));
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
)
.
eq
(
KqglAssoRelationSummary:
:
getOrgCode
,
userBean
.
getOrgCode
())
);
if
(
trap
.
size
()
>
0
)
{
if
(
trap
.
size
()
>
0
)
{
for
(
KqglAssoRelationSummary
spnsw
:
trap
)
{
for
(
KqglAssoRelationSummary
spnsw
:
trap
)
{
if
(
spnsw
.
getApprovalType
()
!=
5
)
{
if
(
spnsw
.
getApprovalType
()
!=
5
)
{
...
...
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