fix: 修复导入SAP时添加直发包parent的一个bug
This commit is contained in:
parent
5eea13aaa4
commit
be8d4fab44
|
|
@ -160,6 +160,10 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
||||||
}
|
}
|
||||||
|
|
||||||
private BomNewPbomParentEntity addZFBParent(BomNewPbomChildEntity child) {
|
private BomNewPbomParentEntity addZFBParent(BomNewPbomChildEntity child) {
|
||||||
|
BomNewPbomParentEntity tp = bomNewPbomParentService.lambdaQuery()
|
||||||
|
.eq(BomNewPbomParentEntity::getMaterialNo, child.getMaterialNo())
|
||||||
|
.eq(BomNewPbomParentEntity::getFacCode, child.getFacCode())
|
||||||
|
.one();
|
||||||
BomNewPbomParentEntity parent = new BomNewPbomParentEntity();
|
BomNewPbomParentEntity parent = new BomNewPbomParentEntity();
|
||||||
parent.setRowId(IdWorker.getId());
|
parent.setRowId(IdWorker.getId());
|
||||||
parent.setCreatedTime(LocalDateTime.now());
|
parent.setCreatedTime(LocalDateTime.now());
|
||||||
|
|
@ -170,7 +174,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
||||||
parent.setBatchNo("");
|
parent.setBatchNo("");
|
||||||
parent.setCreatedBy(SessionUtil.getUserCode());
|
parent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
parent.setCreatedJob(UserJobEnum.ENGINEER.getValue());
|
parent.setCreatedJob(UserJobEnum.ENGINEER.getValue());
|
||||||
parent.setCurrentVersion(VersionUtil.getNextVersion(""));
|
parent.setCurrentVersion(Objects.isNull(tp) ? VersionUtil.getNextVersion("") : VersionUtil.getNextVersion(tp.getCurrentVersion()));
|
||||||
parent.setDeptRowId(SessionUtil.getDepartRowId());
|
parent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||||
parent.setDeptName(SessionUtil.getDepartName());
|
parent.setDeptName(SessionUtil.getDepartName());
|
||||||
parent.setDeviseName(SessionUtil.getRealName());
|
parent.setDeviseName(SessionUtil.getRealName());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue