| | |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | | import com.ruoyi.common.enums.PlanStageEnum; |
| | | import com.ruoyi.common.enums.ReviewStatusEnum; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | | import com.ruoyi.projectManagement.dto.PlanStageDto; |
| | | import com.ruoyi.projectManagement.dto.SaveInfoDto; |
| | | import com.ruoyi.projectManagement.mapper.InfoMapper; |
| | | import com.ruoyi.projectManagement.pojo.Info; |
| | | import com.ruoyi.projectManagement.pojo.PlanNode; |
| | | import com.ruoyi.projectManagement.service.PlanService; |
| | | import com.ruoyi.projectManagement.service.impl.PlanServiceImpl; |
| | | import com.ruoyi.projectManagement.vo.PlanVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | public SaveInfoDto getInfoById(@NotNull Long id){ |
| | | Info info = infoMapper.selectById(id); |
| | | return convert(info); |
| | | } |
| | | |
| | | private SaveInfoDto convert(Info info) { |
| | | SaveInfoDto saveInfoDto = BeanUtil.copyProperties(info, SaveInfoDto.class); |
| | | // 附件处理 |
| | | saveInfoDto.setTeamList(info.getTeam()); |
| | | customerFollowUpFileService.fillAttachment(Lists.newArrayList(saveInfoDto), SaveInfoDto::getAttachment, SaveInfoDto::setAttachmentList); |
| | | return saveInfoDto; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取改id下子项目信息 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public List<SaveInfoDto> getSubordinateInfo(@NotNull Long id) { |
| | | LambdaQueryWrapper<Info> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Info::getProjectManagementInfoParentId, id); |
| | | queryWrapper.orderByAsc(Info::getCreateTime); |
| | | List<Info> infoList = infoMapper.selectList(queryWrapper); |
| | | return infoList.stream().map(this::convert).collect(Collectors.toList()); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 生成项目编号 |
| | | * |
| | | * @return |
| | | */ |
| | | private String generateSerialNumber() { |