Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
integration
Commits
09bc924b
Commit
09bc924b
authored
Mar 11, 2026
by
wujipeng
Browse files
优化
parent
c7738114
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/integration/service/impl/ReportServiceImpl.java
View file @
09bc924b
...
@@ -8,7 +8,6 @@ import com.ruzhoukj.integration.mapper.ReportMapper;
...
@@ -8,7 +8,6 @@ import com.ruzhoukj.integration.mapper.ReportMapper;
import
com.ruzhoukj.integration.pojo.dto.ReportDTO
;
import
com.ruzhoukj.integration.pojo.dto.ReportDTO
;
import
com.ruzhoukj.integration.pojo.entity.*
;
import
com.ruzhoukj.integration.pojo.entity.*
;
import
com.ruzhoukj.integration.pojo.vo.ReportVO
;
import
com.ruzhoukj.integration.pojo.vo.ReportVO
;
import
com.ruzhoukj.integration.pojo.vo.TemplateVO
;
import
com.ruzhoukj.integration.result.PageResult
;
import
com.ruzhoukj.integration.result.PageResult
;
import
com.ruzhoukj.integration.service.*
;
import
com.ruzhoukj.integration.service.*
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -156,13 +155,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> i
...
@@ -156,13 +155,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> i
//编辑模板
//编辑模板
updateById
(
reportDTO
);
updateById
(
reportDTO
);
//查询模板详情单元格编号集合
//查询模板详情单元格编号集合
List
<
String
>
reportDetailList
=
reportDetailBasicService
.
getCellNumberList
(
reportDTO
.
getId
());
//
List<String> reportDetailList = reportDetailBasicService.getCellNumberList(reportDTO.getId());
//处理模板详情
//处理模板详情
handleUpdateReportDetail
(
reportDTO
.
getCells
(),
reportDetailList
,
reportDTO
.
getId
(),
reportDTO
.
getTemplateId
());
// handleUpdateReportDetail(reportDTO.getCells(), reportDetailList, reportDTO.getId(), reportDTO.getTemplateId());
//删除旧数据
Map
<
String
,
ReportDetailBasicEntity
>
cells
=
reportDTO
.
getCells
();
reportDetailBasicService
.
remove
(
new
LambdaQueryWrapper
<
ReportDetailBasicEntity
>()
.
eq
(
ReportDetailBasicEntity:
:
getReportId
,
reportDTO
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
cells
))
{
List
<
ReportDetailBasicEntity
>
reportDetailBasicList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
ReportDetailBasicEntity
>
entry
:
cells
.
entrySet
())
{
reportDetailBasicList
.
add
(
entry
.
getValue
());
}
reportDetailBasicService
.
saveBatch
(
reportDetailBasicList
);
}
//处理模板详情复合
//处理模板详情复合
List
<
ReportDetailMergeEntity
>
merges
=
reportDTO
.
getMerges
();
List
<
ReportDetailMergeEntity
>
merges
=
reportDTO
.
getMerges
();
//删除旧数据
reportDetailMergeService
.
remove
(
new
LambdaQueryWrapper
<
ReportDetailMergeEntity
>()
.
eq
(
ReportDetailMergeEntity:
:
getReportId
,
reportDTO
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
merges
))
{
if
(!
ObjectUtils
.
isEmpty
(
merges
))
{
reportDetailMergeService
.
save
OrUpdate
Batch
(
merges
);
reportDetailMergeService
.
saveBatch
(
merges
);
}
}
//处理模板详情行列配置
//处理模板详情行列配置
Map
<
String
,
ReportConfigEntity
>
rows
=
reportDTO
.
getRows
();
Map
<
String
,
ReportConfigEntity
>
rows
=
reportDTO
.
getRows
();
...
@@ -174,7 +187,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> i
...
@@ -174,7 +187,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> i
if
(!
ObjectUtils
.
isEmpty
(
columns
))
{
if
(!
ObjectUtils
.
isEmpty
(
columns
))
{
reportConfigList
.
addAll
(
columns
.
values
());
reportConfigList
.
addAll
(
columns
.
values
());
}
}
reportConfigService
.
saveOrUpdateBatch
(
reportConfigList
);
//删除旧数据
reportConfigService
.
remove
(
new
LambdaQueryWrapper
<
ReportConfigEntity
>()
.
eq
(
ReportConfigEntity:
:
getReportId
,
reportDTO
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
reportConfigList
))
{
reportConfigService
.
saveBatch
(
reportConfigList
);
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
...
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