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
c4440428
Commit
c4440428
authored
Jul 09, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!317
parents
8691470d
aee2e3a9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
27 deletions
+37
-27
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+25
-14
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+3
-13
src/main/resources/mapping/spmk/SpmkApproveSummaryMapper.xml
+9
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
c4440428
...
@@ -2118,7 +2118,7 @@ public class ClockInController {
...
@@ -2118,7 +2118,7 @@ public class ClockInController {
public
Result
<
Object
>
getAttClockData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttConditions
attconditions
)
throws
ParseException
{
public
Result
<
Object
>
getAttClockData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttConditions
attconditions
)
throws
ParseException
{
long
nowdate
=
new
Date
().
getTime
();
long
nowdate
=
new
Date
().
getTime
();
String
current
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
());
//
String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String
str
=
null
;
String
str
=
null
;
if
(!(
""
).
equals
(
attconditions
.
getDate
())){
if
(!(
""
).
equals
(
attconditions
.
getDate
())){
...
@@ -2134,26 +2134,19 @@ public class ClockInController {
...
@@ -2134,26 +2134,19 @@ public class ClockInController {
Long
startDateyesterday
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
yesterday
,
"yyyy-MM-dd"
)).
getTime
();
Long
startDateyesterday
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
yesterday
,
"yyyy-MM-dd"
)).
getTime
();
Long
endDateyesterday
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
yesterday
,
"yyyy-MM-dd"
)).
getTime
();
Long
endDateyesterday
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
yesterday
,
"yyyy-MM-dd"
)).
getTime
();
Long
startDate
=
0
l
;
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
Long
endDate
=
0
l
;
Long
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
try
{
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
//考勤组信息
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
//考勤组信息
if
(
attgro
!=
null
)
{
if
(
attgro
!=
null
)
{
//APP获取当前天的考勤信息
//APP获取当前天的考勤信息
AttendanceCardListDto
attdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
attconditions
.
getDate
());
AttendanceCardListDto
attdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
attconditions
.
getDate
());
//打卡记录
//打卡记录
// List<KqglAssoDkjl> dajllist = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// List<KqglAssoDkjl> dajllist = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// attdate.setAttpr(dajllist);
// attdate.setAttpr(dajllist);
List
<
AttSchedule
>
attsch
=
attdate
.
getAttsch
();
List
<
AttSchedule
>
attsch
=
attdate
.
getAttsch
();
int
r
=
1
;
for
(
AttSchedule
ash
:
attsch
)
{
for
(
AttSchedule
ash
:
attsch
)
{
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
...
@@ -2167,15 +2160,33 @@ public class ClockInController {
...
@@ -2167,15 +2160,33 @@ public class ClockInController {
}
}
}
else
{
}
else
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
String
xbdk1
=
(
current
+
" "
+
shif
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
b
=
Timestamp
.
valueOf
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
//
Timestamp
b
=
Timestamp
.
valueOf
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
//
String
xbdk1
=
(
str
+
" "
+
shif
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
if
(
b
.
after
(
a
))
{
// >
String
sbdk1
=
(
str
+
" "
+
shif
.
getSbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
if
(
r
==
1
)
{
if
(
b
.
after
(
a
))
{
// 当前时间大于下班打卡时间
ash
.
setIsdk
(
1
);
ash
.
setIsdk
(
1
);
}
}
}
if
(
r
==
2
)
{
String
stampToDate
=
ClockInTool
.
stampToDate
(
String
.
valueOf
(
endDate
));
Timestamp
d
=
Timestamp
.
valueOf
(
stampToDate
);
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
ash
.
setIsdk
(
1
);
}
if
(
b
.
after
(
a
)
&&
b
.
before
(
d
))
{
ash
.
setIsdk
(
0
);
}
}
}
r
++;
}
}
else
{
}
else
{
boolean
ectivedate
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
nowdate
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getStarttime
()),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getEndtime
()),
"yyyy-MM-dd HH:mm"
);
boolean
ectivedate
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
nowdate
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getStarttime
()),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getEndtime
()),
"yyyy-MM-dd HH:mm"
);
if
(
ectivedate
)
{
if
(
ectivedate
)
{
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
c4440428
...
@@ -2757,32 +2757,22 @@ public class TimeCardController {
...
@@ -2757,32 +2757,22 @@ public class TimeCardController {
ttstr
=
date
;
ttstr
=
date
;
}
}
//1:加班 2:请假 3:出差 4:外出 5:补卡
//1:加班 2:请假 3:出差 4:外出 5:补卡
KqglAssoRelationSummary
sums
=
kqglassorelationsummarymapper
.
selectTabledata
(
userBean
.
getEmpNum
(),
1
,
ttstr
);
KqglAssoRelationSummary
qjj
=
kqglassorelationsummarymapper
.
selectTabledata
(
userBean
.
getEmpNum
(),
2
,
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
())
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
));
.
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
belongyear
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
belongmonth
));
BalanceSheetDataDto
empye
=
kqglassomonthpunchsummarymapper
.
FormMonthlySummaryLeave
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
ttstr
);
BalanceSheetDataDto
empye
=
kqglassomonthpunchsummarymapper
.
FormMonthlySummaryLeave
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
ttstr
);
tabl
.
setAttendance
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getDaysOnDuty
()));
// 应出勤
tabl
.
setAttendance
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getDaysOnDuty
()));
// 应出勤
tabl
.
setAttended
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getActualAttDays
()));
// 已出勤
tabl
.
setAttended
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getActualAttDays
()));
// 已出勤
tabl
.
setLeave
(
qjj
==
null
?
""
:
String
.
valueOf
(
empye
.
getBalancedays
()));
// 请假*******************
tabl
.
setLeave
(
qjj
==
null
?
""
:
String
.
valueOf
(
empye
.
getBalancedays
()));
// 请假*******************
tabl
.
setLackworkcard
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberWorkCardShortage
()));
// 上班缺卡
tabl
.
setLackworkcard
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberWorkCardShortage
()));
// 上班缺卡
tabl
.
setWorkovertime
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getTotalOvertimeHours
()));
// 加班
// tabl.setWorkovertime(sums == null ? "" : String.valueOf(sums.getDuration()));// 加班
tabl
.
setCompensatoryleave
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getDaysOff
()));
// 休息天数
tabl
.
setWorkovertime
(
sums
==
null
?
""
:
String
.
valueOf
(
punsum
.
getTotalOvertimeHours
()));
// 加班
tabl
.
setEvection
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getLengthBusinessTrip
()));
// 出差
tabl
.
setCompensatoryleave
(
String
.
valueOf
(
punsum
.
getDaysOff
()));
// 休息天数
// tabl.setEvection(cxx == null ? "" : String.valueOf(cxx.getDuration()));// 出差
tabl
.
setEvection
(
cxx
==
null
?
""
:
String
.
valueOf
(
punsum
.
getLengthBusinessTrip
()));
// 出差
tabl
.
setOffdutycardshortage
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberDutyCardShortage
()));
// 下班缺卡
tabl
.
setOffdutycardshortage
(
punsum
==
null
?
""
:
String
.
valueOf
(
punsum
.
getNumberDutyCardShortage
()));
// 下班缺卡
return
ResultUtil
.
data
(
tabl
,
"操作成功!"
);
return
ResultUtil
.
data
(
tabl
,
"操作成功!"
);
}
}
...
...
src/main/resources/mapping/spmk/SpmkApproveSummaryMapper.xml
View file @
c4440428
...
@@ -161,8 +161,17 @@
...
@@ -161,8 +161,17 @@
</if>
</if>
<if
test=
"param.sts != null"
>
<if
test=
"param.sts != null"
>
<if
test=
"param.sts == 5"
>
and a.sts in (0,1,2,3)
</if>
<if
test=
"param.sts == 4"
>
and a.sts in (2,3)
</if>
<if
test=
"param.sts != 4 and param.sts != 5"
>
and a.sts = #{param.sts}
and a.sts = #{param.sts}
</if>
</if>
</if>
<if
test=
"param.query != null and param.query != ''"
>
<if
test=
"param.query != null and param.query != ''"
>
and (
and (
...
...
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