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
e7a6072b
Commit
e7a6072b
authored
4 years ago
by
lal
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
156d3b06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
414 additions
and
57 deletions
+414
-57
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+46
-2
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+47
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+59
-52
src/main/java/cn/timer/api/dao/kqmk/KqglAssoMonthPunchSummaryMapper.java
+8
-2
src/main/java/cn/timer/api/dto/kqmk/AttendanceSummaryQueryDto.java
+26
-0
src/main/java/cn/timer/api/dto/kqmk/KqglAssoMonthPunchSummaryDto.java
+228
-0
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+0
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
e7a6072b
...
@@ -21,6 +21,50 @@ public class ClockInTool {
...
@@ -21,6 +21,50 @@ public class ClockInTool {
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
famt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
/**
* 获取指定年月的第一天
*
* @param year
* @param month
* @return
*/
public
static
String
getFirstDayOfMonth1
(
int
year
,
int
month
)
{
Calendar
cal
=
Calendar
.
getInstance
();
// 设置年份
cal
.
set
(
Calendar
.
YEAR
,
year
);
// 设置月份
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
// 获取某月最小天数
int
firstDay
=
cal
.
getMinimum
(
Calendar
.
DATE
);
// 设置日历中月份的最小天数
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
firstDay
);
// 格式化日期
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
cal
.
getTime
());
}
/**
* 获取指定年月的最后一天
*
* @param year
* @param month
* @return
*/
public
static
String
getLastDayOfMonth1
(
int
year
,
int
month
)
{
Calendar
cal
=
Calendar
.
getInstance
();
// 设置年份
cal
.
set
(
Calendar
.
YEAR
,
year
);
// 设置月份
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
// 获取某月最大天数
int
lastDay
=
cal
.
getActualMaximum
(
Calendar
.
DATE
);
// 设置日历中月份的最大天数
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
lastDay
);
// 格式化日期
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
cal
.
getTime
());
}
// 数组容量的扩容,当空间(.length)不够的时候,增加一
// 数组容量的扩容,当空间(.length)不够的时候,增加一
public
static
String
[]
arrycopy
(
String
[]
ss
)
{
public
static
String
[]
arrycopy
(
String
[]
ss
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
...
@@ -269,7 +313,7 @@ public class ClockInTool {
...
@@ -269,7 +313,7 @@ public class ClockInTool {
* @return true在时间段内,false不在时间段内
* @return true在时间段内,false不在时间段内
* @throws Exception
* @throws Exception
*/
*/
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
,
String
date_format
)
{
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
,
String
date_format
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
date_format
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
date_format
);
...
@@ -341,7 +385,7 @@ public class ClockInTool {
...
@@ -341,7 +385,7 @@ 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
)
{
}
else
if
(
num
==
3
)
{
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm"
);
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
e7a6072b
...
@@ -4,6 +4,7 @@ import java.lang.reflect.InvocationTargetException;
...
@@ -4,6 +4,7 @@ import java.lang.reflect.InvocationTargetException;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -78,6 +79,7 @@ import cn.timer.api.dao.kqmk.KqglAssoKqjMapper;
...
@@ -78,6 +79,7 @@ import cn.timer.api.dao.kqmk.KqglAssoKqjMapper;
import
cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoMonthPunchSummaryMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRangeMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRangeMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
...
@@ -90,11 +92,13 @@ import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
...
@@ -90,11 +92,13 @@ import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
import
cn.timer.api.dto.kqmk.AttMemberSettings
;
import
cn.timer.api.dto.kqmk.AttMemberSettings
;
import
cn.timer.api.dto.kqmk.AttSchedulingDto
;
import
cn.timer.api.dto.kqmk.AttSchedulingDto
;
import
cn.timer.api.dto.kqmk.AttendanceAssistantDto
;
import
cn.timer.api.dto.kqmk.AttendanceAssistantDto
;
import
cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.CompensateDto
;
import
cn.timer.api.dto.kqmk.CompensateDto
;
import
cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto
;
import
cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto
;
import
cn.timer.api.dto.kqmk.IndividualOvertimeRuleDto
;
import
cn.timer.api.dto.kqmk.IndividualOvertimeRuleDto
;
import
cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto
;
import
cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglAssoRulesViceDto
;
import
cn.timer.api.dto.kqmk.KqglAssoRulesViceDto
;
...
@@ -926,7 +930,7 @@ public class TimeCardController {
...
@@ -926,7 +930,7 @@ public class TimeCardController {
@ApiOperation
(
value
=
"38:获取员工数据-根据 组织机构代码"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"38:获取员工数据-根据 组织机构代码"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
38
)
@ApiOperationSupport
(
order
=
38
)
public
Result
<
Object
>
getEmployeeData
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
getEmployeeData
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglMainEmp
>
yggl
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
YgglMainEmp
>
yggl
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getJobStatus
,
"1"
)
);
return
ResultUtil
.
data
(
yggl
);
return
ResultUtil
.
data
(
yggl
);
}
}
...
@@ -1988,6 +1992,48 @@ public class TimeCardController {
...
@@ -1988,6 +1992,48 @@ public class TimeCardController {
return
ResultUtil
.
data
(
attoverrul
,
"操作成功!"
);
return
ResultUtil
.
data
(
attoverrul
,
"操作成功!"
);
}
}
@Autowired
private
KqglAssoMonthPunchSummaryMapper
kqglassomonthpunchsummarymapper
;
@PostMapping
(
value
=
"/Summary_data"
)
@ApiOperation
(
value
=
"获取考勤报表汇总数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
SummarydataList
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AttendanceSummaryQueryDto
attesummqueto
)
throws
ParseException
{
IPage
<
KqglAssoMonthPunchSummaryDto
>
page
=
new
Page
<
KqglAssoMonthPunchSummaryDto
>(
attesummqueto
.
getCurrentPage
()
==
null
?
1
:
attesummqueto
.
getCurrentPage
(),
attesummqueto
.
getTotalPage
()
==
null
?
10
:
attesummqueto
.
getTotalPage
());
attesummqueto
.
setOrgCode
(
userBean
.
getOrgCode
());
String
year
=
null
,
month
=
null
;
String
staapptime
=
null
,
endapptime
=
null
;
if
(
attesummqueto
.
getTimes
()
!=
null
&&
!(
""
).
equals
(
attesummqueto
.
getTimes
()))
{
year
=
attesummqueto
.
getTimes
().
substring
(
0
,
4
);
month
=
attesummqueto
.
getTimes
().
substring
(
5
,
7
);
staapptime
=
ClockInTool
.
getFirstDayOfMonth1
(
Integer
.
valueOf
(
year
),
Integer
.
valueOf
(
month
));
endapptime
=
ClockInTool
.
getLastDayOfMonth1
(
Integer
.
valueOf
(
year
),
Integer
.
valueOf
(
month
));
}
else
{
year
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
()).
toString
();
month
=
new
SimpleDateFormat
(
"MM"
).
format
(
new
Date
()).
toString
();
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
MONTH
,
0
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
staapptime
=
DateUtil
.
getStringFormat
(
DateUtil
.
getStringTime
(
mat
.
format
(
c
.
getTime
()),
"yyyy-MM-dd"
));
Calendar
ca
=
Calendar
.
getInstance
();
ca
.
set
(
Calendar
.
DAY_OF_MONTH
,
ca
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
endapptime
=
DateUtil
.
getStringFormat
(
DateUtil
.
getStringTime
(
mat
.
format
(
ca
.
getTime
()),
"yyyy-MM-dd"
));
}
attesummqueto
.
setYear
(
year
);
attesummqueto
.
setMonth
(
month
);
attesummqueto
.
setStaapptime
(
staapptime
);
attesummqueto
.
setEndapptime
(
endapptime
);
// 缺-部门id 搜索
IPage
<
KqglAssoMonthPunchSummaryDto
>
pageAs
=
kqglassomonthpunchsummarymapper
.
AttendanceSummaryData
(
page
,
attesummqueto
);
List
<
KqglAssoMonthPunchSummaryDto
>
listAs
=
pageAs
.
getRecords
();
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
}
// @GetMapping(value = "/summary_report")
// @GetMapping(value = "/summary_report")
// @ApiOperation(value = "考勤汇总报表(暂时不用)", httpMethod = "GET", notes = "接口发布说明")
// @ApiOperation(value = "考勤汇总报表(暂时不用)", httpMethod = "GET", notes = "接口发布说明")
// public Result<Object> attendance_summary_report() {
// public Result<Object> attendance_summary_report() {
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
e7a6072b
...
@@ -11,11 +11,10 @@ import java.util.List;
...
@@ -11,11 +11,10 @@ import java.util.List;
import
java.util.Locale
;
import
java.util.Locale
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.SchedulingConfigurer
;
import
org.springframework.scheduling.annotation.SchedulingConfigurer
;
import
org.springframework.scheduling.config.ScheduledTaskRegistrar
;
import
org.springframework.scheduling.support.CronTrigger
;
import
org.springframework.stereotype.Component
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -32,8 +31,6 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
...
@@ -32,8 +31,6 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import
cn.timer.api.bean.kqmk.KqglAssoTeshu
;
import
cn.timer.api.bean.kqmk.KqglAssoTeshu
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.kqmk.KqglTaskTiming
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper
;
import
cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper
;
import
cn.timer.api.dao.kqgl.PunchCardDetailsMapper
;
import
cn.timer.api.dao.kqgl.PunchCardDetailsMapper
;
...
@@ -53,9 +50,11 @@ import cn.timer.api.utils.DateUtil;
...
@@ -53,9 +50,11 @@ import cn.timer.api.utils.DateUtil;
* @author lal
* @author lal
* 考勤报表汇总数据
* 考勤报表汇总数据
*/
*/
@Component
//@Component
@Lazy
//@Lazy
public
class
AttendanceTaskTiming
implements
SchedulingConfigurer
{
@Configuration
//1.主要用于标记配置类,兼备Component的效果。
@EnableScheduling
// 2.开启定时任务
public
class
AttendanceTaskTiming
{
// private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
// private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
static
String
tablename
=
null
;
static
String
tablename
=
null
;
...
@@ -79,20 +78,20 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -79,20 +78,20 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
/**
/**
* 数据库动态更改定时配置(attendance_socks)
* 数据库动态更改定时配置(attendance_socks)
*/
*/
@Override
//
@Override
public
void
configureTasks
(
ScheduledTaskRegistrar
taskRegistrar
)
{
//
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
taskRegistrar
.
addTriggerTask
(()
->
{
//
taskRegistrar.addTriggerTask(() -> {
// 任务逻辑
//
// 任务逻辑
try
{
//
try {
tablename
=
AttendanceTask
();
//
tablename = AttendanceTask();
}
catch
(
ParseException
e
)
{
//
} catch (ParseException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
},
triggerContext
->
{
//
}, triggerContext -> {
CronTrigger
cron
=
new
CronTrigger
(
AttendanceUtil
.
getCron
(
tablename
));
// cron配置
//
CronTrigger cron = new CronTrigger(AttendanceUtil.getCron(tablename)); // cron配置
return
cron
.
nextExecutionTime
(
triggerContext
);
// 下次执行任务的时间
//
return cron.nextExecutionTime(triggerContext); // 下次执行任务的时间
});
//
});
}
//
}
@Autowired
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
...
@@ -104,24 +103,31 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -104,24 +103,31 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
* @return
* @return
* @throws ParseException
* @throws ParseException
*/
*/
// @Scheduled(cron = "0/5 * * * * ?") // 测试:5秒执行一次
public
String
AttendanceTask
()
throws
ParseException
{
//3.添加定时任务
@Scheduled
(
cron
=
"0 10 15 * * ?"
)
//或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000)
// @Scheduled(cron = "0/5 * * * * ?") // 测试:5秒执行一次 0 0 19 * * ?
public
void
AttendanceTask
()
throws
ParseException
{
boolean
implement
=
false
;
// boolean implement = false;
int
sockid
=
0
;
// int sockid = 0;
KqglTaskTiming
sock
=
KqglTaskTiming
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglTaskTiming
>().
lambda
().
eq
(
KqglTaskTiming:
:
getTask
,
"AttendanceTask"
));
// KqglTaskTiming sock = KqglTaskTiming.builder().build().selectOne(new QueryWrapper<KqglTaskTiming>().lambda().eq(KqglTaskTiming::getTask, "AttendanceTask"));
if
(
sock
==
null
)
{
// if(sock == null) {
KqglTaskTiming
sock1
=
KqglTaskTiming
.
builder
().
task
(
"AttendanceTask"
).
executionStatus
(
1
).
lastExecutionTime
(
new
Date
().
getTime
()).
build
();
// KqglTaskTiming sock1 = KqglTaskTiming.builder().task("AttendanceTask").executionStatus(1).lastExecutionTime(new Date().getTime()).build();
sock1
.
insert
();
// sock1.insert();
sockid
=
sock1
.
getId
();
// sockid = sock1.getId();
implement
=
true
;
// implement = true;
}
else
{
// }else {
sockid
=
sock
.
getId
();
// sockid = sock.getId();
if
(
sock
.
getExecutionStatus
()
==
0
)
{
// if(sock.getExecutionStatus() == 0) {
KqglTaskTiming
.
builder
().
task
(
"AttendanceTask"
).
id
(
sock
.
getId
()).
executionStatus
(
1
).
lastExecutionTime
(
new
Date
().
getTime
()).
build
().
updateById
();
// KqglTaskTiming.builder().task("AttendanceTask").id(sock.getId()).executionStatus(1).lastExecutionTime(new Date().getTime()).build().updateById();
implement
=
true
;
// implement = true;
}
// }
}
// }
boolean
implement
=
true
;
//逻辑
//逻辑
if
(
implement
)
{
if
(
implement
)
{
...
@@ -136,7 +142,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -136,7 +142,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
ca
.
set
(
Calendar
.
DAY_OF_MONTH
,
ca
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
ca
.
set
(
Calendar
.
DAY_OF_MONTH
,
ca
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
Long
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
sdf1
.
format
(
ca
.
getTime
()),
"yyyy-MM-dd"
)).
getTime
();
Long
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
sdf1
.
format
(
ca
.
getTime
()),
"yyyy-MM-dd"
)).
getTime
();
List
<
QyzxEntInfoM
>
orgcodelist
=
qyzxentinfommapper
.
selectList
(
new
QueryWrapper
<
QyzxEntInfoM
>());
//系统中的所有公司 所有未到期的公司
//
List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>());//系统中的所有公司 所有未到期的公司
String
str
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
String
str
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
String
ttstr
=
new
SimpleDateFormat
(
"yyyy-MM"
).
format
(
new
Date
()).
toString
();
//
String
ttstr
=
new
SimpleDateFormat
(
"yyyy-MM"
).
format
(
new
Date
()).
toString
();
//
...
@@ -148,8 +154,8 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -148,8 +154,8 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
));
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
));
for
(
int
t
=
0
;
t
<
orgcodelist
.
size
();
t
++){
//
for(int t = 0;t<orgcodelist.size();t++){
int
org_code
=
orgcodelist
.
get
(
t
).
getId
();
//企业组织代码
int
org_code
=
117
;
//
orgcodelist.get(t).getId();//企业组织代码
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
for
(
AdditionalDto
user
:
userlist
)
{
for
(
AdditionalDto
user
:
userlist
)
{
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
...
@@ -434,7 +440,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -434,7 +440,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
}
}
//排查请假是否在最后一次打卡范围内
//排查请假是否在最后一次打卡范围内
查询当月的请假所有日期
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
);
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
);
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
String
beginTime
=
sdf1
.
format
(
new
Date
());
String
beginTime
=
sdf1
.
format
(
new
Date
());
...
@@ -570,11 +576,11 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -570,11 +576,11 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
//最后一次应打卡时间
//最后一次应打卡时间
String
latimeclock
=
""
;
String
latimeclock
=
""
;
if
(
answer
==
1
)
{
if
(
answer
==
1
)
{
latimeclock
=
ClockInTool
.
dealDateFormat
(
shif
.
getXbdk1
(),
3
);
latimeclock
=
num
+
" "
+
shif
.
getXbdk1
();
//
ClockInTool.dealDateFormat(shif.getXbdk1(),3);
}
else
if
(
answer
==
2
)
{
}
else
if
(
answer
==
2
)
{
latimeclock
=
ClockInTool
.
dealDateFormat
(
shif
.
getXbdk2
(),
3
);
latimeclock
=
num
+
" "
+
shif
.
getXbdk2
();
//
ClockInTool.dealDateFormat(shif.getXbdk2(),3);
}
else
{
}
else
{
latimeclock
=
ClockInTool
.
dealDateFormat
(
shif
.
getXbdk3
(),
3
);
latimeclock
=
num
+
" "
+
shif
.
getXbdk3
();
//
ClockInTool.dealDateFormat(shif.getXbdk3(),3);
}
}
for
(
KqglAssoRelationSummary
learel:
leainv
)
{
for
(
KqglAssoRelationSummary
learel:
leainv
)
{
boolean
adopt
=
ClockInTool
.
hourMinuteBetween
(
latimeclock
,
learel
.
getStartTime
().
substring
(
0
,
16
),
learel
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
boolean
adopt
=
ClockInTool
.
hourMinuteBetween
(
latimeclock
,
learel
.
getStartTime
().
substring
(
0
,
16
),
learel
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
...
@@ -678,13 +684,14 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
...
@@ -678,13 +684,14 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
summary
.
setDay31
(
noticesArray
[
30
]);
summary
.
setDay31
(
noticesArray
[
30
]);
summary
.
insert
();
summary
.
insert
();
}
}
}
//
}
// KqglTaskTiming.builder().task("AttendanceTask").id(sockid).executionStatus(0).lastExecutionTime(new Date().getTime()).build().updateById();
// KqglTaskTiming.builder().task("AttendanceTask").id(sockid).executionStatus(0).lastExecutionTime(new Date().getTime()).build().updateById();
return
new
Exception
().
getStackTrace
()[
0
].
getMethodName
();
// return new Exception().getStackTrace()[0].getMethodName();
}
else
{
}
return
null
;
// else {
}
// return null;
// }
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqmk/KqglAssoMonthPunchSummaryMapper.java
View file @
e7a6072b
package
cn
.
timer
.
api
.
dao
.
kqmk
;
package
cn
.
timer
.
api
.
dao
.
kqmk
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto
;
import
cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto
;
/**
/**
* 打卡月汇总
* 打卡月汇总
...
@@ -12,5 +17,6 @@ import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
...
@@ -12,5 +17,6 @@ import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
*/
*/
@Repository
@Repository
public
interface
KqglAssoMonthPunchSummaryMapper
extends
BaseMapper
<
KqglAssoMonthPunchSummary
>
{
public
interface
KqglAssoMonthPunchSummaryMapper
extends
BaseMapper
<
KqglAssoMonthPunchSummary
>
{
IPage
<
KqglAssoMonthPunchSummaryDto
>
AttendanceSummaryData
(
IPage
<
KqglAssoMonthPunchSummaryDto
>
page
,
@Param
(
"param"
)
AttendanceSummaryQueryDto
attendancesummaryquerydto
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/AttendanceSummaryQueryDto.java
0 → 100644
View file @
e7a6072b
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
AttendanceSummaryQueryDto
extends
Page
{
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"关键字"
,
example
=
""
)
private
String
query
;
private
String
times
;
private
Integer
attid
;
private
String
year
;
private
String
month
;
private
String
staapptime
;
private
String
endapptime
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/KqglAssoMonthPunchSummaryDto.java
0 → 100644
View file @
e7a6072b
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
java.util.List
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author lal 2020-05-15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
KqglAssoMonthPunchSummaryDto
{
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"id id"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"姓名 "
,
example
=
"姓名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"工号 工号"
,
example
=
"101"
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"部门 "
,
example
=
"部门"
)
private
String
dept
;
@ApiModelProperty
(
value
=
"职位 "
,
example
=
"职位"
)
private
String
post
;
@ApiModelProperty
(
value
=
"考勤组id 考勤组id"
,
example
=
"101"
)
private
Integer
attGroup
;
@ApiModelProperty
(
value
=
"班次id 班次id"
,
example
=
"101"
)
private
Integer
shift
;
@ApiModelProperty
(
value
=
"应出勤天数 "
,
example
=
"应出勤天数"
)
private
Double
daysOnDuty
;
@ApiModelProperty
(
value
=
"实际出勤天数 "
,
example
=
"实际出勤天数"
)
private
Double
actualAttDays
;
@ApiModelProperty
(
value
=
"休息天数 "
,
example
=
"休息天数"
)
private
Double
daysOff
;
@ApiModelProperty
(
value
=
"工作时长(分钟) "
,
example
=
"工作时长(分钟)"
)
private
Double
workingHours
;
@ApiModelProperty
(
value
=
"迟到次数 "
,
example
=
"迟到次数"
)
private
Double
lateTimes
;
@ApiModelProperty
(
value
=
"迟到时长(分钟) "
,
example
=
"迟到时长(分钟)"
)
private
Double
lateHours
;
@ApiModelProperty
(
value
=
"严重迟到次数 "
,
example
=
"严重迟到次数"
)
private
Double
seriousLateTimes
;
@ApiModelProperty
(
value
=
"严重迟到时长(分钟) "
,
example
=
"严重迟到时长(分钟)"
)
private
Double
seriousLateHours
;
@ApiModelProperty
(
value
=
"旷工迟到次数 "
,
example
=
"旷工迟到次数"
)
private
Double
absenLateTimes
;
@ApiModelProperty
(
value
=
"早退次数 "
,
example
=
"早退次数"
)
private
Double
earlyLeaveTimes
;
@ApiModelProperty
(
value
=
"早退时长(分钟) "
,
example
=
"早退时长(分钟)"
)
private
Double
lengthEarlyLeave
;
@ApiModelProperty
(
value
=
"上班缺卡次数 "
,
example
=
"上班缺卡次数"
)
private
Double
numberWorkCardShortage
;
@ApiModelProperty
(
value
=
"下班缺卡次数 "
,
example
=
"下班缺卡次数"
)
private
Double
numberDutyCardShortage
;
@ApiModelProperty
(
value
=
"旷工天数 "
,
example
=
"旷工天数"
)
private
Double
absenteeismDays
;
@ApiModelProperty
(
value
=
"出差时长 "
,
example
=
"出差时长"
)
private
Double
lengthBusinessTrip
;
@ApiModelProperty
(
value
=
"外出时长 "
,
example
=
"外出时长"
)
private
Double
timeOut
;
@ApiModelProperty
(
value
=
"加班总时长 "
,
example
=
"加班总时长"
)
private
Double
totalOvertimeHours
;
@ApiModelProperty
(
value
=
"工作日(转调休) "
,
example
=
"工作日(转调休)"
)
private
Double
workingTurnCompenLeave
;
@ApiModelProperty
(
value
=
"休息日(转调休) "
,
example
=
"休息日(转调休)"
)
private
Double
restTurnCompenLeave
;
@ApiModelProperty
(
value
=
"节假日(转调休) "
,
example
=
"节假日(转调休)"
)
private
Double
holidayTurnCompenLeave
;
@ApiModelProperty
(
value
=
"工作日(转加班费) "
,
example
=
"工作日(转加班费)"
)
private
Double
workingTransferOvertime
;
@ApiModelProperty
(
value
=
"休息日(转加班费) "
,
example
=
"休息日(转加班费)"
)
private
Double
restTransferOvertime
;
@ApiModelProperty
(
value
=
"节假日(转加班费) "
,
example
=
"节假日(转加班费)"
)
private
Double
holidayTransferOvertime
;
@ApiModelProperty
(
value
=
"day1 "
,
example
=
"day1"
)
private
String
day1
;
@ApiModelProperty
(
value
=
"day2 "
,
example
=
"day2"
)
private
String
day2
;
@ApiModelProperty
(
value
=
"day3 "
,
example
=
"day3"
)
private
String
day3
;
@ApiModelProperty
(
value
=
"day4 "
,
example
=
"day4"
)
private
String
day4
;
@ApiModelProperty
(
value
=
"day5 "
,
example
=
"day5"
)
private
String
day5
;
@ApiModelProperty
(
value
=
"day6 "
,
example
=
"day6"
)
private
String
day6
;
@ApiModelProperty
(
value
=
"day7 "
,
example
=
"day7"
)
private
String
day7
;
@ApiModelProperty
(
value
=
"day8 "
,
example
=
"day8"
)
private
String
day8
;
@ApiModelProperty
(
value
=
"day9 "
,
example
=
"day9"
)
private
String
day9
;
@ApiModelProperty
(
value
=
"day10 "
,
example
=
"day10"
)
private
String
day10
;
@ApiModelProperty
(
value
=
"day11 "
,
example
=
"day11"
)
private
String
day11
;
@ApiModelProperty
(
value
=
"day12 "
,
example
=
"day12"
)
private
String
day12
;
@ApiModelProperty
(
value
=
"day13 "
,
example
=
"day13"
)
private
String
day13
;
@ApiModelProperty
(
value
=
"day14 "
,
example
=
"day14"
)
private
String
day14
;
@ApiModelProperty
(
value
=
"day15 "
,
example
=
"day15"
)
private
String
day15
;
@ApiModelProperty
(
value
=
"day16 "
,
example
=
"day16"
)
private
String
day16
;
@ApiModelProperty
(
value
=
"day17 "
,
example
=
"day17"
)
private
String
day17
;
@ApiModelProperty
(
value
=
"day18 "
,
example
=
"day18"
)
private
String
day18
;
@ApiModelProperty
(
value
=
"day19 "
,
example
=
"day19"
)
private
String
day19
;
@ApiModelProperty
(
value
=
"day20 "
,
example
=
"day20"
)
private
String
day20
;
@ApiModelProperty
(
value
=
"day21 "
,
example
=
"day21"
)
private
String
day21
;
@ApiModelProperty
(
value
=
"day22 "
,
example
=
"day22"
)
private
String
day22
;
@ApiModelProperty
(
value
=
"day23 "
,
example
=
"day23"
)
private
String
day23
;
@ApiModelProperty
(
value
=
"day24 "
,
example
=
"day24"
)
private
String
day24
;
@ApiModelProperty
(
value
=
"day25 "
,
example
=
"day25"
)
private
String
day25
;
@ApiModelProperty
(
value
=
"day26 "
,
example
=
"day26"
)
private
String
day26
;
@ApiModelProperty
(
value
=
"day27 "
,
example
=
"day27"
)
private
String
day27
;
@ApiModelProperty
(
value
=
"day28 "
,
example
=
"day28"
)
private
String
day28
;
@ApiModelProperty
(
value
=
"day29 "
,
example
=
"day29"
)
private
String
day29
;
@ApiModelProperty
(
value
=
"day30 "
,
example
=
"day30"
)
private
String
day30
;
@ApiModelProperty
(
value
=
"day31 "
,
example
=
"day31"
)
private
String
day31
;
@ApiModelProperty
(
value
=
"年 年"
,
example
=
"101"
)
private
Integer
belongYear
;
@ApiModelProperty
(
value
=
"月 月"
,
example
=
"101"
)
private
Integer
belongMonth
;
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"最后修改时间 最后修改时间"
,
example
=
"101"
)
private
Long
lastModified
;
@ApiModelProperty
(
value
=
"表数据"
,
example
=
"字段说明"
)
List
<
BalanceSheetDataDto
>
balanceTo
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
e7a6072b
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