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
c1655b97
Commit
c1655b97
authored
Jul 31, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改员工导出
parent
12e1f509
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
10 deletions
+47
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/AppealApiController.java
...ava/com/mortals/xhx/busiz/h5/web/AppealApiController.java
+46
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/InspectApiController.java
...va/com/mortals/xhx/busiz/h5/web/InspectApiController.java
+1
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/AppealApiController.java
View file @
c1655b97
...
...
@@ -14,13 +14,18 @@ import com.mortals.framework.model.Result;
import
com.mortals.xhx.busiz.h5.req.AppealReq
;
import
com.mortals.xhx.busiz.h5.req.PerformReq
;
import
com.mortals.xhx.busiz.h5.rsp.AppealStatInfo
;
import
com.mortals.xhx.busiz.h5.rsp.PerformStatInfo
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckAllRecordDao
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealEntity
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealQuery
;
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
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,10 +35,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.*
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED
;
...
...
@@ -62,7 +64,10 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
private
CheckGoworkRecordService
checkGoworkRecordService
;
@Autowired
private
CheckOtherRecordService
checkOtherRecordService
;
@Autowired
private
CheckAllRecordDao
checkAllRecordDao
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
PerformAttendAppealService
appealService
;
...
...
@@ -89,13 +94,44 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
}
log
.
info
(
"【{}】【请求体】--> 用户:{}"
,
busiDesc
,
context
.
getUser
().
getRealName
());
try
{
//todo 查询当前登录人的绩效分数
CheckAllRecordQuery
checkAllRecordQuery
=
new
CheckAllRecordQuery
();
checkAllRecordQuery
.
setSubAddType
(
SubAddTypeEnum
.
扣除
.
getValue
());
checkAllRecordQuery
.
setStaffId
(
context
.
getUser
().
getCustomerId
());
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
))
{
totalScore
=
staffPerformStatEntities
.
stream
().
map
(
item
->
item
.
getTotalSubScore
()).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
}
staffPerformStatQuery
.
setDay
(
DateUtil
.
dayOfMonth
(
new
Date
()));
//今日得分
StaffPerformStatEntity
staffPerformStatEntity
=
staffPerformStatService
.
selectOne
(
staffPerformStatQuery
);
BigDecimal
todayScore
=
new
BigDecimal
(
0.0
);
if
(!
ObjectUtils
.
isEmpty
(
staffPerformStatEntity
))
{
todayScore
=
staffPerformStatEntity
.
getTotalSubScore
();
}
AppealStatInfo
appealStatInfo
=
new
AppealStatInfo
();
appealStatInfo
.
setTotalScore
(
new
BigDecimal
(
"10.52"
).
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
appealStatInfo
.
setTotalTimes
(
12
);
appealStatInfo
.
setTodayScore
(
new
BigDecimal
(
"2.5"
).
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
appealStatInfo
.
setTodayTimes
(
3
);
appealStatInfo
.
setTotalScore
(
totalScore
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
appealStatInfo
.
setTotalTimes
(
totalTimes
);
appealStatInfo
.
setTodayScore
(
todayScore
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
));
appealStatInfo
.
setTodayTimes
(
todayTimes
);
rest
.
setData
(
appealStatInfo
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/InspectApiController.java
View file @
c1655b97
...
...
@@ -561,6 +561,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
StaffEntity
custStaff
=
getStaff
(
context
.
getUser
().
getCustomerId
().
toString
());
recordEntity
.
setDeductPerson
(
custStaff
==
null
?
"系统管理员"
:
custStaff
.
getName
());
recordEntity
.
setDeptId
(
staffEntity
.
getDeptId
());
recordEntity
.
setDeptName
(
staffEntity
.
getDeptName
());
recordEntity
.
setSubAddType
(
rule
.
getSubAddType
());
...
...
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