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
07de8772
Commit
07de8772
authored
Nov 04, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险问题修改
parent
22bf8174
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
121 deletions
+120
-121
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+120
-121
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
07de8772
...
...
@@ -76,7 +76,6 @@ import java.time.LocalDateTime;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -333,11 +332,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public
R
<
Boolean
>
removeBatchByInfo
(
String
empIdCard
,
String
socialHouseId
,
String
fundHouseId
,
String
socialCreateMonth
,
String
socialPayMonth
)
{
String
socialCreateMonth
,
String
socialPayMonth
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
buildQueryWrapper
(
empIdCard
,
socialHouseId
,
fundHouseId
,
socialCreateMonth
,
socialPayMonth
);
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
buildQueryWrapper
(
empIdCard
,
socialHouseId
,
fundHouseId
,
socialCreateMonth
,
socialPayMonth
);
List
<
TPaymentInfo
>
list
=
baseMapper
.
selectList
(
wrapper
);
List
<
String
>
idList
=
new
ArrayList
<>();
...
...
@@ -361,13 +360,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
baseMapper
.
deleteBatchIds
(
idList
);
}
if
(
delFlag
)
{
return
R
.
ok
(
null
,
"存在不符合条件的数据(已推送至结算平台或非本人创建),禁止删除!"
);
return
R
.
ok
(
null
,
"存在不符合条件的数据(已推送至结算平台或非本人创建),禁止删除!"
);
}
return
R
.
ok
(
null
,
"批量删除成功"
);
return
R
.
ok
(
null
,
"批量删除成功"
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
String
empIdCard
,
String
socialHouseId
,
String
fundHouseId
,
String
socialCreateMonth
,
String
socialPayMonth
){
String
socialCreateMonth
,
String
socialPayMonth
)
{
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
Common
.
isNotNull
(
empIdCard
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getEmpIdcard
,
empIdCard
);
...
...
@@ -591,41 +590,41 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
TPaymentInfoVo
>
tempList
=
new
ArrayList
<>();
String
importSuccessKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_WAIT_EXPORT
;
AtomicInteger
atomicLine
=
new
AtomicInteger
(
CommonConstants
.
ZERO_INT
);
List
<
CompletableFuture
<
List
<
ErrorMessage
>>>
completableFutureList
=
new
ArrayList
<>();
// 创建一个数值格式化对象
NumberFormat
numberFormat
=
NumberFormat
.
getInstance
(
);
// 设置精确到小数点后2位
numberFormat
.
setMaximumFractionDigits
(
2
)
;
String
maerialRatio
=
""
;
String
sumNumKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
"sum_key"
;
Integer
bfInt
=
(
Integer
)
redisUtil
.
get
(
sumNumKey
);
if
(
Common
.
isNotNull
(
bfInt
))
{
if
(
rowNumber
>=
bfInt
)
{
maerialRatio
=
numberFormat
.
format
(((
float
)
bfInt
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
bfInt
+
100
;
}
else
{
maerialRatio
=
"100"
;
}
}
else
{
if
(
rowNumber
>=
100
)
{
maerialRatio
=
numberFormat
.
format
(((
float
)
100
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
100
;
}
else
{
maerialRatio
=
"100"
;
}
String
importSuccessKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_WAIT_EXPORT
;
List
<
CompletableFuture
<
List
<
ErrorMessage
>>>
completableFutureList
=
new
ArrayList
<>();
// 创建一个数值格式化对象
NumberFormat
numberFormat
=
NumberFormat
.
getInstance
();
// 设置精确到小数点后2位
numberFormat
.
setMaximumFractionDigits
(
2
);
String
maerialRatio
=
""
;
String
sumNumKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
"sum_key"
;
Integer
bfInt
=
(
Integer
)
redisUtil
.
get
(
sumNumKey
)
;
if
(
Common
.
isNotNull
(
bfInt
))
{
if
(
rowNumber
>
bfInt
+
1
)
{
maerialRatio
=
numberFormat
.
format
(((
float
)
bfInt
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
bfInt
+
100
;
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
maerialRatio
=
"100"
;
redisUtil
.
remove
(
sumNumKey
)
;
}
}
else
{
if
(
rowNumber
>=
100
)
{
maerialRatio
=
numberFormat
.
format
(((
float
)
100
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
100
;
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
maerialRatio
=
"100"
;
}
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
}
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
list
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
...
...
@@ -638,7 +637,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 处理第一个0位元素
final
List
<
TPaymentInfoVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
finalList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
...
...
@@ -652,7 +651,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
lastIdx
=
i
;
List
<
TPaymentInfoVo
>
finalTempList
=
tempList
;
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
finalTempList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
...
...
@@ -676,7 +675,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentInfoVo
>
finalTempList
=
tempList
;
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialList
(
user
,
atomicLine
,
finalTempList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
...
...
@@ -734,7 +733,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/**
* @param user
* @param atomicLine
* @param list
* @param areaMap
* @param areaMap2
...
...
@@ -745,17 +743,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @return:
*/
private
List
<
ErrorMessage
>
executeImportSocialList
(
YifuUser
user
,
AtomicInteger
atomicLine
,
List
<
TPaymentInfoVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBirMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
List
<
ErrorMessage
>
errorMessageList
)
{
List
<
TPaymentInfoVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBirMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
List
<
ErrorMessage
>
errorMessageList
)
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
paymentInfo
;
TSocialFundInfo
socialInfo
;
...
...
@@ -781,7 +778,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
[]
areaArray
;
for
(
TPaymentInfoVo
infoVo
:
list
)
{
atomicLine
.
incrementAndGet
();
if
(
Common
.
isNotNull
(
infoVo
.
getEmpIdcard
()))
{
infoVo
.
setEmpIdcard
(
infoVo
.
getEmpIdcard
().
replace
(
"x"
,
"X"
));
}
...
...
@@ -1131,7 +1127,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
);
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -1284,7 +1280,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+
CommonConstants
.
DOWN_LINE_STRING
+
"公积金缴纳地不可为空!"
));
continue
;
}
if
(
fundMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
fundMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
fund
=
(
TSocialFundInfo
)
fundMap
.
get
(
infoVo
.
getEmpIdcard
());
//对身份证与人员姓名的对应关系进行校验
if
(
null
!=
fund
&&
!
fund
.
getEmpName
().
equals
(
infoVo
.
getEmpName
()))
{
...
...
@@ -1310,7 +1306,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//计算公积金合计,个人金额和单位金额一致
infoVo
.
setProvidentSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProvidentSum
(),
infoVo
.
getUnitProvidentSum
()));
// 判重
if
(
paymentInfoMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
paymentInfoMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
paymentInfo
=
(
TPaymentInfo
)
paymentInfoMap
.
get
(
infoVo
.
getProvidentPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
@@ -1436,6 +1432,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
taskSize
>
residualCapacity
)
{
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
}
else
{
// -----------------------------生成paymentInfoMap本段开始--------------------------------
//已存在的档案数据
List
<
String
>
monthList
=
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
SOCIAL_PAY_MONTH
).
stream
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1525,7 +1522,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
TPaymentHeFeiVo
>
tempList
=
new
ArrayList
<>();
AtomicInteger
atomicLine
=
new
AtomicInteger
(
CommonConstants
.
ZERO_INT
);
List
<
CompletableFuture
<
List
<
ErrorMessage
>>>
completableFutureList
=
new
ArrayList
<>();
String
importSuccessKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_WAIT_EXPORT
;
...
...
@@ -1538,30 +1535,32 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
sumNumKey
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
"sum_key"
;
Integer
bfInt
=
(
Integer
)
redisUtil
.
get
(
sumNumKey
);
if
(
Common
.
isNotNull
(
bfInt
))
{
if
(
bfInt
<=
rowNumber
)
{
maerialRatio
=
numberFormat
.
format
((
float
)
bfInt
/
(
float
)
rowNumber
*
100
);
if
(
rowNumber
>
bfInt
+
1
)
{
maerialRatio
=
numberFormat
.
format
((
(
float
)
bfInt
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
bfInt
+
100
;
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
maerialRatio
=
"100"
;
redisUtil
.
remove
(
sumNumKey
);
}
}
else
{
if
(
100
<=
rowNumber
)
{
maerialRatio
=
numberFormat
.
format
((
float
)
100
/
(
float
)
rowNumber
*
100
);
}
else
{
if
(
rowNumber
>=
100
)
{
maerialRatio
=
numberFormat
.
format
((
(
float
)
100
/
(
float
)
rowNumber
)
*
100
);
bfInt
=
100
;
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
maerialRatio
=
"100"
;
}
}
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
->
executeImportSocialListThree
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
...
...
@@ -1572,10 +1571,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 处理第一个0位元素
final
List
<
TPaymentHeFeiVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
<
List
<
ErrorMessage
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
->
executeImportSocialListThree
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
oneCompletableFuture
);
lastIdx
=
1
;
for
(
int
i
=
1
;
i
<
list
.
size
();
i
++)
{
...
...
@@ -1585,10 +1584,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
lastIdx
=
i
;
List
<
TPaymentHeFeiVo
>
finalTempList1
=
tempList
;
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
->
executeImportSocialListThree
(
user
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
tempList
=
new
ArrayList
<>();
}
...
...
@@ -1610,10 +1609,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentHeFeiVo
>
finalTempList
=
tempList
;
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
)
,
yfSocialImportThreadPoolExecutor
);
->
executeImportSocialListThree
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
)
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
}
...
...
@@ -1635,16 +1634,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
private
List
<
ErrorMessage
>
executeImportSocialListThree
(
YifuUser
user
,
AtomicInteger
atomicLine
,
List
<
TPaymentHeFeiVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
String
type
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
List
<
ErrorMessage
>
executeImportSocialListThree
(
YifuUser
user
,
List
<
TPaymentHeFeiVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
String
type
,
List
<
ErrorMessage
>
errorMessageList
)
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
payExists
;
TSocialFundInfo
socialInfo
=
null
;
...
...
@@ -1670,7 +1669,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
[]
areaArray
;
for
(
TPaymentHeFeiVo
infoVo
:
list
)
{
atomicLine
.
incrementAndGet
();
if
(
Common
.
isNotNull
(
infoVo
.
getEmpIdcard
()))
{
infoVo
.
setEmpIdcard
(
infoVo
.
getEmpIdcard
().
replace
(
"x"
,
"X"
));
}
...
...
@@ -1679,7 +1677,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue
;
}
//无对应员工的社保数据
if
(
socialMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
socialMap
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
//采用客服导入的地址
areaArray
=
infoVo
.
getSocialPayAddr
().
split
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
infoVo
=
initAddressThree
(
areaArray
,
areaMap2
,
infoVo
);
...
...
@@ -2026,6 +2024,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/**
* 薪资获取缴费库
*
* @Author hgw
* @Date 2022-8-10 18:06:13
**/
...
...
@@ -2115,24 +2114,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public
void
createPaymentInfoIncome
()
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
LocalDateTimeUtils
.
getDayStart
(
LocalDateTime
.
now
()))
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
@Override
public
void
createPaymentFundIncome
()
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
LocalDateTimeUtils
.
getDayStart
(
LocalDateTime
.
now
()))
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
...
...
@@ -2168,7 +2167,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
...
...
@@ -2179,7 +2178,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
...
...
@@ -2196,11 +2195,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public
void
initEkpPushSocialParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
for
(
TPaymentInfo
library
:
unPushInfo
)
{
for
(
TPaymentInfo
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
...
...
@@ -2209,8 +2208,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
...
...
@@ -2432,15 +2431,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
i
);
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
...
...
@@ -2453,12 +2452,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
for
(
String
key
:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
...
...
@@ -2476,11 +2475,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public
void
initEkpPushFundParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
for
(
TPaymentInfo
library
:
unPushInfo
)
{
for
(
TPaymentInfo
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
...
...
@@ -2488,8 +2487,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
...
...
@@ -2603,15 +2602,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
...
...
@@ -2624,12 +2623,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
for
(
String
key
:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
...
...
@@ -2645,7 +2644,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
List
<
TIncomeDetail
>
detailList
=
new
ArrayList
<>();
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
boolean
exitFlag
=
false
;
...
...
@@ -2780,7 +2779,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public
void
createIncomeInsurance
(
TPaymentInfo
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
,
List
<
TIncomeDetail
>
detailList
)
{
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
...
...
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