Browse Source

项目附件改为验收材料

yewc 11 months ago
parent
commit
96a6eeea6d

+ 7 - 3
zjugis-business/src/main/java/com/zjugis/business/controller/ProjectController.java

@@ -10,6 +10,8 @@ import com.zjugis.business.bean.request.ProjectChildRequest;
 import com.zjugis.business.bean.request.ProjectMaterialRequest;
 import com.zjugis.business.bean.request.ProjectMaterialRequest;
 import com.zjugis.business.bean.request.ProjectRequest;
 import com.zjugis.business.bean.request.ProjectRequest;
 import com.zjugis.business.bean.response.*;
 import com.zjugis.business.bean.response.*;
+import com.zjugis.business.flow.projectStatus.entity.ProjectStatusDO;
+import com.zjugis.business.flow.projectStatus.service.ProjectStatusService;
 import com.zjugis.business.remote.FileClient;
 import com.zjugis.business.remote.FileClient;
 import com.zjugis.business.service.ProjectService;
 import com.zjugis.business.service.ProjectService;
 import com.zjugis.framework.common.pojo.CommonResult;
 import com.zjugis.framework.common.pojo.CommonResult;
@@ -46,7 +48,8 @@ public class ProjectController{
      */
      */
     @Autowired
     @Autowired
     private ProjectService projectService;
     private ProjectService projectService;
-
+    @Autowired
+    private ProjectStatusService projectStatusService;
     @Autowired
     @Autowired
     WorkflowClient workflowClient;
     WorkflowClient workflowClient;
 
 
@@ -177,8 +180,9 @@ public class ProjectController{
 
 
     @GetMapping("/project-material-tree")
     @GetMapping("/project-material-tree")
     public CommonResult<List<zTree>> materialTree(@RequestParam("projectId") String projectId) {
     public CommonResult<List<zTree>> materialTree(@RequestParam("projectId") String projectId) {
-        Project project = projectService.selectDOById(projectId);
-        return workflowClient.getTree(project.getInstanceId());
+       // Project project = projectService.selectDOById(projectId);
+        ProjectStatusDO projectStatusDO=projectStatusService.findByProjectId(projectId);
+        return workflowClient.getTree(projectStatusDO!=null?projectStatusDO.getInstanceId():"");
     }
     }
 
 
     @PostMapping("/project-material-upload")
     @PostMapping("/project-material-upload")

+ 3 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/projectStatus/dao/ProjectStatusDao.java

@@ -16,4 +16,7 @@ public interface ProjectStatusDao extends BaseMapperX<ProjectStatusDO> {
         return selectOne(new LambdaQueryWrapperX<ProjectStatusDO>().eqIfPresent(ProjectStatusDO::getInstanceId, flowInstanceId).eqIfPresent(ProjectStatusDO::getIsvalid, "1"));
         return selectOne(new LambdaQueryWrapperX<ProjectStatusDO>().eqIfPresent(ProjectStatusDO::getInstanceId, flowInstanceId).eqIfPresent(ProjectStatusDO::getIsvalid, "1"));
     }
     }
 
 
+    default ProjectStatusDO findByProjectId(String projectId) {
+        return selectOne(new LambdaQueryWrapperX<ProjectStatusDO>().eqIfPresent(ProjectStatusDO::getProjectId, projectId).eqIfPresent(ProjectStatusDO::getIsvalid, "1"));
+    }
 }
 }

+ 7 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/projectStatus/service/ProjectStatusService.java

@@ -41,4 +41,11 @@ public interface ProjectStatusService {
     String ProjectProcess(String projectId, String sfys);
     String ProjectProcess(String projectId, String sfys);
 
 
     ProjectStatusRespVO flowAdd(String flowInstanceId, String userId);
     ProjectStatusRespVO flowAdd(String flowInstanceId, String userId);
+    /**
+     * 通过项目ID查找记录
+     *
+     * @param projectId
+     * @return
+     */
+    ProjectStatusDO findByProjectId(String projectId);
 }
 }

+ 5 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/projectStatus/service/ProjectStatusServiceImpl.java

@@ -210,4 +210,9 @@ public class ProjectStatusServiceImpl implements ProjectStatusService {
         }
         }
         return null;
         return null;
     }
     }
+
+    @Override
+    public ProjectStatusDO findByProjectId(String projectId) {
+        return projectStatusDao.findByProjectId(projectId);
+    }
 }
 }