fix(ebom): 优化创建根节点的设置

This commit is contained in:
曹鹏飞 2024-05-17 14:06:28 +08:00
parent 4d07895aff
commit 48ac27cdea
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,7 @@ public class EBomEdit {
parent.setExpireEndTime( LocalDateTime.parse("9999-12-31 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") ));
parent.setRootIs(0);
parent.setUserRootIs(0);
parent.setMaterialOriginalUnit(parent.getMaterialUnit());
// Integer rootIs =SpringUtil.getBean(BomNewEbomParentService.class).getBaseMapper().checkIsRoot(parent.getMaterialNo());
// Integer userRootIs = SpringUtil.getBean(BomNewEbomParentService.class).getBaseMapper().checkIsUserRoot(parent.getMaterialNo(), parent.getCreatedBy());
@ -131,6 +132,8 @@ public class EBomEdit {
parentEntity = createParentBomInfo(createDTO.getParent());
parentEntity.setEditStatus(createDTO.getOpType());
parentEntity.setRootIs(parentEntity.getMaterialNo().startsWith("31") ? 1 : 0);
parentEntity.setUserRootIs(1);
createDTO.getDatas().forEach(k -> {
k.setParentRowId(parentEntity.getRowId());