bom-查询-物料编码优先

This commit is contained in:
大米 2024-11-11 17:49:47 +08:00
parent 81846b2cca
commit 8c67f4feea
1 changed files with 3 additions and 2 deletions

View File

@ -73,8 +73,9 @@ public class EBomForwardReport extends BaseForwardReport {
public void buildQueryParam(QueryWrapper<? extends BomNewEbomParentEntity> queryWrapper) {
queryWrapper.eq(FieldGetterUtil.getFieldInfo(BomNewEbomParentEntity::getMaterialNo), query.getMaterialNo());
if (StrUtil.isNotBlank(query.getDrawingNo())) {
queryWrapper.eq(StrUtil.isNotBlank(query.getMaterialNo()) , FieldGetterUtil.getFieldInfo(BomNewEbomParentEntity::getMaterialNo), query.getMaterialNo());
//物料编码优先查询有物料编码以物料编码为准
if (StrUtil.isBlank(query.getMaterialNo()) && StrUtil.isNotBlank(query.getDrawingNo())) {
queryWrapper.eq(FieldGetterUtil.getFieldInfo(BomNewEbomParentEntity::getDrawingNo), query.getDrawingNo());
}
if (query.getVersionStrategy().compareTo(ReportConstant.VersionStrategyEnum.DEFINE.getValue()) == 0) {