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
0eb15b0f
Commit
0eb15b0f
authored
Oct 13, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
46e27ce6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
15 deletions
+46
-15
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+13
-13
src/main/java/cn/timer/api/dto/kqmk/AttqueryCriteriaDto.java
+2
-0
src/main/java/cn/timer/api/dto/kqmk/EmployeeLeaveBalanceDto.java
+2
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+29
-2
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
0eb15b0f
...
...
@@ -172,7 +172,7 @@ public class ClockInController {
KqglAssoDkmx
dkmc
=
KqglAssoDkmx
.
builder
().
build
();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
get
Qyid
,
qyid
).
eq
(
KqglAssoDkjl:
:
get
Attdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
boolean
dnck
=
false
;
boolean
crdk
=
false
;
//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
...
...
@@ -251,13 +251,13 @@ public class ClockInController {
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
).
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
));
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
}
else
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
).
eq
(
KqglAssoDkmx:
:
getData
,
putime
));
attendance_date
=
startDate
;
toweek
=
putime
;
...
...
@@ -619,7 +619,7 @@ public class ClockInController {
sbwd3
=
Integer
.
valueOf
(
sbwd3_
.
substring
(
0
,
sbwd3_
.
lastIndexOf
(
"."
)));
//上班晚到3
//获取前一天最后下班的时间
yesterdaymx
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
yesterdaymx
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
...
...
@@ -918,12 +918,12 @@ public class ClockInController {
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
stapclotime
)));
//应打卡时间 2020-06-10 18:30:00
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间 2020-06-10 16:06:58
if
(
sd1
.
after
(
sd2
))
{
//为true时 打的是昨天的卡
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
}
else
{
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
attendance_date
=
startDate
;
toweek
=
putime
;
...
...
@@ -1557,7 +1557,7 @@ public class ClockInController {
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
eq
(
KqglAssoDkjl:
:
getQyid
,
qyid
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
// boolean dnck = false;
// boolean crdk = false;//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
...
...
@@ -1617,14 +1617,14 @@ public class ClockInController {
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
).
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
));
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
putime
=
toweek
;
}
else
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
).
eq
(
KqglAssoDkmx:
:
getData
,
putime
));
attendance_date
=
startDate
;
toweek
=
putime
;
...
...
@@ -2009,7 +2009,7 @@ public class ClockInController {
sbwd3
=
Integer
.
valueOf
(
sbwd3_
.
substring
(
0
,
sbwd3_
.
lastIndexOf
(
"."
)));
//上班晚到3
//获取前一天最后下班的时间
yesterdaymx
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
yesterdaymx
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
...
...
@@ -2303,7 +2303,7 @@ public class ClockInController {
status_
=
2
;
}
else
{
KqglAssoDkmx
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
KqglAssoDkmx
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
if
(
zydkmc
==
null
)
{
//新增
KqglAssoDkmx
pcd
=
KqglAssoDkmx
.
builder
().
build
();
...
...
@@ -2402,12 +2402,12 @@ public class ClockInController {
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
stapclotime
)));
//应打卡时间 2020-06-10 18:30:00
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间 2020-06-10 16:06:58
if
(
sd1
.
after
(
sd2
))
{
//为true时 打的是昨天的卡
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
}
else
{
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
zydkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
eq
(
KqglAssoDkmx:
:
getQyid
,
qyid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
attendance_date
=
startDate
;
toweek
=
putime
;
...
...
src/main/java/cn/timer/api/dto/kqmk/AttqueryCriteriaDto.java
View file @
0eb15b0f
...
...
@@ -21,4 +21,6 @@ public class AttqueryCriteriaDto extends Page {
@ApiModelProperty
(
value
=
"部门ID"
,
example
=
""
)
private
Integer
deptid
;
private
Integer
turnover_status
;
}
src/main/java/cn/timer/api/dto/kqmk/EmployeeLeaveBalanceDto.java
View file @
0eb15b0f
...
...
@@ -29,6 +29,8 @@ public class EmployeeLeaveBalanceDto {
@ApiModelProperty
(
value
=
"入职日期 "
,
example
=
"字段说明"
)
private
Integer
orgcode
;
private
Integer
turnover_status
;
@ApiModelProperty
(
value
=
"表数据"
,
example
=
"字段说明"
)
List
<
BalanceSheetDataDto
>
balanceTo
;
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
0eb15b0f
...
...
@@ -23,6 +23,7 @@
<result
column=
"department"
property=
"department"
/>
<result
column=
"rztime"
property=
"rztime"
/>
<result
column=
"orgcode"
property=
"orgcode"
/>
<result
column=
"turnover_status"
property=
"turnover_status"
/>
<collection
property=
"balanceTo"
ofType=
"cn.timer.api.dto.kqmk.BalanceSheetDataDto"
>
<result
column=
"leaverulesid"
property=
"leaverulesid"
/>
<result
column=
"balancedays"
property=
"balancedays"
/>
...
...
@@ -75,12 +76,12 @@
emp.`name` as empname,
emp.org_code as orgcode,
IFNULL(c.name,'') as department,
IFNULL(emp.rz_time,'') as rztime
IFNULL(emp.rz_time,'') as rztime,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = emp.emp_num and em.org_code = emp.org_code),0) as turnover_status
from yggl_main_emp emp
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 = #{param.orgCode}
and emp.job_status != 3
<if
test=
"param.query != null and param.query != ''"
>
and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or
...
...
@@ -89,6 +90,32 @@
<if
test=
"param.deptid != null and param.deptid != ''"
>
and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid})
</if>
<if
test=
"param.turnover_status == 0"
>
and emp.emp_num not in (select em.emp_num from yggl_main_lzb em where em.org_code = #{param.orgCode} and em.job_status = 3)
</if>
<if
test=
"param.turnover_status == 1"
>
UNION
SELECT emp.emp_num AS empnum,
emp.`name` AS empname,
emp.org_code AS orgcode,
IFNULL(c. NAME, '') AS department,
IFNULL(emp.rz_time, '') AS rztime,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = emp.emp_num and em.org_code = emp.org_code),0) as turnover_status
FROM yggl_main_lzb emp
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 1=1
<if
test=
"param.query != null and param.query != ''"
>
and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or
c.name like CONCAT('%',#{param.query},'%'))
</if>
<if
test=
"param.deptid != null and param.deptid != ''"
>
and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid})
</if>
and emp.org_code = #{param.orgCode}
AND emp.job_status = #{param.orgCode}
</if>
<!--and c.id = #{param.deptid}
ORDER BY emp.emp_num DESC
...
...
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