| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.common.enums.DeleteFlagEnum; |
| | | import com.gkhy.common.exception.ServiceException; |
| | | import com.gkhy.common.utils.DateUtils; |
| | | import com.gkhy.common.utils.SecurityUtils; |
| | |
| | | if (SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | throw new ServiceException("无权新增"); |
| | | } |
| | | projectManagementSave.setDelFlag(0L); |
| | | projectManagementSave.setDelFlag(DeleteFlagEnum.UN_DELETE.getCode()); |
| | | BeanUtil.copyProperties(projectManagement, projectManagementSave); |
| | | if (projectManagement.getId() != null){ |
| | | checkDataPer(projectManagement.getId()); |
| | |
| | | if (hasDuplicateExpertId(saveData)){ |
| | | throw new ServiceException("专家重复!"); |
| | | } |
| | | long count = saveData.stream() |
| | | .filter(dto -> dto.getSelectionMode() == 1) |
| | | .count(); |
| | | if (count < 1){ |
| | | throw new ServiceException("固定专家不能为空!"); |
| | | } |
| | | // long count = saveData.stream() |
| | | // .filter(dto -> dto.getSelectionMode() == 1) |
| | | // .count(); |
| | | // if (count < 1){ |
| | | // throw new ServiceException("固定专家不能为空!"); |
| | | // } |
| | | |
| | | if ((projectManagement1.getStep() == 1 || projectManagement1.getStep() == 2) && (projectManagement.getStep() == 2 ) ){ |
| | | projectManagementSave.setStep(2L); |
| | |
| | | |
| | | @Override |
| | | public List<ProjectExpertStateResp> getProjectExpertSate(ProjectExpertStateReq req) { |
| | | |
| | | if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | req.setDeptId(SecurityUtils.getDeptId()); |
| | | } |
| | | return projectManagementMapper.getProjectExpertSate(req); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<ProjectExpertResp> projectExpertEvaList(SysProjectExpertReq req) { |
| | | if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | req.setDeptId(SecurityUtils.getDeptId()); |
| | | } |
| | | return projectExpertMapper.projectExpertEvaList(req); |
| | | } |
| | | |