Browse Source

延期 优化

tags/24080901
PoffyZhang 1 year ago
parent
commit
cba39ebf19
2 changed files with 25 additions and 1 deletions
  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 View File

@@ -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 View File

@@ -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());
}
}

Loading…
Cancel
Save