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 d34c2564..a8f393e4 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 @@ -271,7 +271,7 @@ public class BomNewEbomParentService extends ServiceImpl parentChild = this.getBaseMapper().getParentChild(rowId); //排除项目类别的赋值 - materialMainService.intiMaterialInfo(parentChild, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); + materialMainService.intiMaterialInfoInPattern(parentChild,"^21 | ^31", EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); if (CollUtil.isNotEmpty(parentChild)) { List materialNos = parentChild.stream().map(u -> u.getMaterialNo()).collect(Collectors.toList()); if (CollUtil.isNotEmpty(materialNos)) { diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/MaterialMainService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/MaterialMainService.java index f98faba5..6b0b0412 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/MaterialMainService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/MaterialMainService.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.function.BiConsumer; import java.util.function.Function; +import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -92,6 +93,19 @@ public class MaterialMainService extends ServiceImpl void intiMaterialInfoInPattern(List data , String ignoreMaterialNoPattern , String ... ignorePropertyList) { + List materialNos = data.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList()); + if (CollUtil.isNotEmpty(materialNos)) { + List materialBaseInfos = SpringUtil.getBean(MaterialMainService.class).getMaterialBaseInfo(materialNos); + Map materialMp = ListCommonUtil.listToMap(materialBaseInfos, BaseMaterialVO::getMaterialNo); + for (T t : data) { + if ( !Pattern.matches(ignoreMaterialNoPattern, t.getMaterialNo()) && StrUtil.isNotBlank(t.getMaterialNo()) && materialMp.containsKey(t.getMaterialNo())) { + BeanUtil.copyProperties(materialMp.get(t.getMaterialNo()), t, ignorePropertyList); + } + } + } + } + public void initShouldBomExist(List list, Function getMaterialCategoryCodeFun, BiConsumer setShouldBomExistFun, Function getMaterialGetTypeFun) { diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java index 675e6d5d..ce37b78d 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java @@ -98,6 +98,7 @@ public class ConvertToMBom { mBomParent.setCreatedBy(SessionUtil.getUserCode()); mBomParent.setCreatedTime(LocalDateTime.now()); mBomParent.setModifyTime(LocalDateTime.now()); + mBomParent.setSourceRowId(parent.getRowId()); this.mBomParentResult.add(mBomParent); buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChildTreeList_1010 : allChildTreeList_1020, mBomParent.getRowId()); diff --git a/nflg_project_dev/nflg-bom-new/src/main/resources/bootstrap.properties b/nflg_project_dev/nflg-bom-new/src/main/resources/bootstrap.properties index 00bb014f..82bcabbb 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/resources/bootstrap.properties +++ b/nflg_project_dev/nflg-bom-new/src/main/resources/bootstrap.properties @@ -26,5 +26,8 @@ spring.cloud.nacos.discovery.metadata.group=${spring.profiles.active} spring.cloud.nacos.discovery.metadata.region=${env_region:blue} spring.cloud.nacos.discovery.metadata.env=${spring.profiles.active} +spring.cloud.gateway.httpclient.connect-timeout=120000 +spring.cloud.gateway.httpclient.response-timeout=120000 + logging.level.com.nflg.product.bomnew.mapper.master=DEBUG diff --git a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml index b68350f3..34177bdd 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml +++ b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml @@ -83,10 +83,12 @@ select * ,row_id as bomRowId from t_bom_new_ebom_parent where created_by=#{createdBy} and user_root_is=1 and (status=1 or status=3) + order by created_time desc select * ,row_id as bomRowId from t_bom_new_ebom_parent where user_root_is=1 and ( status=2 or status=4 ) + order by created_time desc