Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
notes2.0
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zjm
notes2.0
Commits
f4342fd6
提交
f4342fd6
authored
4月 02, 2020
作者:
gongwenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
考勤
上级
44ce05c3
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
36 行增加
和
5 行删除
+36
-5
AttendanceDepartment.java
.../zjty/tynotes/attendance/entity/AttendanceDepartment.java
+22
-5
CardTask.java
.../main/java/com/zjty/tynotes/attendance/task/CardTask.java
+14
-0
没有找到文件。
notes-attendance/src/main/java/com/zjty/tynotes/attendance/entity/AttendanceDepartment.java
浏览文件 @
f4342fd6
package
com
.
zjty
.
tynotes
.
attendance
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -18,14 +19,30 @@ import org.springframework.data.mongodb.core.mapping.Document;
public
class
AttendanceDepartment
{
private
String
id
;
private
Double
attendancePercent
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"1"
)
private
String
userId
;
private
Double
absenteeismPercent
;
@ApiModelProperty
(
value
=
"用户姓名"
,
example
=
"1"
)
private
String
name
;
private
Double
lateWorkPercent
;
@ApiModelProperty
(
value
=
"应出勤天数"
,
example
=
"1"
)
private
Integer
attendanceDay
;
private
String
name
;
@ApiModelProperty
(
value
=
"实际出勤天数"
,
example
=
"1"
)
private
Float
realAttendanceDay
;
@ApiModelProperty
(
value
=
"公出天数"
,
example
=
"1"
)
private
Float
reasonableOutWorkDay
;
@ApiModelProperty
(
value
=
"迟到天数"
,
example
=
"1"
)
private
Integer
lateDay
;
@ApiModelProperty
(
value
=
"早退天数"
,
example
=
"1"
)
private
Integer
earlyDay
;
private
Integer
lateTime
;
@ApiModelProperty
(
value
=
"出差天数"
,
example
=
"1"
)
private
Float
OutWorkDay
;
@ApiModelProperty
(
value
=
"请假天数"
,
example
=
"1"
)
private
Float
offFromWorkDay
;
}
notes-attendance/src/main/java/com/zjty/tynotes/attendance/task/CardTask.java
浏览文件 @
f4342fd6
...
...
@@ -7,6 +7,7 @@ import com.dingtalk.api.response.OapiAttendanceListResponse;
import
com.taobao.api.ApiException
;
import
com.zjty.tynotes.attendance.dao.CardResultDao
;
import
com.zjty.tynotes.attendance.dao.DingUserDao
;
import
com.zjty.tynotes.attendance.entity.AttendanceDetails
;
import
com.zjty.tynotes.attendance.entity.CardResult
;
import
com.zjty.tynotes.attendance.entity.DingUser
;
import
com.zjty.tynotes.pas.dao.ConfigDao
;
...
...
@@ -115,16 +116,29 @@ public class CardTask {
private
void
computerPersonAttenDanceDay
(
String
startTime
,
String
endTime
,
List
<
User
>
userList
,
List
<
CardResult
>
cardResults1
)
{
if
(
userList
!=
null
){
userList
.
forEach
(
user
->
{
// List<String> checkType = new ArrayList<>();
AttendanceDetails
attendanceDetails
=
new
AttendanceDetails
();
attendanceDetails
.
setUserId
(
user
.
getId
());
if
(
cardResults1
!=
null
){
List
<
CardResult
>
cardResults
=
new
ArrayList
<>();
cardResults1
.
forEach
(
cardResult
->
{
String
userId
=
cardResult
.
getUserId
();
if
(
user
.
getId
().
equals
(
userId
)){
cardResults
.
add
(
cardResult
);
// if(!checkType.contains("OnDuty")&&("OnDuty").equals(cardResult.getCheckType())){
// checkType.add("OnDuty");
// }else if(!checkType.contains("OffDuty")&&("OffDuty").equals(cardResult.getCheckType())){
// checkType.add("OffDuty");
// }
}
});
cardResults
.
forEach
(
cardResult
->
{
String
checkType
=
cardResult
.
getCheckType
();
if
((
"OnDuty"
).
equals
(
checkType
)){
// cardResult.get
}
else
if
(
"OffDuty"
.
equals
(
checkType
)){
}
});
}
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论