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
562da3b7
Commit
562da3b7
authored
Jul 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5e443f53
7e650ea6
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1479 additions
and
49 deletions
+1479
-49
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckAttendRecordDao.java
...om/mortals/xhx/module/check/dao/CheckAttendRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckComplainRecordDao.java
.../mortals/xhx/module/check/dao/CheckComplainRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckEffectRecordDao.java
...om/mortals/xhx/module/check/dao/CheckEffectRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckGoworkRecordDao.java
...om/mortals/xhx/module/check/dao/CheckGoworkRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckOtherRecordDao.java
...com/mortals/xhx/module/check/dao/CheckOtherRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckReviewRecordDao.java
...om/mortals/xhx/module/check/dao/CheckReviewRecordDao.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckAttendRecordDaoImpl.java
...xhx/module/check/dao/ibatis/CheckAttendRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckComplainRecordDaoImpl.java
...x/module/check/dao/ibatis/CheckComplainRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckEffectRecordDaoImpl.java
...xhx/module/check/dao/ibatis/CheckEffectRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckGoworkRecordDaoImpl.java
...xhx/module/check/dao/ibatis/CheckGoworkRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckOtherRecordDaoImpl.java
.../xhx/module/check/dao/ibatis/CheckOtherRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckReviewRecordDaoImpl.java
...xhx/module/check/dao/ibatis/CheckReviewRecordDaoImpl.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckAttendRecordService.java
...ls/xhx/module/check/service/CheckAttendRecordService.java
+16
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckComplainRecordService.java
.../xhx/module/check/service/CheckComplainRecordService.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckEffectRecordService.java
...ls/xhx/module/check/service/CheckEffectRecordService.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckGoworkRecordService.java
...ls/xhx/module/check/service/CheckGoworkRecordService.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckOtherRecordService.java
...als/xhx/module/check/service/CheckOtherRecordService.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckReviewRecordService.java
...ls/xhx/module/check/service/CheckReviewRecordService.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+166
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
...le/check/service/impl/CheckComplainRecordServiceImpl.java
+167
-9
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+166
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+166
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
...odule/check/service/impl/CheckOtherRecordServiceImpl.java
+166
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+166
-8
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckAttendRecordMapperExt.xml
...ources/sqlmap/module/check/CheckAttendRecordMapperExt.xml
+38
-0
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckComplainRecordMapperExt.xml
...rces/sqlmap/module/check/CheckComplainRecordMapperExt.xml
+38
-0
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckEffectRecordMapperExt.xml
...ources/sqlmap/module/check/CheckEffectRecordMapperExt.xml
+38
-0
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckGoworkRecordMapperExt.xml
...ources/sqlmap/module/check/CheckGoworkRecordMapperExt.xml
+38
-0
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckOtherRecordMapperExt.xml
...sources/sqlmap/module/check/CheckOtherRecordMapperExt.xml
+38
-0
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckReviewRecordMapperExt.xml
...ources/sqlmap/module/check/CheckReviewRecordMapperExt.xml
+38
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckAttendRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckAttendRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckAttendRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckAttendRecordDao extends ICRUDDao<CheckAttendRecordEntity,
...
@@ -22,4 +24,18 @@ public interface CheckAttendRecordDao extends ICRUDDao<CheckAttendRecordEntity,
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckComplainRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckComplainRecordDao extends ICRUDDao<CheckComplainRecordEnt
...
@@ -22,4 +24,18 @@ public interface CheckComplainRecordDao extends ICRUDDao<CheckComplainRecordEnt
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckEffectRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckEffectRecordDao extends ICRUDDao<CheckEffectRecordEntity,
...
@@ -22,4 +24,18 @@ public interface CheckEffectRecordDao extends ICRUDDao<CheckEffectRecordEntity,
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckGoworkRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckGoworkRecordDao extends ICRUDDao<CheckGoworkRecordEntity,
...
@@ -22,4 +24,18 @@ public interface CheckGoworkRecordDao extends ICRUDDao<CheckGoworkRecordEntity,
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckOtherRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckOtherRecordDao extends ICRUDDao<CheckOtherRecordEntity,Lo
...
@@ -22,4 +24,18 @@ public interface CheckOtherRecordDao extends ICRUDDao<CheckOtherRecordEntity,Lo
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckReviewRecordDao.java
View file @
562da3b7
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
...
@@ -4,6 +4,8 @@ import com.mortals.framework.dao.ICRUDDao;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -22,4 +24,18 @@ public interface CheckReviewRecordDao extends ICRUDDao<CheckReviewRecordEntity,
...
@@ -22,4 +24,18 @@ public interface CheckReviewRecordDao extends ICRUDDao<CheckReviewRecordEntity,
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
/**
* 个人绩效统计
* @param query
* @return
*/
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckAttendRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckAttendRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckAttendRecordDao
;
import
com.mortals.xhx.module.check.model.CheckAttendRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckAttendRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckAttendRecordDaoImpl extends BaseCRUDDaoMybatis<CheckAttendReco
...
@@ -23,4 +25,14 @@ public class CheckAttendRecordDaoImpl extends BaseCRUDDaoMybatis<CheckAttendReco
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckComplainRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckComplainRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckComplainRecordDao
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckComplainRecordDaoImpl extends BaseCRUDDaoMybatis<CheckComplain
...
@@ -23,4 +25,14 @@ public class CheckComplainRecordDaoImpl extends BaseCRUDDaoMybatis<CheckComplain
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckEffectRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckEffectRecordDaoImpl extends BaseCRUDDaoMybatis<CheckEffectReco
...
@@ -23,4 +25,14 @@ public class CheckEffectRecordDaoImpl extends BaseCRUDDaoMybatis<CheckEffectReco
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckGoworkRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckGoworkRecordDaoImpl extends BaseCRUDDaoMybatis<CheckGoworkReco
...
@@ -23,4 +25,14 @@ public class CheckGoworkRecordDaoImpl extends BaseCRUDDaoMybatis<CheckGoworkReco
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckOtherRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckOtherRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckOtherRecordDao
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckOtherRecordDaoImpl extends BaseCRUDDaoMybatis<CheckOtherRecord
...
@@ -23,4 +25,14 @@ public class CheckOtherRecordDaoImpl extends BaseCRUDDaoMybatis<CheckOtherRecord
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckReviewRecordDaoImpl.java
View file @
562da3b7
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.check.dao.ibatis;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckReviewRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckReviewRecordDao
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
...
@@ -23,4 +25,14 @@ public class CheckReviewRecordDaoImpl extends BaseCRUDDaoMybatis<CheckReviewReco
...
@@ -23,4 +25,14 @@ public class CheckReviewRecordDaoImpl extends BaseCRUDDaoMybatis<CheckReviewReco
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
@Override
public
List
<
StaffPerformStatEntity
>
getStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffPerformStat"
),
query
);
}
@Override
public
List
<
DeptPerformStatEntity
>
getDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDeptPerformStat"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckAttendRecordService.java
View file @
562da3b7
...
@@ -6,6 +6,8 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
...
@@ -6,6 +6,8 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import
com.mortals.xhx.module.check.dao.CheckAttendRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckAttendRecordDao
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,4 +37,18 @@ public interface CheckAttendRecordService extends ICRUDService<CheckAttendRecord
...
@@ -35,4 +37,18 @@ public interface CheckAttendRecordService extends ICRUDService<CheckAttendRecord
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckComplainRecordService.java
View file @
562da3b7
...
@@ -35,4 +35,18 @@ public interface CheckComplainRecordService extends ICRUDService<CheckComplainRe
...
@@ -35,4 +35,18 @@ public interface CheckComplainRecordService extends ICRUDService<CheckComplainRe
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckEffectRecordService.java
View file @
562da3b7
...
@@ -35,4 +35,18 @@ public interface CheckEffectRecordService extends ICRUDService<CheckEffectRecord
...
@@ -35,4 +35,18 @@ public interface CheckEffectRecordService extends ICRUDService<CheckEffectRecord
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckGoworkRecordService.java
View file @
562da3b7
...
@@ -35,4 +35,18 @@ public interface CheckGoworkRecordService extends ICRUDService<CheckGoworkRecord
...
@@ -35,4 +35,18 @@ public interface CheckGoworkRecordService extends ICRUDService<CheckGoworkRecord
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckOtherRecordService.java
View file @
562da3b7
...
@@ -35,4 +35,18 @@ public interface CheckOtherRecordService extends ICRUDService<CheckOtherRecordEn
...
@@ -35,4 +35,18 @@ public interface CheckOtherRecordService extends ICRUDService<CheckOtherRecordEn
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckReviewRecordService.java
View file @
562da3b7
...
@@ -35,4 +35,18 @@ public interface CheckReviewRecordService extends ICRUDService<CheckReviewRecord
...
@@ -35,4 +35,18 @@ public interface CheckReviewRecordService extends ICRUDService<CheckReviewRecord
* @return
* @return
*/
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
/**
* 个人绩效统计
* @param query
* @return
*/
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
);
/**
* 部门绩效统计
* @param query
* @return
*/
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
562da3b7
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckAttendRecordService
;
import
com.mortals.xhx.module.check.service.CheckAttendRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -59,6 +63,12 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
...
@@ -59,6 +63,12 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
protected
void
saveAfter
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -165,12 +175,16 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
...
@@ -165,12 +175,16 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
if
(
temp
.
getEffectScore
()
==
null
)
{
if
(
temp
.
getEffectScore
()
==
null
)
{
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getComplainScore
()
==
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -192,6 +206,150 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
...
@@ -192,6 +206,150 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setAttendScoreAdd
(
entity
.
getAttendScoreAdd
());
statEntity
.
setAttendScoreSub
(
entity
.
getAttendScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setAttendScoreAdd
(
entity
.
getAttendScoreAdd
());
statEntity
.
setAttendScoreSub
(
entity
.
getAttendScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
View file @
562da3b7
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckComplainRecordService
;
import
com.mortals.xhx.module.check.service.CheckComplainRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -59,6 +63,12 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -59,6 +63,12 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
protected
void
saveAfter
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -148,7 +158,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -148,7 +158,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
for
(
StaffCheckSummaryVo
vo:
summaryVoList
){
for
(
StaffCheckSummaryVo
vo:
summaryVoList
){
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
BeanUtils
.
copyProperties
(
vo
,
staffPerformSummaryEntity
,
BeanUtil
.
getNullPropertyNames
(
vo
));
BeanUtils
.
copyProperties
(
vo
,
staffPerformSummaryEntity
,
BeanUtil
.
getNullPropertyNames
(
vo
));
staffPerformSummaryEntity
.
set
Review
Score
(
vo
.
getSumScore
());
staffPerformSummaryEntity
.
set
Complain
Score
(
vo
.
getSumScore
());
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
summaryQuery
.
setStaffId
(
vo
.
getStaffId
());
summaryQuery
.
setStaffId
(
vo
.
getStaffId
());
summaryQuery
.
setYear
(
vo
.
getYear
());
summaryQuery
.
setYear
(
vo
.
getYear
());
...
@@ -167,12 +177,16 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -167,12 +177,16 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if
(
temp
.
getEffectScore
()==
null
){
if
(
temp
.
getEffectScore
()==
null
){
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getReviewScore
()==
null
){
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -197,6 +211,150 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -197,6 +211,150 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setComplainScoreAdd
(
entity
.
getComplainScoreAdd
());
statEntity
.
setComplainScoreSub
(
entity
.
getComplainScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setComplainScoreAdd
(
entity
.
getComplainScoreAdd
());
statEntity
.
setComplainScoreSub
(
entity
.
getComplainScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
562da3b7
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckEffectRecordService
;
import
com.mortals.xhx.module.check.service.CheckEffectRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -59,6 +63,12 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -59,6 +63,12 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -167,12 +177,16 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -167,12 +177,16 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
if
(
temp
.
getAttendScore
()==
null
){
if
(
temp
.
getAttendScore
()==
null
){
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getComplainScore
()
==
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -197,6 +211,150 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -197,6 +211,150 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setEffectScoreAdd
(
entity
.
getEffectScoreAdd
());
statEntity
.
setEffectScoreSub
(
entity
.
getEffectScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setEffectScoreAdd
(
entity
.
getEffectScoreAdd
());
statEntity
.
setEffectScoreSub
(
entity
.
getEffectScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
562da3b7
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
...
@@ -20,11 +20,15 @@ import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckGoworkRecordService
;
import
com.mortals.xhx.module.check.service.CheckGoworkRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -59,6 +63,12 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -59,6 +63,12 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
protected
void
saveAfter
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -166,12 +176,16 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -166,12 +176,16 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
if
(
temp
.
getEffectScore
()==
null
){
if
(
temp
.
getEffectScore
()==
null
){
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getComplainScore
()
==
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -196,7 +210,151 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -196,7 +210,151 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setGoworkScoreAdd
(
entity
.
getGoworkScoreAdd
());
statEntity
.
setGoworkScoreSub
(
entity
.
getGoworkScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setGoworkScoreAdd
(
entity
.
getGoworkScoreAdd
());
statEntity
.
setGoworkScoreSub
(
entity
.
getGoworkScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
View file @
562da3b7
...
@@ -14,11 +14,15 @@ import com.mortals.xhx.common.utils.BeanUtil;
...
@@ -14,11 +14,15 @@ import com.mortals.xhx.common.utils.BeanUtil;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -60,6 +64,12 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -60,6 +64,12 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
protected
void
saveAfter
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -172,12 +182,16 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -172,12 +182,16 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
if
(
temp
.
getEffectScore
()
==
null
)
{
if
(
temp
.
getEffectScore
()
==
null
)
{
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getComplainScore
()
==
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -202,6 +216,150 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -202,6 +216,150 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setOtherScoreAdd
(
entity
.
getOtherScoreAdd
());
statEntity
.
setOtherScoreSub
(
entity
.
getOtherScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setOtherScoreAdd
(
entity
.
getOtherScoreAdd
());
statEntity
.
setOtherScoreSub
(
entity
.
getOtherScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
562da3b7
...
@@ -13,14 +13,18 @@ import com.mortals.xhx.common.code.YesNoEnum;
...
@@ -13,14 +13,18 @@ import com.mortals.xhx.common.code.YesNoEnum;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.dept.service.DeptPerformStatService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Link
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Link
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Msg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Msg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -61,6 +65,12 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -61,6 +65,12 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
MessageService
messageService
;
private
MessageService
messageService
;
@Autowired
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Override
@Override
...
@@ -172,12 +182,16 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -172,12 +182,16 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
if
(
temp
.
getEffectScore
()
==
null
)
{
if
(
temp
.
getEffectScore
()
==
null
)
{
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getComplainScore
()
==
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
staffPerformSummaryEntity
.
setTotalScore
(
total
.
subtract
(
erro
));
...
@@ -202,6 +216,150 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -202,6 +216,150 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}
}
}
}
doSaveStaffPerformStat
(
query
);
doSaveDeptPerformStat
(
query
);
return
summaryVoList
;
return
summaryVoList
;
}
}
@Override
public
void
doSaveStaffPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
StaffPerformStatEntity
temp
=
staffPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setReviewScoreAdd
(
entity
.
getReviewScoreAdd
());
statEntity
.
setReviewScoreSub
(
entity
.
getReviewScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeStaff
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
staffPerformStatService
.
save
(
statEntity
);
}
}
}
}
@Override
public
void
doSaveDeptPerformStat
(
StaffCheckSummaryQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
String
endTime
=
format
.
format
(
calendar
.
getTime
());
query
.
setCheckTimeStart
(
startTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
)){
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
tempQuery
.
setMonth
(
entity
.
getMonth
());
tempQuery
.
setDay
(
entity
.
getDay
());
DeptPerformStatEntity
temp
=
deptPerformStatService
.
selectOne
(
tempQuery
);
if
(
temp
!=
null
)
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
temp
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
temp
));
statEntity
.
setId
(
temp
.
getId
());
statEntity
.
setUpdateTime
(
new
Date
());
statEntity
.
setReviewScoreAdd
(
entity
.
getReviewScoreAdd
());
statEntity
.
setReviewScoreSub
(
entity
.
getReviewScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
statEntity
.
setId
(
null
);
computeDept
(
statEntity
);
statEntity
.
setCreateUserId
(
1
l
);
statEntity
.
setCreateTime
(
new
Date
());
deptPerformStatService
.
save
(
statEntity
);
}
}
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
){
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getAttendScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getComplainScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getComplainScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getReviewScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getReviewScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getGoworkScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getGoworkScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getEffectScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getEffectScoreSub
());
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getOtherScoreAdd
());
totalSubScore
=
totalSubScore
.
add
(
statEntity
.
getOtherScoreSub
());
statEntity
.
setTotalAddScore
(
totalAddScore
);
statEntity
.
setTotalSubScore
(
totalSubScore
);
totalScore
=
totalScore
.
add
(
totalAddScore
);
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckAttendRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as attendScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub
FROM
mortals_xhx_check_attend_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as attendScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub
FROM
mortals_xhx_check_attend_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</mapper>
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckComplainRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as complainScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub
FROM
mortals_xhx_check_complain_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as complainScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as complainScoreSub
FROM
mortals_xhx_check_complain_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</mapper>
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckEffectRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as effectScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub
FROM
mortals_xhx_check_effect_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as effectScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as effectScoreSub
FROM
mortals_xhx_check_effect_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</mapper>
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckGoworkRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as attendScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as attendScoreSub
FROM
mortals_xhx_check_gowork_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as goworkScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as goworkScoreSub
FROM
mortals_xhx_check_gowork_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</mapper>
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckOtherRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as otherScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub
FROM
mortals_xhx_check_other_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as otherScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as otherScoreSub
FROM
mortals_xhx_check_other_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</mapper>
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckReviewRecordMapperExt.xml
View file @
562da3b7
...
@@ -18,4 +18,42 @@
...
@@ -18,4 +18,42 @@
GROUP BY
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m')
</select>
</select>
<!-- 个人绩效统计 -->
<select
id=
"getStaffPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.staff.model.StaffPerformStatEntity"
>
SELECT
staffId,staffName,workNum,deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as reviewScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub
FROM
mortals_xhx_check_review_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
staffId,staffName,workNum,deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
<!-- 部门绩效统计 -->
<select
id=
"getDeptPerformStat"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.dept.model.DeptPerformStatEntity"
>
SELECT
deptId,deptName,
DATE_FORMAT(checkTime,'%Y') as `year`,
DATE_FORMAT(checkTime,'%m') as `month`,
DATE_FORMAT(checkTime,'%d') as `day`,
SUM(CASE subAddType WHEN 1 THEN score ELSE 0 END) as reviewScoreAdd,
SUM(CASE subAddType WHEN 2 THEN score ELSE 0 END) as reviewScoreSub
FROM
mortals_xhx_check_review_record
WHERE checkStatus = 2
<if
test=
"staffId != null and staffId!=''"
>
AND staffId = #{staffId}
</if>
<if
test=
"checkTimeStart != null and checkTimeStart!=''"
>
AND checkTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if
test=
"checkTimeEnd != null and checkTimeEnd!=''"
>
AND checkTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
GROUP BY
deptId,deptName,DATE_FORMAT(checkTime,'%Y-%m-%d');
</select>
</mapper>
</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