Merge branch 'feature/DM/nflg-bom-transition' of http://192.168.0.40:3000/root/nflg_project into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-08-23 11:14:58 +08:00
commit 8c2c0b9f69
7 changed files with 14 additions and 7 deletions

View File

@ -23,6 +23,8 @@ public class EBomConstant {
"materialName","materialDesc","drawingNo"
};
public static final String[] EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT3 = {"material", "materialTexture", "projectType", "materialUnit","materialWeight"};
//集团总部代码
public static final String MAIN_FACTORY_CODE_1010="1010";

View File

@ -454,6 +454,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
//动态判断异常
//CheckEBomExceptoinDynamic.check(parentChild);
BomNewSortUtil.orderNumEbomSort(parentChild,0);
//使用主数据初始化物料描述
//主数据初始化
materialMainService.intiMaterialInfo(parentChild, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT3);
return parentChild;
}

View File

@ -377,6 +377,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
} else { //无BOM-版本时 确定版本号
//child.setSource(Objects.nonNull(parent) ? parent.getSource() : EBomSourceEnum.FROM_BOM.getValue());
child.setBomRowId(0L);
child.setDeviseUserCode(parent.getDeviseUserCode());
child.setDeviseName(parent.getDeviseName());
child.setDeptName(parent.getDeptName());
@ -405,6 +406,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
BomNewSortUtil.orderNumPbomSort(parentChild,0);
//主数据初始化
materialMainService.intiMaterialInfo(parentChild, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT3);
return parentChild;
}

View File

@ -138,7 +138,7 @@ public class CheckEBomException {
&& !Objects.equals(vo.getUserRootIs(), 1) && !Objects.equals(vo.getRootIsForWaitReview(), 1)) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
} else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit()))
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC"))
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC") && !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "SET") )
&& (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12"))
&& Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());

View File

@ -181,7 +181,7 @@ public abstract class EBomToPbomBase {
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
oldParent.setSourceRowId(parentVo.getRowId());
oldParent.setSourceRowId(parentVo.getBomRowId());
oldParent.setCreatedTime(LocalDateTime.now());
oldParent.setCreatedBy(SessionUtil.getUserCode());
oldParent.setDeptName(SessionUtil.getDepartName());

View File

@ -98,7 +98,6 @@ public class PBomUpgrade {
pbomParent.setTechnologyUserCode(SessionUtil.getUserCode());
pbomParent.setRemark("");
pbomParent.setSource(PbomSourceEnum.FROM_CHANGE.getValue());
pbomParent.setSourceStatus(PbomSourceStatusEnum.PBOM.getValue());
pbomParent.setReleaseTime(null);
pbomParent.setReleaseUserName(null);
pbomParent.setSapState(1);
@ -135,7 +134,6 @@ public class PBomUpgrade {
child.setCreatedBy(SessionUtil.getUserCode());
child.setModifyTime(null);
child.setSource(PbomSourceEnum.FROM_CHANGE.getValue());
child.setSourceStatus(PbomSourceStatusEnum.PBOM.getValue());
child.setRemark("");
this.childResult.add(child);
}

View File

@ -159,9 +159,10 @@
</select>
<select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
select *,bom_version_row_id as bom_row_id
from t_bom_new_pbom_child
where parent_row_id = #{parentRowId}
select b.*,b.bom_version_row_id as bom_row_id
from t_bom_new_pbom_parent a join t_bom_new_pbom_child b on a.row_id=b.parent_row_id and a.fac_code=b.fac_code
where a.row_id=#{parentRowId}
order by order_number
</select>