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
8668b87d
Commit
8668b87d
authored
Nov 07, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
缴费库导入重复修改
parent
9ad0081e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
44 deletions
+153
-44
YFSocialImportThreadPoolExecutor.java
...ncurrent/threadpool/YFSocialImportThreadPoolExecutor.java
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+1
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+1
-1
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+149
-40
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/concurrent/threadpool/YFSocialImportThreadPoolExecutor.java
View file @
8668b87d
...
@@ -13,8 +13,8 @@ import java.util.concurrent.TimeUnit;
...
@@ -13,8 +13,8 @@ import java.util.concurrent.TimeUnit;
public
class
YFSocialImportThreadPoolExecutor
extends
ThreadPoolExecutor
{
public
class
YFSocialImportThreadPoolExecutor
extends
ThreadPoolExecutor
{
private
static
final
int
CORE_POOL_SIZE
=
8
;
private
static
final
int
CORE_POOL_SIZE
=
30
;
private
static
final
int
MAX_POOL_SIZE
=
12
;
private
static
final
int
MAX_POOL_SIZE
=
30
;
private
static
final
long
KEEP_ALIVE_TIME
=
15
;
private
static
final
long
KEEP_ALIVE_TIME
=
15
;
private
static
final
int
CAPACITY
=
1024
;
private
static
final
int
CAPACITY
=
1024
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
8668b87d
...
@@ -149,7 +149,7 @@ public class TPaymentInfoController {
...
@@ -149,7 +149,7 @@ public class TPaymentInfoController {
@PostMapping
(
"/importListAdd"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_batchImport')"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_batchImport')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
String
random
)
{
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
String
random
)
{
return
tPaymentInfoService
.
importSocialDiy
(
file
.
getInputStream
()
,
random
);
return
tPaymentInfoService
.
importSocialDiy
(
file
.
getInputStream
());
}
}
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
8668b87d
...
@@ -49,7 +49,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
...
@@ -49,7 +49,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream
* @param inputStream
* @return
* @return
*/
*/
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
,
String
random
);
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
);
/**
/**
* 批量新增缴费库-合肥三险
* 批量新增缴费库-合肥三险
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
8668b87d
...
@@ -399,9 +399,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -399,9 +399,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
@Override
@Override
public
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
,
String
random
)
{
public
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
//养老
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
//大病救助金
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
//失业
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
//生育
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
=
new
ConcurrentHashMap
<>();
//工伤
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
//医保
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
ExcelUtil
<
TPaymentInfoVo
>
util1
=
new
ExcelUtil
<>(
TPaymentInfoVo
.
class
);
ExcelUtil
<
TPaymentInfoVo
>
util1
=
new
ExcelUtil
<>(
TPaymentInfoVo
.
class
);
// 写法2:
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 匿名内部类 不用额外写一个DemoDataListener
...
@@ -449,7 +462,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -449,7 +462,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
*/
private
void
saveData
()
{
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialInfo
(
cachedDataList
,
errorMessageList
,
user
,
rowNumber
);
importTPaymentSocialInfo
(
cachedDataList
,
errorMessageList
,
user
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
);
log
.
info
(
"存储数据库成功!"
);
log
.
info
(
"存储数据库成功!"
);
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
...
@@ -457,11 +471,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -457,11 +471,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
birMoneyMap
.
clear
();
injuryMoneyMap
.
clear
();
medicalMoneyMap
.
clear
();
return
R
.
ok
(
errorMessageList
);
return
R
.
ok
(
errorMessageList
);
}
}
private
void
importTPaymentSocialInfo
(
List
<
TPaymentInfoVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
private
void
importTPaymentSocialInfo
(
List
<
TPaymentInfoVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
Integer
rowNumber
)
{
YifuUser
user
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
...
@@ -620,6 +646,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -620,6 +646,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
redisUtil
.
set
(
sumNumKey
,
bfInt
,
360L
);
}
else
{
}
else
{
maerialRatio
=
"100"
;
maerialRatio
=
"100"
;
redisUtil
.
remove
(
sumNumKey
);
}
}
}
}
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
redisUtil
.
set
(
importSuccessKey
,
maerialRatio
,
360L
);
...
@@ -631,7 +658,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -631,7 +658,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
...
@@ -644,7 +672,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -644,7 +672,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
lastIdx
=
1
;
lastIdx
=
1
;
...
@@ -658,7 +687,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -658,7 +687,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
tempList
=
new
ArrayList
<>();
tempList
=
new
ArrayList
<>();
}
}
}
}
...
@@ -682,7 +712,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -682,7 +712,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
executeImportSocialList
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoPensionMap
,
paymentInfoBigMap
,
paymentInfoBirMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
birMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
// 阻塞当前线程,等待所有的线程执行完毕
// 阻塞当前线程,等待所有的线程执行完毕
...
@@ -756,7 +787,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -756,7 +787,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
List
<
ErrorMessage
>
errorMessageList
)
{
List
<
ErrorMessage
>
errorMessageList
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
paymentInfo
;
TPaymentInfo
paymentInfo
;
TSocialFundInfo
socialInfo
;
TSocialFundInfo
socialInfo
;
...
@@ -764,19 +801,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -764,19 +801,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
temp
;
String
temp
;
int
res
;
int
res
;
//养老
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
//大病救助金
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
//失业
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
//生育
ConcurrentHashMap
<
String
,
BigDecimal
>
birMoneyMap
=
new
ConcurrentHashMap
<>();
//工伤
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
//医保
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
List
<
TSocialFundInfo
>
socialInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
List
<
TSocialFundInfo
>
socialInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
)));
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
)));
...
@@ -1165,6 +1189,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1165,6 +1189,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TPaymentHeFeiVo
>
util1
=
new
ExcelUtil
<>(
TPaymentHeFeiVo
.
class
);
ExcelUtil
<
TPaymentHeFeiVo
>
util1
=
new
ExcelUtil
<>(
TPaymentHeFeiVo
.
class
);
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
=
new
ConcurrentHashMap
<>();
// 写法2:
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
@@ -1211,7 +1240,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1211,7 +1240,8 @@ 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
);
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessageList
,
user
,
type
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
);
log
.
info
(
"存储数据库成功!"
);
log
.
info
(
"存储数据库成功!"
);
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
...
@@ -1219,6 +1249,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1219,6 +1249,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
}
pensionMoneyMap
.
clear
();
bigMoneyMap
.
clear
();
unEmpMoneyMap
.
clear
();
injuryMoneyMap
.
clear
();
medicalMoneyMap
.
clear
();
return
R
.
ok
(
errorMessageList
);
return
R
.
ok
(
errorMessageList
);
}
}
...
@@ -1381,12 +1416,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1381,12 +1416,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+
"的公积金数据(请查验公积金缴纳地)!"
));
+
"的公积金数据(请查验公积金缴纳地)!"
));
continue
;
continue
;
}
}
//查看是否有操作对应主体的权限
if
(!
Common
.
isNotNull
(
infoVo
.
getProvidentPayMonth
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
infoVo
.
getEmpName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
"必填项校验失败:公积金缴纳月份不可为空!"
));
continue
;
}
//计算公积金合计,个人金额和单位金额一致
//计算公积金合计,个人金额和单位金额一致
infoVo
.
setProvidentSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProvidentSum
(),
infoVo
.
getUnitProvidentSum
()));
infoVo
.
setProvidentSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProvidentSum
(),
infoVo
.
getUnitProvidentSum
()));
// 判重
// 判重
...
@@ -1491,7 +1520,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1491,7 +1520,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
type
,
Integer
rowNumber
)
{
YifuUser
user
,
String
type
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
HashMap
<
String
,
String
>
areaMap2
=
new
HashMap
<>();
...
@@ -1644,7 +1678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1644,7 +1678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
list
,
areaMap
,
areaMap2
,
->
executeImportSocialListThree
(
user
,
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
...
@@ -1658,7 +1693,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1658,7 +1693,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
->
executeImportSocialListThree
(
user
,
finalList
,
areaMap
,
->
executeImportSocialListThree
(
user
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
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
++)
{
...
@@ -1671,7 +1707,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1671,7 +1707,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
->
executeImportSocialListThree
(
user
,
finalTempList1
->
executeImportSocialListThree
(
user
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
),
yfSocialImportThreadPoolExecutor
);
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
),
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
tempList
=
new
ArrayList
<>();
tempList
=
new
ArrayList
<>();
}
}
...
@@ -1695,7 +1732,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1695,7 +1732,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
List
<
ErrorMessage
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
finalTempList
,
areaMap
,
->
executeImportSocialListThree
(
user
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
)
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
)
,
yfSocialImportThreadPoolExecutor
);
,
yfSocialImportThreadPoolExecutor
);
completableFutureList
.
add
(
listCompletableFuture
);
completableFutureList
.
add
(
listCompletableFuture
);
}
}
...
@@ -1727,7 +1765,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1727,7 +1765,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
String
type
,
List
<
ErrorMessage
>
errorMessageList
)
{
String
type
,
List
<
ErrorMessage
>
errorMessageList
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
injuryMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
medicalMoneyMap
)
{
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
payExists
;
TPaymentInfo
payExists
;
TSocialFundInfo
socialInfo
=
null
;
TSocialFundInfo
socialInfo
=
null
;
...
@@ -1751,6 +1794,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1751,6 +1794,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
String
[]
areaArray
;
String
[]
areaArray
;
String
exitMoney
;
for
(
TPaymentHeFeiVo
infoVo
:
list
)
{
for
(
TPaymentHeFeiVo
infoVo
:
list
)
{
if
(
Common
.
isNotNull
(
infoVo
.
getEmpIdcard
()))
{
if
(
Common
.
isNotNull
(
infoVo
.
getEmpIdcard
()))
{
...
@@ -1786,14 +1830,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1786,14 +1830,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue
;
continue
;
}
}
//查看缴纳月是否为空
//判断是否存在养老缴费数据
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayMonth
()))
{
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
"必填项校验失败:社保缴纳月份不可为空!"
));
//导入模板判重 养老
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
YL
));
if
(
pensionMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
pensionMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的养老缴费数据"
));
continue
;
continue
;
}
else
{
pensionMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())));
}
}
//判断是否存在养老缴费数据
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
=
paymentInfoPensionMap
.
get
(
infoVo
.
getSocialPayAddr
()
payExists
=
paymentInfoPensionMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
infoVo
.
getEmpIdcard
().
trim
()
...
@@ -1817,6 +1868,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1817,6 +1868,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在失业缴费数据
//判断是否存在失业缴费数据
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
//导入模板判重 失业
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
SY
));
if
(
unEmpMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
())),
unEmpMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的失业缴费数据"
));
continue
;
}
else
{
unEmpMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
())));
}
payExists
=
paymentInfoUnEmpMap
.
get
(
infoVo
.
getSocialPayAddr
()
payExists
=
paymentInfoUnEmpMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
infoVo
.
getEmpIdcard
().
trim
()
...
@@ -1840,6 +1905,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1840,6 +1905,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医保缴费数据
//判断是否存在医保缴费数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
//导入模板判重 医疗
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
YB
));
if
(
medicalMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
medicalMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的医保缴费数据"
));
continue
;
}
else
{
medicalMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())));
}
payExists
=
paymentInfoMedicalMap
.
get
(
infoVo
.
getSocialPayAddr
()
payExists
=
paymentInfoMedicalMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
infoVo
.
getEmpIdcard
().
trim
()
...
@@ -1864,6 +1943,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1864,6 +1943,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在工伤缴费数据
//判断是否存在工伤缴费数据
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
//导入模板判重 工伤
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
GS
));
if
(
injuryMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
injuryMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的工伤缴费数据"
));
continue
;
}
else
{
injuryMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())));
}
payExists
=
paymentInfoInjuryMap
.
get
(
infoVo
.
getSocialPayAddr
()
payExists
=
paymentInfoInjuryMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
infoVo
.
getEmpIdcard
().
trim
()
...
@@ -1887,6 +1981,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -1887,6 +1981,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医疗救助金缴费数据
//判断是否存在医疗救助金缴费数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
//导入模板判重 医疗救助金
exitMoney
=
infoVo
.
getEmpIdcard
().
concat
(
infoVo
.
getSocialPayMonth
().
concat
(
socialInfo
.
getSettleDomainCode
()).
concat
(
SocialConstants
.
DB
));
if
(
bigMoneyMap
.
get
(
exitMoney
)
!=
null
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())),
bigMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
SocialConstants
.
ERROR_TEMPLATE
+
infoVo
.
getEmpIdcard
()
+
"的医疗救助金缴费数据"
));
continue
;
}
else
{
bigMoneyMap
.
put
(
exitMoney
,
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())));
}
payExists
=
paymentInfoBigMap
.
get
(
infoVo
.
getSocialPayAddr
()
payExists
=
paymentInfoBigMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
infoVo
.
getEmpIdcard
().
trim
()
...
...
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