Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
d4b75545cd
|
|
@ -1005,7 +1005,18 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(children)) {
|
if (CollUtil.isNotEmpty(children)) {
|
||||||
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
||||||
children.forEach(c -> {
|
for (BomNewEbomChildEntity c : children) {
|
||||||
|
BomNewEbomParentEntity cp = lambdaQuery()
|
||||||
|
.eq(BomNewEbomParentEntity::getMaterialNo, c.getMaterialNo())
|
||||||
|
.eq(BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
||||||
|
.orderByDesc(BomNewEbomParentEntity::getRowId)
|
||||||
|
.last(" limit 1")
|
||||||
|
.one();
|
||||||
|
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||||
|
if (Objects.nonNull(cp) && !ebomChildService.lambdaQuery().eq(BomNewEbomChildEntity::getParentRowId, cp.getRowId()).exists()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
T1DTO t1 = new T1DTO();
|
T1DTO t1 = new T1DTO();
|
||||||
t1.setID(RandomUtil.randomNumbers(5));
|
t1.setID(RandomUtil.randomNumbers(5));
|
||||||
t1.setMATNR(parent.getMaterialNo());
|
t1.setMATNR(parent.getMaterialNo());
|
||||||
|
|
@ -1019,14 +1030,11 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
t1.setDATUM(dateYMD);
|
t1.setDATUM(dateYMD);
|
||||||
t1s.add(t1);
|
t1s.add(t1);
|
||||||
BomNewEbomParentEntity cp = lambdaQuery()
|
|
||||||
.eq(BomNewEbomParentEntity::getMaterialNo, c.getMaterialNo())
|
|
||||||
.eq(BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
|
||||||
.one();
|
|
||||||
if (!Objects.isNull(cp)) {
|
if (!Objects.isNull(cp)) {
|
||||||
buildChildrenForSap(cp, t1s);
|
buildChildrenForSap(cp, t1s);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1153,7 +1153,19 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(children)) {
|
if (CollUtil.isNotEmpty(children)) {
|
||||||
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
||||||
children.forEach(c -> {
|
for (BomNewPbomChildEntity c : children) {
|
||||||
|
BomNewPbomParentEntity cp = lambdaQuery()
|
||||||
|
.eq(BomNewPbomParentEntity::getMaterialNo, c.getMaterialNo())
|
||||||
|
.eq(BomNewPbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
||||||
|
.orderByDesc(BomNewPbomParentEntity::getRowId)
|
||||||
|
.last(" limit 1")
|
||||||
|
.one();
|
||||||
|
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||||
|
if (Objects.nonNull(cp) && !pbomChildService.lambdaQuery().eq(BomNewPbomChildEntity::getParentRowId, cp.getRowId()).exists()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
T1DTO t1 = new T1DTO();
|
T1DTO t1 = new T1DTO();
|
||||||
t1.setID(RandomUtil.randomNumbers(5));
|
t1.setID(RandomUtil.randomNumbers(5));
|
||||||
t1.setMATNR(parent.getMaterialNo());
|
t1.setMATNR(parent.getMaterialNo());
|
||||||
|
|
@ -1167,14 +1179,11 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
}
|
}
|
||||||
t1.setDATUM(dateYMD);
|
t1.setDATUM(dateYMD);
|
||||||
t1s.add(t1);
|
t1s.add(t1);
|
||||||
BomNewPbomParentEntity cp = lambdaQuery()
|
|
||||||
.eq(BomNewPbomParentEntity::getMaterialNo, c.getMaterialNo())
|
|
||||||
.eq(BomNewPbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
|
||||||
.one();
|
|
||||||
if (!Objects.isNull(cp)) {
|
if (!Objects.isNull(cp)) {
|
||||||
buildChildrenForSap(cp, t1s);
|
buildChildrenForSap(cp, t1s);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue