解决仙桃会到1010 的问题(油漆包没parnent数据问题)-测试完再发生产
This commit is contained in:
parent
ed23c74ccc
commit
14fa056416
|
|
@ -23,6 +23,8 @@ public interface BomNewPbomChildMapper extends BaseMapper<BomNewPbomChildEntity>
|
||||||
|
|
||||||
void delByParentRowId(@Param("parentRowId") Long parentRowId);
|
void delByParentRowId(@Param("parentRowId") Long parentRowId);
|
||||||
|
|
||||||
|
void batchDelByParentRowId(@Param("parentRowIds") List<Long> parentRowIds);
|
||||||
|
|
||||||
void setProductionFactoryCode(@Param("productionFactoryCode")String productionFactoryCode, @Param("rowIds") List<Long> rowIds);
|
void setProductionFactoryCode(@Param("productionFactoryCode")String productionFactoryCode, @Param("rowIds") List<Long> rowIds);
|
||||||
|
|
||||||
List<BomNewPbomChildEntity> getChildrenByChildRowId(Long rowId);
|
List<BomNewPbomChildEntity> getChildrenByChildRowId(Long rowId);
|
||||||
|
|
|
||||||
|
|
@ -1110,6 +1110,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
bomTree.add(parent);
|
bomTree.add(parent);
|
||||||
EBomToPbomBase eBomToPBom =parent.getMaterialNo().startsWith("31")? new EBomToPBomForFormal31(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode())):new EBomToPBomForFormal(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode()));
|
EBomToPbomBase eBomToPBom =parent.getMaterialNo().startsWith("31")? new EBomToPBomForFormal31(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode())):new EBomToPBomForFormal(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode()));
|
||||||
eBomToPBom.convert();
|
eBomToPBom.convert();
|
||||||
|
// if(CollUtil.isNotEmpty(eBomToPBom.getDelParentRowIds())){
|
||||||
|
// pBomChildService.getBaseMapper().batchDelByParentRowId(eBomToPBom.getDelParentRowIds());
|
||||||
|
// }
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
||||||
pBomParentService.saveOrUpdateBatch(eBomToPBom.getPBomParentResult());
|
pBomParentService.saveOrUpdateBatch(eBomToPBom.getPBomParentResult());
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class EBomToPBomFor31 extends EBomToPbomBase {
|
||||||
this.convertMode = convertModelEnum;
|
this.convertMode = convertModelEnum;
|
||||||
// generateDrawingNo(allBomDetail, parentRowId, "");
|
// generateDrawingNo(allBomDetail, parentRowId, "");
|
||||||
//初始化Ebom版本
|
//初始化Ebom版本
|
||||||
|
// this.delParentRowIds.clear();
|
||||||
initEBomVersion();
|
initEBomVersion();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ public class EBomToPBomForFormal31 extends EBomToPbomBase {
|
||||||
this.facCodes = inFacCodes;
|
this.facCodes = inFacCodes;
|
||||||
this.convertMode=convertModelEnum;
|
this.convertMode=convertModelEnum;
|
||||||
// generateDrawingNo(allBomDetail, parentRowId, "");
|
// generateDrawingNo(allBomDetail, parentRowId, "");
|
||||||
|
// this.delParentRowIds.clear();
|
||||||
initEBomVersionFormal();
|
initEBomVersionFormal();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,10 @@ public abstract class EBomToPbomBase {
|
||||||
@Getter
|
@Getter
|
||||||
private List<Long> addEBomNew=new ArrayList<>();
|
private List<Long> addEBomNew=new ArrayList<>();
|
||||||
|
|
||||||
|
//删除子表的父级行
|
||||||
|
// @Getter
|
||||||
|
// protected List<Long> delParentRowIds=new ArrayList<>();
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
// protected List<BomNewEbomUpdateDetailEntity> upgradeChangeDetailResult = new ArrayList<>();
|
// protected List<BomNewEbomUpdateDetailEntity> upgradeChangeDetailResult = new ArrayList<>();
|
||||||
|
|
||||||
|
|
@ -181,6 +185,7 @@ public abstract class EBomToPbomBase {
|
||||||
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
||||||
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
||||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||||
|
// this.delParentRowIds.add(oldParent.getRowId());
|
||||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||||
oldParent.setCreatedTime(LocalDateTime.now());
|
oldParent.setCreatedTime(LocalDateTime.now());
|
||||||
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
|
|
@ -861,6 +866,9 @@ public abstract class EBomToPbomBase {
|
||||||
protected List<BomNewEbomParentVO> getResultAllSubIncludeSelf(BomNewEbomParentVO parentVO) {
|
protected List<BomNewEbomParentVO> getResultAllSubIncludeSelf(BomNewEbomParentVO parentVO) {
|
||||||
List<BomNewEbomParentVO> reusltSub = new ArrayList<>();
|
List<BomNewEbomParentVO> reusltSub = new ArrayList<>();
|
||||||
reusltSub.add(parentVO);
|
reusltSub.add(parentVO);
|
||||||
|
if(parentVO.getBomRowId()<=0){
|
||||||
|
return reusltSub;
|
||||||
|
}
|
||||||
getAllSubData(ImmutableList.of(parentVO.getBomRowId()), reusltSub);
|
getAllSubData(ImmutableList.of(parentVO.getBomRowId()), reusltSub);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,14 @@
|
||||||
delete from t_bom_new_pbom_child where parent_row_id =#{parentRowId}
|
delete from t_bom_new_pbom_child where parent_row_id =#{parentRowId}
|
||||||
|
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="batchDelByParentRowId">
|
||||||
|
delete from t_bom_new_pbom_child where parent_row_id in
|
||||||
|
<foreach collection="parentRowIds" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
|
||||||
<update id="setProductionFactoryCode">
|
<update id="setProductionFactoryCode">
|
||||||
update t_bom_new_pbom_child set production_factory_code=#{productionFactoryCode}, set_production_factory_time=now() , production_factory_code_input_type=2
|
update t_bom_new_pbom_child set production_factory_code=#{productionFactoryCode}, set_production_factory_time=now() , production_factory_code_input_type=2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue