Browse Source

工作台接口

master
PoffyZhang 1 year ago
parent
commit
50c1c60319
19 changed files with 351 additions and 39 deletions
  1. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java
  2. +9
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  3. +0
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java
  4. +20
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/DeclaredStatisticsMapper.java
  5. +22
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/DeclaredStatisticsMapper.xml
  6. +40
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/po/DeclaredProjectStatisticsPO.java
  7. +17
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IDeclaredStatisticsService.java
  8. +32
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/DeclaredStatisticsServiceImpl.java
  9. +40
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/sys/enumeration/NoticeTypeEnum.java
  10. +9
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  11. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java
  12. +20
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml
  13. +27
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/po/TodoCenterStatisticsPO.java
  14. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/StatisticsService.java
  15. +9
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java
  16. +43
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/workbench/converter/WorkbenchConverter.java
  17. +53
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java
  18. +0
    -16
      pmapi/src/main/java/com/ningdatech/pmapi/workbench/model/TodoCenterStatisticsPO.java
  19. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/workbench/model/vo/WorkbenchVO.java

+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java View File

@@ -25,7 +25,8 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
"com.ningdatech.pmapi.user.controller",
"com.ningdatech.pmapi.meeting.controller",
"com.ningdatech.pmapi.expert.controller",
"com.ningdatech.pmapi.sms.controller"
"com.ningdatech.pmapi.sms.controller",
"com.ningdatech.pmapi.workbench.controller"
})
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> {



+ 9
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java View File

@@ -6,10 +6,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingOrganizationService;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.ningdatech.pmapi.projectdeclared.service.IDeclaredStatisticsService;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst;
@@ -64,7 +65,7 @@ public class DefaultDeclaredProjectManage {

private final IProjectInstService projectInstService;

private final StateMachineUtils stateMachineUtils;
private final IDeclaredStatisticsService statisticsService;

//项目名称去重
public void checkDuplication(ProjectDTO project){
@@ -232,4 +233,10 @@ public class DefaultDeclaredProjectManage {
throw new BusinessException("提交预审 项目信息修改 错误 :" + e.getMessage());
}
}

public DeclaredProjectStatisticsPO declaredProjectStatistics(Integer year){
UserInfoDetails userInfo = LoginUserUtil.loginUserDetail();
//查此人建设单位的项目
return statisticsService.getStatistics(userInfo.getOrganizationCode(),year);
}
}

+ 0
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java View File

@@ -6,19 +6,15 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Maps;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst;
import com.ningdatech.pmapi.projectlib.service.IProjectInstService;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.OrgInfoDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import com.wflow.workflow.bean.vo.ProcessStartParamsVo;
import com.wflow.workflow.service.ProcessInstanceService;
import com.wflow.workflow.service.ProcessModelService;


+ 20
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/DeclaredStatisticsMapper.java View File

@@ -0,0 +1,20 @@
package com.ningdatech.pmapi.projectdeclared.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import org.apache.ibatis.annotations.Param;

/**
* <p>
* Mapper 接口
* </p>
*
* @author zpf
* @since 2023-02-05
*/
public interface DeclaredStatisticsMapper extends BaseMapper {

DeclaredProjectStatisticsPO getStatistics(@Param("orgCode") String orgCode,@Param("year") Integer year);

}

+ 22
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/DeclaredStatisticsMapper.xml View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ningdatech.pmapi.projectdeclared.mapper.DeclaredStatisticsMapper">

<select id="getStatistics" resultType="com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO">
SELECT
count(0) totalNum,
count(CASE WHEN p.project_type = 1 THEN 1 end) buildNum,
count(CASE WHEN p.project_type = 2 THEN 1 end) operationNum,
count(CASE WHEN p.stage = 10000 THEN 1 end) notApprovedNum,
count(CASE WHEN p.stage = 20000 THEN 1 end) approvedNum,
count(CASE WHEN p.stage = 20000 AND p.status = 20002 THEN 1 end) constructionNum,
count(CASE WHEN p.stage = 20000 AND p.status = 20003 THEN 1 end) tobeInspectedNum,
count(CASE WHEN p.stage = 30000 THEN 1 end) archivedNum,
sum(p.declare_amount) declaredAmount,
sum(p.approval_amount) approvalAmount
FROM
nd_project p
WHERE build_org_code = #{orgCode} and project_year = #{year}
</select>

</mapper>

+ 40
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/po/DeclaredProjectStatisticsPO.java View File

@@ -0,0 +1,40 @@
package com.ningdatech.pmapi.projectdeclared.model.po;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
* @Classname DeclaredProjectStatistics
* @Description
* @Date 2023/3/20 16:29
* @Author PoffyZhang
*/
@Data
public class DeclaredProjectStatisticsPO {

@ApiModelProperty("总项目数")
private Integer totalNum;
@ApiModelProperty("建设项目数")
private Integer buildNum;
@ApiModelProperty("运维项目数")
private Integer operationNum;

@ApiModelProperty("待立项数")
private Integer notApprovedNum;
@ApiModelProperty("已立项数")
private Integer approvedNum;
@ApiModelProperty("建设中数")
private Integer constructionNum;
@ApiModelProperty("待验收数")
private Integer tobeInspectedNum;
@ApiModelProperty("已归档数")
private Integer archivedNum;

@ApiModelProperty("申报总金额")
private BigDecimal declaredAmount;
@ApiModelProperty("立项总金额")
private BigDecimal approvalAmount;

}

+ 17
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IDeclaredStatisticsService.java View File

@@ -0,0 +1,17 @@
package com.ningdatech.pmapi.projectdeclared.service;

import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;

/**
* <p>
* 服务类
* </p>
*
* @author zpf
* @since 2023-02-05
*/
public interface IDeclaredStatisticsService {

DeclaredProjectStatisticsPO getStatistics(String orgCode,Integer year);

}

+ 32
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/DeclaredStatisticsServiceImpl.java View File

@@ -0,0 +1,32 @@
package com.ningdatech.pmapi.projectdeclared.service.impl;

import com.ningdatech.pmapi.projectdeclared.mapper.DeclaredStatisticsMapper;
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.ningdatech.pmapi.projectdeclared.service.IDeclaredStatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author zpf
* @since 2023-02-05
*/
@Service
@AllArgsConstructor
public class DeclaredStatisticsServiceImpl implements IDeclaredStatisticsService {

private final DeclaredStatisticsMapper declaredStatisticsMapper;

/**
* 根据userId 去查询 申报项目统计
* @param orgCode
* @return
*/
@Override
public DeclaredProjectStatisticsPO getStatistics(String orgCode,Integer year) {
return declaredStatisticsMapper.getStatistics(orgCode,year);
}
}

+ 40
- 0
pmapi/src/main/java/com/ningdatech/pmapi/sys/enumeration/NoticeTypeEnum.java View File

@@ -0,0 +1,40 @@
package com.ningdatech.pmapi.sys.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

/**
*
* 公告类型枚举
* @author ZPF
* @since 2023/02/24 16:14
*/
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum NoticeTypeEnum {
/**
* 公告类型枚举
*/
ANNOUNCEMENT(1, "公告"),
HELP_DOCUMENTS(2, "帮助文档");

private Integer code;
private String desc;

public static String getDescByCode(Integer code) {
if (Objects.isNull(code)) {
return StringUtils.EMPTY;
}
for (NoticeTypeEnum t : NoticeTypeEnum.values()) {
if (code.equals(t.getCode())) {
return t.desc;
}
}
return StringUtils.EMPTY;
}
}

+ 9
- 5
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.todocenter.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
@@ -49,6 +50,7 @@ import com.ningdatech.pmapi.todocenter.model.dto.AdjustHandleDTO;
import com.ningdatech.pmapi.todocenter.model.dto.PdfGenerateDTO;
import com.ningdatech.pmapi.todocenter.model.dto.SealInfoDTO;
import com.ningdatech.pmapi.todocenter.model.dto.SignReqDTO;
import com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO;
import com.ningdatech.pmapi.todocenter.model.vo.ProcessProgressDetailVo;
import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum;
import com.ningdatech.pmapi.todocenter.model.req.ProcessDetailReq;
@@ -92,7 +94,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@@ -128,6 +129,8 @@ public class TodoCenterManage {
private final FileService fileService;
private final ICompanySignatureService companySignatureService;

private final StatisticsService statisticsService;


/**
* 待办中心待我处理项目列表查询
@@ -1148,12 +1151,13 @@ public class TodoCenterManage {
}

//获取当前登录人的 待办中心统计数据
public TodoCenterStatisticsVO todoCenterStatistics(Integer year){
TodoCenterStatisticsVO resVo = new TodoCenterStatisticsVO();
public TodoCenterStatisticsVO todoCenterStatistics(){
Long userId = LoginUserUtil.getUserId();

//为了查询效率 还是自己去写统计接口
// statisticsService.
TodoCenterStatisticsPO statistics = statisticsService.getStatistics(userId);
TodoCenterStatisticsVO statisticsVO = BeanUtil.copyProperties(statistics,TodoCenterStatisticsVO.class);

return resVo;
return statisticsVO;
}
}

+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java View File

@@ -1,10 +1,11 @@
package com.ningdatech.pmapi.todocenter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wflow.bean.entity.WflowDepartments;
import com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO;
import org.apache.ibatis.annotations.Param;

public interface StatisticsMapper extends BaseMapper {


TodoCenterStatisticsPO getStatistics(@Param("userId") Long userId);
}

+ 20
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml View File

@@ -1,5 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ningdatech.pmapi.todocenter.mapper.StatisticsMapper">

<select id="getStatistics" parameterType="java.lang.Long"
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO">
SELECT
sum(CASE WHEN tol.todoNum IS NOT NULL AND tol.todoNum > 0 THEN 1 ELSE 0 end) todoNum,
sum(CASE WHEN tol.idoNum IS NOT NULL AND tol.idoNum > 0 THEN 1 ELSE 0 end) idoNum,
sum(CASE WHEN tol.mysubmitNum IS NOT NULL AND tol.mysubmitNum > 0 THEN 1 ELSE 0 end) mysubmitNum,
sum(CASE WHEN tol.ccmeNum IS NOT NULL AND tol.ccmeNum > 0 THEN 1 ELSE 0 end) ccmeNum
FROM (
SELECT
sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ is NULL THEN 1 end) todoNum,
sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ IS not NULL THEN 1 end) idoNum,
sum(CASE WHEN hp.start_user_id_ = #{userId} THEN 1 end) mysubmitNum,
0 ccmeNum
FROM
act_hi_procinst hp
LEFT JOIN
act_hi_taskinst ht ON hp.proc_inst_id_ = ht.proc_inst_id_
GROUP BY hp.id_
) tol
</select>
</mapper>

+ 27
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/po/TodoCenterStatisticsPO.java View File

@@ -0,0 +1,27 @@
package com.ningdatech.pmapi.todocenter.model.po;

import com.ningdatech.pmapi.todocenter.model.vo.TodoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
* @Classname TodoCenterStatisticsPO
* @Description
* @Date 2023/3/20 11:51
* @Author PoffyZhang
*/
@Data
public class TodoCenterStatisticsPO {

@ApiModelProperty("待处理数")
private Integer todoNum;
@ApiModelProperty("已处理数")
private Integer idoNum;
@ApiModelProperty("我发起数")
private Integer mysubmitNum;
@ApiModelProperty("抄送我数")
private Integer ccmeNum;

}

+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/StatisticsService.java View File

@@ -1,5 +1,7 @@
package com.ningdatech.pmapi.todocenter.service;

import com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO;

/**
* @Classname StatisticsService
* @Description
@@ -8,6 +10,6 @@ package com.ningdatech.pmapi.todocenter.service;
*/
public interface StatisticsService {

//根据用户id 去查询 一些统计数据
TodoCenterStatisticsPO getStatistics(Long userId);
}

+ 9
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java View File

@@ -1,6 +1,9 @@
package com.ningdatech.pmapi.todocenter.service.impl;

import com.ningdatech.pmapi.todocenter.mapper.StatisticsMapper;
import com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO;
import com.ningdatech.pmapi.todocenter.service.StatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
@@ -10,8 +13,13 @@ import org.springframework.stereotype.Service;
* @Author PoffyZhang
*/
@Service
@AllArgsConstructor
public class StatisticsServiceImpl implements StatisticsService {

private final StatisticsMapper mapper;

@Override
public TodoCenterStatisticsPO getStatistics(Long userId) {
return mapper.getStatistics(userId);
}
}

+ 43
- 0
pmapi/src/main/java/com/ningdatech/pmapi/workbench/converter/WorkbenchConverter.java View File

@@ -0,0 +1,43 @@
package com.ningdatech.pmapi.workbench.converter;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.ningdatech.pmapi.sys.model.vo.NoticeListItemVO;
import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO;
import com.ningdatech.pmapi.todocenter.model.vo.TodoVO;
import com.ningdatech.pmapi.workbench.model.vo.WorkbenchVO;

import java.util.Collections;
import java.util.List;

/**
* @Classname WorkbenchConverter
* @Description
* @Date 2023/3/20 17:23
* @Author PoffyZhang
*/
public class WorkbenchConverter {


public static List<NoticeListItemVO> converts(List<NoticeListItemVO> vos) {
if(CollUtil.isNotEmpty(vos)){

}
return Collections.emptyList();
}

public static WorkbenchVO.DeclaredStatistics convert(DeclaredProjectStatisticsPO po) {
WorkbenchVO.DeclaredStatistics res = BeanUtil.copyProperties(po,WorkbenchVO.DeclaredStatistics.class);
return res;
}

public static TodoVO convert(ResToBeProcessedVO vo) {
TodoVO res = new TodoVO();
res.setNodeId(vo.getNodeId());
res.setProjectId(vo.getProjectId());
res.setProjectName(vo.getProjectName());
return res;
}
}

+ 53
- 4
pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java View File

@@ -1,10 +1,30 @@
package com.ningdatech.pmapi.workbench.manage;

import cn.hutool.core.bean.BeanUtil;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage;
import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage;
import com.ningdatech.pmapi.projectdeclared.model.po.DeclaredProjectStatisticsPO;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.sys.enumeration.NoticeTypeEnum;
import com.ningdatech.pmapi.sys.manage.NoticeManage;
import com.ningdatech.pmapi.sys.model.req.NoticeListReq;
import com.ningdatech.pmapi.sys.model.vo.NoticeListItemVO;
import com.ningdatech.pmapi.todocenter.manage.TodoCenterManage;
import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedReq;
import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO;
import com.ningdatech.pmapi.todocenter.model.vo.TodoCenterStatisticsVO;
import com.ningdatech.pmapi.todocenter.model.vo.TodoVO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.ningdatech.pmapi.workbench.converter.WorkbenchConverter;
import com.ningdatech.pmapi.workbench.model.vo.WorkbenchVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.stream.Collectors;

/**
* @Classname WorkbenchManage
* @Description
@@ -15,13 +35,42 @@ import org.springframework.stereotype.Component;
@AllArgsConstructor
public class WorkbenchManage {

private TodoCenterManage todoCenterManage;
private final TodoCenterManage todoCenterManage;

private final DefaultDeclaredProjectManage defaultDeclaredProjectManage;

private final DeclaredProjectManage declaredProjectManage;

private final NoticeManage noticeManage;

public WorkbenchVO getWorkbenchData(Integer year){
UserInfoDetails userInfo = LoginUserUtil.loginUserDetail();
WorkbenchVO res = new WorkbenchVO();

//1.待办中心数据
todoCenterManage.todoCenterStatistics(year);
TodoCenterStatisticsVO statisticsVO = todoCenterManage.todoCenterStatistics();
ToBeProcessedReq toBeProcessedReq = new ToBeProcessedReq();
toBeProcessedReq.setPageNumber(1);
toBeProcessedReq.setPageSize(5);
statisticsVO.setTodoList(todoCenterManage.todoProjectList(toBeProcessedReq).getRecords()
.stream().map(v -> WorkbenchConverter.convert(v)).collect(Collectors.toList()));
res.setTodoCerter(statisticsVO);

return null;
}
//2.项目统计数据
res.setOrgDeclared(WorkbenchConverter.convert(defaultDeclaredProjectManage.declaredProjectStatistics(year)));
ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setPageNumber(1);
projectListReq.setPageSize(5);
projectListReq.setProjectYear(year);
res.setProjects(declaredProjectManage.projectLibList(projectListReq).getRecords().stream().collect(Collectors.toList()));

//3.政策文件
NoticeListReq noticeListReq = new NoticeListReq();
noticeListReq.setType(NoticeTypeEnum.HELP_DOCUMENTS.getCode());
noticeListReq.setPageNumber(1);
noticeListReq.setPageSize(5);
res.setNoticeList(noticeManage.listByManager(noticeListReq).getRecords().stream().collect(Collectors.toList()));

return res;
}
}

+ 0
- 16
pmapi/src/main/java/com/ningdatech/pmapi/workbench/model/TodoCenterStatisticsPO.java View File

@@ -1,16 +0,0 @@
package com.ningdatech.pmapi.workbench.model;

import lombok.Data;

/**
* @Classname TodoCenterStatisticsPO
* @Description
* @Date 2023/3/20 11:51
* @Author PoffyZhang
*/
@Data
public class TodoCenterStatisticsPO {

// private

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/workbench/model/vo/WorkbenchVO.java View File

@@ -32,7 +32,7 @@ public class WorkbenchVO implements Serializable {
public List<ProjectLibListItemVO> projects;

@ApiModelProperty("公告列表")
public NoticeListItemVO noticeList;
public List<NoticeListItemVO> noticeList;

@Data
public static class DeclaredStatistics {


Loading…
Cancel
Save