소스 검색

延期 优化

master
PoffyZhang 1 년 전
부모
커밋
cba39ebf19
2개의 변경된 파일25개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java
  2. +18
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java

+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java 파일 보기

@@ -4,7 +4,6 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.common.util.ExcelDownUtil;
import com.ningdatech.pmapi.projectdeclared.manage.DelayedApplyManage;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO;
import com.ningdatech.pmapi.projectdeclared.model.vo.DelayedApplyVO;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
@@ -16,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @Classname DelayedProjectController
@@ -39,6 +39,12 @@ public class DelayedApplyController {
return delayedApplyManage.projectLibList(req);
}

@ApiOperation(value = "查看某个项目的延期列表", notes = "查看某个项目的延期列表")
@GetMapping("/delay-list/{projectId}")
public List<DelayedApplyVO> delayList(@PathVariable Long projectId) {
return delayedApplyManage.delayList(projectId);
}

@ApiOperation(value = "延期的内容详情", notes = "延期的内容详情")
@GetMapping("/detail/{projectId}")
public DelayedApplyVO detailByProjectId(@PathVariable Long projectId) {


+ 18
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java 파일 보기

@@ -304,4 +304,22 @@ public class DelayedApplyManage {
}
return BeanUtil.copyProperties(delayApply,DelayedApplyVO.class);
}

/**
* 查看某个项目的 延期列表
* @param projectId
* @return
*/
public List<DelayedApplyVO> delayList(Long projectId) {
List<Long> allVersionProjectId = projectService.getAllVersionProjectId(projectId);
List<ProjectDelayApply> delays = projectDelayApplyService.list(Wrappers.lambdaQuery(ProjectDelayApply.class)
.in(ProjectDelayApply::getProjectId, allVersionProjectId));

if(CollUtil.isEmpty(delays)){
return Collections.emptyList();
}

return delays.stream().map(d -> BeanUtil.copyProperties(d,DelayedApplyVO.class))
.collect(Collectors.toList());
}
}

불러오는 중...
취소
저장