fix:报告模板删除修改
This commit is contained in:
@@ -101,7 +101,6 @@ public class SimulationReportTemplateServiceImpl extends ServiceImpl<SimulationR
|
||||
|
||||
upgradeTemplate.setTemplateVersion(generateVersion(reportTemplate.getTemplateVersion(),templateDto.getVersionType()));
|
||||
upgradeTemplate.setUuid(generateUuid("report_template_"));
|
||||
upgradeTemplate.setTemplateCode(generateUuid("report_code_"));
|
||||
upgradeTemplate.setCreator(creator);
|
||||
upgradeTemplate.setTenantId(tenantId);
|
||||
|
||||
@@ -139,7 +138,12 @@ public class SimulationReportTemplateServiceImpl extends ServiceImpl<SimulationR
|
||||
|
||||
@Override
|
||||
public SdmResponse deleteReportTemplate(ReportTemplateDto reportTemplateDto) {
|
||||
List<SimulationReportTemplate> reportTemplateEntityList = this.lambdaQuery().eq(SimulationReportTemplate::getTemplateCode, reportTemplateDto.getTemplateCode()).list();
|
||||
List<SimulationReportTemplate> reportTemplateEntityList = null;
|
||||
if (reportTemplateDto.getUuid() != null) {
|
||||
reportTemplateEntityList = this.lambdaQuery().eq(SimulationReportTemplate::getUuid, reportTemplateDto.getUuid()).list();
|
||||
} else {
|
||||
reportTemplateEntityList = this.lambdaQuery().eq(SimulationReportTemplate::getTemplateCode, reportTemplateDto.getTemplateCode()).list();
|
||||
}
|
||||
if (CollectionUtils.isEmpty(reportTemplateEntityList)) {
|
||||
return SdmResponse.failed("报告模板不存在");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user