|
@@ -819,30 +819,13 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
*/
|
|
|
@Override
|
|
|
public AjaxResult demandUnitWillManipulateTotal() {
|
|
|
- List<HomeToDoQueryResVo> homeRes = new ArrayList<>();
|
|
|
//计划待提交,需求待提交,合同待填制,项目建设待完成
|
|
|
List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
- List<PmDemandResVo> demandRes = demandService.demandWaitCommit();
|
|
|
+ List<PmDemand> demandRes = demandService.demandWaitCommit();
|
|
|
demandRes.addAll(demandService.contractWaitFilled());
|
|
|
demandRes.addAll(demandService.projectWaitFinish());
|
|
|
- //转为首页table展示数据
|
|
|
- if (!ObjectUtils.isEmpty(planRes) && planRes.size() > 0) {
|
|
|
- for (PlanQuarterResponseVo planVo : planRes) {
|
|
|
- HomeToDoQueryResVo home = new HomeToDoQueryResVo();
|
|
|
- BeanUtils.copyProperties(planVo, home);
|
|
|
- homeRes.add(home);
|
|
|
- }
|
|
|
- }
|
|
|
- if (!ObjectUtils.isEmpty(demandRes) && demandRes.size() > 0) {
|
|
|
- for (PmDemandResVo demandResVo : demandRes) {
|
|
|
- HomeToDoQueryResVo home = new HomeToDoQueryResVo();
|
|
|
- home.setEvaluation(BigDecimal.valueOf(demandResVo.getEvaluation()));
|
|
|
- BeanUtils.copyProperties(demandResVo, home);
|
|
|
- homeRes.add(home);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return AjaxResult.success(homeRes);
|
|
|
+ List<PmDemandResVo> resVos = demandService.listToVoList(demandRes);
|
|
|
+ return AjaxResult.success(planAndProjectToHome(planRes, resVos));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -886,12 +869,21 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
|
|
|
@Override
|
|
|
public AjaxResult purchasingManagementWillManipulateTotal() {
|
|
|
- List<HomeToDoQueryResVo> homeRes = new ArrayList<>();
|
|
|
//计划待审核,需求待审核,任务待下达
|
|
|
List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode());
|
|
|
List<PmDemand> demandRes = demandService.demandWaitExamine();
|
|
|
demandRes.addAll(demandService.taskWaitRelease());
|
|
|
- List<PmDemandResVo> vos = demandService.listToVoList(demandRes);
|
|
|
+ List<PmDemandResVo> resVos = demandService.listToVoList(demandRes);
|
|
|
+ return AjaxResult.success(planAndProjectToHome(planRes, resVos));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计划数据和项目数据一起返回给 首页--待办事项
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<HomeToDoQueryResVo> planAndProjectToHome(List<PlanQuarterResponseVo> planRes, List<PmDemandResVo> demandRes) {
|
|
|
+ List<HomeToDoQueryResVo> homeRes = new ArrayList<>();
|
|
|
//转为首页table展示数据
|
|
|
if (!ObjectUtils.isEmpty(planRes) && planRes.size() > 0) {
|
|
|
for (PlanQuarterResponseVo planVo : planRes) {
|
|
@@ -901,15 +893,14 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(demandRes) && demandRes.size() > 0) {
|
|
|
- for (PmDemandResVo demandResVo : vos) {
|
|
|
+ for (PmDemandResVo demandResVo : demandRes) {
|
|
|
HomeToDoQueryResVo home = new HomeToDoQueryResVo();
|
|
|
home.setEvaluation(BigDecimal.valueOf(demandResVo.getEvaluation()));
|
|
|
BeanUtils.copyProperties(demandResVo, home);
|
|
|
homeRes.add(home);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- return AjaxResult.success(homeRes);
|
|
|
+ return homeRes;
|
|
|
}
|
|
|
|
|
|
@Override
|