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
7e21b096
Commit
7e21b096
authored
May 20, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
681369b6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
697 additions
and
33 deletions
+697
-33
src/main/java/cn/timer/api/bean/kqmk/AttendanceSocks.java
+47
-0
src/main/java/cn/timer/api/bean/kqmk/KqglAssoDkmx.java
+10
-0
src/main/java/cn/timer/api/bean/kqmk/KqglAssoMonthPunchSummary.java
+2
-1
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
+64
-0
src/main/java/cn/timer/api/bean/kqmk/KqglTaskTiming.java
+52
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+74
-24
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceUtil.java
+20
-0
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+72
-1
src/main/java/cn/timer/api/dao/kqmk/AttendanceSocksMapper.java
+16
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
+2
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+16
-0
src/main/java/cn/timer/api/dao/kqmk/KqglTaskTimingMapper.java
+17
-0
src/main/java/cn/timer/api/dto/kqmk/AttLeaveApprovalDto.java
+1
-1
src/main/java/cn/timer/api/dto/kqmk/AttOvertimeApprovalDto.java
+1
-1
src/main/resources/mapping/kqmk/AttendanceSocksMapper.xml
+25
-0
src/main/resources/mapping/kqmk/KqglAssoDkmxMapper.xml
+35
-5
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+11
-0
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+141
-0
src/main/resources/mapping/kqmk/KqglTaskTimingMapper.xml
+91
-0
No files found.
src/main/java/cn/timer/api/bean/kqmk/AttendanceSocks.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
bean
.
kqmk
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author lal 2020-05-19
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"attendance_socks"
)
@ApiModel
(
"考勤定时"
)
public
class
AttendanceSocks
extends
Model
<
AttendanceSocks
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
cronId
;
@ApiModelProperty
(
value
=
"cron_name "
,
example
=
"cron_name"
)
private
String
cronName
;
@ApiModelProperty
(
value
=
"cron "
,
example
=
"cron"
)
private
String
cron
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoDkmx.java
View file @
7e21b096
...
...
@@ -91,4 +91,13 @@ public class KqglAssoDkmx extends Model<KqglAssoDkmx> {
@ApiModelProperty
(
value
=
"打卡时间 打卡时间"
,
example
=
"101"
)
private
Long
dksj
;
@ApiModelProperty
(
value
=
"严重迟到次数 严重迟到次数"
,
example
=
"101"
)
private
Integer
yzcdcs
;
@ApiModelProperty
(
value
=
"严重迟到时长(分钟) "
,
example
=
"严重迟到时长(分钟)"
)
private
Double
yzcdsc
;
@ApiModelProperty
(
value
=
"旷工迟到次数 旷工迟到次数"
,
example
=
"101"
)
private
Integer
kgcdfzs
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoMonthPunchSummary.java
View file @
7e21b096
...
...
@@ -227,6 +227,6 @@ public class KqglAssoMonthPunchSummary extends Model<KqglAssoMonthPunchSummary>
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"最后修改时间 最后修改时间"
,
example
=
"101"
)
private
Integer
lastModified
;
private
Long
lastModified
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
bean
.
kqmk
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author lal 2020-05-19
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"kqgl_asso_relation_summary"
)
@ApiModel
(
"打卡月汇总关联表"
)
public
class
KqglAssoRelationSummary
extends
Model
<
KqglAssoRelationSummary
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id 用户id"
,
example
=
"101"
)
private
Integer
userId
;
@ApiModelProperty
(
value
=
"时间 "
,
example
=
"年月日"
)
private
String
appTime
;
@ApiModelProperty
(
value
=
"审批id 审批id"
,
example
=
"101"
)
private
Integer
approvalId
;
@ApiModelProperty
(
value
=
"审批类型 1:加班 2:请假 3:出差 4:外出 5:补卡"
,
example
=
"101"
)
private
Integer
approvalType
;
@ApiModelProperty
(
value
=
"时长 时长"
,
example
=
"101"
)
private
double
duration
;
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
private
Integer
leaveTypeId
;
@ApiModelProperty
(
value
=
"加班类型id"
,
example
=
"101"
)
private
Integer
overtimeTypeId
;
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费"
,
example
=
"101"
)
private
Integer
compensateId
;
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglTaskTiming.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
bean
.
kqmk
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2020-05-19
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"kqgl_task_timing"
)
@ApiModel
(
"考勤任务定时"
)
public
class
KqglTaskTiming
extends
Model
<
KqglTaskTiming
>
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"任务 "
,
example
=
"任务"
)
private
String
task
;
@ApiModelProperty
(
value
=
"任务执行状态 0:未执行;1:执行中"
,
example
=
"101"
)
private
Integer
executionStatus
;
@ApiModelProperty
(
value
=
"最后一次执行时间 最后一次执行时间"
,
example
=
"101"
)
private
Long
lastExecutionTime
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
7e21b096
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
7e21b096
...
...
@@ -14,7 +14,7 @@ import java.util.Locale;
import
java.util.Set
;
/**
* @author
Yl123
2020-05-11
* @author
lal
2020-05-11
*
*/
public
class
ClockInTool
{
...
...
@@ -22,14 +22,67 @@ public class ClockInTool {
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
/**
* 获取两个日期之间的所有日期
*/
public
static
List
<
String
>
getDays
(
String
startTime
,
String
endTime
)
{
// 返回的日期集合
List
<
String
>
days
=
new
ArrayList
<
String
>();
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
Date
start
=
dateFormat
.
parse
(
startTime
);
Date
end
=
dateFormat
.
parse
(
endTime
);
Calendar
tempStart
=
Calendar
.
getInstance
();
tempStart
.
setTime
(
start
);
Calendar
tempEnd
=
Calendar
.
getInstance
();
tempEnd
.
setTime
(
end
);
tempEnd
.
add
(
Calendar
.
DATE
,
+
1
);
// 日期加1(包含结束)
while
(
tempStart
.
before
(
tempEnd
))
{
days
.
add
(
dateFormat
.
format
(
tempStart
.
getTime
()));
tempStart
.
add
(
Calendar
.
DAY_OF_YEAR
,
1
);
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
days
;
}
/**
* 拼接字符串
*/
public
static
String
listToString
(
List
<
String
>
list
)
{
if
(
list
==
null
)
{
return
null
;
}
StringBuilder
result
=
new
StringBuilder
();
boolean
first
=
true
;
// 第一个前面不拼接","
for
(
String
string
:
list
)
{
if
(
first
)
{
first
=
false
;
}
else
{
result
.
append
(
","
);
}
result
.
append
(
string
);
}
return
result
.
toString
();
}
/**
* 使用java正则表达式去掉多余的.与0
*
* @param s
* @return string
*/
public
static
String
replace
(
String
s
){
if
(
null
!=
s
&&
s
.
indexOf
(
"."
)
>
0
){
s
=
s
.
replaceAll
(
"0+?$"
,
""
);
//去掉多余的0
s
=
s
.
replaceAll
(
"[.]$"
,
""
);
//如最后一位是.则去掉
public
static
String
replace
(
String
s
)
{
if
(
null
!=
s
&&
s
.
indexOf
(
"."
)
>
0
)
{
s
=
s
.
replaceAll
(
"0+?$"
,
""
);
// 去掉多余的0
s
=
s
.
replaceAll
(
"[.]$"
,
""
);
// 如最后一位是.则去掉
}
return
s
;
}
...
...
@@ -37,8 +90,7 @@ public class ClockInTool {
/**
* 根据 年、月 获取对应的月份 的 天数
*/
public
static
int
getDaysByYearMonth
(
int
year
,
int
month
)
{
public
static
int
getDaysByYearMonth
(
int
year
,
int
month
)
{
Calendar
a
=
Calendar
.
getInstance
();
a
.
set
(
Calendar
.
YEAR
,
year
);
a
.
set
(
Calendar
.
MONTH
,
month
-
1
);
...
...
@@ -58,8 +110,7 @@ public class ClockInTool {
public
static
String
getMinMonthDate
(
String
date
)
throws
ParseException
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
famt
.
parse
(
date
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
return
famt
.
format
(
calendar
.
getTime
());
}
...
...
@@ -73,20 +124,20 @@ public class ClockInTool {
public
static
String
getMaxMonthDate
(
String
date
)
throws
ParseException
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
famt
.
parse
(
date
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
return
famt
.
format
(
calendar
.
getTime
());
}
/**
* 对比两个字符串数组
*
* @param t1
* @param t2
* @return
*/
public
static
<
T
>
List
<
T
>
compare
(
T
[]
t1
,
T
[]
t2
)
{
List
<
T
>
list1
=
Arrays
.
asList
(
t1
);
//将t1数组转成list数组
List
<
T
>
list2
=
new
ArrayList
<
T
>();
//用来存放2个数组中不相同的元素
List
<
T
>
list1
=
Arrays
.
asList
(
t1
);
// 将t1数组转成list数组
List
<
T
>
list2
=
new
ArrayList
<
T
>();
// 用来存放2个数组中不相同的元素
for
(
T
t
:
t2
)
{
if
(!
list1
.
contains
(
t
))
{
list2
.
add
(
t
);
...
...
@@ -96,26 +147,26 @@ public class ClockInTool {
}
public
static
String
[]
array_unique
(
String
[]
ss
)
{
Set
<
String
>
set
=
new
HashSet
<
String
>(
Arrays
.
asList
(
ss
));
Set
<
String
>
set
=
new
HashSet
<
String
>(
Arrays
.
asList
(
ss
));
return
set
.
toArray
(
new
String
[
set
.
size
()]);
//或者return new HashSet<String>(Arrays.asList(ss)).toArray(new String[0]);
//
或者return new HashSet<String>(Arrays.asList(ss)).toArray(new String[0]);
}
public
static
byte
[]
CreateBSCommBufferFromString
(
String
sCmdParam
,
byte
[]
bytCmd
)
{
try
{
if
(
sCmdParam
.
length
()
==
0
){
public
static
byte
[]
CreateBSCommBufferFromString
(
String
sCmdParam
,
byte
[]
bytCmd
)
{
try
{
if
(
sCmdParam
.
length
()
==
0
)
{
return
bytCmd
;
}
byte
[]
bytText
=
sCmdParam
.
getBytes
(
"UTF-8"
);
byte
[]
bytTextLen
=
int2byte
(
bytText
.
length
+
1
);
bytCmd
=
new
byte
[
4
+
bytText
.
length
+
1
];
System
.
arraycopy
(
bytTextLen
,
0
,
bytCmd
,
0
,
bytTextLen
.
length
);
System
.
arraycopy
(
bytText
,
0
,
bytCmd
,
4
,
bytText
.
length
);
bytCmd
=
new
byte
[
4
+
bytText
.
length
+
1
];
System
.
arraycopy
(
bytTextLen
,
0
,
bytCmd
,
0
,
bytTextLen
.
length
);
System
.
arraycopy
(
bytText
,
0
,
bytCmd
,
4
,
bytText
.
length
);
bytCmd
[
4
+
bytText
.
length
]
=
0
;
return
bytCmd
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
bytCmd
=
new
byte
[
0
];
bytCmd
=
new
byte
[
0
];
return
bytCmd
;
}
}
...
...
@@ -139,7 +190,6 @@ public class ClockInTool {
return
bytTmp
;
}
public
static
String
dateToWeek2
(
String
datetime
)
{
SimpleDateFormat
f
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
0 → 100644
View file @
7e21b096
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceUtil.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
controller
.
kqgl
.
atttimer
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
cn.timer.api.bean.kqmk.AttendanceSocks
;
public
class
AttendanceUtil
{
// 默认cron 5秒一次
private
static
String
cron
=
"0/5 * * * * ?"
;
// 数据库cron
public
static
String
getCron
(
String
tablename
)
{
AttendanceSocks
task
=
AttendanceSocks
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
AttendanceSocks
>().
eq
(
AttendanceSocks:
:
getCronName
,
tablename
));
// 数据库查询
if
(
task
!=
null
&&
task
.
getCron
()
!=
null
)
{
cron
=
task
.
getCron
();
}
return
cron
;
}
}
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
7e21b096
package
cn
.
timer
.
api
.
controller
.
kqgl
.
service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.kqmk.AttLeaveApprovalDto
;
import
cn.timer.api.dto.kqmk.AttOvertimeApprovalDto
;
import
cn.timer.api.dto.kqmk.AttRepairApprovalDto
;
/**
* @author lal
* 记录用户假期审批流程 对应减去剩余余额
*/
@Service
public
class
KqglServiceImpl
implements
KqglService
{
@Autowired
private
KqglAssoLeaveBalanceMapper
kqglassoleavebalancemapper
;
/**
* 考勤请假审批
*/
@Override
public
boolean
attleaveapproval
(
AttLeaveApprovalDto
leaveappr
)
{
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
leaveappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
leaveappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
leaveappr
.
getLeaveid
()).
approvalType
(
2
).
duration
(
leaveappr
.
getDuration
())
.
leaveTypeId
(
leaveappr
.
getLeavetype
()).
build
().
insert
();
}
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
leaveappr
.
getUserid
()));
int
modifynumber
=
1
;
KqglAssoLeaveBalance
balan
=
kqglassoleavebalancemapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveBalance
>().
lambda
().
eq
(
KqglAssoLeaveBalance:
:
getUserid
,
leaveappr
.
getUserid
())
.
orderByDesc
(
KqglAssoLeaveBalance
::
getModifyNumber
).
last
(
"LIMIT 1"
));
if
(
balan
!=
null
)
{
modifynumber
=
balan
.
getModifyNumber
()+
1
;
}
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
();
//员工假期余额
return
true
;
}
...
...
@@ -25,6 +63,18 @@ public class KqglServiceImpl implements KqglService {
@Override
public
boolean
attovertimeapproval
(
AttOvertimeApprovalDto
overappr
)
{
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
overappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
overappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
overappr
.
getOvertimeid
()).
approvalType
(
1
).
duration
(
overappr
.
getDuration
())
.
overtimeTypeId
(
overappr
.
getOvertimetype
()).
compensateId
(
overappr
.
getCompensate
()).
build
().
insert
();
}
return
true
;
}
...
...
@@ -33,7 +83,23 @@ public class KqglServiceImpl implements KqglService {
*/
@Override
public
boolean
attevectionapproval
(
AttEvectionApprovalDto
evecappr
)
{
if
(
evecappr
.
getEvectiontype
()
==
1
)
{
//出差
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
3
).
build
().
insert
();
}
}
else
{
//外出
String
startdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getStarttime
());
String
enddate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
evecappr
.
getEndtime
());
String
[]
days
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
startdate
,
enddate
)).
split
(
";"
);
for
(
String
num
:
days
)
{
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
evecappr
.
getUserid
()).
appTime
(
num
).
approvalId
(
evecappr
.
getEvectionid
()).
approvalType
(
4
).
build
().
insert
();
}
}
return
true
;
}
...
...
@@ -43,6 +109,11 @@ public class KqglServiceImpl implements KqglService {
@Override
public
boolean
attrepairapproval
(
AttRepairApprovalDto
repaappr
)
{
String
cardrepltime
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
repaappr
.
getCardrepltime
());
//补卡时间
//记入打卡月汇总关联表
KqglAssoRelationSummary
.
builder
().
userId
(
repaappr
.
getUserid
()).
appTime
(
cardrepltime
).
approvalId
(
repaappr
.
getRepairid
()).
approvalType
(
5
).
build
().
insert
();
return
true
;
}
...
...
src/main/java/cn/timer/api/dao/kqmk/AttendanceSocksMapper.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
cn.timer.api.bean.kqmk.AttendanceSocks
;
/**
* 考勤定时
*
* @author Tang 2020-05-19
*/
@Repository
public
interface
AttendanceSocksMapper
extends
BaseMapper
<
AttendanceSocks
>
{
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
View file @
7e21b096
...
...
@@ -24,4 +24,6 @@ public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBala
IPage
<
EmployeeLeaveBalanceDto
>
selectPageByQueryLeaveBalance
(
IPage
<
EmployeeLeaveBalanceDto
>
page
,
@Param
(
"param"
)
AttqueryCriteriaDto
attquerycriteriadto
);
AdditionalDto
selectAdditional
(
int
orgcode
,
int
empnum
);
List
<
AdditionalDto
>
selectAdditionalList
(
int
orgcode
);
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
/**
* 打卡月汇总关联表
*
* @author Tang 2020-05-19
*/
@Repository
public
interface
KqglAssoRelationSummaryMapper
extends
BaseMapper
<
KqglAssoRelationSummary
>
{
}
src/main/java/cn/timer/api/dao/kqmk/KqglTaskTimingMapper.java
0 → 100644
View file @
7e21b096
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.kqmk.KqglTaskTiming
;
/**
* 考勤任务定时
*
* @author Tang 2020-05-19
*/
@Repository
public
interface
KqglTaskTimingMapper
extends
BaseMapper
<
KqglTaskTiming
>
{
}
src/main/java/cn/timer/api/dto/kqmk/AttLeaveApprovalDto.java
View file @
7e21b096
...
...
@@ -30,6 +30,6 @@ public class AttLeaveApprovalDto {
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"时间戳"
)
private
long
endtime
;
@ApiModelProperty
(
value
=
"时长
(分钟)
"
,
example
=
""
)
@ApiModelProperty
(
value
=
"时长"
,
example
=
""
)
private
double
duration
;
}
src/main/java/cn/timer/api/dto/kqmk/AttOvertimeApprovalDto.java
View file @
7e21b096
...
...
@@ -30,7 +30,7 @@ public class AttOvertimeApprovalDto {
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"时间戳"
)
private
long
endtime
;
@ApiModelProperty
(
value
=
"时长
(分钟)
"
,
example
=
""
)
@ApiModelProperty
(
value
=
"时长"
,
example
=
""
)
private
double
duration
;
@ApiModelProperty
(
value
=
"加班补偿方式"
,
example
=
"1:转调休;2:转加班费;3:转调休或加班费"
)
...
...
src/main/resources/mapping/kqmk/AttendanceSocksMapper.xml
0 → 100644
View file @
7e21b096
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.kqmk.AttendanceSocksMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqmk.AttendanceSocks"
>
<result
column=
"cron_id"
property=
"cronId"
/>
<result
column=
"cron_name"
property=
"cronName"
/>
<result
column=
"cron"
property=
"cron"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
cron_id,
cron_name,
cron
</sql>
<sql
id=
"Base_Column_List_Alias"
>
cron_id AttendanceSocks_cron_id,
cron_name AttendanceSocks_cron_name,
cron AttendanceSocks_cron
</sql>
</mapper>
\ No newline at end of file
src/main/resources/mapping/kqmk/KqglAssoDkmxMapper.xml
View file @
7e21b096
...
...
@@ -23,6 +23,9 @@
<result
column=
"gzsc"
property=
"gzsc"
/>
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"dksj"
property=
"dksj"
/>
<result
column=
"yzcdcs"
property=
"yzcdcs"
/>
<result
column=
"yzcdsc"
property=
"yzcdsc"
/>
<result
column=
"kgcdfzs"
property=
"kgcdfzs"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -44,7 +47,10 @@
ydkcs,
gzsc,
qyid,
dksj
dksj,
yzcdcs,
yzcdsc,
kgcdfzs
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -66,7 +72,10 @@
ydkcs KqglAssoDkmx_ydkcs,
gzsc KqglAssoDkmx_gzsc,
qyid KqglAssoDkmx_qyid,
dksj KqglAssoDkmx_dksj
dksj KqglAssoDkmx_dksj,
yzcdcs KqglAssoDkmx_yzcdcs,
yzcdsc KqglAssoDkmx_yzcdsc,
kgcdfzs KqglAssoDkmx_kgcdfzs
</sql>
<!--
...
...
@@ -126,7 +135,16 @@
qyid,
</if>
<if test ='null != dksj'>
dksj
dksj,
</if>
<if test ='null != yzcdcs'>
yzcdcs,
</if>
<if test ='null != yzcdsc'>
yzcdsc,
</if>
<if test ='null != kgcdfzs'>
kgcdfzs
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
...
@@ -182,7 +200,16 @@
#{qyid},
</if>
<if test ='null != dksj'>
#{dksj}
#{dksj},
</if>
<if test ='null != yzcdcs'>
#{yzcdcs},
</if>
<if test ='null != yzcdsc'>
#{yzcdsc},
</if>
<if test ='null != kgcdfzs'>
#{kgcdfzs}
</if>
</trim>
</insert>
...
...
@@ -212,7 +239,10 @@
<if test ='null != ydkcs'>ydkcs = #{ydkcs},</if>
<if test ='null != gzsc'>gzsc = #{gzsc},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != dksj'>dksj = #{dksj}</if>
<if test ='null != dksj'>dksj = #{dksj},</if>
<if test ='null != yzcdcs'>yzcdcs = #{yzcdcs},</if>
<if test ='null != yzcdsc'>yzcdsc = #{yzcdsc},</if>
<if test ='null != kgcdfzs'>kgcdfzs = #{kgcdfzs}</if>
</set>
WHERE id = #{id}
</update>
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
7e21b096
...
...
@@ -99,6 +99,17 @@
and emp.emp_num = #{empnum}
</select>
<select
id=
"selectAdditionalList"
resultMap=
"AdditionalMap"
>
SELECT emp.emp_num as empnum,
emp.`name` as empname,
IFNULL(c.name,'') as department,
gw.`name` as position
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 = #{orgcode}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance">
...
...
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
0 → 100644
View file @
7e21b096
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqmk.KqglAssoRelationSummary"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"app_time"
property=
"appTime"
/>
<result
column=
"approval_id"
property=
"approvalId"
/>
<result
column=
"approval_type"
property=
"approvalType"
/>
<result
column=
"duration"
property=
"duration"
/>
<result
column=
"leave_type_id"
property=
"leaveTypeId"
/>
<result
column=
"overtime_type_id"
property=
"overtimeTypeId"
/>
<result
column=
"compensate_id"
property=
"compensateId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
user_id,
app_time,
approval_id,
approval_type,
duration,
leave_type_id,
overtime_type_id,
compensate_id
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id KqglAssoRelationSummary_id,
user_id KqglAssoRelationSummary_user_id,
app_time KqglAssoRelationSummary_app_time,
approval_id KqglAssoRelationSummary_approval_id,
approval_type KqglAssoRelationSummary_approval_type,
duration KqglAssoRelationSummary_duration,
leave_type_id KqglAssoRelationSummary_leave_type_id,
overtime_type_id KqglAssoRelationSummary_overtime_type_id,
compensate_id KqglAssoRelationSummary_compensate_id
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
INSERT INTO kqgl_asso_relation_summary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
user_id,
</if>
<if test ='null != appTime'>
app_time,
</if>
<if test ='null != approvalId'>
approval_id,
</if>
<if test ='null != approvalType'>
approval_type,
</if>
<if test ='null != duration'>
duration,
</if>
<if test ='null != leaveTypeId'>
leave_type_id,
</if>
<if test ='null != overtimeTypeId'>
overtime_type_id,
</if>
<if test ='null != compensateId'>
compensate_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != appTime'>
#{appTime},
</if>
<if test ='null != approvalId'>
#{approvalId},
</if>
<if test ='null != approvalType'>
#{approvalType},
</if>
<if test ='null != duration'>
#{duration},
</if>
<if test ='null != leaveTypeId'>
#{leaveTypeId},
</if>
<if test ='null != overtimeTypeId'>
#{overtimeTypeId},
</if>
<if test ='null != compensateId'>
#{compensateId}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_relation_summary
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
UPDATE kqgl_asso_relation_summary
<set>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != appTime'>app_time = #{appTime},</if>
<if test ='null != approvalId'>approval_id = #{approvalId},</if>
<if test ='null != approvalType'>approval_type = #{approvalType},</if>
<if test ='null != duration'>duration = #{duration},</if>
<if test ='null != leaveTypeId'>leave_type_id = #{leaveTypeId},</if>
<if test ='null != overtimeTypeId'>overtime_type_id = #{overtimeTypeId},</if>
<if test ='null != compensateId'>compensate_id = #{compensateId}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_relation_summary
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_relation_summary
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_relation_summary
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/kqmk/KqglTaskTimingMapper.xml
0 → 100644
View file @
7e21b096
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.kqmk.KqglTaskTimingMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.timer.api.bean.kqmk.KqglTaskTiming"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"task"
property=
"task"
/>
<result
column=
"execution_status"
property=
"executionStatus"
/>
<result
column=
"last_execution_time"
property=
"lastExecutionTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
task,
execution_status,
last_execution_time
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id KqglTaskTiming_id,
task KqglTaskTiming_task,
execution_status KqglTaskTiming_execution_status,
last_execution_time KqglTaskTiming_last_execution_time
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglTaskTiming">
INSERT INTO kqgl_task_timing
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != task'>
task,
</if>
<if test ='null != executionStatus'>
execution_status,
</if>
<if test ='null != lastExecutionTime'>
last_execution_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != task'>
#{task},
</if>
<if test ='null != executionStatus'>
#{executionStatus},
</if>
<if test ='null != lastExecutionTime'>
#{lastExecutionTime}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_task_timing
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglTaskTiming">
UPDATE kqgl_task_timing
<set>
<if test ='null != task'>task = #{task},</if>
<if test ='null != executionStatus'>execution_status = #{executionStatus},</if>
<if test ='null != lastExecutionTime'>last_execution_time = #{lastExecutionTime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_task_timing
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_task_timing
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_task_timing
</select>
-->
</mapper>
\ No newline at end of file
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