Bladeren bron

项目申报相关导出

tags/24080901
CMM 1 jaar geleden
bovenliggende
commit
ae509b3f76
7 gewijzigde bestanden met toevoegingen van 148 en 32 verwijderingen
  1. +28
    -27
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/event/ProjectStatusChangeEvent.java
  2. +21
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java
  3. +42
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectRenewalDeclareExportDTO.java
  4. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java
  5. +46
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java
  6. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectRenewalExportDTO.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 28
- 27
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/event/ProjectStatusChangeEvent.java Bestand weergeven

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.common.statemachine.event;

import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -25,114 +26,114 @@ public enum ProjectStatusChangeEvent {
/**
* 项目申报提交(项目状态进入:单位内部审核中)
*/
PROJECT_APPLICATION_SUBMIT(10015, null, null),
PROJECT_APPLICATION_SUBMIT( ProjectStatusEnum.TO_BE_DECLARED.getCode(), null, null),
/**
* 单位内部审核驳回(项目状态进入:单位内部审核不通过)
*/
UNDER_INTERNAL_REJECT(null, 10001, null),
UNDER_INTERNAL_REJECT(null, ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode(), null),
/**
* 单位内部审核通过(项目状态进入:待预审)
*/
UNDER_INTERNAL_PASS(10001, null, null),
UNDER_INTERNAL_PASS(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode(), null, null),
/**
* 预审申报(项目状态进入:待预审选择,有判断条件:市级项目且申报金额大于1000万项目状态变为:省级部门联审中;否则项目状态变为:预审中)
*/
PRELIMINARY_REVIEW_DECLARE(10003, null, null),
PRELIMINARY_REVIEW_DECLARE(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode(), null, null),
/**
* 省级部门联审不通过(项目状态变为:省级部门联审不通过)
*/
PROVINCIAL_DEPARTMENT_REVIEW_REJECT(null, 10004, null),
PROVINCIAL_DEPARTMENT_REVIEW_REJECT(null, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode(), null),
/**
* 省级部门联审通过(项目状态变为:预审中)
*/
PROVINCIAL_DEPARTMENT_REVIEW_PASS(10004, null, null),
PROVINCIAL_DEPARTMENT_REVIEW_PASS(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode(), null, null),
/**
* 预审驳回(项目状态变为:预审不通过)
*/
PRELIMINARY_REVIEW_REJECT(null, 10006, null),
PRELIMINARY_REVIEW_REJECT(null, ProjectStatusEnum.PRE_APPLYING.getCode(), null),
/**
* 预审通过(项目状态变为:部门联审中)
*/
PRELIMINARY_REVIEW_PASS(10006, null, null),
PRELIMINARY_REVIEW_PASS(ProjectStatusEnum.PRE_APPLYING.getCode(), null, null),
/**
* 部门联审驳回(项目状态变为:部门联审不通过)
*/
DEPARTMENT_UNITED_REVIEW_REJECT(null, 10008, null),
DEPARTMENT_UNITED_REVIEW_REJECT(null, ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW.getCode(), null),
/**
* 部门联审通过(项目状态变为:年度计划中)
*/
DEPARTMENT_UNITED_REVIEW_PASS(10008, null, null),
DEPARTMENT_UNITED_REVIEW_PASS(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW.getCode(), null, null),
/**
* 年度计划暂缓(项目状态变为:被暂缓)
*/
ANNUAL_PLAN_SUSPEND(null, 10010, null),
ANNUAL_PLAN_SUSPEND(null, ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode(), null),
/**
* 年度计划项目开启方案申报(项目状态变为:方案待申报)
*/
ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE(10010, null, null),
ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode(), null, null),
/**
* 申报方案(项目状态变为:方案评审中)
*/
DECLARE_PLAN(10016, null, null),
DECLARE_PLAN( ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode(), null, null),
/**
* 方案评审驳回(项目状态变为:方案评审不通过)
*/
PLAN_REVIEW_REJECT(null, 10012, null),
PLAN_REVIEW_REJECT(null, ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode(), null),
/**
* 方案评审通过(项目状态变为:待立项批复)
*/
PLAN_REVIEW_PASS(10012, null, null),
PLAN_REVIEW_PASS(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode(), null, null),
/**
* 立项批复(项目状态变为:已立项-待采购)
*/
PROJECT_APPROVAL(10014, null, null),
PROJECT_APPROVAL(ProjectStatusEnum.TO_BE_APPROVED.getCode(), null, null),
/**
* 采购备案(项目状态变为:建设中)
*/
PURCHASE_PUT_ON_RECORD(20001, null, null),
PURCHASE_PUT_ON_RECORD(ProjectStatusEnum.TO_BE_PURCHASED.getCode(), null, null),
/**
* 初验备案(项目状态变为:待终验)
*/
PRELIMINARY_ACCEPTANCE_PUT_ON_RECORD(20002, null, null),
PRELIMINARY_ACCEPTANCE_PUT_ON_RECORD(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(), null, null),
/**
* 终验申请(项目状态变为:终验审核中)
*/
FINAL_ACCEPTANCE_APPLICATION(20003, null, null),
FINAL_ACCEPTANCE_APPLICATION(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode(), null, null),
/**
* 终验审核不通过(项目状态变为:终验审核不通过)
*/
FINAL_ACCEPTANCE_REJECT(null, 20004, null),
FINAL_ACCEPTANCE_REJECT(null, ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode(), null),
/**
* 终验审核通过(项目状态变为:已归档)
*/
FINAL_ACCEPTANCE_PASS(20004, null, null),
FINAL_ACCEPTANCE_PASS(ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode(), null, null),

// 下个节点还未提交审核意见时,流程发起人和前一个审核人可以点击撤回

/**
* 单位内部审核中时被撤回(项目状态进入:待申报)
*/
UNDER_INTERNAL_WITHDRAW(null, null, 10001),
UNDER_INTERNAL_WITHDRAW(null, null, ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()),
/**
* 省级部门联审中时被撤回(项目状态进入:待预审)
*/
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_WITHDRAW(null, null, 10004),
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_WITHDRAW(null, null, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()),
/**
* 预审中时被撤回(项目状态进入:待预审选择,,有判断条件:市级项目且申报金额大于1000万项目状态变为:省级部门联审中;否则项目状态变为:预审中)
*/
PRE_APPLYING_WITHDRAW(null, null, 10006),
PRE_APPLYING_WITHDRAW(null, null, ProjectStatusEnum.PRE_APPLYING.getCode()),
/**
* 部门联审中时被撤回(项目状态进入:预审中)
*/
DEPARTMENT_JOINT_REVIEW_WITHDRAW(null, null, 10008),
DEPARTMENT_JOINT_REVIEW_WITHDRAW(null, null, ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW.getCode()),
/**
* 方案评审中时被撤回(项目状态进入:方案待申报)
*/
SCHEME_UNDER_REVIEW_WITHDRAW(null, null, 10012),
SCHEME_UNDER_REVIEW_WITHDRAW(null, null, ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()),
/**
* 终验审核中时被撤回(项目状态进入:待终验)
*/
FINAL_ACCEPTANCE_IS_UNDER_REVIEW_WITHDRAW(null, null, 20004);
FINAL_ACCEPTANCE_IS_UNDER_REVIEW_WITHDRAW(null, null, ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode());

private Integer passProjectStatusCode;
private Integer rejectProjectStatusCode;


+ 21
- 3
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java Bestand weergeven

@@ -41,17 +41,35 @@ public class StateMachineUtils {
@Resource(name = "projectDeclareStateMachinePersister")
private StateMachinePersister projectDeclareStateMachinePersister;

//通过审核
/**
* 审核通过
* @param project
* @return void
* @author CMM
* @since 2023/03/10 13:40
*/
public void pass(Project project) throws Exception {
execute(project,getProjectStatusPassEvent(project.getStatus()));
}

//拒绝
/**
* 审核驳回
* @param project
* @return void
* @author CMM
* @since 2023/03/10 13:40
*/
public void reject(Project project) throws Exception {
execute(project,getProjectStatusRejectEvent(project.getStatus()));
}

//撤回
/**
* 审核撤回
* @param project
* @return void
* @author CMM
* @since 2023/03/10 13:40
*/
public void withDraw(Project project) throws Exception {
execute(project,getProjectStatusWithdrawEvent(project.getStatus()));
}


+ 42
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectRenewalDeclareExportDTO.java Bestand weergeven

@@ -0,0 +1,42 @@
package com.ningdatech.pmapi.projectdeclared.model.dto;

import java.io.Serializable;
import java.math.BigDecimal;

import com.alibaba.excel.annotation.ExcelProperty;

import lombok.Data;

/**
* 项目续建申报列表导出实体
*
* @author CMM
* @since 2023/02/21 15:03
*/
@Data
public class ProjectRenewalDeclareExportDTO implements Serializable {

private static final long serialVersionUID = 1L;

@ExcelProperty(value = "序号",index = 0)
private Integer serialNumber;

@ExcelProperty("项目名称")
private String projectName;

@ExcelProperty("项目类型")
private String projectTypeName;

@ExcelProperty("预算年度")
private Integer projectYear;

@ExcelProperty("年度支付金额(万元)")
private BigDecimal annualPaymentAmount;

@ExcelProperty("状态")
private String approvalStatusName;

@ExcelProperty("创建时间")
private String createOn;

}

+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java Bestand weergeven

@@ -62,9 +62,15 @@ public class ProjectRenewalFundDeclarationController {
}

@GetMapping("/export")
@ApiOperation("续建项目列表导出")
@ApiOperation("项目库续建项目列表导出")
private void exportList(ProjectRenewalListReq req, HttpServletResponse response){
ExcelDownUtil.downXls(response,req,projectRenewalFundManage::exportList);
}

@GetMapping("/exportRenewalDeclare")
@ApiOperation("申报管理续建项目资金申报列表导出")
private void exportRenewalDeclareList(ProjectRenewalListReq req, HttpServletResponse response){
ExcelDownUtil.downXls(response,req,projectRenewalFundManage::exportRenewalDeclareList);
}

}

+ 46
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java Bestand weergeven

@@ -11,6 +11,7 @@ import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.util.ExcelDownUtil;
import com.ningdatech.pmapi.common.util.ExcelExportStyle;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectRenewalDeclareExportDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectRenewalApprovalStatusEnum;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum;
@@ -189,6 +190,10 @@ public class ProjectRenewalFundManage {
return exportDTO;
}).collect(Collectors.toList());

for (int i = 0; i < collect.size(); i++) {
collect.get(i).setSerialNumber(i + 1);
}


String fileName = "续建项目资金库列表";
ExcelDownUtil.setFileName(fileName,response);
@@ -203,4 +208,45 @@ public class ProjectRenewalFundManage {
throw new RuntimeException(e);
}
}

public void exportRenewalDeclareList(HttpServletResponse response, ProjectRenewalListReq param) {
param.setPageNumber(CommonConst.EXPORT_PAGE_NUMBER);
param.setPageSize(CommonConst.EXPORT_PAGE_SIZE);
Page<ProjectRenewalFundDeclarationPO> page = param.page();
projectRenewalFundDeclarationService.pageSql(page, param);
List<ProjectRenewalFundDeclarationPO> records = page.getRecords();

List<ProjectRenewalDeclareExportDTO> collect = records.stream().map(r -> {
ProjectRenewalDeclareExportDTO exportDTO = new ProjectRenewalDeclareExportDTO();
BeanUtils.copyProperties(r, exportDTO);
exportDTO.setProjectTypeName(ProjectTypeEnum.getDesc(r.getProjectType()));
if (ProjectRenewalApprovalStatusEnum.PENDING.name().equals(r.getApprovalStatus())) {
exportDTO.setApprovalStatusName(ProjectRenewalApprovalStatusEnum.PENDING.getDesc());
} else if (ProjectRenewalApprovalStatusEnum.PASS.name().equals(r.getApprovalStatus())) {
exportDTO.setApprovalStatusName(ProjectRenewalApprovalStatusEnum.PASS.getDesc());
} else if (ProjectRenewalApprovalStatusEnum.NOT_PASS.name().equals(r.getApprovalStatus())) {
exportDTO.setApprovalStatusName(ProjectRenewalApprovalStatusEnum.NOT_PASS.getDesc());
}
String createOnStr = NdDateUtils.format(r.getCreateOn(), "yyyy-MM-dd HH:mm");
exportDTO.setCreateOn(createOnStr);
return exportDTO;
}).collect(Collectors.toList());

for (int i = 0; i < collect.size(); i++) {
collect.get(i).setSerialNumber(i + 1);
}

String fileName = "续建项目资金申报列表";
ExcelDownUtil.setFileName(fileName,response);
//数据导出处理函数
try {
EasyExcel.write(response.getOutputStream(), ProjectRenewalDeclareExportDTO.class)
.autoCloseStream(false)
.registerWriteHandler(ExcelExportStyle.formalStyle())
.sheet(fileName)
.doWrite(collect);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectRenewalExportDTO.java Bestand weergeven

@@ -17,6 +17,9 @@ public class ProjectRenewalExportDTO implements Serializable {

private static final long serialVersionUID = 1L;

@ExcelProperty(value = "序号",index = 0)
private Integer serialNumber;

@ExcelProperty("项目名称")
private String projectName;



+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Bestand weergeven

@@ -268,7 +268,7 @@ public class TodoCenterManage {
}

// 如果流程状态是被退回状态,流程通过后,进入下一个审核人,
// 当前通过审核人一定不是最后一个审核人(下一个审核人至多是最后一个),更新流程状态为审核中
// 当前通过审核人一定不是最后一个审核人(下一个审核人至多是最后一个)
if (ProcessStatusEnum.BE_BACKED.getDesc().equals(currentProcessStatus)) {
// 获取发送浙政钉工作通知必要信息
WorkNoticeInfo passWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo);


Laden…
Annuleren
Opslaan