Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
e47eddd4
Commit
e47eddd4
authored
Jul 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加照片海康下载
parent
ba5c1535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
5 deletions
+34
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/PerformApiController.java
...va/com/mortals/xhx/busiz/h5/web/PerformApiController.java
+34
-5
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/PerformApiController.java
View file @
e47eddd4
...
@@ -24,6 +24,9 @@ import com.mortals.xhx.module.check.service.*;
...
@@ -24,6 +24,9 @@ import com.mortals.xhx.module.check.service.*;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealEntity
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealEntity
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealQuery
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealQuery
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealService
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealService
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -72,6 +75,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
...
@@ -72,6 +75,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
@Autowired
@Autowired
private
CheckAllRecordDao
checkAllRecordDao
;
private
CheckAllRecordDao
checkAllRecordDao
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
/**
/**
* 个人当天绩效统计
* 个人当天绩效统计
...
@@ -88,18 +93,41 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
...
@@ -88,18 +93,41 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
log
.
info
(
"【{}】【请求体】--> 用户:{}"
,
busiDesc
,
context
.
getUser
().
getRealName
());
log
.
info
(
"【{}】【请求体】--> 用户:{}"
,
busiDesc
,
context
.
getUser
().
getRealName
());
try
{
try
{
//todo
//todo
CheckAllRecordQuery
checkAllRecordQuery
=
new
CheckAllRecordQuery
();
CheckAllRecordQuery
checkAllRecordQuery
=
new
CheckAllRecordQuery
();
checkAllRecordQuery
.
setSubAddType
(
SubAddTypeEnum
.
扣除
.
getValue
());
checkAllRecordQuery
.
setSubAddType
(
SubAddTypeEnum
.
扣除
.
getValue
());
checkAllRecordQuery
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
checkAllRecordQuery
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
int
totalTimes
=
checkAllRecordDao
.
getCount
(
checkAllRecordQuery
);
int
totalTimes
=
checkAllRecordDao
.
getCount
(
checkAllRecordQuery
);
checkAllRecordQuery
.
setCheckTimeStart
(
DateUtil
.
today
());
checkAllRecordQuery
.
setCheckTimeEnd
(
DateUtil
.
today
());
int
todayTimes
=
checkAllRecordDao
.
getCount
(
checkAllRecordQuery
);
StaffPerformStatQuery
staffPerformStatQuery
=
new
StaffPerformStatQuery
();
staffPerformStatQuery
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
staffPerformStatQuery
.
setYear
(
DateUtil
.
year
(
new
Date
()));
staffPerformStatQuery
.
setMonth
(
DateUtil
.
month
(
new
Date
())+
1
);
List
<
StaffPerformStatEntity
>
staffPerformStatEntities
=
staffPerformStatService
.
find
(
staffPerformStatQuery
);
BigDecimal
totalScore
=
new
BigDecimal
(
0.0
);
if
(
ObjectUtils
.
isEmpty
(
staffPerformStatEntities
)){
// staffPerformStatEntities.stream().map(item->item.getTotalSubScore().doubleValue()).
}
staffPerformStatQuery
.
setDay
(
DateUtil
.
dayOfMonth
(
new
Date
()));
//今日得分
StaffPerformStatEntity
staffPerformStatEntity
=
staffPerformStatService
.
selectOne
(
staffPerformStatQuery
);
BigDecimal
todayScore
=
new
BigDecimal
(
0.0
);
if
(!
ObjectUtils
.
isEmpty
(
staffPerformStatEntity
)){
todayScore
=
staffPerformStatEntity
.
getTotalSubScore
();
}
PerformStatInfo
performStatInfo
=
new
PerformStatInfo
();
PerformStatInfo
performStatInfo
=
new
PerformStatInfo
();
performStatInfo
.
setTotalScore
(
RandomUtil
.
randomBigDecimal
(
new
BigDecimal
(
"15"
),
new
BigDecimal
(
"45"
)).
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
performStatInfo
.
setTotalScore
(
totalScore
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
performStatInfo
.
setTotalTimes
(
totalTimes
);
performStatInfo
.
setTotalTimes
(
totalTimes
);
performStatInfo
.
setTodayScore
(
RandomUtil
.
randomBigDecimal
(
new
BigDecimal
(
"2"
),
new
BigDecimal
(
"10"
)).
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
performStatInfo
.
setTodayScore
(
todayScore
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
performStatInfo
.
setTodayTimes
(
RandomUtil
.
randomInt
(
10
)
);
performStatInfo
.
setTodayTimes
(
todayTimes
);
rest
.
setData
(
performStatInfo
);
rest
.
setData
(
performStatInfo
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -142,7 +170,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
...
@@ -142,7 +170,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
query
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
Result
<
CheckAllRecordVo
>
result
=
checkAllRecordService
.
getAllCheckRecord
(
query
,
pageInfo
);
Result
<
CheckAllRecordVo
>
result
=
checkAllRecordService
.
getAllCheckRecord
(
query
,
pageInfo
);
List
<
CheckAllRecordVo
>
allCheckRecord
=
result
.
getList
();
List
<
PerformInfo
>
collect
=
allCheckRecord
.
stream
().
map
(
item
->
{
List
<
CheckAllRecordVo
>
allCheckRecord
=
result
.
getList
();
List
<
PerformInfo
>
collect
=
allCheckRecord
.
stream
().
map
(
item
->
{
PerformInfo
performInfo
=
new
PerformInfo
();
PerformInfo
performInfo
=
new
PerformInfo
();
BeanUtils
.
copyProperties
(
item
,
performInfo
,
BeanUtil
.
getNullPropertyNames
(
item
));
BeanUtils
.
copyProperties
(
item
,
performInfo
,
BeanUtil
.
getNullPropertyNames
(
item
));
return
performInfo
;
return
performInfo
;
...
...
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