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
d0d21995
Commit
d0d21995
authored
Oct 30, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-社保自动化相关提交
parent
9ef521e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
23 deletions
+41
-23
TDispatchInfoPreServiceImpl.java
...yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
+41
-23
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
View file @
d0d21995
...
...
@@ -175,34 +175,45 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.
eq
(
TSocialPreDetail:
:
getRegisterId
,
registrationPreVo
.
getExitSocialInfoList
()
.
get
(
0
).
getRegisterId
()));
//批量新增
for
(
TSocialPreDetailVo
vo
:
registrationPreVo
.
getExitSocialInfoList
())
{
for
(
TSocialPreDetailVo
vo
:
registrationPreVo
.
getExitSocialInfoList
())
{
TSocialPreDetail
preDetal
=
new
TSocialPreDetail
();
BeanUtils
.
copyProperties
(
vo
,
preDetal
);
socialPreDetailService
.
save
(
preDetal
);
}
//批量删除社保待购买列表中的待确认、待派单、派单失败、审核、办理失败的数据
baseMapper
.
delete
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
().
in
(
TDispatchInfoPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"2"
,
"4"
,
"8"
))
.
eq
(
TDispatchInfoPre:
:
getRegisterId
,
registrationPreVo
.
getExitSocialInfoList
()
TDispatchInfoPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"2"
,
"4"
,
"8"
))
.
eq
(
TDispatchInfoPre:
:
getRegisterId
,
registrationPreVo
.
getExitSocialInfoList
()
.
get
(
0
).
getRegisterId
()));
}
else
{
//删除已存在的入职确认信息对应的社保明细
TDispatchInfoPreVo
preVo
=
registrationPreVo
.
getDispatchInfoPreVo
();
socialPreDetailService
.
remove
(
Wrappers
.<
TSocialPreDetail
>
lambdaQuery
()
.
eq
(
TSocialPreDetail:
:
getRegisterId
,
preVo
.
getRegisterId
()));
if
(
Common
.
isNotNull
(
preVo
)
&&
Common
.
isNotNull
(
preVo
.
getId
()))
{
//更新逻辑
TDispatchInfoPre
pre
=
new
TDispatchInfoPre
();
BeanUtils
.
copyProperties
(
preVo
,
pre
);
baseMapper
.
updateById
(
pre
);
}
if
(
Common
.
isNotNull
(
preVo
)
&&
Common
.
isEmpty
(
preVo
.
getId
()))
{
try
{
try
{
if
(
Common
.
isNotNull
(
preVo
)
&&
Common
.
isNotNull
(
preVo
.
getId
()))
{
//更新逻辑
TDispatchInfoPre
pre
=
new
TDispatchInfoPre
();
BeanUtils
.
copyProperties
(
preVo
,
pre
);
//时间格式转化
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 15:20"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
pre
.
setExpectedCollectionTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedCollectionTime
()));
}
if
(
Common
.
isNotNull
(
preVo
.
getExpectedConfirmTime
()))
{
preVo
.
setExpectedConfirmTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 09:00"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
pre
.
setExpectedConfirmTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedConfirmTime
()));
}
baseMapper
.
updateById
(
pre
);
}
if
(
Common
.
isNotNull
(
preVo
)
&&
Common
.
isEmpty
(
preVo
.
getId
()))
{
//判断是否存在社保待购买信息
TDispatchInfoPre
preExit
=
baseMapper
.
selectOne
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
()
.
eq
(
TDispatchInfoPre:
:
getRegisterId
,
preVo
.
getRegisterId
())
.
eq
(
TDispatchInfoPre:
:
getEmpIdcard
,
preVo
.
getEmpIdcard
())
.
in
(
TDispatchInfoPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"2"
,
"4"
,
"8"
))
.
in
(
TDispatchInfoPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"2"
,
"4"
,
"8"
))
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
TDispatchInfoPre
pre
=
new
TDispatchInfoPre
();
BeanUtils
.
copyProperties
(
preVo
,
pre
);
...
...
@@ -252,10 +263,10 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
baseMapper
.
deleteById
(
preExit
);
}
baseMapper
.
insert
(
pre
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
return
false
;
}
}
return
true
;
...
...
@@ -575,13 +586,20 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.
atZone
(
ZoneId
.
systemDefault
())
.
toLocalDate
();
// 添加年数和月数
localDate
=
localDate
.
plusYears
(
vo
.
getYearAfter
())
.
plusMonths
(
vo
.
getMonthAfter
())
.
minusDays
(
1
);
// 转回Date类型
return
Date
.
from
(
localDate
.
atStartOfDay
()
.
atZone
(
ZoneId
.
systemDefault
())
.
toInstant
());
if
(
vo
.
getMonthAfter
()
==
0
&&
vo
.
getYearAfter
()
==
0
)
{
// 转回Date类型
return
Date
.
from
(
localDate
.
atStartOfDay
()
.
atZone
(
ZoneId
.
systemDefault
())
.
toInstant
());
}
else
{
localDate
=
localDate
.
plusYears
(
vo
.
getYearAfter
())
.
plusMonths
(
vo
.
getMonthAfter
())
.
minusDays
(
1
);
// 转回Date类型
return
Date
.
from
(
localDate
.
atStartOfDay
()
.
atZone
(
ZoneId
.
systemDefault
())
.
toInstant
());
}
}
}
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