subAgencyList = baseDao.selectSubAgencyList(subAgencyPids);
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java
new file mode 100644
index 0000000000..c2c5395932
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * 处理进展——已转项目
+ */
+@Data
+public class ProcessProjectIdFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 2185544562374036005L;
+
+ /**
+ * 项目Id
+ */
+ private String projectId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java
new file mode 100644
index 0000000000..5c12be99ee
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 项目跟踪-项目处理进展列表-接口返参
+ */
+@Data
+public class ProjectProcessListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 5342591979112900804L;
+
+ /**
+ * 项目处理进展Id
+ */
+ private String processId = "";
+
+ /**
+ * 处理进展名称
+ */
+ private String processName = "";
+
+ /**
+ * 处理进展时间
+ */
+ private Long processTime;
+
+ /**
+ * 处理部门
+ */
+ private String departmentName = "";
+
+ /**
+ * 进展说明
+ */
+ private String progressDesc = "";
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
index f81da526df..7a356440b8 100644
--- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
+++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-dev
- image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.2
+ image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.3
ports:
- "8102:8102"
network_mode: host # 使用现有网络
diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml
index 95f677175b..a4f4fd5ffb 100644
--- a/epmet-module/gov-project/gov-project-server/pom.xml
+++ b/epmet-module/gov-project/gov-project-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.2
+ 0.3.3
gov-project
com.epmet
@@ -78,6 +78,12 @@
2.0.0
compile
+
+ com.epmet
+ gov-issue-client
+ 2.0.0
+ compile
+
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
index 804be2a6d3..70d127d92f 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
@@ -26,7 +26,9 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.ProjectDTO;
+import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
+import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.excel.ProjectExcel;
import com.epmet.service.ProjectService;
@@ -106,4 +108,15 @@ public class ProjectController {
return new Result>().ok(list);
}
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 议题转项目-项目各业务表初始化数据
+ **/
+ @PostMapping("issueshiftproject")
+ public Result issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO) {
+ return new Result().ok(projectService.issueShiftProject(formDTO));
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java
index 116ad85e3a..f5958bd7fc 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java
@@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.ProjectProcessDTO;
+import com.epmet.dto.form.ProcessProjectIdFormDTO;
+import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.excel.ProjectProcessExcel;
import com.epmet.service.ProjectProcessService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -91,4 +93,9 @@ public class ProjectProcessController {
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessExcel.class);
}
+ @PostMapping("projectprocesslist")
+ public Result> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO){
+ return new Result>().ok(projectProcessService.projectProcessList(formDTO));
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java
index 71f0b72b72..53583222b0 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java
@@ -18,7 +18,9 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
+import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.entity.ProjectProcessEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -43,4 +45,11 @@ public interface ProjectProcessDao extends BaseDao {
List getProcessListByProjectId(@Param("projectId") String projectId);
List selectReturnableList(@Param("projectId") String projectId);
+
+ /**
+ * @Description 议题处理进展——已转项目
+ * @param formDTO
+ * @author zxc
+ */
+ List projectProcessList(ProcessProjectIdFormDTO formDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
index bf4458e68b..4905c95282 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
@@ -2,6 +2,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.StaffsInAgencyFromDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.StaffInfoResultDTO;
@@ -36,4 +37,15 @@ public interface EpmetUserFeignClient {
*/
@PostMapping("/epmetuser/customerstaff/stafflist")
Result> getStaffList(@RequestBody StaffsInAgencyFromDTO fromDTO);
+
+ /**
+ * 根据用户ID获取工作人员基本信息
+ *
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author zhaoqifeng
+ * @date 2020/4/22 10:05
+ **/
+ @PostMapping(value = "epmetuser/customerstaff/getstaffinfobyuserid")
+ Result getCustomerStaffInfoByUserId(@RequestBody CustomerStaffDTO formDTO);
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java
index 94a52d75f0..aa37f59e4b 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java
@@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.StaffsInAgencyFromDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.StaffInfoResultDTO;
@@ -28,4 +29,9 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient {
public Result> getStaffList(StaffsInAgencyFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffList", fromDTO);
}
+
+ @Override
+ public Result getCustomerStaffInfoByUserId(CustomerStaffDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "CustomerStaffDTO", formDTO);
+ }
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java
index 751e31ba03..99a642f700 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java
@@ -21,14 +21,13 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.ProjectProcessDTO;
-import com.epmet.dto.form.ProcessListFormDTO;
-import com.epmet.dto.form.ProjectDetailFromDTO;
-import com.epmet.dto.form.ReturnListFromDTO;
-import com.epmet.dto.form.TransferFormDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.DepartmentResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
+import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.dto.result.ReturnListResultDTO;
import com.epmet.entity.ProjectProcessEntity;
+import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@@ -126,4 +125,11 @@ public interface ProjectProcessService extends BaseService
**/
void transfer(TransferFormDTO formDTO);
+ /**
+ * @Description 议题处理进展——已转项目
+ * @param formDTO
+ * @author zxc
+ */
+ List projectProcessList(ProcessProjectIdFormDTO formDTO);
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
index f482b79abd..6dc0c7308e 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
@@ -162,4 +162,12 @@ public interface ProjectService extends BaseService {
* @return java.util.List
*/
List getProjectByIssue(ShiftProjectsFromDTO fromDTO);
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 议题转项目-项目各业务表初始化数据
+ **/
+ IssueProjectResultDTO issueShiftProject(ShiftProjectFormDTO formDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
index 0939efc749..f26a6b84e4 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
@@ -32,10 +32,7 @@ import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.*;
-import com.epmet.dto.result.AgencyDeptGridResultDTO;
-import com.epmet.dto.result.ProcesslistResultDTO;
-import com.epmet.dto.result.ReturnListResultDTO;
-import com.epmet.dto.result.StaffInfoResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
@@ -181,7 +178,6 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl projectProcessList(ProcessProjectIdFormDTO formDTO) {
+ return baseDao.projectProcessList(formDTO);
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
index 19946355bd..b31106a853 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
@@ -29,6 +29,8 @@ import com.epmet.constant.ParameterKeyConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.ProjectDao;
import com.epmet.dto.CustomerProjectParameterDTO;
+import com.epmet.dto.CustomerStaffDTO;
+import com.epmet.dto.IssueDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.*;
@@ -37,6 +39,8 @@ import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.CommonFeignClient;
+import com.epmet.feign.EpmetUserFeignClient;
+import com.epmet.feign.GovOrgFeignClient;
import com.epmet.redis.ProjectRedis;
import com.epmet.service.CustomerProjectParameterService;
import com.epmet.service.ProjectProcessService;
@@ -49,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.stream.Collectors;
/**
* 项目表
@@ -69,6 +74,10 @@ public class ProjectServiceImpl extends BaseServiceImpl projectList = baseDao.selectCreatedList(fromDTO);
+ List projectList = baseDao.selectInvolvedList(fromDTO);
//获取客户定制的可滞留天数
Integer finalDays = getDays(fromDTO);
projectList.forEach(p -> {
@@ -347,9 +356,12 @@ public class ProjectServiceImpl extends BaseServiceImpl> detentionDays = commonFeignClient.detentionDays(list);
return detentionDays.getData().get(0).getDetentionDays();
}
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 议题转项目-项目各业务表初始化数据
+ **/
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public IssueProjectResultDTO issueShiftProject(ShiftProjectFormDTO formDTO) {
+ IssueProjectResultDTO issueProjectResultDTO = new IssueProjectResultDTO();
+ List staffList = formDTO.getStaffList();
+ IssueDTO issueDTO = formDTO.getIssueDTO();
+ //1:调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用
+ List agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());
+ agencyIdList.add(issueDTO.getOrgId());
+ agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList));
+ List deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList());
+ deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList));
+ List gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList());
+ gridIdList.add(issueDTO.getGridId());
+ gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList));
+ AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO();
+ agencyDeptGridFormDTO.setAgencyIdList(agencyIdList);
+ agencyDeptGridFormDTO.setDeptIdList(deptIdList);
+ agencyDeptGridFormDTO.setGridIdList(gridIdList);
+ Result resultDTO = govOrgFeignClient.getAgencyDeptGridList(agencyDeptGridFormDTO);
+ AgencyDeptGridResultDTO agencyDeptGrid = resultDTO.getData();
+
+ //2:项目表新增数据
+ ProjectEntity projectEntity = new ProjectEntity();
+ projectEntity.setAgencyId(issueDTO.getOrgId());
+ projectEntity.setCustomerId(issueDTO.getCustomerId());
+ projectEntity.setOrigin(ProjectConstant.ISSUE);
+ projectEntity.setOriginId(issueDTO.getId());
+ projectEntity.setTitle(issueDTO.getIssueTitle());
+ projectEntity.setStatus(ProjectConstant.PENDING);
+ projectEntity.setOrgIdPath(issueDTO.getOrgIdPath());
+ baseDao.insert(projectEntity);
+
+ //3:项目处理进展表新增数据
+ ProjectProcessEntity processEntity = new ProjectProcessEntity();
+ processEntity.setProjectId(projectEntity.getId());
+ processEntity.setStaffId(formDTO.getStaffId());
+ processEntity.setOperation(ProjectConstant.OPERATION_CREATED);
+ processEntity.setOperationName(ProjectConstant.OPERATION_CREATED_NAME);
+ processEntity.setPublicReply(formDTO.getPublicReply());
+ processEntity.setInternalRemark(formDTO.getInternalRemark());
+ agencyDeptGrid.getAgencyList().forEach(agency -> {
+ if (issueDTO.getOrgId().equals(agency.getId())) {
+ processEntity.setDepartmentName(agency.getOrganizationName());
+ }
+ });
+ agencyDeptGrid.getGridList().forEach(grid -> {
+ if (issueDTO.getGridId().equals(grid.getId())) {
+ processEntity.setDepartmentName(processEntity.getDepartmentName() + "-" + grid.getGridName());
+ }
+ });
+ projectProcessService.insert(processEntity);
+
+ //4:项目人员关联表批量新增数据
+ List entityList = new ArrayList<>();
+ staffList.forEach(ts -> {
+ ProjectStaffEntity entity = ConvertUtils.sourceToTarget(ts, ProjectStaffEntity.class);
+ entity.setOrgId(ts.getAgencyId());
+ entity.setProjectId(projectEntity.getId());
+ entity.setProcessId(processEntity.getId());
+ entity.setIsHandle(ProjectConstant.UNHANDLED);
+ agencyDeptGrid.getAgencyList().forEach(agency -> {
+ if (ts.getAgencyId().equals(agency.getId())) {
+ entity.setCustomerId(agency.getCustomerId());
+ entity.setOrgIdPath(agency.getPids() + ":" + agency.getId());
+ entity.setDepartmentName(agency.getOrganizationName());
+ }
+ });
+ if (StringUtils.isNotBlank(ts.getDepartmentId())) {
+ agencyDeptGrid.getDeptList().forEach(dept -> {
+ if (ts.getDepartmentId().equals(dept.getId())) {
+ entity.setDepartmentName(entity.getDepartmentName() + "-" + dept.getDepartmentName());
+ }
+ });
+ }
+ if (StringUtils.isNotBlank(ts.getGridId())) {
+ agencyDeptGrid.getGridList().forEach(grid -> {
+ if (ts.getGridId().equals(grid.getId())) {
+ entity.setDepartmentName(entity.getDepartmentName() + "-" + grid.getGridName());
+ }
+ });
+ }
+ entityList.add(entity);
+ });
+ projectStaffService.insertBatch(entityList);
+
+ //5:返回接口参数
+ issueProjectResultDTO.setProjectId(projectEntity.getId());
+ issueProjectResultDTO.setOrgName(processEntity.getDepartmentName());
+ issueProjectResultDTO.setShiftedTime(projectEntity.getCreatedTime());
+ return issueProjectResultDTO;
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
index 492465f853..242e6fdfc5 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
+++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
@@ -68,10 +68,22 @@
FROM
project_staff
WHERE DEL_FLAG = '0'
- AND IS_HANDLE = 'unhandled'
+ AND IS_HANDLE = 'handle'
GROUP BY PROJECT_ID) ps ON p.ID = ps.PROJECT_ID
LEFT JOIN project_process pp ON p.ID = pp.PROJECT_ID AND pp.OPERATION = 'close'
- WHERE p.DEL_FLAG = '0'
+ WHERE
+ NOT EXISTS (
+ SELECT
+ PROJECT_ID
+ FROM
+ project_staff
+ WHERE
+ DEL_FLAG = '0'
+ AND PROJECT_ID = p.ID
+ AND STAFF_ID = #{userId}
+ AND IS_HANDLE = 'unhandled'
+ )
+ AND p.DEL_FLAG = '0'
ORDER BY p.CREATED_TIME ASC
LIMIT #{pageNo}, #{pageSize}