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
57b0a72f
You need to sign in or sign up before continuing.
Commit
57b0a72f
authored
Feb 03, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
e6421469
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
56 deletions
+100
-56
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+100
-56
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
57b0a72f
...
@@ -72,6 +72,7 @@ import java.math.BigDecimal;
...
@@ -72,6 +72,7 @@ import java.math.BigDecimal;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.NumberFormat
;
import
java.text.NumberFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
...
@@ -1427,8 +1428,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1427,8 +1428,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
importSuccessKey
)))
{
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
importSuccessKey
)))
{
redisUtil
.
remove
(
importSuccessKey
);
redisUtil
.
remove
(
importSuccessKey
);
}
}
//批量插入的集合
//养老插入的集合
List
<
TPaymentInfo
>
batchInsertList
=
new
ArrayList
<>();
List
<
TPaymentInfo
>
batchYlInsertList
=
new
ArrayList
<>();
//工伤插入的集合
List
<
TPaymentInfo
>
batchGsInsertList
=
new
ArrayList
<>();
//失业插入的集合
List
<
TPaymentInfo
>
batchSyInsertList
=
new
ArrayList
<>();
//医疗插入的集合
List
<
TPaymentInfo
>
batchYyInsertList
=
new
ArrayList
<>();
//获取所有项目信息
//获取所有项目信息
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMapById
();
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
=
this
.
getSelectVoMapById
();
//地区数据
//地区数据
...
@@ -1499,21 +1506,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1499,21 +1506,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
*/
private
void
saveData
()
{
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
,
pensionMoneyMap
,
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
type
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
sumNumKey
,
importSuccessKey
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
sumNumKey
,
importSuccessKey
,
batchInsertList
,
areaMap
,
areaMap2
,
domainMap
);
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
areaMap
,
areaMap2
,
domainMap
);
log
.
info
(
"存储数据库成功!"
);
log
.
info
(
"存储数据库成功!"
);
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
//批量插入数据
if
(!
batchInsertList
.
isEmpty
())
{
this
.
saveBatch
(
batchInsertList
);
batchInsertList
.
clear
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
pensionMoneyMap
.
clear
();
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
...
@@ -1522,6 +1521,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1522,6 +1521,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
areaMap
.
clear
();
areaMap
.
clear
();
areaMap2
.
clear
();
areaMap2
.
clear
();
domainMap
.
clear
();
domainMap
.
clear
();
//批量插入数据
if
(!
batchYlInsertList
.
isEmpty
())
{
this
.
saveBatch
(
batchYlInsertList
);
batchYlInsertList
.
clear
();
}
if
(!
batchGsInsertList
.
isEmpty
())
{
this
.
saveBatch
(
batchGsInsertList
);
batchGsInsertList
.
clear
();
}
if
(!
batchYyInsertList
.
isEmpty
())
{
this
.
saveBatch
(
batchYyInsertList
);
batchYyInsertList
.
clear
();
}
if
(!
batchSyInsertList
.
isEmpty
())
{
this
.
saveBatch
(
batchSyInsertList
);
batchSyInsertList
.
clear
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
this
.
judgeAllMessage
(
errorMessageList
);
return
this
.
judgeAllMessage
(
errorMessageList
);
}
}
...
@@ -1777,16 +1797,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1777,16 +1797,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setSettleDomainCode
(
domain
.
getDepartNo
());
paymentInfo
.
setSettleDomainCode
(
domain
.
getDepartNo
());
paymentInfo
.
setUnitId
(
domain
.
getCustomerId
());
paymentInfo
.
setUnitId
(
domain
.
getCustomerId
());
paymentInfo
.
setUnitName
(
domain
.
getCustomerName
());
paymentInfo
.
setUnitName
(
domain
.
getCustomerName
());
}
else
{
paymentInfo
.
setSettleDomainName
(
""
);
paymentInfo
.
setSettleDomainCode
(
""
);
paymentInfo
.
setUnitId
(
""
);
paymentInfo
.
setUnitName
(
""
);
}
}
paymentInfo
.
setFundProvince
(
tProvidentFund
.
getFundProvince
());
paymentInfo
.
setFundProvince
(
tProvidentFund
.
getFundProvince
());
paymentInfo
.
setFundCity
(
tProvidentFund
.
getFundCity
());
paymentInfo
.
setFundCity
(
tProvidentFund
.
getFundCity
());
paymentInfo
.
setFundTown
(
tProvidentFund
.
getFundTown
());
paymentInfo
.
setFundTown
(
tProvidentFund
.
getFundTown
());
paymentInfo
.
setProvidentHousehold
(
tProvidentFund
.
getProvidentHouseholdName
());
paymentInfo
.
setProvidentHousehold
(
tProvidentFund
.
getProvidentHouseholdName
());
}
}
if
(
Common
.
isNotNull
(
tProvidentFund
))
{
if
(
Common
.
isNotNull
(
tProvidentFund
))
{
paymentInfo
.
setInauguralTeam
(
tProvidentFund
.
getInauguralTeam
()
);
paymentInfo
.
setInauguralTeam
(
Common
.
isEmpty
(
tProvidentFund
.
getInauguralTeam
())
?
tProvidentFund
.
getInauguralTeam
():
""
);
paymentInfo
.
setEmpNo
(
tProvidentFund
.
getEmpNo
());
paymentInfo
.
setEmpNo
(
tProvidentFund
.
getEmpNo
());
}
else
{
paymentInfo
.
setInauguralTeam
(
""
);
paymentInfo
.
setEmpNo
(
""
);
}
}
paymentInfo
.
setProvidentPayMonth
(
infoVo
.
getProvidentPayMonth
());
paymentInfo
.
setProvidentPayMonth
(
infoVo
.
getProvidentPayMonth
());
if
(
null
!=
paymentInfo
.
getFundProvince
())
{
if
(
null
!=
paymentInfo
.
getFundProvince
())
{
...
@@ -1808,6 +1835,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1808,6 +1835,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setProvidentPayAddr
(
paymentInfo
.
getProvidentPayAddr
()
paymentInfo
.
setProvidentPayAddr
(
paymentInfo
.
getProvidentPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
}
else
{
paymentInfo
.
setFundTown
(
""
);
}
}
paymentInfo
.
setProvidentCreateMonth
(
infoVo
.
getProvidentCreateMonth
());
paymentInfo
.
setProvidentCreateMonth
(
infoVo
.
getProvidentCreateMonth
());
...
@@ -1821,11 +1850,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1821,11 +1850,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setSumAll
(
paymentInfo
.
getProvidentSum
());
paymentInfo
.
setSumAll
(
paymentInfo
.
getProvidentSum
());
paymentInfo
.
setFundId
(
UUID
.
randomUUID
().
toString
());
paymentInfo
.
setFundId
(
UUID
.
randomUUID
().
toString
());
batchInsertList
.
add
(
paymentInfo
);
batchInsertList
.
add
(
paymentInfo
);
//批量插入数据
if
(
batchInsertList
.
size
()
>=
100000
)
{
this
.
saveBatch
(
batchInsertList
);
batchInsertList
.
clear
();
}
paymentInfoMap
.
put
(
paymentInfo
.
getProvidentPayAddr
()
paymentInfoMap
.
put
(
paymentInfo
.
getProvidentPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
paymentInfo
.
getEmpIdcard
().
trim
()
+
paymentInfo
.
getEmpIdcard
().
trim
()
...
@@ -1844,14 +1868,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1844,14 +1868,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorDetailVO
>
errorMessageList
,
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorDetailVO
>
errorMessageList
,
YifuUser
user
,
String
type
,
Integer
rowNumber
,
String
type
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
,
String
sumNumKey
,
String
importSuccessKey
,
String
sumNumKey
,
String
importSuccessKey
,
List
<
TPaymentInfo
>
batchInsertList
,
HashMap
<
String
,
String
>
areaMap
,
List
<
TPaymentInfo
>
batchGsInsertList
,
List
<
TPaymentInfo
>
batchSyInsertList
,
List
<
TPaymentInfo
>
batchYlInsertList
,
List
<
TPaymentInfo
>
batchYyInsertList
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
)
{
HashMap
<
String
,
String
>
areaMap2
,
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
)
{
// 将以下代码提取出来,使用paymentInfoMap提升性能,避免list多次循环查询数据库浪费性能
// 将以下代码提取出来,使用paymentInfoMap提升性能,避免list多次循环查询数据库浪费性能
...
@@ -2039,10 +2067,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2039,10 +2067,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 1.list.size()不足partSize,直接执行
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
list
,
areaMap
,
areaMap2
,
->
executeImportSocialListThree
(
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchInsertList
,
domainMap
),
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
domainMap
),
yfSocialImportThreadPoolExecutor
);
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
...
@@ -2053,11 +2082,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2053,11 +2082,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 处理第一个0位元素
// 处理第一个0位元素
final
List
<
TPaymentHeFeiVo
>
finalList
=
list
.
subList
(
0
,
1
);
final
List
<
TPaymentHeFeiVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
<
List
<
ErrorDetailVO
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorDetailVO
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
finalList
,
areaMap
,
->
executeImportSocialListThree
(
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchInsertList
,
domainMap
),
yfSocialImportThreadPoolExecutor
);
medicalMoneyMap
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
domainMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
oneCompletableFuture
);
completableFutureList
.
add
(
oneCompletableFuture
);
lastIdx
=
1
;
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
...
@@ -2067,11 +2097,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2067,11 +2097,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
lastIdx
=
i
;
lastIdx
=
i
;
List
<
TPaymentHeFeiVo
>
finalTempList1
=
tempList
;
List
<
TPaymentHeFeiVo
>
finalTempList1
=
tempList
;
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
finalTempList1
->
executeImportSocialListThree
(
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchInsertList
,
domainMap
),
injuryMoneyMap
,
medicalMoneyMap
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
domainMap
),
yfSocialImportThreadPoolExecutor
);
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
tempList
=
new
ArrayList
<>();
tempList
=
new
ArrayList
<>();
...
@@ -2095,10 +2126,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2095,10 +2126,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentHeFeiVo
>
finalTempList
=
tempList
;
List
<
TPaymentHeFeiVo
>
finalTempList
=
tempList
;
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
finalTempList
,
areaMap
,
->
executeImportSocialListThree
(
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchInsertList
,
domainMap
)
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
domainMap
)
,
yfSocialImportThreadPoolExecutor
);
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
...
@@ -2121,8 +2153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2121,8 +2153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
private
List
<
ErrorDetailVO
>
executeImportSocialListThree
(
YifuUser
user
,
private
List
<
ErrorDetailVO
>
executeImportSocialListThree
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
TPaymentHeFeiVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
...
@@ -2136,7 +2167,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2136,7 +2167,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
,
List
<
TPaymentInfo
>
batchInsertList
,
List
<
TPaymentInfo
>
batchGsInsertList
,
List
<
TPaymentInfo
>
batchSyInsertList
,
List
<
TPaymentInfo
>
batchYlInsertList
,
List
<
TPaymentInfo
>
batchYyInsertList
,
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
)
{
Map
<
String
,
TSettleDomainSelectVo
>
domainMap
)
{
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
payExists
;
TPaymentInfo
payExists
;
...
@@ -2154,8 +2188,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2154,8 +2188,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
Common
.
isNotNull
(
socialInfoList
))
{
if
(
Common
.
isNotNull
(
socialInfoList
))
{
for
(
TSocialFundInfo
tSocialInfo1
:
socialInfoList
)
{
for
(
TSocialFundInfo
tSocialInfo1
:
socialInfoList
)
{
socialMap
.
put
(
tSocialInfo1
.
getEmpIdcard
()
socialMap
.
put
(
tSocialInfo1
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tSocialInfo1
.
getSocialCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tSocialInfo1
.
getSocialProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tSocialInfo1
.
getSocialProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tSocialInfo1
.
getSocialCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
tSocialInfo1
.
getSocialTown
()
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
tSocialInfo1
.
getSocialTown
()
?
"null"
:
tSocialInfo1
.
getSocialTown
()),
tSocialInfo1
);
?
"null"
:
tSocialInfo1
.
getSocialTown
()),
tSocialInfo1
);
}
}
...
@@ -2424,10 +2458,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2424,10 +2458,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
payExists
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
payExists
.
setEmpName
(
socialInfo
.
getEmpName
());
payExists
.
setEmpName
(
socialInfo
.
getEmpName
());
payExists
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
payExists
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
payExists
.
setSettleDomain
Name
(
socialInfo
.
getSettleDomainName
()
);
payExists
.
setSettleDomain
Code
(
Common
.
isEmpty
(
socialInfo
.
getSettleDomainCode
())
?
socialInfo
.
getSettleDomainCode
():
""
);
payExists
.
set
SettleDomainCode
(
socialInfo
.
getSettleDomainCode
()
);
payExists
.
set
UnitId
(
Common
.
isEmpty
(
socialInfo
.
getUnitId
())
?
socialInfo
.
getUnitId
():
""
);
payExists
.
set
UnitId
(
socialInfo
.
getUnitId
()
);
payExists
.
set
SettleDomainName
(
Common
.
isEmpty
(
socialInfo
.
getSettleDomainName
())
?
socialInfo
.
getSettleDomainName
():
""
);
payExists
.
setUnitName
(
socialInfo
.
getUnitName
()
);
payExists
.
setUnitName
(
Common
.
isEmpty
(
socialInfo
.
getUnitName
())
?
socialInfo
.
getUnitName
():
""
);
payExists
.
setSocialProvince
(
socialInfo
.
getSocialProvince
());
payExists
.
setSocialProvince
(
socialInfo
.
getSocialProvince
());
payExists
.
setSocialCity
(
socialInfo
.
getSocialCity
());
payExists
.
setSocialCity
(
socialInfo
.
getSocialCity
());
payExists
.
setSocialTown
(
socialInfo
.
getSocialTown
());
payExists
.
setSocialTown
(
socialInfo
.
getSocialTown
());
...
@@ -2443,10 +2477,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2443,10 +2477,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
domain
=
null
;
domain
=
null
;
}
}
if
(
Common
.
isNotNull
(
domain
))
{
if
(
Common
.
isNotNull
(
domain
))
{
payExists
.
setSettleDomainName
(
domain
.
getDepartName
());
payExists
.
setSettleDomainName
(
Common
.
isEmpty
(
domain
.
getDepartName
())
?
domain
.
getDepartName
():
""
);
payExists
.
setSettleDomainCode
(
domain
.
getDepartNo
());
payExists
.
setSettleDomainCode
(
Common
.
isEmpty
(
domain
.
getDepartNo
())
?
domain
.
getDepartNo
():
""
);
payExists
.
setUnitId
(
domain
.
getCustomerId
());
payExists
.
setUnitId
(
Common
.
isEmpty
(
domain
.
getCustomerId
())
?
domain
.
getCustomerId
():
""
);
payExists
.
setUnitName
(
domain
.
getCustomerName
());
payExists
.
setUnitName
(
Common
.
isEmpty
(
domain
.
getCustomerName
())
?
domain
.
getCustomerName
():
""
);
}
else
{
payExists
.
setSettleDomainName
(
""
);
payExists
.
setSettleDomainCode
(
""
);
payExists
.
setUnitId
(
""
);
payExists
.
setUnitName
(
""
);
}
}
payExists
.
setSocialProvince
(
tSocialInfo
.
getSocialProvince
());
payExists
.
setSocialProvince
(
tSocialInfo
.
getSocialProvince
());
payExists
.
setSocialCity
(
tSocialInfo
.
getSocialCity
());
payExists
.
setSocialCity
(
tSocialInfo
.
getSocialCity
());
...
@@ -2454,8 +2493,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2454,8 +2493,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setSocialHousehold
(
tSocialInfo
.
getSocialHouseholdName
());
payExists
.
setSocialHousehold
(
tSocialInfo
.
getSocialHouseholdName
());
}
}
if
(
Common
.
isNotNull
(
tSocialInfo
))
{
if
(
Common
.
isNotNull
(
tSocialInfo
))
{
payExists
.
setInauguralTeam
(
tSocialInfo
.
getInauguralTeam
()
);
payExists
.
setInauguralTeam
(
Common
.
isEmpty
(
tSocialInfo
.
getInauguralTeam
())
?
tSocialInfo
.
getInauguralTeam
():
""
);
payExists
.
setEmpNo
(
tSocialInfo
.
getEmpNo
());
payExists
.
setEmpNo
(
tSocialInfo
.
getEmpNo
());
}
else
{
payExists
.
setInauguralTeam
(
""
);
payExists
.
setEmpNo
(
""
);
}
}
payExists
.
setSocialPayMonth
(
infoVo
.
getSocialPayMonth
());
payExists
.
setSocialPayMonth
(
infoVo
.
getSocialPayMonth
());
...
@@ -2476,9 +2518,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2476,9 +2518,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
Common
.
isNotNull
(
temp
))
{
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
}
else
{
payExists
.
setSocialTown
(
""
);
}
}
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setSocialCreateMonth
(
infoVo
.
getSocialCreateMonth
());
payExists
.
setSocialCreateMonth
(
infoVo
.
getSocialCreateMonth
());
payExists
.
setSumAll
(
payExists
.
getSocialSum
());
payExists
.
setCreateTime
(
LocalDateTime
.
now
());
payExists
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
...
@@ -2487,6 +2534,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2487,6 +2534,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
,
payExists
.
getUnitSocialSum
()));
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalPensionMoney
()
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalPensionMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
,
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
batchYlInsertList
.
add
(
payExists
);
}
}
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
...
@@ -2496,12 +2545,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2496,12 +2545,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
,
payExists
.
getUnitSocialSum
()));
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalUnemploymentMoney
()
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalUnemploymentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
,
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
batchSyInsertList
.
add
(
payExists
);
}
}
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitInjuryMoney
()
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitInjuryMoney
()
,
payExists
.
getUnitSocialSum
()));
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
batchGsInsertList
.
add
(
payExists
);
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
...
@@ -2517,17 +2570,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2517,17 +2570,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalMedicalMoney
()
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalMedicalMoney
()
,
payExists
.
getPersonalBigmailmentMoney
()
,
payExists
.
getPersonalBigmailmentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
,
payExists
.
getSocialSecurityPersonalSum
()));
}
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSumAll
(
payExists
.
getSocialSum
());
batchYyInsertList
.
add
(
payExists
);
payExists
.
setCreateBy
(
user
.
getId
());
payExists
.
setCreateName
(
user
.
getNickname
());
payExists
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
batchInsertList
.
add
(
payExists
);
//批量插入数据
if
(
batchInsertList
.
size
()
>=
50000
)
{
this
.
saveBatch
(
batchInsertList
);
batchInsertList
.
clear
();
}
}
}
}
}
}
...
...
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