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
a83e268d
Commit
a83e268d
authored
Aug 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
0ddedeba
6ae0097c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+34
-1
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
a83e268d
...
...
@@ -410,6 +410,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
BeanCopyUtils
.
copyProperties
(
detail
,
newDetail
);
detail
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
detail
.
setIsOverdue
(
null
);
this
.
updateById
(
detail
);
//新数据置为待办理
newDetail
.
setId
(
null
);
...
...
@@ -722,6 +723,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//被替换者无效
insuranceDetail
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setIsOverdue
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
insuranceDetail
);
//替换记录成功
...
...
@@ -878,7 +880,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
insuranceExportList
.
addAll
(
list
);
insuranceExportList
.
removeAll
(
listVOS
);
insuranceExportList
.
addAll
(
crossMerger
(
list
,
listVOS
));
}
}
...
...
@@ -940,6 +943,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
//被替换者激活
byId
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
byId
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
this
.
updateById
(
byId
);
}
}
...
...
@@ -2577,6 +2581,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
/**
* 将集合交叉合并,list1 是第一个顺序 list2 是第二个顺序
*
* @author licancan
* @param list1
* @param list2
* @return {@link List<InsuranceExportListVO>}
*/
private
List
<
InsuranceExportListVO
>
crossMerger
(
List
<
InsuranceExportListVO
>
list1
,
List
<
InsuranceExportListVO
>
list2
){
//将list放入到链表队列
LinkedList
<
InsuranceExportListVO
>
st1
=
new
LinkedList
<>(
list1
);
LinkedList
<
InsuranceExportListVO
>
st2
=
new
LinkedList
<>(
list2
);
//计算较大的数组长度
int
max
=
list1
.
size
()
>
list2
.
size
()
?
list1
.
size
()
:
list2
.
size
();
//新建一个最终结果的list
List
<
InsuranceExportListVO
>
list
=
new
ArrayList
<>(
list1
.
size
()
+
list2
.
size
());
for
(
int
i
=
0
;
i
<
max
;
i
++){
//如果队列没取完,继续取
if
(!
st1
.
isEmpty
()){
list
.
add
(
st1
.
poll
());
}
//如果队列没取完,继续取
if
(!
st2
.
isEmpty
()){
list
.
add
(
st2
.
poll
());
}
}
return
list
;
}
/***********************减员办理********************************/
/**
...
...
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