|  |  | @ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
	
		
			
				
					|  |  | @ -181,19 +183,23 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
			
				
					|  |  |  | 			created.setProjectStatus(p.getStatus()); | 
			
		
	
		
			
				
					|  |  |  | 			created.setPublicReply(p.getPublicReply()); | 
			
		
	
		
			
				
					|  |  |  | 			created.setProjectTime(p.getCreatedTime().getTime()); | 
			
		
	
		
			
				
					|  |  |  | 			String detentionDays = getDetentionDays(p); | 
			
		
	
		
			
				
					|  |  |  | 			if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > finalDays) { | 
			
		
	
		
			
				
					|  |  |  | 				created.setWarningFlag(true); | 
			
		
	
		
			
				
					|  |  |  | 				created.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  | 				created.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 				created.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			//获取当前处理部门
 | 
			
		
	
		
			
				
					|  |  |  | 			List<String> departmentNameList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  | 			if (ProjectConstant.CLOSED.equals(p.getStatus())) { | 
			
		
	
		
			
				
					|  |  |  | 				created.setDepartmentNameList(departmentNameList); | 
			
		
	
		
			
				
					|  |  |  | 				created.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 				created.setDetentionDays("0"); | 
			
		
	
		
			
				
					|  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  | 				String detentionDays = getDetentionDays(p); | 
			
		
	
		
			
				
					|  |  |  | 				if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > finalDays) { | 
			
		
	
		
			
				
					|  |  |  | 					created.setWarningFlag(true); | 
			
		
	
		
			
				
					|  |  |  | 					created.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 				} else { | 
			
		
	
		
			
				
					|  |  |  | 					created.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 					created.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  | 				departmentNameList = baseDao.selectDepartmentNameList(p); | 
			
		
	
		
			
				
					|  |  |  | 				created.setDepartmentNameList(departmentNameList); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
	
		
			
				
					|  |  | @ -220,19 +226,23 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
			
				
					|  |  |  | 			involved.setProjectStatus(p.getStatus()); | 
			
		
	
		
			
				
					|  |  |  | 			involved.setPublicReply(p.getPublicReply()); | 
			
		
	
		
			
				
					|  |  |  | 			involved.setProjectTime(p.getCreatedTime().getTime()); | 
			
		
	
		
			
				
					|  |  |  | 			String detentionDays = getDetentionDays(p); | 
			
		
	
		
			
				
					|  |  |  | 			if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > finalDays) { | 
			
		
	
		
			
				
					|  |  |  | 				involved.setWarningFlag(true); | 
			
		
	
		
			
				
					|  |  |  | 				involved.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  | 				involved.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 				involved.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			//获取当前处理部门
 | 
			
		
	
		
			
				
					|  |  |  | 			List<String> departmentNameList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  | 			if (ProjectConstant.CLOSED.equals(p.getStatus())) { | 
			
		
	
		
			
				
					|  |  |  | 				involved.setDepartmentNameList(departmentNameList); | 
			
		
	
		
			
				
					|  |  |  | 				involved.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 				involved.setDetentionDays("0"); | 
			
		
	
		
			
				
					|  |  |  | 			} else { | 
			
		
	
		
			
				
					|  |  |  | 				String detentionDays = getDetentionDays(p); | 
			
		
	
		
			
				
					|  |  |  | 				if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > finalDays) { | 
			
		
	
		
			
				
					|  |  |  | 					involved.setWarningFlag(true); | 
			
		
	
		
			
				
					|  |  |  | 					involved.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 				} else { | 
			
		
	
		
			
				
					|  |  |  | 					involved.setDetentionDays(detentionDays); | 
			
		
	
		
			
				
					|  |  |  | 					involved.setWarningFlag(false); | 
			
		
	
		
			
				
					|  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  | 				departmentNameList = baseDao.selectDepartmentNameList(p); | 
			
		
	
		
			
				
					|  |  |  | 				involved.setDepartmentNameList(departmentNameList); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
	
		
			
				
					|  |  | @ -280,6 +290,9 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
			
				
					|  |  |  | 	public void closed(ProjectClosedFromDTO fromDTO) { | 
			
		
	
		
			
				
					|  |  |  | 		//更新项目表状态
 | 
			
		
	
		
			
				
					|  |  |  | 		ProjectEntity projectEntity = baseDao.selectById(fromDTO.getProjectId()); | 
			
		
	
		
			
				
					|  |  |  | 		if (ProjectConstant.CLOSED.equals(projectEntity.getStatus())) { | 
			
		
	
		
			
				
					|  |  |  | 			throw new RenException(EpmetErrorCode.PROJECT_IS_CLOSED.getCode()); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		projectEntity.setStatus(ProjectConstant.CLOSED); | 
			
		
	
		
			
				
					|  |  |  | 		projectEntity.setClosedStatus(fromDTO.getClosedStatus()); | 
			
		
	
		
			
				
					|  |  |  | 		baseDao.updateById(projectEntity); | 
			
		
	
	
		
			
				
					|  |  | @ -307,6 +320,11 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
			
				
					|  |  |  | 	@Override | 
			
		
	
		
			
				
					|  |  |  | 	@Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  | 	public void projectReturn(ReturnFromDTO fromDTO) { | 
			
		
	
		
			
				
					|  |  |  | 		ProjectEntity projectEntity = baseDao.selectById(fromDTO.getProjectId()); | 
			
		
	
		
			
				
					|  |  |  | 		if (ProjectConstant.CLOSED.equals(projectEntity.getStatus())) { | 
			
		
	
		
			
				
					|  |  |  | 			throw new RenException(EpmetErrorCode.PROJECT_IS_CLOSED.getCode()); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//更新项目关联表
 | 
			
		
	
		
			
				
					|  |  |  | 		ProjectStaffEntity projectStaffEntity = new ProjectStaffEntity(); | 
			
		
	
		
			
				
					|  |  |  | 		projectStaffEntity.setId(fromDTO.getProjectStaffId()); | 
			
		
	
	
		
			
				
					|  |  | @ -328,6 +346,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
			
				
					|  |  |  | 		ProjectStaffDTO projectStaffDTO = projectStaffService.getProjectStaffInfo(fromDTO.getProjectProcessId()); | 
			
		
	
		
			
				
					|  |  |  | 		ProjectStaffEntity projectStaff = ConvertUtils.sourceToTarget(projectStaffDTO, ProjectStaffEntity.class); | 
			
		
	
		
			
				
					|  |  |  | 		projectStaff.setId(null); | 
			
		
	
		
			
				
					|  |  |  | 		projectStaff.setProcessId(projectProcessEntity.getId()); | 
			
		
	
		
			
				
					|  |  |  | 		projectStaff.setIsHandle(ProjectConstant.UNHANDLED); | 
			
		
	
		
			
				
					|  |  |  | 		projectStaffService.insert(projectStaff); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |