Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
996cd986
Commit
996cd986
authored
Jun 12, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量导入修改
parent
337aa807
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
BusinessAddDto.java
...m/src/main/java/com/dsk/system/domain/BusinessAddDto.java
+1
-1
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+4
-2
No files found.
dsk-system/src/main/java/com/dsk/system/domain/BusinessAddDto.java
View file @
996cd986
...
@@ -61,6 +61,6 @@ public class BusinessAddDto {
...
@@ -61,6 +61,6 @@ public class BusinessAddDto {
private
String
customerId
;
private
String
customerId
;
public
Double
getInvestmentAmount
()
{
public
Double
getInvestmentAmount
()
{
return
StringUtils
.
isEmpty
(
investmentAmount
)
?
0
:
Double
.
parseDouble
(
investmentAmount
);
return
StringUtils
.
isEmpty
(
investmentAmount
)
?
null
:
Double
.
parseDouble
(
investmentAmount
);
}
}
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
996cd986
...
@@ -126,7 +126,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -126,7 +126,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
Integer
errorCount
=
0
;
//失败条数
Integer
errorCount
=
0
;
//失败条数
List
<
String
>
result
=
new
LinkedList
();
//导入结果汇总
List
<
String
>
result
=
new
LinkedList
();
//导入结果汇总
List
<
BusinessExcelDto
>
businessInfoList
=
readBusinessInfoExcel
.
getExcelInfo
(
file
);
List
<
BusinessExcelDto
>
businessInfoList
=
readBusinessInfoExcel
.
getExcelInfo
(
file
);
if
(
CollectionUtil
.
isEmpty
(
businessInfoList
))
return
AjaxResult
.
error
(
"文档中无项目信息
!
"
);
if
(
CollectionUtil
.
isEmpty
(
businessInfoList
))
return
AjaxResult
.
error
(
"文档中无项目信息
,请按照模板文档格式上传
"
);
for
(
BusinessExcelDto
businessInfo
:
businessInfoList
)
{
for
(
BusinessExcelDto
businessInfo
:
businessInfoList
)
{
//查询已有的项目名称
//查询已有的项目名称
Integer
count
=
businessInfoMapper
.
isRepetitionProjectName
(
businessInfo
.
getProjectName
(),
userId
.
intValue
());
Integer
count
=
businessInfoMapper
.
isRepetitionProjectName
(
businessInfo
.
getProjectName
(),
userId
.
intValue
());
...
@@ -147,7 +147,9 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -147,7 +147,9 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
}
}
result
.
add
(
"导入项目成功条数"
+
rowSuccess
);
result
.
add
(
"导入项目成功条数"
+
rowSuccess
);
result
.
add
(
"导入项目失败条数"
+
errorCount
);
result
.
add
(
"导入项目失败条数"
+
errorCount
);
return
errorCount
==
businessInfoList
.
size
()
?
AjaxResult
.
error
(
String
.
join
(
","
,
result
))
:
AjaxResult
.
success
(
String
.
join
(
","
,
result
));
AjaxResult
success
=
AjaxResult
.
success
(
String
.
join
(
","
,
result
));
success
.
put
(
"successCount"
,
rowSuccess
);
return
success
;
}
}
/**
/**
...
...
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