1、Ebom 正式工作表只查最新

This commit is contained in:
大米 2024-04-12 18:45:15 +08:00
parent 9a366156e5
commit a0947bb48c
2 changed files with 4 additions and 1 deletions

View File

@ -294,6 +294,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
public Page<BomNewEbomParentVO> formalWorksheet(BomNewEbomParentQuery query) { public Page<BomNewEbomParentVO> formalWorksheet(BomNewEbomParentQuery query) {
Page<BomNewEbomParentVO> result = this.getBaseMapper().formalWorksheet(new Page<>(query.getPage(), query.getPageSize()), query); Page<BomNewEbomParentVO> result = this.getBaseMapper().formalWorksheet(new Page<>(query.getPage(), query.getPageSize()), query);
if (CollUtil.isNotEmpty(result.getRecords())) { if (CollUtil.isNotEmpty(result.getRecords())) {
materialMainService.intiMaterialInfo(result.getRecords()); materialMainService.intiMaterialInfo(result.getRecords());
} }
@ -771,6 +772,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
BomNewEbomParentEntity root = this.getById(paramDto.getBomRowId()); BomNewEbomParentEntity root = this.getById(paramDto.getBomRowId());
VUtils.isTure(Objects.isNull(root)).throwMessage("Bom不存在"); VUtils.isTure(Objects.isNull(root)).throwMessage("Bom不存在");
//
// VUtils.isTure(root.getVirtrualPackageEnum()>0).throwMessage("已生成过虚拟包不能2次生成");
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue())) VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()))
.throwMessage("异常状态下不允许生成虚拟包"); .throwMessage("异常状态下不允许生成虚拟包");
LogRecordContext.putVariable("gvbom", root); LogRecordContext.putVariable("gvbom", root);

View File

@ -136,7 +136,7 @@
<!--BOM-正式工作表--> <!--BOM-正式工作表-->
<select id="formalWorksheet" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO"> <select id="formalWorksheet" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
select * , row_id as bomRowId from t_bom_new_ebom_parent where status=4 select * , row_id as bomRowId from t_bom_new_ebom_parent where status=4 and last_version_is=1
<include refid="whr"/> <include refid="whr"/>
</select> </select>