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
d30eafea
Commit
d30eafea
authored
May 29, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
64b7c6c5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+17
-7
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
d30eafea
...
...
@@ -567,4 +567,8 @@ public interface ErrorCodes {
* 社保办理:无办理权限或无可需要办理的社保数据
*/
String
SOCIAL_IMPORT_HANDLE_NOT_EXITS
=
"social.import.handle.not.exits"
;
/**
* 社保办理:该数据已处理,请勿重复操作
*/
String
SOCIAL_IMPORT_SAME_INFO
=
"social.import.same.info"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
d30eafea
...
...
@@ -221,6 +221,7 @@ fund_import_handle_reason_not_empty=\u516C\u79EF\u91D1\u529E\u7406\uFF1A\u529E\u
social_import_handle_reason_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u
FF1A
\u
4EFB
\u
4E00
\u9669\u
79CD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u5931\u
8D25
\u
7C7B
\u
578B
\u
5FC5
\u
586B
social_import_handle_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u
5FC5
\u
987B
\u
529E
\u7406\u5176\u
4E2D
\u
4E00
\u
4E2A
\u9669\u
79CD
social.import.handle.not.exits
=
\u
65E0
\u
529E
\u7406\u6743\u9650\u6216\u
65E0
\u
53EF
\u9700\u8981\u
529E
\u7406\u7684\u
793E
\u
4FDD
\u6570\u
636E
social.import.same.info
=
\u
8BE5
\u6570\u
636E
\u
5DF2
\u5904\u7406\u
FF0C
\u
8BF7
\u
52FF
\u
91CD
\u
590D
\u
64CD
\u
4F5C
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
d30eafea
...
...
@@ -78,6 +78,7 @@ import java.math.BigDecimal;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -5029,6 +5030,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
FundImportHandleVo
>
util1
=
new
ExcelUtil
<>(
FundImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5073,7 +5075,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
);
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
,
map
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5091,7 +5093,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
)
{
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5127,6 +5130,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
CommonConstants
.
PARAM_INFO_ERROR
),
excel
));
continue
;
}
//表内数据重复 员工身份证
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
// 办理失败,原因必填
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getReasonType
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_REASON_NOT_EMPY
),
excel
));
...
...
@@ -5185,6 +5195,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SocialImportHandleVo
>
util1
=
new
ExcelUtil
<>(
SocialImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
idcardMap
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5229,7 +5240,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
mId
);
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
mId
,
idcardMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5247,7 +5258,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
mId
)
{
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
mId
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5274,8 +5286,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
String
handlerRemaek
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
StringBuilder
socialSucessType
=
new
StringBuilder
();
StringBuilder
socialFailureType
=
new
StringBuilder
();
...
...
@@ -5285,7 +5295,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"存在重复身份证行("
+
map
.
get
(
excel
.
getEmpIdcard
())+
")请先去重"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
//身份证加任一险种必填
...
...
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