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
09d99ea8
Commit
09d99ea8
authored
Aug 11, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤异常添加绩效考核
parent
d40edea2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
14 deletions
+28
-14
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
.../xhx/base/framework/interceptor/AuthTokenServiceImpl.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+18
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
...ndance/service/impl/AttendanceRecordErrorServiceImpl.java
+7
-10
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
.../src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
+1
-1
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
View file @
09d99ea8
...
...
@@ -90,9 +90,9 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims
claims
=
parseToken
(
token
);
String
uuid
=
(
String
)
claims
.
get
(
SysConstains
.
LOGIN_USER_KEY
);
String
userKey
=
getTokenKey
(
uuid
);
//
cacheService.select(portalDb);
cacheService
.
select
(
portalDb
);
String
userStr
=
cacheService
.
get
(
userKey
);
//
cacheService.select(db);
cacheService
.
select
(
db
);
if
(
StringUtils
.
isNotEmpty
(
userStr
))
{
UserEntity
userEntity
=
JSONObject
.
parseObject
(
userStr
,
UserEntity
.
class
);
userEntity
.
setToken
(
token
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
09d99ea8
...
...
@@ -25,6 +25,8 @@ import com.mortals.xhx.common.code.GoWorkResultEnum;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.HomeStatInfo
;
import
com.mortals.xhx.common.pdu.user.UserPdu
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
com.mortals.xhx.module.attendance.model.AttendanceRecordEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceRecordQuery
;
import
com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceQuery
;
...
...
@@ -80,10 +82,25 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
private
DeptService
deptService
;
@Autowired
private
IUserFeign
userFeign
;
@RequestMapping
(
"login"
)
public
String
login
(
@RequestBody
LoginForm
loginForm
)
throws
Exception
{
String
loginName
=
loginForm
.
getLoginName
();
String
password
=
loginForm
.
getPassword
();
UserPdu
userPdu
=
new
UserPdu
();
userPdu
.
setLoginName
(
loginName
);
userPdu
.
setPassword
(
password
);
String
resp
=
userFeign
.
portalLogin
(
userPdu
);
return
resp
;
/*
JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
...
...
@@ -137,7 +154,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
return ret.toJSONString();
}
}
*/
}
@RequestMapping
(
"logout"
)
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
View file @
09d99ea8
...
...
@@ -83,11 +83,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
//判断后打绩效
String
ruleCode
=
""
;
if
(
ErrorStatusEnum
.
早退
.
getValue
()
==
DataUtil
.
converStr2Int
(
entity
.
getProcessResult
(),
3
))
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getErrorDateTime
())
||
ObjectUtils
.
isEmpty
(
entity
.
getGoOffDateTime
()))
{
//早退5分钟内
ruleCode
=
"ATTEND1002"
;
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getErrorDateTime
())
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getGoOffDateTime
()))
{
//判断时间差定义
Long
earlyMin
=
DateUtil
.
between
(
entity
.
getErrorDateTime
(),
entity
.
getGoOffDateTime
(),
DateUnit
.
MINUTE
);
...
...
@@ -104,12 +99,11 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
//早退5分钟内
ruleCode
=
"ATTEND1006"
;
}
}
else
{
ruleCode
=
"ATTEND1002"
;
}
}
else
if
(
ErrorStatusEnum
.
迟到
.
getValue
()
==
DataUtil
.
converStr2Int
(
entity
.
getProcessResult
(),
3
))
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getErrorDateTime
())
||
ObjectUtils
.
isEmpty
(
entity
.
getGoOffDateTime
()))
{
//早退5分钟内
ruleCode
=
"ATTEND1001"
;
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getErrorDateTime
())
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getGoOffDateTime
()))
{
Long
lateMin
=
DateUtil
.
between
(
entity
.
getErrorDateTime
(),
entity
.
getGoOffDateTime
(),
DateUnit
.
MINUTE
);
...
...
@@ -125,6 +119,9 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
//迟到60分钟以上
ruleCode
=
"ATTEND1005"
;
}
}
else
{
//早退5分钟内
ruleCode
=
"ATTEND1001"
;
}
}
else
if
(
ErrorStatusEnum
.
缺卡
.
getValue
()
==
DataUtil
.
converStr2Int
(
entity
.
getProcessResult
(),
3
))
{
ruleCode
=
"ATTEND1007"
;
...
...
@@ -139,7 +136,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
attendSaveReq
.
setActualAttendTime
(
entity
.
getActualAttendanceDateTime
());
attendSaveReq
.
setErrorResult
(
entity
.
getRemark
());
// attendSaveReq.setTitle("考勤:" + ErrorStatusEnum.getByValue(entity.getErrorStatus()).getDesc()
);
attendSaveReq
.
setTitle
(
"考勤"
);
attendSaveReq
.
setHappenTime
(
entity
.
getErrorDateTime
());
attendSaveReq
.
setRuleCode
(
ruleCode
);
attendSaveReq
.
setStaffId
(
entity
.
getStaffId
());
...
...
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
View file @
09d99ea8
...
...
@@ -18,7 +18,7 @@ import java.util.List;
* @author zxfei
* @date 2022-07-06
*/
//
@FeignClient(name = "portal-manager", path = "/zwfw", fallbackFactory = UserFeignFallbackFactory.class)
@FeignClient
(
name
=
"portal-manager"
,
path
=
"/zwfw"
,
fallbackFactory
=
UserFeignFallbackFactory
.
class
)
public
interface
IUserFeign
extends
IFeign
{
...
...
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