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
3a9c378e
Commit
3a9c378e
authored
Mar 09, 2026
by
wujipeng
Browse files
模板生成报表第二版
parent
fd725ced
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/integration/pojo/entity/ReportDetailMergeEntity.java
View file @
3a9c378e
...
...
@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author : wujipeng
...
...
@@ -15,6 +18,9 @@ import lombok.Data;
*/
@Data
@TableName
(
value
=
"report_detail_merge"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
ReportDetailMergeEntity
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
...
...
src/main/java/com/ruzhoukj/integration/service/impl/ReportServiceImpl.java
View file @
3a9c378e
...
...
@@ -84,10 +84,40 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> i
List
<
ReportDetailBasicEntity
>
reportDetailBasicList
=
new
ArrayList
<>();
List
<
TemplateDetailBasicEntity
>
templateDetailBasicList
=
templateDetailBasicService
.
list
(
new
LambdaQueryWrapper
<
TemplateDetailBasicEntity
>()
.
eq
(
TemplateDetailBasicEntity:
:
getTemplateId
,
template
.
getId
()));
for
(
TemplateDetailBasicEntity
templateDetailBasicEntity
:
templateDetailBasicList
)
{
reportDetailBasicList
.
add
(
ReportDetailBasicEntity
.
builder
()
.
templateId
(
template
.
getId
())
.
reportId
(
report
.
getId
())
.
location
(
templateDetailBasicEntity
.
getLocation
())
.
value
(
templateDetailBasicEntity
.
getValue
())
.
type
(
templateDetailBasicEntity
.
getType
())
.
staticValue
(
templateDetailBasicEntity
.
getStaticValue
())
.
format
(
templateDetailBasicEntity
.
getFormat
())
.
metaId
(
templateDetailBasicEntity
.
getMetaId
())
.
metaName
(
templateDetailBasicEntity
.
getMetaName
())
.
formula
(
templateDetailBasicEntity
.
getFormula
())
.
useReportId
(
templateDetailBasicEntity
.
getUseReportId
())
.
useReportName
(
templateDetailBasicEntity
.
getUseReportName
())
.
useReportLocation
(
templateDetailBasicEntity
.
getUseReportLocation
())
.
offset
(
templateDetailBasicEntity
.
getOffset
())
.
offsetNumber
(
templateDetailBasicEntity
.
getOffsetNumber
())
.
build
()
);
}
reportDetailBasicService
.
saveBatch
(
reportDetailBasicList
);
//处理报表详情-复合
List
<
ReportDetailMergeEntity
>
reportDetailMergeList
=
new
ArrayList
<>();
List
<
TemplateDetailMergeEntity
>
templateDetailMergeList
=
templateDetailMergeService
.
list
(
new
LambdaQueryWrapper
<
TemplateDetailMergeEntity
>()
.
eq
(
TemplateDetailMergeEntity:
:
getTemplateId
,
template
.
getId
()));
for
(
TemplateDetailMergeEntity
templateDetailMergeEntity
:
templateDetailMergeList
)
{
reportDetailMergeList
.
add
(
ReportDetailMergeEntity
.
builder
()
.
templateId
(
template
.
getId
())
.
reportId
(
report
.
getId
())
.
rangeCell
(
templateDetailMergeEntity
.
getRangeCell
())
.
masterCell
(
templateDetailMergeEntity
.
getMasterCell
())
.
build
());
}
reportDetailMergeService
.
saveBatch
(
reportDetailMergeList
);
//处理报表配置
List
<
ReportConfigEntity
>
reportConfigList
=
new
ArrayList
<>();
List
<
TemplateConfigEntity
>
templateConfigList
=
templateConfigService
.
list
(
new
LambdaQueryWrapper
<
TemplateConfigEntity
>()
...
...
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