From 178ed71853b74a93157f626508e66c3fdf8fb70b Mon Sep 17 00:00:00 2001 From: jing's Date: Sun, 31 Mar 2024 15:14:05 +0800 Subject: [PATCH] =?UTF-8?q?ebom=E7=BC=96=E8=BE=91=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/api/user/EbomApi.java | 4 ++-- .../product/bomnew/pojo/vo/EbomExcelEditVO.java | 16 ++++++++++------ .../bomnew/service/BomNewEbomParentService.java | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java index 9ad6a31d..b74063bb 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java @@ -183,8 +183,8 @@ public class EbomApi extends BaseApi { extra = "{{#exportParam.toString()}}", type = "Ebom-编辑导出") public void editExportBom(@RequestBody EbomEditExportDTO exportParam , HttpServletResponse response) throws IOException { VUtils.isTure(CollUtil.isEmpty(exportParam.getList()) && exportParam.getBomRowId()<=0).throwMessage("请选择要导出的物料行"); - - bomNewEbomParentService.editExportBom(exportParam, response); + EecExcelUtil.setResponseExcelHeader(response, "bom列表"); + bomNewEbomParentService.editExportBom(exportParam, response.getOutputStream()); } diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/EbomExcelEditVO.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/EbomExcelEditVO.java index 2819e567..b792e5ae 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/EbomExcelEditVO.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/EbomExcelEditVO.java @@ -1,5 +1,6 @@ package com.nflg.product.bomnew.pojo.vo; +import cn.hutool.core.util.ObjectUtil; import com.nflg.product.bomnew.constant.EBomExceptionStatusEnum; import com.nflg.product.bomnew.constant.EBomStatusEnum; import com.nflg.product.bomnew.constant.MateiralStateEnum; @@ -19,7 +20,10 @@ public class EbomExcelEditVO { private String errorStatus; public String getErrorStatus(){ - return EnumUtils.getValueEnum(EBomExceptionStatusEnum.class, this.status).getDescription(); + if(ObjectUtil.isNull(this.exceptionStatus)){ + return ""; + } + return EnumUtils.getValueEnum(EBomExceptionStatusEnum.class, this.exceptionStatus).getDescription(); } private Integer exceptionStatus; @ExcelColumn(value ="序号",colIndex = 1) @@ -79,16 +83,16 @@ public class EbomExcelEditVO { @ExcelColumn(value ="类别",colIndex = 13) private String categoryName; - @ExcelColumn(value ="创建日期",colIndex = 14) + @ExcelColumn(value ="创建日期",format = "yyyy-MM-dd hh:mm:ss",colIndex = 14) private LocalDateTime createdTime; - @ExcelColumn(value ="修改日期",colIndex = 15) + @ExcelColumn(value ="修改日期",format = "yyyy-MM-dd hh:mm:ss",colIndex = 15) private LocalDateTime modifTime; - @ExcelColumn(value ="有效起始日",colIndex = 16) + @ExcelColumn(value ="有效起始日",format = "yyyy-MM-dd hh:mm:ss",colIndex = 16) private String startTime; public LocalDateTime getStartTime(){ return createdTime; } - @ExcelColumn(value ="版本过期时间",colIndex = 17) + @ExcelColumn(value ="版本过期时间",format = "yyyy-MM-dd hh:mm:ss",colIndex = 17) private LocalDateTime expireEndTime; @ExcelColumn(value ="物料状态",colIndex = 18) @@ -97,7 +101,7 @@ public class EbomExcelEditVO { private Integer materialState; public String getMaterialStateStr() { - return EnumUtils.getValueEnum(MateiralStateEnum.class, this.status).getDescription(); + return EnumUtils.getValueEnum(MateiralStateEnum.class, this.materialState).getDescription(); } diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java index 4fffca04..f71e77d9 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java @@ -47,6 +47,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; @@ -837,7 +838,7 @@ public class BomNewEbomParentService extends ServiceImpl result=param.getList(); if(CollUtil.isEmpty(param.getList())){ result=getChild(param.getBomRowId());