加1|自制;2|外协;3|采购
This commit is contained in:
parent
c1f21f8723
commit
38e9ed6d93
|
|
@ -274,8 +274,6 @@ public class BomNewPbomParentVO extends BaseMaterialVO implements Serializable {
|
||||||
|
|
||||||
private String levelNo;
|
private String levelNo;
|
||||||
|
|
||||||
@ApiModelProperty("物料一级分类编码")
|
|
||||||
private String relCategoryCode;
|
|
||||||
|
|
||||||
@ApiModelProperty("子级")
|
@ApiModelProperty("子级")
|
||||||
List<BomNewPbomParentVO> childNodes;
|
List<BomNewPbomParentVO> childNodes;
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
//排除项目类别的赋值
|
//排除项目类别的赋值
|
||||||
materialMainService.intiMaterialInfoInPattern(parentChild, "^21 | ^31", EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
materialMainService.intiMaterialInfoInPattern(parentChild, "^21 | ^31", EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
if (CollUtil.isNotEmpty(parentChild)) {
|
if (CollUtil.isNotEmpty(parentChild)) {
|
||||||
List<String> materialNos = parentChild.stream().map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
List<String> materialNos = parentChild.stream().filter(u->StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(materialNos)) {
|
if (CollUtil.isNotEmpty(materialNos)) {
|
||||||
List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos)
|
List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos)
|
||||||
.eq(BomNewEbomParentEntity::getLastVersionIs, 1)
|
.eq(BomNewEbomParentEntity::getLastVersionIs, 1)
|
||||||
|
|
@ -440,6 +440,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
childEntity.setRowId(u.getRowId());
|
childEntity.setRowId(u.getRowId());
|
||||||
childEntity.setProjectType(u.getProjectType());
|
childEntity.setProjectType(u.getProjectType());
|
||||||
childEntity.setProjectTypeInputType(u.getProjectTypeInputType());
|
childEntity.setProjectTypeInputType(u.getProjectTypeInputType());
|
||||||
|
if(Objects.isNull(u.getExceptionStatus())) {
|
||||||
|
childEntity.setExceptionStatus(u.getExceptionStatus());
|
||||||
|
}
|
||||||
child.add(childEntity);
|
child.add(childEntity);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -496,6 +499,14 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
saveException(checkEBomException);
|
saveException(checkEBomException);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initBomException(Long bomRowId, List<Integer> ignoreCheckException) throws ExecutionException, InterruptedException {
|
||||||
|
CheckEBomException checkEBomException = new CheckEBomException(bomRowId);
|
||||||
|
checkEBomException.initException(ignoreCheckException);
|
||||||
|
|
||||||
|
//保存异常
|
||||||
|
saveException(checkEBomException);
|
||||||
|
}
|
||||||
|
|
||||||
private void saveException(CheckEBomException checkEBomException) {
|
private void saveException(CheckEBomException checkEBomException) {
|
||||||
List<BomNewEbomParentVO> allBomDetail = checkEBomException.getAllBomDetail();
|
List<BomNewEbomParentVO> allBomDetail = checkEBomException.getAllBomDetail();
|
||||||
//父级
|
//父级
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
* @return 原始BOM列表
|
* @return 原始BOM列表
|
||||||
*/
|
*/
|
||||||
public Page<BomOriginalListVO> getOriginalBomListPage(OriginalBomQuery query) {
|
public Page<BomOriginalListVO> getOriginalBomListPage(OriginalBomQuery query) {
|
||||||
Page<BomOriginalListVO> result=null;
|
Page<BomOriginalListVO> result= new Page<>();
|
||||||
//物料编码搜索或图号搜索
|
//物料编码搜索或图号搜索
|
||||||
if (CollUtil.isNotEmpty(query.getMaterialNos()) || CollUtil.isNotEmpty(query.getDrawingNos())) {
|
if (CollUtil.isNotEmpty(query.getMaterialNos()) || CollUtil.isNotEmpty(query.getDrawingNos())) {
|
||||||
List<String> queryDrawingNos= new ArrayList<>();
|
List<String> queryDrawingNos= new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,14 @@ public class CheckEBomException {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initException(List<Integer> unCheckException) {
|
||||||
|
//初始化物料信息
|
||||||
|
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
|
this.unCheckExcept=unCheckException;
|
||||||
|
checkException();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void initException(String... ignorePropertyList) {
|
public void initException(String... ignorePropertyList) {
|
||||||
|
|
||||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import com.nflg.product.bomnew.constant.EBomExceptionStatusEnum;
|
||||||
import com.nflg.product.bomnew.constant.ProjectTypeInputTypeEnum;
|
import com.nflg.product.bomnew.constant.ProjectTypeInputTypeEnum;
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||||
|
|
@ -112,14 +113,15 @@ public class EbomInitProjectType {
|
||||||
}
|
}
|
||||||
|
|
||||||
//11
|
//11
|
||||||
if (StrUtil.isNotBlank(child.getMaterialCategoryCode()) && (child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601"));
|
// if (StrUtil.isNotBlank(child.getMaterialCategoryCode()) && (child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601"));
|
||||||
{
|
// {
|
||||||
MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo());
|
// MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo());
|
||||||
if (Objects.nonNull(materialHistoryProjectType)) {
|
// if (Objects.nonNull(materialHistoryProjectType)) {
|
||||||
child.setProjectType(materialHistoryProjectType.getProjectType());
|
// child.setProjectType(materialHistoryProjectType.getProjectType());
|
||||||
child.setProjectTypeInputType(ProjectTypeInputTypeEnum.HISTORY_STATISTICS.getValue());
|
// child.setProjectTypeInputType(ProjectTypeInputTypeEnum.HISTORY_STATISTICS.getValue());
|
||||||
}
|
// child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_14.getValue());
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,11 +115,15 @@ public class ConvertToMBom {
|
||||||
mBomParent.setModifyTime(LocalDateTime.now());
|
mBomParent.setModifyTime(LocalDateTime.now());
|
||||||
mBomParent.setSourceRowId(parent.getRowId());
|
mBomParent.setSourceRowId(parent.getRowId());
|
||||||
mBomParent.setLastVersionIs(1);
|
mBomParent.setLastVersionIs(1);
|
||||||
|
mBomParent.setStatus(MBomConstantEnum.MBomStatusEnum.UNPUB_SAP.getValue());
|
||||||
this.mBomParentResult.add(mBomParent);
|
this.mBomParentResult.add(mBomParent);
|
||||||
|
|
||||||
|
|
||||||
//1010 不做处理
|
//1010 不做处理
|
||||||
// buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChildTreeList_1010 : allChildTreeList_1020, mBomParent.getRowId());
|
// buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChildTreeList_1010 : allChildTreeList_1020, mBomParent.getRowId());
|
||||||
|
allChild_1010.forEach(u->{
|
||||||
|
u.setRelParentRowId(u.getParentRowId());
|
||||||
|
});
|
||||||
buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChild_1010 : allChildTreeList_1020, mBomParent.getRowId());
|
buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChild_1010 : allChildTreeList_1020, mBomParent.getRowId());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue