From b27d06b8f0b805efd16e28fd80a57a0ed8a053ce Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 21 二月 2024 15:31:31 +0800
Subject: [PATCH] 修改

---
 modules/mainPart/src/main/java/com/zt/life/modules/qaAuditReport/service/QaAuditReportService.java |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/qaAuditReport/service/QaAuditReportService.java b/modules/mainPart/src/main/java/com/zt/life/modules/qaAuditReport/service/QaAuditReportService.java
index b617d53..b0c3ba5 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/qaAuditReport/service/QaAuditReportService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/qaAuditReport/service/QaAuditReportService.java
@@ -3,6 +3,8 @@
 import cn.hutool.core.convert.Convert;
 import com.zt.common.service.BaseService;
 import com.zt.common.utils.CommonUtils;
+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.dto.BaselineDto;
@@ -22,6 +24,7 @@
 import com.zt.life.sys.service.SysOssConfigService;
 import com.zt.modules.coderule.service.SysCodeRuleService;
 import com.zt.modules.oss.service.SysOssService;
+import com.zt.modules.sys.service.SysUserService;
 import com.zt.modules.workflow.dto.FlowInfoDto;
 import com.zt.modules.workflow.service.WorkflowService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -69,9 +72,11 @@
     @Autowired
     private  QaAuditReportIncongruentService incongruentService;
 
-
     @Autowired
     private WorkflowService workflowService;
+
+    @Autowired
+    private SysUserService sysUserService;
     /**
      * 鍒嗛〉鏌ヨ
      *
@@ -79,9 +84,14 @@
      * @return
      */
     public List<QaAuditReport> page(QueryFilter queryFilter) {
+        User user = UserContext.getUser();
+        Integer secretClass = user.getSecretClass();
+        Long deptId = user.getDeptId();
+        queryFilter.getQueryParams().put("secretClass",secretClass);
+        queryFilter.getQueryParams().put("deptId",deptId);
         List<QaAuditReport> list = baseDao.getList(queryFilter.getQueryParams());
         if (list != null && list.size() > 0) {
-            workflowService.getRunFlow(list, "pzbgsh");
+            workflowService.getRunFlow(list, "qashbg");
             sysOssService.setListOsses(list, "qa_audit_report");
         }
         return list;
@@ -98,6 +108,11 @@
 
     public QaAuditReportDto getDto(Long projectId, Long reportId) {
         QaAuditReportDto data = new QaAuditReportDto();
+        Map<String, String> map = new HashMap<>();
+        map.put("contract", "鍚堝悓璇勫闃舵");
+        map.put("require", "娴嬭瘯闇�姹傚垎鏋愪笌绛栧垝闃舵");
+        map.put("execute", "娴嬭瘯璁捐銆佸疄鐜颁笌鎵ц闃舵");
+        map.put("summary", "娴嬭瘯鎬荤粨闃舵");
         if (reportId != null) {
             data.setId(reportId);
             QaAuditReport auditReport = this.get(reportId);
@@ -112,6 +127,10 @@
             data.setAuditReport(auditReport);
             List<QaAuditReportIncongruent> incongruentList = incongruentService.createList(projectId);
             data.setIncongruentList(incongruentList);
+        }
+        for (QaAuditReportIncongruent incongruent : data.getIncongruentList()) {
+            String type = map.get(incongruent.getDiscoveryPhase());
+            incongruent.setDiscoveryPhase(type);
         }
         if (projectId != null) {
             data.setProjectId(projectId);
@@ -164,6 +183,12 @@
         try {
             QaAuditReportDto dataObj = this.getDto(null, id);
 
+            String projectLeaderId=dataObj.getProject().getProjectLeader();
+            String projectConfigerId=dataObj.getProject().getProjectTesters();
+            String projectTestersId=dataObj.getProject().getProjectConfiger();
+            dataObj.getProject().setProjectLeader(sysUserService.getNames(projectLeaderId));
+            dataObj.getProject().setProjectTesters(sysUserService.getNames(projectTestersId));
+            dataObj.getProject().setProjectConfiger(sysUserService.getNames(projectConfigerId));
             String CheckerPath = "鏂囦欢鍥剧墖:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getAuditReport().getCheckerId()));
             dataObj.getAuditReport().setChecker(CheckerPath);
             String SupervisorPath = "鏂囦欢鍥剧墖:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getAuditReport().getSupervisorId()));

--
Gitblit v1.9.1