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
b6bb94b4
Commit
b6bb94b4
authored
May 22, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://develop-gitlab.youlingrc.com/8timerv2/8timerapiv200.git
into dsc
parents
6467418f
c0a991a9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
203 additions
and
40 deletions
+203
-40
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
+10
-3
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+66
-6
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+0
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+9
-16
src/main/java/cn/timer/api/dao/kqmk/KqglAssoDkmxMapper.java
+4
-1
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+9
-1
src/main/java/cn/timer/api/dao/kqmk/KqglAssoTeshuMapper.java
+1
-1
src/main/java/cn/timer/api/dto/kqmk/AttSubsidiaryDto.java
+26
-0
src/main/resources/mapping/kqmk/KqglAssoDkmxMapper.xml
+18
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+2
-2
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+56
-5
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
View file @
b6bb94b4
...
@@ -52,12 +52,18 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
...
@@ -52,12 +52,18 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
@ApiModelProperty
(
value
=
"时长 时长"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"时长 时长"
,
example
=
"101"
)
private
double
duration
;
private
double
duration
;
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
private
Integer
leaveTypeId
;
private
Integer
leaveTypeId
;
@ApiModelProperty
(
value
=
"加班类型id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班类型id"
,
example
=
"101"
)
private
Integer
overtimeTypeId
;
private
Integer
overtimeTypeId
;
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费"
,
example
=
"101"
)
private
Integer
compensateId
;
private
Integer
compensateId
;
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
"开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"结束时间 "
,
example
=
"结束时间"
)
private
String
endTime
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
b6bb94b4
...
@@ -151,7 +151,7 @@ public class ClockInController {
...
@@ -151,7 +151,7 @@ public class ClockInController {
String
staputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchstart
);
//应打卡开始时间
String
staputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchstart
);
//应打卡开始时间
String
entputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchend
);
//应打卡结束时间
String
entputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchend
);
//应打卡结束时间
String
DKputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
time_
);
//打卡时间
String
DKputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
time_
);
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
);
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"HH:mm"
);
if
(!
effectiveDate
)
{
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
// 手动抛出异常
// 手动抛出异常
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
b6bb94b4
package
cn
.
timer
.
api
.
controller
.
kqgl
;
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -9,6 +8,7 @@ import java.util.Arrays;
...
@@ -9,6 +8,7 @@ import java.util.Arrays;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -21,6 +21,57 @@ public class ClockInTool {
...
@@ -21,6 +21,57 @@ public class ClockInTool {
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// 数组容量的扩容,当空间(.length)不够的时候,增加一
public
static
String
[]
arrycopy
(
String
[]
ss
)
{
// TODO Auto-generated method stub
String
[]
ii
=
new
String
[
ss
.
length
+
1
];
System
.
arraycopy
(
ss
,
0
,
ii
,
0
,
ss
.
length
);
return
ii
;
}
public
static
String
[]
replaceNull
(
String
[]
str
)
{
// 用StringBuffer来存放数组中的非空元素,用“;”分隔
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
str
.
length
;
i
++)
{
if
(
""
.
equals
(
str
[
i
]))
{
continue
;
}
sb
.
append
(
str
[
i
]);
if
(
i
!=
str
.
length
-
1
)
{
sb
.
append
(
";"
);
}
}
// 用String的split方法分割,得到数组
str
=
sb
.
toString
().
split
(
";"
);
return
str
;
}
/**
* 删除数组中的指定值 或者数组中的元素包含指定值
*
* @param filters 数组
* @param target 指定值
* @return
*/
public
static
String
[]
doChinFilters
(
String
[]
filters
,
String
target
)
{
String
[]
res
=
null
;
if
(
filters
.
length
>
0
)
{
List
<
String
>
tempList
=
Arrays
.
asList
(
filters
);
// Arrays.asList(filters) 迭代器实现类 不支持remove() 删除,多一步转化
List
<
String
>
arrList
=
new
ArrayList
<
String
>(
tempList
);
Iterator
<
String
>
it
=
arrList
.
iterator
();
while
(
it
.
hasNext
())
{
String
x
=
it
.
next
();
if
(
x
.
indexOf
(
target
)
!=
-
1
)
{
it
.
remove
();
}
}
res
=
new
String
[
arrList
.
size
()];
arrList
.
toArray
(
res
);
}
return
res
;
}
/**
/**
* 获取两个日期之间的所有日期
* 获取两个日期之间的所有日期
*/
*/
...
@@ -218,13 +269,20 @@ public class ClockInTool {
...
@@ -218,13 +269,20 @@ public class ClockInTool {
* @return true在时间段内,false不在时间段内
* @return true在时间段内,false不在时间段内
* @throws Exception
* @throws Exception
*/
*/
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
)
throws
Exception
{
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
,
String
date_format
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"HH:mm"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
date_format
);
Date
now
=
format
.
parse
(
nowDate
);
Date
now
=
null
;
Date
start
=
format
.
parse
(
startDate
);
Date
start
=
null
;
Date
end
=
format
.
parse
(
endDate
);
Date
end
=
null
;
try
{
now
=
format
.
parse
(
nowDate
);
start
=
format
.
parse
(
startDate
);
end
=
format
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
long
nowTime
=
now
.
getTime
();
long
nowTime
=
now
.
getTime
();
long
startTime
=
start
.
getTime
();
long
startTime
=
start
.
getTime
();
...
@@ -283,6 +341,8 @@ public class ClockInTool {
...
@@ -283,6 +341,8 @@ public class ClockInTool {
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
);
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
);
}
else
if
(
num
==
2
)
{
}
else
if
(
num
==
2
)
{
df2
=
new
SimpleDateFormat
(
"HH:mm"
);
df2
=
new
SimpleDateFormat
(
"HH:mm"
);
}
else
if
(
num
==
3
)
{
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm"
);
}
}
return
df2
.
format
(
date1
);
return
df2
.
format
(
date1
);
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
b6bb94b4
...
@@ -928,9 +928,6 @@ public class TimeCardController {
...
@@ -928,9 +928,6 @@ public class TimeCardController {
return
ResultUtil
.
data
(
yggl
);
return
ResultUtil
.
data
(
yggl
);
}
}
//用户和考勤组关系
@Autowired
private
UserAttendanceRelMapper
userattendancerelservice
;
//用户与设备关系表
//用户与设备关系表
@Autowired
@Autowired
private
UserEquiRelationMapper
userequirelationmapper
;
private
UserEquiRelationMapper
userequirelationmapper
;
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
b6bb94b4
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
b6bb94b4
...
@@ -33,16 +33,15 @@ public class KqglServiceImpl implements KqglService {
...
@@ -33,16 +33,15 @@ public class KqglServiceImpl implements KqglService {
*/
*/
@Override
@Override
public
boolean
attleaveapproval
(
AttLeaveApprovalDto
leaveappr
)
{
public
boolean
attleaveapproval
(
AttLeaveApprovalDto
leaveappr
)
{
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getStarttime
());
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getEndtime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
leaveappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
leaveappr
.
getLeaveid
()).
approvalType
(
2
).
duration
(
leaveappr
.
getDuration
())
KqglAssoRelationSummary
.
builder
().
userId
(
leaveappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
leaveappr
.
getLeaveid
()).
approvalType
(
2
).
duration
(
leaveappr
.
getDuration
())
.
leaveTypeId
(
leaveappr
.
getLeavetype
()).
build
().
insert
();
.
leaveTypeId
(
leaveappr
.
getLeavetype
()).
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
leaveappr
.
getStarttime
()))
.
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
leaveappr
.
getEndtime
())).
build
().
insert
();
}
}
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
leaveappr
.
getUserid
()));
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
leaveappr
.
getUserid
()));
int
modifynumber
=
1
;
int
modifynumber
=
1
;
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
leaveappr
.
getUserid
())
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
leaveappr
.
getUserid
())
...
@@ -50,10 +49,8 @@ public class KqglServiceImpl implements KqglService {
...
@@ -50,10 +49,8 @@ public class KqglServiceImpl implements KqglService {
if
(
balan
!=
null
)
{
if
(
balan
!=
null
)
{
modifynumber
=
balan
.
getModifyNumber
()+
1
;
modifynumber
=
balan
.
getModifyNumber
()+
1
;
}
}
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
leaveappr
.
getLeavetype
()).
userid
(
leaveappr
.
getUserid
()).
modifyAction
(
2
).
balanceDays
(
"-"
+
leaveappr
.
getDuration
())
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
leaveappr
.
getLeavetype
()).
userid
(
leaveappr
.
getUserid
()).
modifyAction
(
2
).
balanceDays
(
"-"
+
leaveappr
.
getDuration
())
.
reason
(
"系统按照规则自动"
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
.
reason
(
"系统按照规则自动"
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
return
true
;
return
true
;
}
}
...
@@ -62,7 +59,6 @@ public class KqglServiceImpl implements KqglService {
...
@@ -62,7 +59,6 @@ public class KqglServiceImpl implements KqglService {
*/
*/
@Override
@Override
public
boolean
attovertimeapproval
(
AttOvertimeApprovalDto
overappr
)
{
public
boolean
attovertimeapproval
(
AttOvertimeApprovalDto
overappr
)
{
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getStarttime
());
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getEndtime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
...
@@ -70,11 +66,9 @@ public class KqglServiceImpl implements KqglService {
...
@@ -70,11 +66,9 @@ public class KqglServiceImpl implements KqglService {
//记入打卡月汇总关联表
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
overappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
overappr
.
getOvertimeid
()).
approvalType
(
1
).
duration
(
overappr
.
getDuration
())
KqglAssoRelationSummary
.
builder
().
userId
(
overappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
overappr
.
getOvertimeid
()).
approvalType
(
1
).
duration
(
overappr
.
getDuration
())
.
overtimeTypeId
(
overappr
.
getOvertimetype
()).
compensateId
(
overappr
.
getCompensate
()).
build
().
insert
();
.
overtimeTypeId
(
overappr
.
getOvertimetype
()).
compensateId
(
overappr
.
getCompensate
()).
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
overappr
.
getStarttime
()))
.
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
overappr
.
getEndtime
())).
build
().
insert
();
}
}
return
true
;
return
true
;
}
}
...
@@ -89,7 +83,8 @@ public class KqglServiceImpl implements KqglService {
...
@@ -89,7 +83,8 @@ public class KqglServiceImpl implements KqglService {
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
3
).
build
().
insert
();
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
3
)
.
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
evecappr
.
getStarttime
())).
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
evecappr
.
getEndtime
())).
build
().
insert
();
}
}
}
else
{
//外出
}
else
{
//外出
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getStarttime
());
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getStarttime
());
...
@@ -97,7 +92,8 @@ public class KqglServiceImpl implements KqglService {
...
@@ -97,7 +92,8 @@ public class KqglServiceImpl implements KqglService {
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
4
).
build
().
insert
();
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
4
)
.
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
evecappr
.
getStarttime
())).
endTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
evecappr
.
getEndtime
())).
build
().
insert
();
}
}
}
}
return
true
;
return
true
;
...
@@ -108,12 +104,9 @@ public class KqglServiceImpl implements KqglService {
...
@@ -108,12 +104,9 @@ public class KqglServiceImpl implements KqglService {
*/
*/
@Override
@Override
public
boolean
attrepairapproval
(
AttRepairApprovalDto
repaappr
)
{
public
boolean
attrepairapproval
(
AttRepairApprovalDto
repaappr
)
{
String
cardrepltime
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
repaappr
.
getCardrepltime
());
//补卡时间
String
cardrepltime
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
repaappr
.
getCardrepltime
());
//补卡时间
//记入打卡月汇总关联表
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
repaappr
.
getUserid
()).
appTime
(
cardrepltime
).
approvalId
(
repaappr
.
getRepairid
()).
approvalType
(
5
).
build
().
insert
();
KqglAssoRelationSummary
.
builder
().
userId
(
repaappr
.
getUserid
()).
appTime
(
cardrepltime
).
approvalId
(
repaappr
.
getRepairid
()).
approvalType
(
5
).
startTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
).
format
(
repaappr
.
getCardrepltime
())).
build
().
insert
();
return
true
;
return
true
;
}
}
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoDkmxMapper.java
View file @
b6bb94b4
package
cn
.
timer
.
api
.
dao
.
kqmk
;
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.kqmk.KqglAssoDkmx
;
import
cn.timer.api.bean.kqmk.KqglAssoDkmx
;
import
cn.timer.api.dto.kqmk.AttSubsidiaryDto
;
/**
/**
* 打卡明细表
* 打卡明细表
...
@@ -13,4 +15,5 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx;
...
@@ -13,4 +15,5 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx;
@Repository
@Repository
public
interface
KqglAssoDkmxMapper
extends
BaseMapper
<
KqglAssoDkmx
>
{
public
interface
KqglAssoDkmxMapper
extends
BaseMapper
<
KqglAssoDkmx
>
{
AttSubsidiaryDto
subsidiary
(
int
userid
,
String
data
);
}
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
b6bb94b4
package
cn
.
timer
.
api
.
dao
.
kqmk
;
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
java.util.List
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
/**
/**
...
@@ -13,4 +16,9 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
...
@@ -13,4 +16,9 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
@Repository
@Repository
public
interface
KqglAssoRelationSummaryMapper
extends
BaseMapper
<
KqglAssoRelationSummary
>
{
public
interface
KqglAssoRelationSummaryMapper
extends
BaseMapper
<
KqglAssoRelationSummary
>
{
KqglAssoRelationSummary
SecondaryValue
(
int
userid
,
int
approvaltype
,
String
time
);
List
<
KqglAssoRelationSummary
>
SpecificLeave
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
);
}
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoTeshuMapper.java
View file @
b6bb94b4
...
@@ -18,6 +18,6 @@ public interface KqglAssoTeshuMapper extends BaseMapper<KqglAssoTeshu> {
...
@@ -18,6 +18,6 @@ public interface KqglAssoTeshuMapper extends BaseMapper<KqglAssoTeshu> {
int
insertKqglAssoTeshuList
(
List
<
KqglAssoTeshu
>
kqglassoteshu
);
int
insertKqglAssoTeshuList
(
List
<
KqglAssoTeshu
>
kqglassoteshu
);
List
<
KqglAssoTeshu
>
ShouldSpecialDatessetByKqzid
(
int
kqzid
,
int
tsrq
,
int
type
);
List
<
KqglAssoTeshu
>
ShouldSpecialDatessetByKqzid
(
int
kqzid
,
String
tsrq
,
int
type
);
}
}
src/main/java/cn/timer/api/dto/kqmk/AttSubsidiaryDto.java
0 → 100644
View file @
b6bb94b4
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
AttSubsidiaryDto
{
@ApiModelProperty
(
value
=
"工作总时长"
,
example
=
"字段说明"
)
private
double
gzsctotalgzsc
;
@ApiModelProperty
(
value
=
"严重迟到总次数"
,
example
=
"字段说明"
)
private
double
yzcdcstotal
;
@ApiModelProperty
(
value
=
"严重迟到总时长(分钟) "
,
example
=
"字段说明"
)
private
double
yzcdsctotal
;
@ApiModelProperty
(
value
=
"旷工迟到总次数"
,
example
=
"字段说明"
)
private
double
kgcdfzstotal
;
}
src/main/resources/mapping/kqmk/KqglAssoDkmxMapper.xml
View file @
b6bb94b4
...
@@ -28,6 +28,13 @@
...
@@ -28,6 +28,13 @@
<result
column=
"kgcdfzs"
property=
"kgcdfzs"
/>
<result
column=
"kgcdfzs"
property=
"kgcdfzs"
/>
</resultMap>
</resultMap>
<resultMap
id=
"AttSubsidiary"
type=
"cn.timer.api.dto.kqmk.AttSubsidiaryDto"
>
<result
column=
"gzsctotalgzsc"
property=
"gzsctotalgzsc"
/>
<result
column=
"yzcdcstotal"
property=
"yzcdcstotal"
/>
<result
column=
"yzcdsctotal"
property=
"yzcdsctotal"
/>
<result
column=
"kgcdfzstotal"
property=
"kgcdfzstotal"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
id,
userid,
userid,
...
@@ -78,6 +85,17 @@
...
@@ -78,6 +85,17 @@
kgcdfzs KqglAssoDkmx_kgcdfzs
kgcdfzs KqglAssoDkmx_kgcdfzs
</sql>
</sql>
<select
id=
"subsidiary"
resultMap=
"AttSubsidiary"
>
select SUM(dk.gzsc) as gzsctotalgzsc,
SUM(dk.yzcdcs) as yzcdcstotal,
SUM(dk.yzcdsc) as yzcdsctotal,
SUM(dk.kgcdfzs) as kgcdfzstotal
from kqgl_asso_dkmx dk
where dk.userid = #{userid}
and SUBSTR(dk.`data`,1,7) = #{data}
GROUP BY dk.userid
</select>
<!--
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkmx">
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkmx">
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
b6bb94b4
...
@@ -102,8 +102,8 @@
...
@@ -102,8 +102,8 @@
<select
id=
"selectAdditionalList"
resultMap=
"AdditionalMap"
>
<select
id=
"selectAdditionalList"
resultMap=
"AdditionalMap"
>
SELECT emp.emp_num as empnum,
SELECT emp.emp_num as empnum,
emp.`name` as empname,
emp.`name` as empname,
IFNULL(c.name,
''
) as department,
IFNULL(c.name,
null
) as department,
gw.`name`
as position
IFNULL(gw.`name`,null)
as position
from yggl_main_emp emp
from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
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
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
...
...
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
b6bb94b4
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
<result
column=
"leave_type_id"
property=
"leaveTypeId"
/>
<result
column=
"leave_type_id"
property=
"leaveTypeId"
/>
<result
column=
"overtime_type_id"
property=
"overtimeTypeId"
/>
<result
column=
"overtime_type_id"
property=
"overtimeTypeId"
/>
<result
column=
"compensate_id"
property=
"compensateId"
/>
<result
column=
"compensate_id"
property=
"compensateId"
/>
<result
column=
"start_time"
property=
"startTime"
/>
<result
column=
"end_time"
property=
"endTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -24,7 +26,9 @@
...
@@ -24,7 +26,9 @@
duration,
duration,
leave_type_id,
leave_type_id,
overtime_type_id,
overtime_type_id,
compensate_id
compensate_id,
start_time,
end_time
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias"
>
<sql
id=
"Base_Column_List_Alias"
>
...
@@ -36,9 +40,42 @@
...
@@ -36,9 +40,42 @@
duration KqglAssoRelationSummary_duration,
duration KqglAssoRelationSummary_duration,
leave_type_id KqglAssoRelationSummary_leave_type_id,
leave_type_id KqglAssoRelationSummary_leave_type_id,
overtime_type_id KqglAssoRelationSummary_overtime_type_id,
overtime_type_id KqglAssoRelationSummary_overtime_type_id,
compensate_id KqglAssoRelationSummary_compensate_id
compensate_id KqglAssoRelationSummary_compensate_id,
start_time KqglAssoRelationSummary_start_time,
end_time KqglAssoRelationSummary_end_time
</sql>
</sql>
<select
id=
"SecondaryValue"
resultMap=
"BaseResultMap"
>
select a.user_id,
SUM(a.duration) as duration
from (select res.user_id,res.duration
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{time}
GROUP BY res.approval_id) as a
GROUP BY a.user_id
</select>
<select
id=
"SpecificLeave"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
</select>
<select
id=
"LeaveInvestigation"
resultMap=
"BaseResultMap"
>
select res.start_time,
res.end_time
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.start_time,res.end_time;
</select>
<!--
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
...
@@ -66,7 +103,13 @@
...
@@ -66,7 +103,13 @@
overtime_type_id,
overtime_type_id,
</if>
</if>
<if test ='null != compensateId'>
<if test ='null != compensateId'>
compensate_id
compensate_id,
</if>
<if test ='null != startTime'>
start_time,
</if>
<if test ='null != endTime'>
end_time
</if>
</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
@@ -92,7 +135,13 @@
...
@@ -92,7 +135,13 @@
#{overtimeTypeId},
#{overtimeTypeId},
</if>
</if>
<if test ='null != compensateId'>
<if test ='null != compensateId'>
#{compensateId}
#{compensateId},
</if>
<if test ='null != startTime'>
#{startTime},
</if>
<if test ='null != endTime'>
#{endTime}
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -112,7 +161,9 @@
...
@@ -112,7 +161,9 @@
<if test ='null != duration'>duration = #{duration},</if>
<if test ='null != duration'>duration = #{duration},</if>
<if test ='null != leaveTypeId'>leave_type_id = #{leaveTypeId},</if>
<if test ='null != leaveTypeId'>leave_type_id = #{leaveTypeId},</if>
<if test ='null != overtimeTypeId'>overtime_type_id = #{overtimeTypeId},</if>
<if test ='null != overtimeTypeId'>overtime_type_id = #{overtimeTypeId},</if>
<if test ='null != compensateId'>compensate_id = #{compensateId}</if>
<if test ='null != compensateId'>compensate_id = #{compensateId},</if>
<if test ='null != startTime'>start_time = #{startTime},</if>
<if test ='null != endTime'>end_time = #{endTime}</if>
</set>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
View file @
b6bb94b4
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
select
<include
refid=
"Base_Column_List"
/>
select
<include
refid=
"Base_Column_List"
/>
from kqgl_asso_teshu teshu
from kqgl_asso_teshu teshu
where teshu.kqzid = #{kqzid}
where teshu.kqzid = #{kqzid}
and
substring(teshu.tsrq,6,2
) = #{tsrq}
and
SUBSTR(teshu.tsrq,1,7
) = #{tsrq}
and teshu.type = #{type}
and teshu.type = #{type}
</select>
</select>
...
...
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