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
c54e48f2
Commit
c54e48f2
authored
Jul 28, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
c86f7672
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
18 deletions
+33
-18
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+24
-17
src/main/java/cn/timer/api/dto/kqmk/AttendanceSummaryQueryDto.java
+2
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+1
-1
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+6
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
c54e48f2
...
...
@@ -31,6 +31,7 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.yggl.YgglMainLzb
;
import
cn.timer.api.controller.kqgl.ClockInController
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
...
...
@@ -173,6 +174,10 @@ public class AttendanceTaskTiming{
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
for
(
AdditionalDto
user
:
userlist
)
{
YgglMainLzb
lzb
=
YgglMainLzb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainLzb
>().
lambda
().
eq
(
YgglMainLzb:
:
getOrgCode
,
org_code
).
eq
(
YgglMainLzb:
:
getJobStatus
,
3
)
.
eq
(
YgglMainLzb:
:
getEmpNum
,
user
.
getEmpnum
()));
if
(
lzb
==
null
)
{
//已离职 的人员不进入计算(已存在的不做任何处理)
// KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
// .eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
...
...
@@ -252,8 +257,8 @@ public class AttendanceTaskTiming{
xbqkcs
=
xblacks
.
length
;
}
//具体打卡时间入汇总表(打卡成功才会录入汇总表)
//
KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda()
//
.eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
//
KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda()
//
.eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
String
[]
ycqts
=
new
String
[
31
];
//应上班的具体天数(yyyy-MM-dd)
String
[]
xxts
=
new
String
[
31
];
//休息的具体天数(yyyy-MM-dd)
List
<
String
>
rowData
=
new
ArrayList
<
String
>();
...
...
@@ -272,10 +277,10 @@ public class AttendanceTaskTiming{
int
attgroid
=
0
;
if
(
attgro
!=
null
){
//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
attgroid
=
attgro
.
getId
();
//
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
//
//休息天数,应出勤天数,实际出勤
//
double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
//
int zjgzts = 0;//目前为止应该出勤的天数
//
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
//
//休息天数,应出勤天数,实际出勤
//
double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
//
int zjgzts = 0;//目前为止应该出勤的天数
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
List
<
KqglAssoTeshu
>
bxdklist
=
kqglassoteshumapper
.
ShouldSpecialDatessetByKqzid
(
attgro
.
getId
(),
ttstr
,
1
);
//当前月 必须打卡日期
int
bxdk
=
bxdklist
.
size
();
...
...
@@ -321,8 +326,8 @@ public class AttendanceTaskTiming{
int
xiuxi
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
)
-
q
-
bxdk
+
wxdk
.
size
();
daysOff
=
xiuxi
;
daysOnDuty
=
y
+
bxdk
;
//
String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
//
int zjgzts = 0;//目前为止应该出勤的天数
//
String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
//
int zjgzts = 0;//目前为止应该出勤的天数
//目前为止应出勤天数
int
w
=
0
,
x
=
0
;
int
zj
=
6
;
...
...
@@ -439,8 +444,8 @@ public class AttendanceTaskTiming{
}
}
List
<
PunchRecord
>
initial
=
punchrecordmapper
.
getMaintenancePunchCardList
(
startDate
,
endDateyesterday
,
user
.
getEmpnum
());
//
// 迟到次数 迟到时长 早退次数 早退时长
//
int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
//
// 迟到次数 迟到时长 早退次数 早退时长
//
int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
String
[]
cdts
=
new
String
[
31
];
//迟到的具体天数
String
[]
ztts
=
new
String
[
31
];
//早退的具体天数
if
(
initial
.
size
()
>
0
){
...
...
@@ -458,8 +463,8 @@ public class AttendanceTaskTiming{
}
}
AttSubsidiaryDto
subs
=
kqglassodkmxmapper
.
subsidiary
(
user
.
getEmpnum
(),
ttstr
);
//
//工作时长(分钟)、严重迟到次数、严重迟到时长(分钟)、旷工迟到次数
//
double workinghours = 0,seriouslatetimes = 0,seriouslatehours = 0,absenlatetimes = 0;
//
//工作时长(分钟)、严重迟到次数、严重迟到时长(分钟)、旷工迟到次数
//
double workinghours = 0,seriouslatetimes = 0,seriouslatehours = 0,absenlatetimes = 0;
if
(
subs
!=
null
)
{
workinghours
=
subs
.
getGzsctotalgzsc
();
seriouslatetimes
=
subs
.
getYzcdcstotal
();
...
...
@@ -519,9 +524,9 @@ public class AttendanceTaskTiming{
//排查请假是否在最后一次打卡范围内 查询当月的请假所有日期
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
,
org_code
);
//
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
//
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
String
beginTime
=
sdf1
.
format
(
new
Date
());
//
List<String> rowData = new ArrayList<String>();
//
List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
for
(
String
num
:
range
)
{
...
...
@@ -630,10 +635,10 @@ public class AttendanceTaskTiming{
if
(!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
)
&&
!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
))
{
if
(
lea
.
getOvertimeTypeId
()
==
3
)
{
if
(
lea
.
getCompensateId
()
==
1
||
lea
.
getCompensateId
()
==
3
)
{
//
holidayturncompenleave++;
//
holidayturncompenleave++;
holidayturncompenleave
=
holidayturncompenleave
+
lea
.
getDuration
();
}
else
if
(
lea
.
getCompensateId
()
==
2
||
lea
.
getCompensateId
()
==
4
)
{
//
holidaytransferovertime++;
//
holidaytransferovertime++;
holidaytransferovertime
=
holidaytransferovertime
+
lea
.
getDuration
();
}
}
...
...
@@ -800,7 +805,9 @@ public class AttendanceTaskTiming{
summary
.
insert
();
}
// summary.insertOrUpdate();
// summary.insertOrUpdate();
}
}
}
...
...
src/main/java/cn/timer/api/dto/kqmk/AttendanceSummaryQueryDto.java
View file @
c54e48f2
...
...
@@ -19,6 +19,8 @@ public class AttendanceSummaryQueryDto extends Page {
private
String
times
;
private
Integer
attid
;
private
Integer
turnover_status
;
private
String
year
;
private
String
month
;
private
String
staapptime
;
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
c54e48f2
...
...
@@ -133,7 +133,7 @@
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode}
and emp.job_status != 3
<!-- and emp.job_status != 3 -->
</select>
<select
id=
"RealTimeUpdate"
resultMap=
"AdditionalMap"
>
...
...
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
c54e48f2
...
...
@@ -288,6 +288,9 @@
<if
test=
"param.attid != null and param.attid != ''"
>
and sum.att_group = #{param.attid}
</if>
<if
test=
"param.turnover_status == 1"
>
and sum.num not in (select em.emp_num from yggl_main_lzb em where em.org_code = #{param.orgCode} and em.job_status = 3)
</if>
<!-- yz.id as yzid,
yz.leave_rules_id as leaverulesid,
...
...
@@ -479,6 +482,9 @@
<if
test=
"param.attid != null and param.attid != ''"
>
and sum.att_group = #{param.attid}
</if>
<if
test=
"param.turnover_status == 1"
>
and sum.num not in (select em.emp_num from yggl_main_lzb em where em.org_code = #{param.orgCode} and em.job_status = 3)
</if>
<!-- LEFT JOIN kqgl_asso_leave_employee_balance as mrtj on mrtj.userid = sum.num
IFNULL(mrtj.leave_rules_id,'') as leaverulesid,
...
...
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