ebom编辑部分导出异常
This commit is contained in:
parent
e7154dc542
commit
178ed71853
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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<BomNewEbomParentMapper,
|
|||
}
|
||||
|
||||
|
||||
public void editExportBom(EbomEditExportDTO param, HttpServletResponse response) throws IOException {
|
||||
public void editExportBom(EbomEditExportDTO param, OutputStream response) throws IOException {
|
||||
List<BomNewEbomParentVO> result=param.getList();
|
||||
if(CollUtil.isEmpty(param.getList())){
|
||||
result=getChild(param.getBomRowId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue