Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
11db0ba0
Commit
11db0ba0
authored
Apr 14, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.9-日志优化
parent
1fc8a510
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+25
-0
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+15
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
11db0ba0
...
...
@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties
;
...
...
@@ -186,6 +187,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if
(
Common
.
isNotNull
(
newInsurance
.
getId
()))
{
oldInsurance
=
oldMap
.
get
(
newInsurance
.
getId
());
if
(
oldInsurance
!=
null
)
{
initDateHour
(
oldInsurance
);
differenceInsuranceKey
=
HrEquator
.
comparisonValue
(
oldInsurance
,
newInsurance
);
}
if
(
Common
.
isNotNull
(
differenceInsuranceKey
)
||
oldInsurance
==
null
)
{
...
...
@@ -260,6 +262,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
/**
* @Description: 设置日期为08点
* @Author: hgw
* @Date: 2025/4/14 18:52
* @return: void
**/
public
void
initDateHour
(
TEmployeeInsurancePre
oldInsurance
)
{
if
(
oldInsurance
!=
null
)
{
oldInsurance
.
setModelType
(
CommonConstants
.
TWO_STRING
);
if
(
Common
.
isNotNull
(
oldInsurance
.
getPolicyStart
()))
{
oldInsurance
.
setPolicyStart
(
DateUtil
.
setHourByDate
(
oldInsurance
.
getPolicyStart
()));
}
if
(
Common
.
isNotNull
(
oldInsurance
.
getPolicyEnd
()))
{
oldInsurance
.
setPolicyEnd
(
DateUtil
.
setHourByDate
(
oldInsurance
.
getPolicyEnd
()));
}
if
(
Common
.
isNotNull
(
oldInsurance
.
getPolicyEffect
()))
{
oldInsurance
.
setPolicyEffect
(
DateUtil
.
setHourByDate
(
oldInsurance
.
getPolicyEffect
()));
}
if
(
Common
.
isNotNull
(
oldInsurance
.
getJoinLeaveDate
()))
{
oldInsurance
.
setJoinLeaveDate
(
DateUtil
.
setHourByDate
(
oldInsurance
.
getJoinLeaveDate
()));
}
}
}
@Override
public
void
saveUpdateInsurance
(
String
empPreId
,
EmployeeRegistrationPre
oldInfo
,
EmployeeRegistrationPre
newInfo
,
String
userId
,
String
nickName
,
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
)
{
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
11db0ba0
...
...
@@ -1388,6 +1388,21 @@ public class DateUtil {
cal
.
add
(
Calendar
.
MONTH
,
mnt
);
return
cal
.
getTime
();
}
/**
* @Description: 设置(时)
* @Author: hgw
* @Date: 2022/8/3 9:17
* @return: java.util.Date
**/
public
static
Date
setHourByDate
(
Date
date
)
{
Calendar
cal
=
Calendar
.
getInstance
();
if
(
date
!=
null
)
{
cal
.
setTime
(
date
);
}
cal
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
return
cal
.
getTime
();
}
/**
* @Description: 增减(月),并且设置为1号1点
* @Author: hgw
...
...
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