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
2488b616
Commit
2488b616
authored
Aug 22, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
b952036b
3896a8ce
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
9 deletions
+74
-9
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
...ndance/service/impl/AttendanceRecordErrorServiceImpl.java
+14
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
...rc/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
+4
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
...a/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
+4
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
...java/com/mortals/xhx/module/dept/service/DeptService.java
+6
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+5
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/vo/StaffVo.java
...n/java/com/mortals/xhx/module/staff/model/vo/StaffVo.java
+2
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+19
-4
attendance-performance-manager/src/main/resources/sqlmap/module/attendance/AttendanceSummaryMapper.xml
...rces/sqlmap/module/attendance/AttendanceSummaryMapper.xml
+4
-0
attendance-performance-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
...r/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
+16
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
View file @
2488b616
...
...
@@ -4,13 +4,15 @@ import cn.hutool.core.date.DateUnit;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.busiz.h5.req.AttendSaveReq
;
import
com.mortals.xhx.busiz.h5.web.ApiWebPerformController
;
import
com.mortals.xhx.common.code.ErrorStatusEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity
;
import
com.mortals.xhx.module.attendance.
service.AttendanceClassDetailService
;
import
com.mortals.xhx.module.attendance.service.
AttendanceClassService
;
import
com.mortals.xhx.module.attendance.
model.vo.AttendanceSummaryQuery
;
import
com.mortals.xhx.module.attendance.service.
*
;
import
com.mortals.xhx.module.perform.service.PerformAttendRecordService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -20,7 +22,6 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.xhx.module.attendance.dao.AttendanceRecordErrorDao
;
import
com.mortals.xhx.module.attendance.model.AttendanceRecordErrorEntity
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordErrorService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
...
...
@@ -47,6 +48,8 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
private
ApiWebPerformController
apiWebPerformController
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
AttendanceStatService
attendanceStatService
;
@Override
...
...
@@ -140,6 +143,14 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
attendSaveReq
.
setStaffId
(
entity
.
getStaffId
());
performAttendRecordService
.
saveAttend
(
attendSaveReq
,
context
);
}
//异常处理后重新汇总考勤
if
(
StringUtils
.
isNotEmpty
(
entity
.
getProcessResult
()))
{
AttendanceSummaryQuery
query
=
new
AttendanceSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setSummaryTime
(
DateUtils
.
getStrDate
(
entity
.
getErrorDateTime
()));
attendanceStatService
.
doAttendanceSummary
(
query
);
}
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/dao/DeptDao.java
View file @
2488b616
...
...
@@ -36,5 +36,8 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
* */
DeptEntity
queryDeptParient
(
String
parentCode
);
/**
* 查询包含本部门所有下级部门
* */
List
<
DeptEntity
>
getAllChildrenDept
(
Long
deptId
);
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/dao/ibatis/DeptDaoImpl.java
View file @
2488b616
...
...
@@ -37,7 +37,10 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
return
getSqlSession
().
selectOne
(
getSqlId
(
"queryDeptParient"
),
parentCode
);
}
@Override
public
List
<
DeptEntity
>
getAllChildrenDept
(
Long
deptId
)
{
return
getSqlSession
().
selectList
(
getSqlId
(
"getAllChildrenDept"
),
deptId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/DeptService.java
View file @
2488b616
package
com.mortals.xhx.module.dept.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.dept.dao.DeptDao
;
...
...
@@ -64,5 +65,10 @@ public interface DeptService extends ICRUDService<DeptEntity, Long> {
*/
Rest
<
Void
>
updateDeptNum
(
Context
context
);
/**
* 查询包含本部门所有下级部门
* */
List
<
DeptEntity
>
getAllChildrenDept
(
Long
deptId
)
throws
AppException
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
2488b616
...
...
@@ -255,5 +255,10 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
return
Rest
.
ok
();
}
@Override
public
List
<
DeptEntity
>
getAllChildrenDept
(
Long
deptId
)
throws
AppException
{
return
dao
.
getAllChildrenDept
(
deptId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/vo/StaffVo.java
View file @
2488b616
...
...
@@ -32,4 +32,6 @@ public class StaffVo extends BaseEntityLong {
private
List
<
StaffInfoVo
>
staffInfoVos
;
private
List
<
Long
>
deptIdList
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
2488b616
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.util.SecurityUtil
;
import
com.mortals.xhx.base.system.role.model.RoleUserQuery
;
...
...
@@ -33,14 +34,12 @@ import com.mortals.xhx.module.staff.model.StaffQuery;
import
com.mortals.xhx.module.staff.model.vo.StaffInfoVo
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -263,4 +262,20 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
System
.
out
.
println
(
"1"
+
StrUtil
.
padPre
(
"125"
,
7
,
"0"
));
}
@Override
protected
StaffEntity
findBefore
(
StaffEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
if
(
params
.
getDeptId
()!=
null
){
List
<
DeptEntity
>
deptList
=
deptService
.
getAllChildrenDept
(
params
.
getDeptId
());
if
(
CollectionUtils
.
isNotEmpty
(
deptList
)){
List
<
Long
>
deptIdList
=
new
ArrayList
<>();
deptList
.
forEach
(
item
->
{
deptIdList
.
add
(
item
.
getId
());
});
params
.
setDeptId
(
null
);
params
.
setDeptIdList
(
deptIdList
);
}
}
return
params
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/attendance/AttendanceSummaryMapper.xml
View file @
2488b616
...
...
@@ -39,6 +39,8 @@
FROM
mortals_xhx_staff s
LEFT JOIN mortals_xhx_attendance_vacation_balance b ON s.id = b.staffId
WHERE 1=1
<if
test=
"staffId != null and staffId!=''"
>
AND s.id = #{staffId}
</if>
</select>
<!-- 汇总当前日期请假情况 -->
...
...
@@ -60,6 +62,7 @@
AND processStatus = 2
AND STR_TO_DATE(date_format(startTime,'%Y-%m-%d'),'%Y-%m-%d')
<![CDATA[ <= ]]>
STR_TO_DATE(#{summaryTime},'%Y-%m-%d')
AND STR_TO_DATE(date_format(endTime,'%Y-%m-%d'),'%Y-%m-%d')
<![CDATA[ >= ]]>
STR_TO_DATE(#{summaryTime},'%Y-%m-%d')
<if
test=
"staffId != null and staffId!=''"
>
AND leavePersonId = #{staffId}
</if>
GROUP BY leavePersonId,leavePerson,leaveType
</select>
...
...
@@ -83,6 +86,7 @@
and processResult != 4
and e.errorDateTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{summaryTime},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
and e.errorDateTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{summaryTime},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
<if
test=
"staffId != null and staffId!=''"
>
AND e.staffId = #{staffId}
</if>
group by
e.staffId,
e.staffName
...
...
attendance-performance-manager/src/main/resources/sqlmap/module/dept/DeptMapperExt.xml
View file @
2488b616
...
...
@@ -12,4 +12,20 @@
<select
id=
"queryDeptParentId"
resultType=
"integer"
>
select parentId from mortals_xhx_dept where deptId = #{deptId}
</select>
<!--查询所有子部门-->
<select
id=
"getAllChildrenDept"
resultType=
"com.mortals.xhx.module.dept.model.DeptEntity"
>
SELECT * FROM (
SELECT id, parentId, deptName,deptCode,deptStatus FROM mortals_xhx_dept WHERE id = #{deptId}
UNION ALL
SELECT i.id, i.parentId, i.deptName,i.deptCode,i.deptStatus
FROM mortals_xhx_dept i
INNER JOIN (
SELECT * FROM (
SELECT id, parentId, deptName,deptCode,deptStatus FROM mortals_xhx_dept WHERE id = #{deptId}
UNION ALL
SELECT id, parentId, deptName,deptCode,deptStatus FROM mortals_xhx_dept WHERE parentId = #{deptId}
) t1
) t2 ON i.parentId = t2.id
) t3
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment