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
44e15c0b
Commit
44e15c0b
authored
Feb 08, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
316bdc5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
32 deletions
+35
-32
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+35
-32
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
44e15c0b
...
...
@@ -1457,7 +1457,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
List
<
ErrorDetailVO
>
errorMessageList
=
new
ArrayList
<>();
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageMap
=
new
ConcurrentHashMap
<>();
ExcelUtil
<
TPaymentHeFeiVo
>
util1
=
new
ExcelUtil
<>(
TPaymentHeFeiVo
.
class
);
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
=
new
ConcurrentHashMap
<>();
...
...
@@ -1489,7 +1489,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessage
List
.
add
(
new
ErrorDetailVO
(
errorMessage
.
getLineNum
(),
errorMessage
.
getMessage
()));
errorMessage
Map
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
errorMessage
.
getLineNum
(),
errorMessage
.
getMessage
()));
}
else
{
cachedDataList
.
add
(
data
);
}
...
...
@@ -1510,7 +1510,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessage
List
,
type
,
rowNumber
,
pensionMoneyMap
,
importTPaymentSocialHeFei
(
cachedDataList
,
errorMessage
Map
,
type
,
rowNumber
,
pensionMoneyMap
,
bigMoneyMap
,
unEmpMoneyMap
,
injuryMoneyMap
,
medicalMoneyMap
,
sumNumKey
,
importSuccessKey
,
batchGsInsertList
,
batchSyInsertList
,
batchYlInsertList
,
batchYyInsertList
,
areaMap
,
areaMap2
,
domainMap
);
...
...
@@ -1559,6 +1559,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
List
<
ErrorDetailVO
>
errorMessageList
=
new
ArrayList
<>(
errorMessageMap
.
values
());
errorMessageMap
.
clear
();
return
this
.
judgeAllMessage
(
errorMessageList
);
}
...
...
@@ -1887,7 +1889,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
List
<
ErrorDetailVO
>
errorMessageList
,
private
void
importTPaymentSocialHeFei
(
List
<
TPaymentHeFeiVo
>
list
,
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageList
,
String
type
,
Integer
rowNumber
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
...
...
@@ -1908,7 +1911,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
taskSize
=
list
.
size
()
/
partSize
+
CommonConstants
.
ONE_INT
;
int
residualCapacity
=
yfSocialImportThreadPoolExecutor
.
getResidualCapacity
();
if
(
taskSize
>
residualCapacity
)
{
errorMessageList
.
add
(
new
ErrorDetailVO
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
}
else
{
// -----------------------------生成paymentInfoMap本段开始--------------------------------
...
...
@@ -2054,7 +2057,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------生成paymentInfoMap本段结束--------------------------------
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List
<
CompletableFuture
<
List
<
ErrorDetailVO
>>>
completableFutureList
=
new
ArrayList
<>();
List
<
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>>
completableFutureList
=
new
ArrayList
<>();
// 创建一个数值格式化对象
NumberFormat
numberFormat
=
NumberFormat
.
getInstance
();
...
...
@@ -2084,7 +2087,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
try
{
// 1.list.size()不足partSize,直接执行
if
(
list
.
size
()
<
100
)
{
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
list
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
errorMessageList
,
pensionMoneyMap
,
bigMoneyMap
,
...
...
@@ -2097,7 +2100,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for
(
int
i
=
0
;
i
<
100
;
i
=
i
+
25
)
{
// partSize数量的list为一个执行单元
List
<
TPaymentHeFeiVo
>
finalTempList1
=
list
.
subList
(
i
,
i
+
j
);
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
paymentInfoBigMap
,
type
,
...
...
@@ -2113,7 +2116,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
boolean
computeFlag
;
do
{
computeFlag
=
false
;
for
(
CompletableFuture
<
List
<
ErrorDetailVO
>>
listCompletableFuture
:
completableFutureList
)
{
for
(
CompletableFuture
<
ConcurrentHashMap
<
String
,
ErrorDetailVO
>>
listCompletableFuture
:
completableFutureList
)
{
if
(!
listCompletableFuture
.
isDone
())
{
computeFlag
=
true
;
}
...
...
@@ -2137,7 +2140,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
private
List
<
ErrorDetailVO
>
executeImportSocialListThree
(
List
<
TPaymentHeFeiVo
>
list
,
private
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
executeImportSocialListThree
(
List
<
TPaymentHeFeiVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
...
...
@@ -2145,7 +2148,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
,
String
type
,
List
<
ErrorDetailVO
>
errorMessageList
,
String
type
,
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageList
,
ConcurrentHashMap
<
String
,
BigDecimal
>
pensionMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
bigMoneyMap
,
ConcurrentHashMap
<
String
,
BigDecimal
>
unEmpMoneyMap
,
...
...
@@ -2196,7 +2199,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
areaArray
=
infoVo
.
getSocialPayAddr
().
split
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
infoVo
=
initAddressThree
(
areaArray
,
areaMap2
,
infoVo
);
if
(
null
==
infoVo
.
getSocialProvince
()
||
null
==
infoVo
.
getSocialCity
())
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳地填写错误,请核实后再次尝试!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳地填写错误,请核实后再次尝试!"
));
continue
;
}
socialInfo
=
socialMap
.
get
(
infoVo
.
getEmpIdcard
()
...
...
@@ -2206,11 +2209,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验
if
(
socialInfo
!=
null
&&
!
socialInfo
.
getEmpName
().
equals
(
infoVo
.
getEmpName
()))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"姓名与身份证信息不一致,请核实后再次尝试!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"姓名与身份证信息不一致,请核实后再次尝试!"
));
continue
;
}
if
(
socialInfo
!=
null
&&
socialInfo
.
getSocialStartDate
()
==
null
)
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的社保起缴日期为空!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的社保起缴日期为空!"
));
continue
;
}
}
...
...
@@ -2234,7 +2237,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if
(!
isTrueAdder
)
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"无对应员工"
+
infoVo
.
getEmpIdcard
()
+
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"无对应员工"
+
infoVo
.
getEmpIdcard
()
+
"的社保数据(请查验社保缴纳地)"
));
continue
;
}
...
...
@@ -2249,7 +2252,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的养老缴费数据"
));
continue
;
}
else
{
...
...
@@ -2273,7 +2276,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalPensionMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的养老缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -2286,7 +2289,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的失业缴费数据"
));
continue
;
}
else
{
...
...
@@ -2311,7 +2314,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalUnemploymentMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的失业缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -2324,7 +2327,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医保缴费数据"
));
continue
;
}
else
{
...
...
@@ -2350,7 +2353,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalMedicalMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的医保缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -2364,7 +2367,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
injuryMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的工伤缴费数据"
));
continue
;
}
else
{
...
...
@@ -2389,7 +2392,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMoney
())),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitInjuryMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的单位工伤缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -2403,7 +2406,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitBigailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())),
bigMoneyMap
.
get
(
exitMoney
)).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
SocialConstants
.
ERROR_TEMPLATE
+
"的医疗救助金缴费数据"
));
continue
;
}
else
{
...
...
@@ -2429,7 +2432,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalBigailmentMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitBigmailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalBigmailmentMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的医疗救助金缴费数据,请勿重复导入!"
));
continue
;
}
...
...
@@ -2562,7 +2565,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
batchYyInsertList
.
put
(
UUID
.
randomUUID
().
toString
(),
payExists
);
}
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ONE_INT
,
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ONE_INT
,
infoVo
.
getEmpIdcard
(),
payExists
.
getSocialHousehold
(),
payExists
.
getProvidentHousehold
(),
infoVo
.
getEmpName
(),
...
...
@@ -2575,24 +2578,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/**
* 导入校验
**/
private
boolean
socialThreeCheckBase
(
List
<
ErrorDetailVO
>
errorMessageList
,
TPaymentHeFeiVo
infoVo
,
String
type
)
{
private
boolean
socialThreeCheckBase
(
ConcurrentHashMap
<
String
,
ErrorDetailVO
>
errorMessageList
,
TPaymentHeFeiVo
infoVo
,
String
type
)
{
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayMonth
()))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳月份不可为空!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳月份不可为空!"
));
return
true
;
}
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialCreateMonth
()))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保生成月份不可为空!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保生成月份不可为空!"
));
return
true
;
}
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayAddr
()))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳地不可为空!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"社保缴纳地不可为空!"
));
return
true
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)
&&
!
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
())
&&
!
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
())
&&
!
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
errorMessageList
.
add
(
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"无相关险种!"
));
errorMessageList
.
put
(
UUID
.
randomUUID
().
toString
(),
new
ErrorDetailVO
(
infoVo
.
getRowIndex
(),
CommonConstants
.
ZERO_INT
,
infoVo
.
getEmpIdcard
(),
""
,
""
,
infoVo
.
getEmpName
(),
"无相关险种!"
));
return
true
;
}
return
false
;
...
...
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