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
af1eff68
Commit
af1eff68
authored
4 years ago
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
7e8aa443
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
81 additions
and
16 deletions
+81
-16
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
+4
-1
src/main/java/cn/timer/api/bean/kqgl/SpecialDate.java
+14
-2
src/main/java/cn/timer/api/bean/kqmk/KqglAssoTeshu.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+7
-2
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+3
-0
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+7
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+6
-2
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+5
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
+0
-0
src/main/java/cn/timer/api/dto/kqmk/AttendanceAssistantDto.java
+3
-1
src/main/java/cn/timer/api/dto/kqmk/ResttryfixdayDto.java
+15
-0
src/main/resources/mapping/kqgl/SpecialDateMapper.xml
+6
-2
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
+7
-2
No files found.
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
View file @
af1eff68
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.bean.kqgl;
import
java.io.Serializable
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -27,7 +28,9 @@ public class AttendanceAssistant implements Serializable{
String
[]
attWeekdaysShifts
;
// 周工作日班次【固定排班】
String
[]
attMustPunchData
;
// 必须打卡的日期【固定排班】
String
[]
attMustPunchShifid
;
// 必须打卡的班次id【固定排班】
String
[]
attNonPunchData
;
// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attNonPunchData
;
String
[]
attShifts
;
// 排班制 选择的班次【排班制】
int
attRemind
;
// 是否开启提醒:0-否、1-是【排班制】
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/kqgl/SpecialDate.java
View file @
af1eff68
...
...
@@ -22,7 +22,8 @@ public class SpecialDate implements Serializable{
private
Long
lusjTime
;
// 录入时间
private
Integer
luryid
;
// 录入人员
private
Integer
type
;
// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
private
Integer
legalday
;
private
String
bcname
;
private
String
sbdk1
;
private
String
xbdk1
;
...
...
@@ -30,7 +31,9 @@ public class SpecialDate implements Serializable{
private
String
xbdk2
;
private
String
sbdk3
;
private
String
xbdk3
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -143,4 +146,12 @@ public class SpecialDate implements Serializable{
this
.
xbdk3
=
xbdk3
;
}
public
Integer
getLegalday
()
{
return
legalday
;
}
public
void
setLegalday
(
Integer
legalday
)
{
this
.
legalday
=
legalday
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoTeshu.java
View file @
af1eff68
...
...
@@ -54,5 +54,8 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> {
@ApiModelProperty
(
value
=
"类型(1:必须打卡日期;2:不用打卡日期(扩展字段)) 类型(1:必须打卡日期;2:不用打卡日期(扩展字段))"
,
example
=
"101"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"是否是法定节假日(0:否;1:是)"
,
example
=
"0"
)
private
Integer
legalday
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
af1eff68
...
...
@@ -101,6 +101,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -1563,7 +1564,10 @@ public class AttController {
List
<
SpecialDate
>
speclist
=
new
ArrayList
<
SpecialDate
>();
String
[]
attmuspudata
=
attass
.
getAttMustPunchData
();
// 必须打卡的日期【固定排班】
String
[]
attmuspushifid
=
attass
.
getAttMustPunchShifid
();
// 必须打卡的班次id【固定排班】
String
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
// String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
if
(
attmuspudata
.
length
>
0
&&
attmuspushifid
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
m
=
0
;
m
<
attmuspudata
.
length
;
m
++){
SpecialDate
mut
=
new
SpecialDate
();
...
...
@@ -1581,12 +1585,13 @@ public class AttController {
for
(
int
n
=
0
;
n
<
attnonpudata
.
length
;
n
++){
SpecialDate
non
=
new
SpecialDate
();
non
.
setKqzid
(
attgrpid
);
//考勤组id
non
.
setTsrq
(
attnonpudata
[
n
]);
//日期
non
.
setTsrq
(
attnonpudata
[
n
]
.
getDate
()
);
//日期
non
.
setBcid
(
0
);
//班次id
long
date
=
new
Date
().
getTime
();
non
.
setLusjTime
(
date
);
//录入时间
non
.
setLuryid
(
180658
);
// 录入人员***********
non
.
setType
(
2
);
// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
non
.
setLegalday
(
attnonpudata
[
n
].
getWhether
());
speclist
.
add
(
non
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
af1eff68
...
...
@@ -396,6 +396,9 @@ public class ClockInTool {
* @return
*/
public
static
String
[]
doChinFilters
(
String
[]
filters
,
String
target
)
{
target
=
ClockInTool
.
Str_Time_formatting
(
target
,
"yyyy-MM-dd"
);
String
[]
res
=
null
;
if
(
filters
.
length
>
0
)
{
List
<
String
>
tempList
=
Arrays
.
asList
(
filters
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
af1eff68
...
...
@@ -65,7 +65,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import
cn.timer.api.bean.kqmk.KqglAssoYhsb
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.qyxx.CmsContent
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
...
...
@@ -127,6 +126,7 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto;
import
cn.timer.api.dto.kqmk.MachinememberDto
;
import
cn.timer.api.dto.kqmk.ModifyEmployeeBalanceDto
;
import
cn.timer.api.dto.kqmk.OriginalRecordDto
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
cn.timer.api.dto.kqmk.SetConditionsDto
;
import
cn.timer.api.dto.kqmk.StartTimeRestDto
;
import
cn.timer.api.dto.kqmk.UserAttendanceRelDto
;
...
...
@@ -1428,16 +1428,19 @@ public class TimeCardController {
List
<
KqglAssoTeshu
>
speclist
=
new
ArrayList
<
KqglAssoTeshu
>();
String
[]
attmuspudata
=
attass
.
getAttMustPunchData
();
// 必须打卡的日期【固定排班】
String
[]
attmuspushifid
=
attass
.
getAttMustPunchShifid
();
// 必须打卡的班次id【固定排班】
String
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
// String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
if
(
attmuspudata
.
length
>
0
&&
attmuspushifid
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
m
=
0
;
m
<
attmuspudata
.
length
;
m
++){
KqglAssoTeshu
mut
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attmuspudata
[
m
]).
bcid
(
Integer
.
valueOf
(
attmuspushifid
[
m
])).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
1
).
build
();
speclist
.
add
(
mut
);
}
}
if
(
attnonpudata
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
n
=
0
;
n
<
attnonpudata
.
length
;
n
++){
KqglAssoTeshu
non
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attnonpudata
[
n
]).
bcid
(
0
).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
2
).
build
();
KqglAssoTeshu
non
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attnonpudata
[
n
]
.
getDate
()).
legalday
(
attnonpudata
[
n
].
getWhether
()
).
bcid
(
0
).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
2
).
build
();
speclist
.
add
(
non
);
}
}
...
...
@@ -1445,6 +1448,7 @@ public class TimeCardController {
kqglassoteshumapper
.
insertKqglAssoTeshuList
(
speclist
);
}
//记录排班(排班制)
List
<
KqglAssoPbmxDto
>
schlist
=
new
ArrayList
<
KqglAssoPbmxDto
>();
KqglAssoPbmxDto
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
af1eff68
...
...
@@ -101,7 +101,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
6 17
* * ?")
// @Scheduled(cron = "0
8 11
* * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
...
...
@@ -170,6 +170,10 @@ public class AttendanceTaskTiming{
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDate
);
//特殊日期中 为法定带薪休假的
List
<
KqglAssoTeshu
>
fdjjr
=
KqglAssoTeshu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getLegalday
,
1
).
eq
(
KqglAssoTeshu:
:
getType
,
2
));
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
...
@@ -177,7 +181,7 @@ public class AttendanceTaskTiming{
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
dkjl
=
attendance
.
size
()
+
fdjjr
.
size
()
;
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
af1eff68
...
...
@@ -160,6 +160,10 @@ public class LastMonthtimingExport {
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDate
);
//特殊日期中 为法定带薪休假的
List
<
KqglAssoTeshu
>
fdjjr
=
KqglAssoTeshu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getLegalday
,
1
).
eq
(
KqglAssoTeshu:
:
getType
,
2
));
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
...
@@ -167,7 +171,7 @@ public class LastMonthtimingExport {
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
dkjl
=
attendance
.
size
()
+
fdjjr
.
size
()
;
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
View file @
af1eff68
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/AttendanceAssistantDto.java
View file @
af1eff68
...
...
@@ -29,7 +29,9 @@ public class AttendanceAssistantDto implements Serializable{
String
[]
attWeekdaysShifts
;
// 周工作日班次【固定排班】
String
[]
attMustPunchData
;
// 必须打卡的日期【固定排班】
String
[]
attMustPunchShifid
;
// 必须打卡的班次id【固定排班】
String
[]
attNonPunchData
;
// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attNonPunchData
;
String
[]
attShifts
;
// 排班制 选择的班次【排班制】
int
attRemind
;
// 是否开启提醒:0-否、1-是【排班制】
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/ResttryfixdayDto.java
0 → 100644
View file @
af1eff68
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ResttryfixdayDto
{
private
String
date
;
//日期
private
Integer
whether
;
//是否法定节假日
}
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqgl/SpecialDateMapper.xml
View file @
af1eff68
...
...
@@ -9,6 +9,7 @@
<result
column=
"lusj_time"
property=
"lusjTime"
jdbcType=
"BIGINT"
/>
<result
column=
"luryid"
property=
"luryid"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"legalday"
property=
"legalday"
jdbcType=
"INTEGER"
/>
<result
column=
"bcname"
property=
"bcname"
jdbcType=
"VARCHAR"
/>
<result
column=
"sbdk1"
property=
"sbdk1"
jdbcType=
"VARCHAR"
/>
...
...
@@ -124,7 +125,7 @@
</update>
<insert
id=
"insertKqglAssoTeshuList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type)
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type
,legalday
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.kqzid != null"
>
...
...
@@ -143,7 +144,10 @@
#{item.luryid,jdbcType=INTEGER},
</if>
<if
test=
"item.type != null"
>
#{item.type,jdbcType=INTEGER}
#{item.type,jdbcType=INTEGER},
</if>
<if
test=
"item.legalday != null"
>
#{item.legalday,jdbcType=INTEGER}
</if>
)
</foreach>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
View file @
af1eff68
...
...
@@ -11,6 +11,7 @@
<result
column=
"lusj_time"
property=
"lusjTime"
/>
<result
column=
"luryid"
property=
"luryid"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"legalday"
property=
"legalday"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -34,7 +35,7 @@
</sql>
<insert
id=
"insertKqglAssoTeshuList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type)
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type
,legalday
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.kqzid != null"
>
...
...
@@ -53,7 +54,10 @@
#{item.luryid,jdbcType=INTEGER},
</if>
<if
test=
"item.type != null"
>
#{item.type,jdbcType=INTEGER}
#{item.type,jdbcType=INTEGER},
</if>
<if
test=
"item.legalday != null"
>
#{item.legalday,jdbcType=INTEGER}
</if>
)
</foreach>
...
...
@@ -65,6 +69,7 @@
where teshu.kqzid = #{kqzid}
and SUBSTR(teshu.tsrq,1,7) = #{tsrq}
and teshu.type = #{type}
and teshu.legalday = 0
</select>
<!--
...
...
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