Browse Source

修改导出文件头格式

tags/24080901
CMM 1 year ago
parent
commit
2f8a479844
4 changed files with 52 additions and 1 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java
  2. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java
  3. +13
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java
  4. +30
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalAuditReq.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java View File

@@ -136,7 +136,7 @@ public class ExcelDownUtil {
} }
public static void setExportResponseHeader(String fileName, HttpServletResponse response) throws UnsupportedEncodingException { public static void setExportResponseHeader(String fileName, HttpServletResponse response) throws UnsupportedEncodingException {
// 设置响应头和保存文件名 // 设置响应头和保存文件名
response.setContentType(StrPool.CONTENT_TYPE);
response.setContentType(ExcelUtil.XLS_CONTENT_TYPE);
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + encodeName(fileName) + ".xls"); response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + encodeName(fileName) + ".xls");
} }




+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java View File

@@ -4,6 +4,7 @@ package com.ningdatech.pmapi.projectlib.controller;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectlib.manage.ProjectRenewalFundManage; import com.ningdatech.pmapi.projectlib.manage.ProjectRenewalFundManage;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectRenewalFundDeclarationDTO; import com.ningdatech.pmapi.projectlib.model.dto.ProjectRenewalFundDeclarationDTO;
import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalAuditReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -44,4 +45,11 @@ public class ProjectRenewalFundDeclarationController {
private Long declared (@Validated @RequestBody ProjectRenewalFundDeclarationDTO dto){ private Long declared (@Validated @RequestBody ProjectRenewalFundDeclarationDTO dto){
return projectRenewalFundManage.declared(dto); return projectRenewalFundManage.declared(dto);
} }

@PostMapping("/audit")
@ApiOperation("续建项目审核")
private Long audit(@Validated @RequestBody ProjectRenewalAuditReq param){
return projectRenewalFundManage.audit(param);
}

} }

+ 13
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java View File

@@ -10,6 +10,7 @@ import com.ningdatech.pmapi.projectlib.model.dto.ProjectRenewalFundDeclarationDT
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration; import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration;
import com.ningdatech.pmapi.projectlib.model.po.ProjectRenewalFundDeclarationPO; import com.ningdatech.pmapi.projectlib.model.po.ProjectRenewalFundDeclarationPO;
import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalAuditReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO;
import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService;
@@ -115,4 +116,16 @@ public class ProjectRenewalFundManage {
} }
return declaration.getId(); return declaration.getId();
} }

public Long audit(ProjectRenewalAuditReq param) {
Long projectRenewalId = param.getProjectRenewalId();
ProjectRenewalFundDeclaration projectRenewal = projectRenewalFundDeclarationService.getById(projectRenewalId);
if (Boolean.TRUE.equals(param.getResult())){
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PASS.name());
}else {
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.NOT_PASS.name());
}
// projectRenewal
return null;
}
} }

+ 30
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalAuditReq.java View File

@@ -0,0 +1,30 @@
package com.ningdatech.pmapi.projectlib.model.req;

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

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

/**
* 续建项目审核请求实体
*
* @author CMM
* @since 2023/02/21 13:43
*/
@Data
@ApiModel("续建项目审核请求参数")
public class ProjectRenewalAuditReq {

@ApiModelProperty("续建项目ID")
private Long projectRenewalId;

@NotNull(message = "审核结果不能为空")
@ApiModelProperty("审核结果")
private Boolean result;

@ApiModelProperty("审核意见")
@Max(200)
private String auditOpinion;
}

Loading…
Cancel
Save