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
cf43fece
Commit
cf43fece
authored
Nov 06, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社保公积金基数批量导入导出-fxj
parent
3d1b27b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
12 deletions
+36
-12
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+36
-12
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
cf43fece
...
@@ -257,21 +257,22 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -257,21 +257,22 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
sysBaseSetInfo
.
setBaseType
(
baseType
);
sysBaseSetInfo
.
setBaseType
(
baseType
);
sysBaseSetInfo
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
sysBaseSetInfo
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
sysBaseSetInfo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
sysBaseSetInfo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
sysBaseSetInfo
.
setApplyStartDate
(
new
Date
());
// 查询符合条件的基数列表
// 查询符合条件的基数列表
List
<
SysBaseSetInfo
>
sysBaseSetInfoList
=
baseMapper
.
getSysBaseSetInfoNoPage
(
sysBaseSetInfo
);
List
<
SysBaseSetInfo
>
sysBaseSetInfoList
=
baseMapper
.
getSysBaseSetInfoNoPage
(
sysBaseSetInfo
);
// 返回的map
// 返回的map
Map
<
String
,
SysBaseSetInfo
>
setInfoMap
=
new
HashMap
<>();
Map
<
String
,
SysBaseSetInfo
>
setInfoMap
=
new
HashMap
<>();
if
(
sysBaseSetInfoList
!=
null
&&
!
sysBaseSetInfoList
.
isEmpty
())
{
if
(
sysBaseSetInfoList
!=
null
&&
!
sysBaseSetInfoList
.
isEmpty
())
{
// map的键
// map的键
S
tring
key
;
S
ysBaseSetInfo
temp
;
for
(
SysBaseSetInfo
setInfo
:
sysBaseSetInfoList
)
{
for
(
SysBaseSetInfo
setInfo
:
sysBaseSetInfoList
)
{
/*key = setInfo.getDepartId() + CommonConstants.DOWN_LINE_STRING + setInfo.getProvince()
temp
=
setInfoMap
.
get
(
setInfo
.
getDepartName
());
+ CommonConstants.DOWN_LINE_STRING + setInfo.getCity();
if
(
temp
!=
null
)
{
if (setInfo.getTown() != null) {
if
(
setInfo
.
getApplyStartDate
().
getTime
()
>
temp
.
getApplyStartDate
().
getTime
())
{
key += CommonConstants.DOWN_LINE_STRING + setInfo.getTown();
setInfoMap
.
put
(
setInfo
.
getDepartName
(),
setInfo
);
}*/
}
setInfoMap
.
put
(
setInfo
.
getDepartName
(),
setInfo
);
}
else
{
setInfoMap
.
put
(
setInfo
.
getDepartName
(),
setInfo
);
}
}
}
}
}
return
setInfoMap
;
return
setInfoMap
;
...
@@ -532,7 +533,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -532,7 +533,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
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
);
}
}
return
R
.
ok
(
errorMessageList
);
boolean
isTrue
=
true
;
for
(
ErrorMessage
message
:
errorMessageList
)
{
if
(!
CommonConstants
.
SAVE_SUCCESS
.
equals
(
message
.
getMessage
()))
{
isTrue
=
false
;
break
;
}
}
if
(
isTrue
)
{
return
R
.
ok
();
}
else
{
return
R
.
ok
(
errorMessageList
);
}
}
}
@Override
@Override
...
@@ -588,7 +600,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -588,7 +600,18 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
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
);
}
}
return
R
.
ok
(
errorMessageList
);
boolean
isTrue
=
true
;
for
(
ErrorMessage
message
:
errorMessageList
)
{
if
(!
CommonConstants
.
SAVE_SUCCESS
.
equals
(
message
.
getMessage
()))
{
isTrue
=
false
;
break
;
}
}
if
(
isTrue
)
{
return
R
.
ok
();
}
else
{
return
R
.
ok
(
errorMessageList
);
}
}
}
private
void
importSysBaseSetSocial
(
List
<
SysBaseSetSocialInsertVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
void
importSysBaseSetSocial
(
List
<
SysBaseSetSocialInsertVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 区域数据初始化
// 区域数据初始化
...
@@ -1174,7 +1197,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -1174,7 +1197,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 插入
// 插入
try
{
try
{
insertFundExcel
(
temp
,
infoVo
,
fundProList
);
insertFundExcel
(
temp
,
infoVo
,
fundProList
,
fundSetInfoMap
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"数据保存失败,请修改后重新提交"
);
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"数据保存失败,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
errorMessageList
.
add
(
errorMsg
);
...
@@ -1187,7 +1210,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -1187,7 +1210,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
/**
/**
* 插入excel bad record
* 插入excel bad record
*/
*/
private
void
insertFundExcel
(
SysBaseSetInfo
old
,
SysBaseSetInfo
insert
,
List
<
SysPayProportion
>
fundProList
)
{
private
void
insertFundExcel
(
SysBaseSetInfo
old
,
SysBaseSetInfo
insert
,
List
<
SysPayProportion
>
fundProList
,
Map
<
String
,
SysBaseSetInfo
>
fundSetInfoMap
)
{
if
(
Common
.
isNotNull
(
old
)
&&
Common
.
isNotNull
(
old
.
getId
()));{
if
(
Common
.
isNotNull
(
old
)
&&
Common
.
isNotNull
(
old
.
getId
()));{
baseMapper
.
updateById
(
old
);
baseMapper
.
updateById
(
old
);
}
}
...
@@ -1198,6 +1221,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -1198,6 +1221,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
sysPayProportionService
.
save
(
fundPro
);
sysPayProportionService
.
save
(
fundPro
);
}
}
}
}
fundSetInfoMap
.
put
(
insert
.
getDepartName
(),
insert
);
}
}
/**
/**
...
...
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