问题修复
This commit is contained in:
parent
d94a6653d8
commit
b98cfb6157
|
|
@ -61,4 +61,6 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
||||||
void updateRootState();
|
void updateRootState();
|
||||||
|
|
||||||
void delBatch(@Param("rowIds") List<Long> rowIds);
|
void delBatch(@Param("rowIds") List<Long> rowIds);
|
||||||
|
|
||||||
|
void updateStateBatchByRowIds(@Param("status") Integer status, @Param("list") List<Long> list );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
||||||
pBomParentService.saveOrUpdateBatch(eBomToPBom.getPBomParentResult());
|
pBomParentService.saveOrUpdateBatch(eBomToPBom.getPBomParentResult());
|
||||||
|
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getPBomChildResult())) {
|
if (CollUtil.isNotEmpty(eBomToPBom.getPBomChildResult())) {
|
||||||
pBomChildService.saveOrUpdateBatch(eBomToPBom.getPBomChildResult());
|
pBomChildService.saveOrUpdateBatch(eBomToPBom.getPBomChildResult());
|
||||||
|
|
@ -473,6 +474,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
if(CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeResult())){
|
if(CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeResult())){
|
||||||
upgradeChangeService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeResult());
|
upgradeChangeService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeResult());
|
||||||
};
|
};
|
||||||
|
if(CollUtil.isNotEmpty(eBomToPBom.getHasConvertEBomRowIds())){
|
||||||
|
this.getBaseMapper().updateStateBatchByRowIds(EBomStatusEnum.PUBLISHED.getValue(),eBomToPBom.getHasConvertEBomRowIds());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ public class EBomToPBom {
|
||||||
@Getter
|
@Getter
|
||||||
private List<BomNewEbomUpgradeChangeEntity> upgradeChangeResult = new ArrayList<>();
|
private List<BomNewEbomUpgradeChangeEntity> upgradeChangeResult = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private List<Long> hasConvertEBomRowIds=new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
private Map<String, String> generateDrawingNoMap = new HashMap<>();
|
private Map<String, String> generateDrawingNoMap = new HashMap<>();
|
||||||
|
|
||||||
|
|
@ -124,6 +127,7 @@ public class EBomToPBom {
|
||||||
.eq(BomNewPbomParentEntity::getMaterialNo, parentVo.getMaterialNo())
|
.eq(BomNewPbomParentEntity::getMaterialNo, parentVo.getMaterialNo())
|
||||||
.eq(BomNewPbomParentEntity::getFacCode, facCode).one();
|
.eq(BomNewPbomParentEntity::getFacCode, facCode).one();
|
||||||
|
|
||||||
|
this.hasConvertEBomRowIds.add(parentVo.getRowId());
|
||||||
if (Objects.nonNull(oldParent) && !EBomStatusEnum.PUBLISHED.equalsValue(oldParent.getStatus())) {
|
if (Objects.nonNull(oldParent) && !EBomStatusEnum.PUBLISHED.equalsValue(oldParent.getStatus())) {
|
||||||
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()));
|
||||||
oldParent.setCurrentVersion(parentVo.getCurrentVersion());
|
oldParent.setCurrentVersion(parentVo.getCurrentVersion());
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,13 @@
|
||||||
</foreach>;
|
</foreach>;
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateStateBatchByRowIds">
|
||||||
|
update t_bom_new_ebom_parent set status=#{status} where row_id in
|
||||||
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue