From f491d30b0a69148bd0991b3d5b1c4cf9f8216949 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期五, 12 一月 2024 09:52:39 +0800 Subject: [PATCH] 修改 --- modules/mainPart/src/main/java/com/zt/life/modules/baselineRelease/service/BaselineReleaseService.java | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/baselineRelease/service/BaselineReleaseService.java b/modules/mainPart/src/main/java/com/zt/life/modules/baselineRelease/service/BaselineReleaseService.java index 868f5ea..c84163d 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/baselineRelease/service/BaselineReleaseService.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/baselineRelease/service/BaselineReleaseService.java @@ -2,6 +2,8 @@ import cn.hutool.core.convert.Convert; import com.zt.common.service.BaseService; +import com.zt.core.context.User; +import com.zt.core.context.UserContext; import com.zt.life.export.dto.WordFile; import com.zt.life.export.service.WordFileService; import com.zt.life.modules.baselineRelease.dao.BaselineReleaseDao; @@ -77,6 +79,9 @@ * @return */ public List<BaselineRelease> page(QueryFilter queryFilter) { + User user = UserContext.getUser(); + Integer secretClass = user.getSecretClass(); + queryFilter.getQueryParams().put("secretClass",secretClass); List<BaselineRelease> list = baseDao.getList(queryFilter.getQueryParams()); if (list.size() > 0) { workflowService.getRunFlow(list, "jxfb"); @@ -101,7 +106,7 @@ data.setId(baselineId); BaselineRelease baseline = this.get(baselineId); data.setBaseline(baseline); - if (projectId == null) { + if (baseline != null && projectId == null) { projectId = baseline.getProjectId(); } List<BaselineReleaseRemark> remarkList = remarkService.getList(baselineId); @@ -112,18 +117,18 @@ baseline.setPageCode(pageCode); data.setBaseline(baseline); } - if ("demand".equals(pageCode)){ + if ("demand".equals(pageCode)) { data.getBaseline().setBaselineType("1"); - }else if("product".equals(pageCode)){ + } else if ("product".equals(pageCode)) { data.getBaseline().setBaselineType("2"); } for (BaselineReleaseRemark remark : data.getRemarkList()) { if (remark.getWarehouseDetailId() != null) { - Long configItemId = remark.getWarehouseDetailId(); - OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); - if (ossDto != null) { - remark.setFiles(ossDto); - } + Long configItemId = remark.getWarehouseDetailId(); + OssDto ossDto = sysOssConfigService.getOssByBusiType(configItemId, "config_item_warehouse"); + if (ossDto != null) { + remark.setFiles(ossDto); + } } } if (projectId != null) { -- Gitblit v1.9.1