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
83228dac
Commit
83228dac
authored
Jul 14, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常分值分布情况
parent
fb9f9950
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
204 additions
and
1 deletion
+204
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/StaffPerformStatDao.java
...com/mortals/xhx/module/staff/dao/StaffPerformStatDao.java
+18
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffPerformStatDaoImpl.java
.../xhx/module/staff/dao/ibatis/StaffPerformStatDaoImpl.java
+15
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/StaffPerformStatService.java
...als/xhx/module/staff/service/StaffPerformStatService.java
+7
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffPerformStatServiceImpl.java
...odule/staff/service/impl/StaffPerformStatServiceImpl.java
+38
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffPerformStatController.java
...tals/xhx/module/staff/web/StaffPerformStatController.java
+32
-1
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffPerformStatMapperExt.xml
...sources/sqlmap/module/staff/StaffPerformStatMapperExt.xml
+94
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/StaffPerformStatDao.java
View file @
83228dac
...
...
@@ -33,4 +33,22 @@ public interface StaffPerformStatDao extends ICRUDDao<StaffPerformStatEntity,Lo
* @return
*/
List
<
StaffPerformStatEntity
>
getYearSummaryList
(
StaffSummaryTopQuery
query
);
/**
* 按天异常分值统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getDayExceptionList
(
StaffSummaryTopQuery
query
);
/**
* 按月异常分值统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getMonthExceptionList
(
StaffSummaryTopQuery
query
);
/**
* 按年异常分值统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getYearExceptionList
(
StaffSummaryTopQuery
query
);
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffPerformStatDaoImpl.java
View file @
83228dac
...
...
@@ -32,4 +32,19 @@ public class StaffPerformStatDaoImpl extends BaseCRUDDaoMybatis<StaffPerformStat
public
List
<
StaffPerformStatEntity
>
getYearSummaryList
(
StaffSummaryTopQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getYearSummaryList"
),
query
);
}
@Override
public
List
<
StaffPerformStatEntity
>
getDayExceptionList
(
StaffSummaryTopQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDayExceptionList"
),
query
);
}
@Override
public
List
<
StaffPerformStatEntity
>
getMonthExceptionList
(
StaffSummaryTopQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getMonthExceptionList"
),
query
);
}
@Override
public
List
<
StaffPerformStatEntity
>
getYearExceptionList
(
StaffSummaryTopQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getYearExceptionList"
),
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/StaffPerformStatService.java
View file @
83228dac
...
...
@@ -25,4 +25,11 @@ public interface StaffPerformStatService extends ICRUDService<StaffPerformStatEn
* @return
*/
List
<
StaffPerformStatEntity
>
getSummaryTopList
(
StaffSummaryTopQuery
query
)
throws
AppException
;
/**
* 获取异常分值统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getExceptionList
(
StaffSummaryTopQuery
query
)
throws
AppException
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffPerformStatServiceImpl.java
View file @
83228dac
...
...
@@ -62,4 +62,42 @@ public class StaffPerformStatServiceImpl extends AbstractCRUDServiceImpl<StaffPe
return
result
;
}
@Override
public
List
<
StaffPerformStatEntity
>
getExceptionList
(
StaffSummaryTopQuery
query
)
throws
AppException
{
LocalDate
now
=
LocalDate
.
now
();
List
<
StaffPerformStatEntity
>
result
=
null
;
if
(
query
==
null
){
query
=
new
StaffSummaryTopQuery
();
query
.
setSummaryType
(
SummaryTopTypeEnum
.
月
.
getValue
());
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
年
.
getValue
()){
if
(
query
.
getYear
()==
null
){
query
.
setYear
(
now
.
getYear
());
}
result
=
dao
.
getYearExceptionList
(
query
);
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
月
.
getValue
()){
if
(
query
.
getYear
()==
null
){
query
.
setYear
(
now
.
getYear
());
}
if
(
query
.
getMonth
()==
null
){
query
.
setMonth
(
now
.
getMonthValue
());
}
result
=
dao
.
getMonthExceptionList
(
query
);
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
日
.
getValue
()){
if
(
query
.
getYear
()==
null
){
query
.
setYear
(
now
.
getYear
());
}
if
(
query
.
getMonth
()==
null
){
query
.
setMonth
(
now
.
getMonthValue
());
}
if
(
query
.
getDay
()==
null
){
query
.
setDay
(
now
.
getDayOfMonth
());
}
result
=
dao
.
getDayExceptionList
(
query
);
}
return
result
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffPerformStatController.java
View file @
83228dac
...
...
@@ -44,7 +44,7 @@ public class StaffPerformStatController extends BaseCRUDJsonBodyMappingControlle
}
/**
*
部门
绩效排行榜
*
个人
绩效排行榜
* @param query
* @return
*/
...
...
@@ -74,4 +74,35 @@ public class StaffPerformStatController extends BaseCRUDJsonBodyMappingControlle
return
ret
;
}
/**
* 异常分值统计
* @param query
* @return
*/
@PostMapping
({
"summary/exception"
})
@UnAuth
public
Rest
<
Object
>
getExceptionList
(
@RequestBody
StaffSummaryTopQuery
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询异常分值统计"
;
int
code
=
1
;
try
{
List
<
StaffPerformStatEntity
>
result
=
this
.
getService
().
getExceptionList
(
query
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
setCode
(
code
);
ret
.
setData
(
model
.
get
(
"data"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffPerformStatMapperExt.xml
View file @
83228dac
...
...
@@ -76,4 +76,98 @@
`year`
) AS a ORDER BY totalScore DESC LIMIT 10
</select>
<!-- 按天异常分值统计 -->
<select
id=
"getDayExceptionList"
parameterType=
"com.mortals.xhx.module.staff.model.vo.StaffSummaryTopQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
`year`,
`month`,
`day`,
SUM(attendScoreAdd) AS attendScoreAdd,
SUM(attendScoreSub) AS attendScoreSub,
SUM(reviewScoreAdd) AS reviewScoreAdd,
SUM(reviewScoreSub) AS reviewScoreSub,
SUM(complainScoreAdd) AS complainScoreAdd,
SUM(complainScoreSub) AS complainScoreSub,
SUM(goworkScoreAdd) AS goworkScoreAdd,
SUM(goworkScoreSub) AS goworkScoreSub,
SUM(effectScoreAdd) AS effectScoreAdd,
SUM(effectScoreSub) AS effectScoreSub,
SUM(otherScoreAdd) AS otherScoreAdd,
SUM(otherScoreSub) AS otherScoreSub
FROM
mortals_xhx_staff_perform_stat
WHERE 1=1
<if
test=
"year != null"
>
AND `year` = #{year}
</if>
<if
test=
"month != null"
>
AND `month` = #{month}
</if>
<if
test=
"day != null"
>
AND `day` = #{day}
</if>
GROUP BY
`year`,
`month`,
`day`
</select>
<!-- 按月异常分值统计 -->
<select
id=
"getMonthExceptionList"
parameterType=
"com.mortals.xhx.module.staff.model.vo.StaffSummaryTopQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
`year`,
`month`,
SUM(attendScoreAdd) AS attendScoreAdd,
SUM(attendScoreSub) AS attendScoreSub,
SUM(reviewScoreAdd) AS reviewScoreAdd,
SUM(reviewScoreSub) AS reviewScoreSub,
SUM(complainScoreAdd) AS complainScoreAdd,
SUM(complainScoreSub) AS complainScoreSub,
SUM(goworkScoreAdd) AS goworkScoreAdd,
SUM(goworkScoreSub) AS goworkScoreSub,
SUM(effectScoreAdd) AS effectScoreAdd,
SUM(effectScoreSub) AS effectScoreSub,
SUM(otherScoreAdd) AS otherScoreAdd,
SUM(otherScoreSub) AS otherScoreSub
FROM
mortals_xhx_staff_perform_stat
WHERE 1=1
<if
test=
"year != null"
>
AND `year` = #{year}
</if>
<if
test=
"month != null"
>
AND `month` = #{month}
</if>
GROUP BY
`year`,
`month`
</select>
<!-- 按年异常分值统计 -->
<select
id=
"getYearExceptionList"
parameterType=
"com.mortals.xhx.module.staff.model.vo.StaffSummaryTopQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
`year`,
SUM(attendScoreAdd) AS attendScoreAdd,
SUM(attendScoreSub) AS attendScoreSub,
SUM(reviewScoreAdd) AS reviewScoreAdd,
SUM(reviewScoreSub) AS reviewScoreSub,
SUM(complainScoreAdd) AS complainScoreAdd,
SUM(complainScoreSub) AS complainScoreSub,
SUM(goworkScoreAdd) AS goworkScoreAdd,
SUM(goworkScoreSub) AS goworkScoreSub,
SUM(effectScoreAdd) AS effectScoreAdd,
SUM(effectScoreSub) AS effectScoreSub,
SUM(otherScoreAdd) AS otherScoreAdd,
SUM(otherScoreSub) AS otherScoreSub
FROM
mortals_xhx_staff_perform_stat
WHERE 1=1
<if
test=
"year != null"
>
AND `year` = #{year}
</if>
GROUP BY
`year`
</select>
</mapper>
\ No newline at end of file
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