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
a421a91f
Commit
a421a91f
authored
Aug 22, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1349ec10
b1b965b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
11 deletions
+44
-11
attendance-performance-manager-ui/admin/src/views/attendance/record/hik/list.vue
...manager-ui/admin/src/views/attendance/record/hik/list.vue
+4
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/model/vo/AttendanceStatVo.java
...tals/xhx/module/attendance/model/vo/AttendanceStatVo.java
+1
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
...odule/attendance/service/work/FixWorkOtherAttendance.java
+19
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
...xhx/module/attendance/web/AttendanceRecordController.java
+16
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordHikController.java
.../module/attendance/web/AttendanceRecordHikController.java
+0
-1
common-lib/src/main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
...main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
+4
-0
No files found.
attendance-performance-manager-ui/admin/src/views/attendance/record/hik/list.vue
View file @
a421a91f
...
@@ -220,12 +220,13 @@ export default {
...
@@ -220,12 +220,13 @@ export default {
},
},
/** 导出Excel */
/** 导出Excel */
doExport
()
{
doExport
()
{
console
.
log
(
"
isExport:
"
,
this
.
isExport
==
true
)
console
.
log
(
"
isExport:
"
,
this
.
isExport
)
if
(
this
.
isExport
==
true
)
{
if
(
this
.
isExport
==
true
)
{
console
.
log
(
"
isExport:
"
,
this
.
isExport
)
this
.
$message
.
info
(
"
考勤数据正在导出中,请勿重复点击!
"
)
this
.
$message
.
info
(
"
考勤数据正在导出中,请勿重复点击!
"
)
return
false
;
return
false
;
}
else
{
console
.
log
(
"
isExport11:
"
,
this
.
isExport
)
}
}
this
.
isExport
=
true
;
this
.
isExport
=
true
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/model/vo/AttendanceStatVo.java
View file @
a421a91f
...
@@ -19,10 +19,8 @@ public class AttendanceStatVo extends BaseEntityLong {
...
@@ -19,10 +19,8 @@ public class AttendanceStatVo extends BaseEntityLong {
private
List
<
AttendanceStaffStatEntity
>
attendanceStaffStatEntities
;
private
List
<
AttendanceStaffStatEntity
>
attendanceStaffStatEntities
;
private
String
startTime
;
private
String
startTime
;
private
String
endTime
;
private
String
endTime
;
private
List
<
Long
>
idList
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
View file @
a421a91f
...
@@ -308,9 +308,25 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
...
@@ -308,9 +308,25 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
}
}
if
(!
ObjectUtils
.
isEmpty
(
errorEntityList
))
{
if
(!
ObjectUtils
.
isEmpty
(
errorEntityList
))
{
//删除当前员工当日未处理的异常后,重新添加
AttendanceRecordErrorQuery
errorQuery
=
new
AttendanceRecordErrorQuery
();
errorQuery
.
setCreateTimeStart
(
DateUtil
.
today
());
errorQuery
.
setCreateTimeEnd
(
DateUtil
.
today
());
errorQuery
.
setStaffId
(
attendanceRecordEntity
.
getStaffId
());
errorQuery
.
setProcessStatus
(
ProcessStatusEnum
.
未处理
.
getValue
());
Long
[]
errorIds
=
errorService
.
find
(
errorQuery
).
stream
().
map
(
i
->
i
.
getId
()).
toArray
(
Long
[]::
new
);
if
(!
ObjectUtils
.
isEmpty
(
errorIds
)){
errorService
.
remove
(
errorIds
,
context
);
}
for
(
AttendanceRecordErrorEntity
errorEntity
:
errorEntityList
)
{
for
(
AttendanceRecordErrorEntity
errorEntity
:
errorEntityList
)
{
//查看是否存在相同的异常记录,如果存在 则不添加
errorService
.
save
(
errorEntity
,
context
);
AttendanceRecordErrorQuery
errorQuery
=
new
AttendanceRecordErrorQuery
();
/* //查看是否存在相同的异常记录,如果存在 则不添加
errorQuery = new AttendanceRecordErrorQuery();
errorQuery.setShiftsId(errorEntity.getShiftsId());
errorQuery.setShiftsId(errorEntity.getShiftsId());
errorQuery.setGoOffDateTime(errorEntity.getErrorDateTime());
errorQuery.setGoOffDateTime(errorEntity.getErrorDateTime());
errorQuery.setStaffId(errorEntity.getStaffId());
errorQuery.setStaffId(errorEntity.getStaffId());
...
@@ -323,7 +339,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
...
@@ -323,7 +339,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorEntity.setId(attendanceRecordErrorEntity.getId());
errorEntity.setId(attendanceRecordErrorEntity.getId());
errorService.update(errorEntity,context);
errorService.update(errorEntity,context);
log.info("已经存在相同的异常记录,更新保存!");
log.info("已经存在相同的异常记录,更新保存!");
}
}
*/
}
}
}
}
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
View file @
a421a91f
...
@@ -6,6 +6,7 @@ import com.mortals.framework.annotation.Excel;
...
@@ -6,6 +6,7 @@ import com.mortals.framework.annotation.Excel;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.utils.ServletUtils
;
import
com.mortals.framework.utils.ServletUtils
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.common.code.GoWorkResultEnum;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.common.code.GoWorkResultEnum;
import
com.mortals.xhx.common.code.NormalEnum
;
import
com.mortals.xhx.common.code.NormalEnum
;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.keys.RedisCacheKeys
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.model.vo.AttendStatInfo
;
import
com.mortals.xhx.module.attendance.model.vo.AttendStatInfo
;
import
com.mortals.xhx.module.attendance.service.AttendanceClassService
;
import
com.mortals.xhx.module.attendance.service.AttendanceClassService
;
...
@@ -75,6 +77,8 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -75,6 +77,8 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
private
AttendanceGroupService
groupService
;
private
AttendanceGroupService
groupService
;
@Autowired
@Autowired
private
AttendanceClassService
classService
;
private
AttendanceClassService
classService
;
@Autowired
private
ICacheService
cacheService
;
public
AttendanceRecordController
()
{
public
AttendanceRecordController
()
{
super
.
setModuleDesc
(
"考勤打卡记录信息"
);
super
.
setModuleDesc
(
"考勤打卡记录信息"
);
...
@@ -96,6 +100,14 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -96,6 +100,14 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
@Override
@Override
public
void
doExportBefore
(
Context
context
,
AttendanceRecordEntity
query
,
List
<
String
>
properties
)
throws
AppException
{
public
void
doExportBefore
(
Context
context
,
AttendanceRecordEntity
query
,
List
<
String
>
properties
)
throws
AppException
{
String
bool
=
cacheService
.
get
(
RedisCacheKeys
.
getRecordExportLockKey
());
if
(!
ObjectUtils
.
isEmpty
(
bool
))
{
throw
new
AppException
(
"每日数据正在导出中,请稍后再试!"
);
}
cacheService
.
set
(
RedisCacheKeys
.
getRecordExportLockKey
(),
"111"
,
120L
);
if
(!
ObjectUtils
.
isEmpty
(
query
.
getProperties
()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getProperties
()))
{
/* //通过属性转换为注解
/* //通过属性转换为注解
List<Field> tempFields = new ArrayList<>();
List<Field> tempFields = new ArrayList<>();
...
@@ -177,6 +189,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -177,6 +189,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
attendanceExportRecordEntity
.
setType
(
2
);
attendanceExportRecordEntity
.
setType
(
2
);
attendanceExportRecordEntity
.
setExportOrImport
(
1
);
attendanceExportRecordEntity
.
setExportOrImport
(
1
);
attendanceExportRecordService
.
save
(
attendanceExportRecordEntity
);
attendanceExportRecordService
.
save
(
attendanceExportRecordEntity
);
cacheService
.
del
(
RedisCacheKeys
.
getRecordExportLockKey
());
}
}
...
@@ -323,7 +338,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -323,7 +338,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
this
.
getModuleDesc
()
+
"统计"
;
String
busiDesc
=
this
.
getModuleDesc
()
+
"统计"
;
try
{
try
{
// Rest<AttendStatInfo> rest = this.service.statByDay(getContext());
// Rest<AttendStatInfo> rest = this.service.statByDay(getContext());
// if (rest.getCode() == YesNoEnum.NO.getValue()) {
// if (rest.getCode() == YesNoEnum.NO.getValue()) {
// throw new AppException("统计异常!");
// throw new AppException("统计异常!");
// } else {
// } else {
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordHikController.java
View file @
a421a91f
...
@@ -190,7 +190,6 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
...
@@ -190,7 +190,6 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
String
bool
=
cacheService
.
get
(
RedisCacheKeys
.
getHikExportLockKey
());
String
bool
=
cacheService
.
get
(
RedisCacheKeys
.
getHikExportLockKey
());
if
(!
ObjectUtils
.
isEmpty
(
bool
)){
if
(!
ObjectUtils
.
isEmpty
(
bool
)){
throw
new
AppException
(
"考勤数据正在导出中,请稍后再试!"
);
throw
new
AppException
(
"考勤数据正在导出中,请稍后再试!"
);
}
}
...
...
common-lib/src/main/java/com/mortals/xhx/common/keys/RedisCacheKeys.java
View file @
a421a91f
...
@@ -23,4 +23,8 @@ public final class RedisCacheKeys {
...
@@ -23,4 +23,8 @@ public final class RedisCacheKeys {
return
"hik:export:lock"
;
return
"hik:export:lock"
;
}
}
public
static
String
getRecordExportLockKey
()
{
return
"record:export:lock"
;
}
}
}
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