Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom

This commit is contained in:
大米 2024-01-01 17:37:56 +08:00
commit 806b4393d9
2 changed files with 16 additions and 8 deletions

View File

@ -195,7 +195,7 @@ public class EbomApi extends BaseApi {
@PostMapping("createBomImport")
@ApiOperation("创建EBOM-导入")
public ResultVO<Boolean> createBomImport(
@RequestParam(value = "type") Integer type, @RequestParam(value = "rowId") Long rowId, @RequestParam(value = "file") MultipartFile file
@RequestParam(value = "opType") Integer opType, @RequestParam(value = "rowId") Long rowId, @RequestParam(value = "file") MultipartFile file
) throws IOException, ExecutionException, InterruptedException {
@ -203,7 +203,7 @@ public class EbomApi extends BaseApi {
return ResultVO.error(STATE.Error, "请先保存编辑BOM列表再导入数据");
}
if (Objects.isNull(type)) {
if (Objects.isNull(opType)) {
return ResultVO.error(STATE.Error, "请选择清除原数据或追加行");
}
@ -211,7 +211,7 @@ public class EbomApi extends BaseApi {
return ResultVO.error("请上传Excel文件");
}
BomNewEbomImportDTO dto=new BomNewEbomImportDTO();
dto.setOpType(type);
dto.setOpType(opType);
dto.setRowId(rowId);
if( !(dto.isDel() || dto.isAppend() )){
return ResultVO.error("清除原数据或追加行数据错误");

View File

@ -2,6 +2,7 @@ package com.nflg.product.bomnew.pojo.vo;
import com.nflg.product.bomnew.constant.EBomExceptionStatusEnum;
import com.nflg.product.bomnew.constant.EBomStatusEnum;
import com.nflg.product.bomnew.constant.MateiralStateEnum;
import com.nflg.product.bomnew.util.EnumUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -87,18 +88,25 @@ public class EbomExcelEditVO {
public LocalDateTime getStartTime(){
return createdTime;
}
@ExcelColumn(value ="版本过期时间",colIndex = 16)
@ExcelColumn(value ="版本过期时间",colIndex = 17)
private LocalDateTime expireEndTime;
@ExcelColumn(value ="物料状态",colIndex = 17)
private String materialStatus;
@ExcelColumn(value ="物料状态",colIndex = 18)
private String materialStateStr;
private Integer materialState;
public String getMaterialStateStr() {
return EnumUtils.getValueEnum(MateiralStateEnum.class, this.status).getDescription();
}
@ApiModelProperty(value = "1=待复核、2=已复核、3=已退回、4=定版已发布PBOM")
private Integer status;
@ExcelColumn(value ="BOM状态",colIndex = 18)
@ExcelColumn(value ="BOM状态",colIndex = 19)
private String statusName;
public String getStatusName() {