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..fdd0572d 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()); } @@ -343,10 +343,10 @@ public class EbomApi extends BaseApi { void checkDeleteRule(BomNewEBomParentEditDTO dto){ - if(CollUtil.isNotEmpty(dto.getDelDatas()) && CollUtil.isNotEmpty(dto.getDelDatas())){ + if(CollUtil.isNotEmpty(dto.getDelDatas()) && CollUtil.isNotEmpty(dto.getDatas())){ List delList=dto.getDelDatas().stream().map(BomNewEbomParentVO::getRowId).collect(Collectors.toList()); - List dataList=dto.getDelDatas().stream().filter(u-> ObjectUtil.isNotNull(u.getRowId())&& u.getRowId().longValue()>0).map(BomNewEbomParentVO::getRowId).collect(Collectors.toList()); + List dataList=dto.getDatas().stream().filter(u-> ObjectUtil.isNotNull(u.getRowId())&& u.getRowId().longValue()>0).map(BomNewEbomParentVO::getRowId).collect(Collectors.toList()); //交 删除编辑出现相同(互斥) List sameList= CollectionUtil.intersection(delList,dataList).stream().collect(Collectors.toList());; diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/entity/BomNewEbomChildEntity.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/entity/BomNewEbomChildEntity.java index c293a5b9..7ee774d1 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/entity/BomNewEbomChildEntity.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/entity/BomNewEbomChildEntity.java @@ -181,6 +181,11 @@ public class BomNewEbomChildEntity implements Serializable { @ApiModelProperty(value = "异常状态:1=正常、2=冻结/完全弃用异常、3=递归异常、4=数据不完整异常、5=超级物料异常、6=重复异常") private Integer exceptionStatus; + @TableField(value = "exception_tag") + @ApiModelProperty(value = "异常确认标记") + private String exceptionTag; + + /** * 来源1-原BOM转换 2-EXCE导入 3-MDM创建 */ @@ -214,6 +219,12 @@ public class BomNewEbomChildEntity implements Serializable { @ApiModelProperty("BOM-版本Row_id(parent表row_id 关联)") private Long bomVersionRowId; + + + + + + private static final long serialVersionUID = -14147430944632372L; } diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewEbomParentVO.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewEbomParentVO.java index 8c07d9a4..09902d71 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewEbomParentVO.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewEbomParentVO.java @@ -324,6 +324,11 @@ public class BomNewEbomParentVO extends BaseMaterialVO implements Serializable { @ApiModelProperty("生成虚拟包的跟节点物料编码") private String virtualPartRootMaterialNo; + + @ApiModelProperty(value = "异常确认标记") + private String exceptionTag; + + private List childNodes = Collections.emptyList(); private static final long serialVersionUID = 1L; 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 eccb1c0c..07076664 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()); @@ -1119,8 +1120,18 @@ public class BomNewEbomParentService extends ServiceImpl waitCheckList = bomTreeList.stream().filter(item -> EBomStatusEnum.WAIT_CHECK.getValue().equals(item.getStatus())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(waitCheckList)) { + List materialNoList = waitCheckList.stream().map(BomNewEbomParentVO::getMaterialNo).collect(Collectors.toList()); + throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("物料编号 {} 状态为待复核,无法退回设计", StrUtil.join(",", materialNoList))); + } + + + + revertList.clear(); - //忽略叶子节点 和 工艺人员 + //忽略叶子节点 和 工艺人员不退回设计 revertList.addAll(bomTreeList.stream() .filter(u -> u.getBomRowId() > 0 && !Objects.equals(UserJobEnum.ENGINEER.getValue(),u.getCreatedJob())) .map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList())); @@ -1237,6 +1248,7 @@ public class BomNewEbomParentService extends ServiceImpl + + @@ -39,7 +41,7 @@ row_id, parent_row_id, identity_no, order_number, drawing_no, material_no, material_name, material_desc, material_texture, material_unit, material_category_code, unit_weight, num, total_weight, project_type, project_type_input_type, created_by,virtual_part_is, created_time, modify_time, edit_status, exception_status, source, - source_row_id, remark,virtual_part_type,virtual_part_root_material_no,bom_version_row_id + source_row_id, remark,virtual_part_type,virtual_part_root_material_no,bom_version_row_id,exception_tag