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
708e1728
Commit
708e1728
authored
4 years ago
by
lal
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
84698311
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
51 deletions
+88
-51
src/main/java/cn/timer/api/controller/LoginController.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+5
-1
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+18
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+44
-41
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+14
-4
src/main/java/cn/timer/api/dto/jxgl/AppraisalDetail.java
+2
-1
src/main/java/cn/timer/api/dto/kqmk/AttOvertimeApprovalDto.java
+1
-1
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
708e1728
...
...
@@ -37,6 +37,7 @@ import cn.timer.api.bean.jxgl.JxglBasicSetting;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics
;
import
cn.timer.api.bean.qyxx.CmsContent
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
...
...
@@ -602,6 +603,9 @@ public class LoginController {
}
}
//加班基础设置
KqglAssoOvertimeBasics
.
builder
().
minimumUnit
(
3
).
modifyUserid
(
999
).
modifyTime
(
new
Date
().
getTime
()).
orgCode
(
qyzxEntInfoM
.
getId
());
// 绩效设置初始化
JxglBasicSetting
bS
=
jxglService
.
selectAT
(
qyId
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
708e1728
...
...
@@ -391,6 +391,7 @@ public class ClockInController {
if
(
effectiveDate1
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk1
()
!=
null
)
{
sbdkkd
=
true
;
//打卡无效
atttype
=
1
;
}
else
{
atttype
=
1
;
}
...
...
@@ -414,6 +415,7 @@ public class ClockInController {
if
(
effectiveDate3
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
atttype
=
3
;
}
else
{
atttype
=
3
;
}
...
...
@@ -440,6 +442,7 @@ public class ClockInController {
if
(
effectiveDate5
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
atttype
=
5
;
}
else
{
atttype
=
5
;
}
...
...
@@ -926,8 +929,9 @@ public class ClockInController {
//第二次未超过应上班打卡时间 打卡为无效
if
(
sbdkkd
)
{
status
=
0
;
status
=
2
;
atttype
=
0
;
msg
=
"已有最优的打卡记录存在"
;
}
long
attime
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
708e1728
...
...
@@ -2641,8 +2641,13 @@ public class TimeCardController {
if
(!(
"0"
).
equals
(
rul
.
getWorkThree
()))
{
CompensateDto
com3
=
CompensateDto
.
builder
().
build
();
com3
.
setId
(
3
);
com3
.
setValue
(
"调休
/加班费
"
);
com3
.
setValue
(
"调休"
);
coms
.
add
(
com3
);
CompensateDto
com4
=
CompensateDto
.
builder
().
build
();
com4
.
setId
(
4
);
com4
.
setValue
(
"加班费"
);
coms
.
add
(
com4
);
}
}
}
else
if
(
id
==
2
)
{
...
...
@@ -2662,8 +2667,13 @@ public class TimeCardController {
if
(!(
"0"
).
equals
(
rul
.
getRestThree
()))
{
CompensateDto
com3
=
CompensateDto
.
builder
().
build
();
com3
.
setId
(
3
);
com3
.
setValue
(
"调休
/加班费
"
);
com3
.
setValue
(
"调休"
);
coms
.
add
(
com3
);
CompensateDto
com4
=
CompensateDto
.
builder
().
build
();
com4
.
setId
(
4
);
com4
.
setValue
(
"加班费"
);
coms
.
add
(
com4
);
}
}
}
else
{
...
...
@@ -2683,8 +2693,13 @@ public class TimeCardController {
if
(!(
"0"
).
equals
(
rul
.
getHolidaysThree
()))
{
CompensateDto
com3
=
CompensateDto
.
builder
().
build
();
com3
.
setId
(
3
);
com3
.
setValue
(
"调休
/加班费
"
);
com3
.
setValue
(
"调休"
);
coms
.
add
(
com3
);
CompensateDto
com4
=
CompensateDto
.
builder
().
build
();
com4
.
setId
(
4
);
com4
.
setValue
(
"加班费"
);
coms
.
add
(
com4
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
708e1728
...
...
@@ -104,12 +104,10 @@ public class AttendanceTaskTiming{
* @throws ParseException
*/
//3.添加定时任务 每天下午七点执行一次
@Scheduled
(
cron
=
"0 11 10 * * ?"
)
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000)
//3.添加定时任务 每四小时执行一次
@Scheduled
(
cron
=
"0 0 */4 * * ?"
)
// @Scheduled(cron = "0
/5 *
* * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0
*/5
* * * ?") // 测试:5秒执行一次 0 0 19 * * ?
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
...
...
@@ -514,48 +512,53 @@ public class AttendanceTaskTiming{
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
overtimes
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
1
));
// KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
String
company
=
"未知"
,
method
=
"无"
;
//加班单位、加班补偿方式
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics
basics
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
org_code
));
if
(
basics
.
getMinimumUnit
()
==
1
)
{
company
=
"分钟"
;
}
else
if
(
basics
.
getMinimumUnit
()
==
2
)
{
company
=
"半小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
3
)
{
company
=
"小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
4
)
{
company
=
"半天"
;}
else
if
(
basics
.
getMinimumUnit
()
==
5
)
{
company
=
"天"
;}
//1:转调休;2:转加班费;3:转调休或加班费
if
(
lea
.
getCompensateId
()
==
1
)
{
method
=
"转调休"
;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
))
{
if
(
lea
.
getCompensateId
()
==
1
)
{
workingturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
workingtransferovertime
++;
List
<
KqglAssoRelationSummary
>
leas
=
KqglAssoRelationSummary
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
1
));
for
(
KqglAssoRelationSummary
lea
:
leas
)
{
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics
basics
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
org_code
));
if
(
basics
.
getMinimumUnit
()
==
1
)
{
company
=
"分钟"
;
}
else
if
(
basics
.
getMinimumUnit
()
==
2
)
{
company
=
"半小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
3
)
{
company
=
"小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
4
)
{
company
=
"半天"
;}
else
if
(
basics
.
getMinimumUnit
()
==
5
)
{
company
=
"天"
;}
//1:转调休;2:转加班费;3:转调休或加班费
if
(
lea
.
getCompensateId
()
==
1
)
{
method
=
"转调休"
;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
))
{
if
(
lea
.
getCompensateId
()
==
1
)
{
workingturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
workingtransferovertime
++;
}
}
}
//休息日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0
) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
restturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
resttransferovertime
++;
//休息日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
restturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
resttransferovertime
++;
}
}
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0
) {
if
(!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
)
&&
!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
holidayturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
holidaytransferovertime
++;
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) {
if
(!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
)
&&
!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
holidayturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
holidaytransferovertime
++;
}
}
}
}
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
708e1728
...
...
@@ -17,6 +17,7 @@ import cn.timer.api.bean.kqmk.KqglAssoDkmx;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRange
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeRules
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
...
...
@@ -73,8 +74,16 @@ public class KqglServiceImpl implements KqglService {
if
(
balan
!=
null
)
{
modifynumber
=
balan
.
getModifyNumber
()+
1
;
}
String
mse
=
"考勤请假审批"
;
KqglAssoLeaveRulesT
rult
=
KqglAssoLeaveRulesT
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRulesT
>().
lambda
().
eq
(
KqglAssoLeaveRulesT:
:
getId
,
leaveappr
.
getLeavetype
()));
if
(
rult
!=
null
)
{
mse
=
"考勤"
+
rult
.
getName
()+
"审批"
;
}
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
(
mse
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
//查询员工假期余额表中所对应的假期id
...
...
@@ -114,7 +123,8 @@ public class KqglServiceImpl implements KqglService {
//查询当前公司调休的id
KqglAssoLeaveRules
learul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
emp
.
getOrgCode
()).
eq
(
KqglAssoLeaveRules:
:
getRulesType
,
2
));
if
(
overappr
.
getCompensate
()
==
1
)
{
//
if
(
overappr
.
getCompensate
()
==
1
||
overappr
.
getCompensate
()
==
3
)
{
double
duration
=
0
l
;
//
...
...
@@ -134,7 +144,7 @@ public class KqglServiceImpl implements KqglService {
//1:工作日加班;2:休息日加班;3:节假日加班
if
(
overappr
.
getOvertimetype
()
==
1
)
{
if
(
rul
.
getIsWorkovertime
()
==
1
)
{
if
(
rul
.
getWork
()
==
1
)
{
if
(
rul
.
getWork
()
==
1
)
{
//1:调休 2:加班费 3:调休/加班费
duration
=
Double
.
valueOf
(
rul
.
getWorkOne
())
*
overappr
.
getDuration
();
}
else
if
(
rul
.
getWork
()
==
3
)
{
duration
=
Double
.
valueOf
(
rul
.
getWorkThree
())
*
overappr
.
getDuration
();
...
...
@@ -162,7 +172,7 @@ public class KqglServiceImpl implements KqglService {
}
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
learul
.
getId
()).
userid
(
overappr
.
getUserid
()).
modifyAction
(
2
).
balanceDays
(
"+"
+
duration
)
.
reason
(
"
系统按照审批自动(加班)
"
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
overappr
.
getStarttime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
.
reason
(
"
考勤加班审批
"
).
modifyUserid
(
emp
.
getEmpNum
()).
modifyTimer
(
overappr
.
getStarttime
()).
orgCode
(
emp
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
modifynumber
).
build
().
insert
();
//员工假期余额
//查询员工假期余额表中所对应的假期id
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/jxgl/AppraisalDetail.java
View file @
708e1728
...
...
@@ -52,7 +52,8 @@ public class AppraisalDetail implements Serializable{
private
String
appraisalExplain
;
@ApiModelProperty
(
value
=
"总分"
,
example
=
"0"
)
private
Integer
total
;
private
String
total
;
// private Integer total;
@ApiModelProperty
(
value
=
"等级"
,
example
=
"0"
)
private
String
level
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/AttOvertimeApprovalDto.java
View file @
708e1728
...
...
@@ -36,6 +36,6 @@ public class AttOvertimeApprovalDto {
@ApiModelProperty
(
value
=
"时长"
,
example
=
""
)
private
double
duration
;
@ApiModelProperty
(
value
=
"加班补偿方式"
,
example
=
"1:转调休;2:转加班费;
3:转调休或加班费
"
)
@ApiModelProperty
(
value
=
"加班补偿方式"
,
example
=
"1:转调休;2:转加班费;
(3:转调休 4:加班费)
"
)
private
int
compensate
;
}
This diff is collapsed.
Click to expand it.
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