1、报表复制异常修复;2、部分报表模板请求组织id归属修复;

This commit is contained in:
gaoqr
2026-05-28 18:51:59 +08:00
parent 68b29d3f9b
commit 0853339838
@@ -175,7 +175,7 @@ public class ReportTemplateServiceImpl implements ReportTemplateService {
// 超管/管理端操作的就是公共模版
boolean isPublic = (isSuperAdmin || manageEndPoint) && ObjectUtil.isNull(targetOrganId);
Long organId = isPublic ? loginOrganId : targetOrganId;
Long organId = ObjectUtil.defaultIfNull(targetOrganId, loginOrganId);
Long templateId = createReqVO.getId();
// 校验存在
@@ -204,6 +204,7 @@ public class ReportTemplateServiceImpl implements ReportTemplateService {
copyTemplateDO.setType(ReportTemplateTypeEnum.SYSTEM);
} else {
// 重置所属机构
copyTemplateDO.setOrganId(organId);
copyTemplateDO.setType(ReportTemplateTypeEnum.CUSTOM);
}
templateMapper.insert(copyTemplateDO);
@@ -220,7 +221,7 @@ public class ReportTemplateServiceImpl implements ReportTemplateService {
// 超管/管理端操作的就是公共模版
boolean isPublic = (isSuperAdmin || manageEndPoint) && ObjectUtil.isNull(targetOrganId);
Long organId = isPublic ? loginOrganId : targetOrganId;
Long organId = ObjectUtil.defaultIfNull(targetOrganId, loginOrganId);
Long templateId = updateReqVO.getId();
// 校验存在
@@ -801,7 +802,7 @@ public class ReportTemplateServiceImpl implements ReportTemplateService {
// 超管/管理端操作的就是公共模版
boolean isPublic = (isSuperAdmin || manageEndPoint) && ObjectUtil.isNull(targetOrganId);
Long organId = isPublic ? loginOrganId : targetOrganId;
Long organId = ObjectUtil.defaultIfNull(targetOrganId, loginOrganId);
try {
// 读取文件json