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
c928be85
Commit
c928be85
authored
Jul 15, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
131e5ab3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
204 additions
and
17 deletions
+204
-17
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+83
-8
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+13
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+24
-6
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+41
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+2
-0
src/main/java/cn/timer/api/dao/spmk/SpmkApproveSummaryMapper.java
+4
-0
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
+1
-0
src/main/java/cn/timer/api/dto/spmk/ApprovedQuantityDto.java
+23
-0
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
+3
-3
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+10
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
c928be85
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
c928be85
...
...
@@ -658,6 +658,7 @@ public class ClockInTool {
return
res
;
}
/**
* 时间戳转换时间
*/
...
...
@@ -682,6 +683,18 @@ public class ClockInTool {
return
res
;
}
/**
* 时间戳转换时间
*/
public
static
String
stampToDate4
(
String
s
){
String
res
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
long
lt
=
new
Long
(
s
);
Date
date
=
new
Date
(
lt
);
res
=
simpleDateFormat
.
format
(
date
);
return
res
;
}
public
static
String
Str_Time_formatting
(
String
str
,
String
Format
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
Format
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
c928be85
...
...
@@ -31,7 +31,9 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.controller.kqgl.ClockInController
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
import
cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper
;
import
cn.timer.api.dao.kqgl.PunchCardDetailsMapper
;
import
cn.timer.api.dao.kqgl.PunchRecordMapper
;
...
...
@@ -43,7 +45,9 @@ import cn.timer.api.dao.kqmk.KqglAssoTeshuMapper;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntInfoMMapper
;
import
cn.timer.api.dto.kqmk.AdditionalDto
;
import
cn.timer.api.dto.kqmk.AttSchedule
;
import
cn.timer.api.dto.kqmk.AttSubsidiaryDto
;
import
cn.timer.api.dto.kqmk.AttendanceCardListDto
;
import
cn.timer.api.utils.DateUtil
;
/**
...
...
@@ -99,6 +103,10 @@ public class AttendanceTaskTiming{
private
PunchRecordMapper
punchrecordmapper
;
@Autowired
private
KqglAssoDkmxMapper
kqglassodkmxmapper
;
@Autowired
private
ClockInController
clockincontroller
;
/**
* @return
* @throws ParseException
...
...
@@ -109,7 +117,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
40 17
* * ?")
// @Scheduled(cron = "0
24 10
* * ?")
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
...
...
@@ -179,12 +187,18 @@ public class AttendanceTaskTiming{
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
String
[]
xblacks
=
new
String
[
31
];
//下班缺卡天数
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
clockincontroller
.
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
bccs
=
attdate
.
getAttsch
().
size
();
}
dkjtts
[
dk
]
=
pcd
.
getData
();
dk
++;
if
(
pcd
.
getYdkcs
()
==
2
||
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
bccs
==
2
||
bccs
==
4
||
bccs
==
6
){
if
(
pcd
.
getSbdk1
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
...
...
@@ -194,7 +208,7 @@ public class AttendanceTaskTiming{
xbqkcs
++;
}
}
if
(
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
bccs
==
4
||
bccs
==
6
){
if
(
pcd
.
getSbdk2
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
...
...
@@ -204,7 +218,7 @@ public class AttendanceTaskTiming{
xbqkcs
++;
}
}
if
(
pcd
.
getYdkcs
()
==
6
){
if
(
bccs
==
6
){
if
(
pcd
.
getSbdk3
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
...
...
@@ -215,6 +229,12 @@ public class AttendanceTaskTiming{
}
}
}
sblacks
=
ClockInTool
.
deleteArrayNull
(
sblacks
);
sbqkcs
=
sblacks
.
length
;
xblacks
=
ClockInTool
.
deleteArrayNull
(
xblacks
);
xbqkcs
=
xblacks
.
length
;
}
//具体打卡时间入汇总表(打卡成功才会录入汇总表)
// KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda()
...
...
@@ -789,6 +809,4 @@ public class AttendanceTaskTiming{
// return null;
// }
}
}
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
c928be85
...
...
@@ -76,6 +76,7 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper;
import
cn.timer.api.dao.spmk.SpmkCustomApprovalMapper
;
import
cn.timer.api.dao.spmk.SpmkExecutorMapper
;
import
cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper
;
import
cn.timer.api.dto.spmk.ApprovedQuantityDto
;
import
cn.timer.api.dto.spmk.ApprovingDto
;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FromData
;
...
...
@@ -926,4 +927,44 @@ public class SpmkController {
return
ResultUtil
.
data
(
msg
);
}
@PostMapping
(
value
=
"/approved_quantity"
)
@ApiOperation
(
value
=
"APP-我发起的/我审批的/抄送我的-数量"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
ApprovedQuantity
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
MySummaryQueryDto
mysummaryquerydto
){
ApprovedQuantityDto
qna
=
ApprovedQuantityDto
.
builder
().
build
();
mysummaryquerydto
.
setEndTime
(
null
);
mysummaryquerydto
.
setStartTime
(
null
);
mysummaryquerydto
.
setOrgCode
(
userBean
.
getOrgCode
());
mysummaryquerydto
.
setEmpNum
(
userBean
.
getEmpNum
());
mysummaryquerydto
.
setSts
(
5
);
//状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝 4:(2/3) 5:全部
int
istartedit
=
0
,
ccme
=
0
,
iapprovedit
=
0
;
mysummaryquerydto
.
setType
(
0
);
//我发起的
List
<
SpmkApproveSummary
>
istartedit_
=
spmkApproveSummaryMapper
.
selectPageByQueryForEmpNum
(
mysummaryquerydto
);
if
(
istartedit_
.
size
()
>
0
)
{
istartedit
=
istartedit_
.
size
();
}
mysummaryquerydto
.
setType
(
1
);
//抄送我的
List
<
SpmkApproveSummary
>
ccme_
=
spmkApproveSummaryMapper
.
selectPageByQueryForEmpNum
(
mysummaryquerydto
);
if
(
ccme_
.
size
()
>
0
)
{
ccme
=
ccme_
.
size
();
}
mysummaryquerydto
.
setType
(
2
);
//我审批的
List
<
SpmkApproveSummary
>
iapprovedit_
=
spmkApproveSummaryMapper
.
selectPageByQueryForEmpNum
(
mysummaryquerydto
);
if
(
iapprovedit_
.
size
()
>
0
)
{
iapprovedit
=
iapprovedit_
.
size
();
}
qna
.
setIstartedit
(
istartedit
);
qna
.
setCcme
(
ccme
);
qna
.
setIapprovedit
(
iapprovedit
);
return
ResultUtil
.
data
(
qna
);
}
}
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
c928be85
...
...
@@ -23,4 +23,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
leaveinvesti
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
}
src/main/java/cn/timer/api/dao/spmk/SpmkApproveSummaryMapper.java
View file @
c928be85
package
cn
.
timer
.
api
.
dao
.
spmk
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -22,4 +24,6 @@ public interface SpmkApproveSummaryMapper extends BaseMapper<SpmkApproveSummary>
IPage
<
SpmkApproveSummary
>
selectPageByQueryForEmpNum
(
IPage
<
SpmkApproveSummary
>
page
,
@Param
(
"param"
)
MySummaryQueryDto
mySummaryQueryDto
);
List
<
SpmkApproveSummary
>
selectPageByQueryForEmpNum
(
@Param
(
"param"
)
MySummaryQueryDto
mySummaryQueryDto
);
}
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
View file @
c928be85
...
...
@@ -26,6 +26,7 @@ public class AttSchedule implements Serializable{
private
Long
starttime
;
private
Long
endtime
;
private
int
isleave
;
//是否请假
private
int
isupdate
;
//是否跟新打卡
private
int
isdk
;
//0:当前打卡 1:已过打卡
private
KqglAssoDkjl
dajl
;
...
...
src/main/java/cn/timer/api/dto/spmk/ApprovedQuantityDto.java
0 → 100644
View file @
c928be85
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ApprovedQuantityDto
{
@ApiModelProperty
(
value
=
"我发起的"
,
example
=
"11"
)
private
Integer
istartedit
;
@ApiModelProperty
(
value
=
"抄送我的"
,
example
=
"22"
)
private
Integer
ccme
;
@ApiModelProperty
(
value
=
"我审批的"
,
example
=
"33"
)
private
Integer
iapprovedit
;
}
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
View file @
c928be85
...
...
@@ -24,16 +24,16 @@ public class MySummaryQueryDto extends Page{
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"关键字 标题/审批人名称/审批总汇id"
,
example
=
"
请假
"
)
@ApiModelProperty
(
value
=
"关键字 标题/审批人名称/审批总汇id"
,
example
=
""
)
private
String
query
;
@ApiModelProperty
(
value
=
"状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝"
,
example
=
"0"
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
"
2000-10-10 10:10:10
"
)
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
""
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"结束时间 "
,
example
=
"
2020-10-10 10:10:10
"
)
@ApiModelProperty
(
value
=
"结束时间 "
,
example
=
""
)
private
String
endTime
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
...
...
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
c928be85
...
...
@@ -68,6 +68,16 @@
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.start_time,res.end_time;
</select>
<select
id=
"leaveinvesti"
resultMap=
"BaseResultMap"
>
select res.start_time,
res.end_time
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.org_code = #{orgcode}
and res.approval_type = #{approvaltype}
and res.app_time = #{apptime}
GROUP BY res.start_time,res.end_time;
</select>
<select
id=
"selectTabledata"
resultMap=
"BaseResultMap"
>
select SUM(res.duration) as duration
...
...
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