bug修复
This commit is contained in:
parent
42c8f7a1fa
commit
a434819d73
|
|
@ -271,7 +271,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
BomNewEbomParentEntity parent = this.getBaseMapper().selectById(rowId);
|
||||
List<BomNewEbomParentVO> 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<String> materialNos = parentChild.stream().map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
|
|
|
|||
|
|
@ -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<MaterialMainMapper, Materia
|
|||
}
|
||||
}
|
||||
|
||||
public <T extends BaseMaterialVO> void intiMaterialInfoInPattern(List<T> data , String ignoreMaterialNoPattern , String ... ignorePropertyList) {
|
||||
List<String> materialNos = data.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
List<BaseMaterialVO> materialBaseInfos = SpringUtil.getBean(MaterialMainService.class).getMaterialBaseInfo(materialNos);
|
||||
Map<String, BaseMaterialVO> 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 <T> void initShouldBomExist(List<T> list, Function<T, String> getMaterialCategoryCodeFun, BiConsumer<T, Integer> setShouldBomExistFun, Function<T,Integer> getMaterialGetTypeFun) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
<include refid="whr"/>
|
||||
order by created_time desc
|
||||
</if>
|
||||
<if test="job==1">
|
||||
select * ,row_id as bomRowId from t_bom_new_ebom_parent where user_root_is=1 and ( status=2 or status=4 )
|
||||
<include refid="whr"/>
|
||||
order by created_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue