fix(ebom): 增加为空判断
This commit is contained in:
parent
9ae5eaaed6
commit
1d50b4686d
|
|
@ -30,4 +30,8 @@ public class BomExceptionQuery implements Serializable {
|
||||||
@ApiModelProperty(value = "rowId", required = true)
|
@ApiModelProperty(value = "rowId", required = true)
|
||||||
@NotNull
|
@NotNull
|
||||||
protected Long rowId;
|
protected Long rowId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "materialNo", required = true)
|
||||||
|
@NotNull
|
||||||
|
protected String materialNo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2391,13 +2391,17 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
BomExceptionQuery bom = query.get(index);
|
BomExceptionQuery bom = query.get(index);
|
||||||
BomExceptionVO vo = new BomExceptionVO();
|
BomExceptionVO vo = new BomExceptionVO();
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
|
BomNewEbomParentEntity parent = getById(bom.getBomRowId());
|
||||||
|
VUtils.isTure(Objects.isNull(parent)).throwMessage(bom.getMaterialNo() + "不存在");
|
||||||
|
|
||||||
checkAndSaveEBomException(bom.getBomRowId(), bom.getRowId());
|
checkAndSaveEBomException(bom.getBomRowId(), bom.getRowId());
|
||||||
|
|
||||||
BomNewEbomParentEntity parent = getById(bom.getBomRowId());
|
|
||||||
vo.setMaterialNo(parent.getMaterialNo());
|
vo.setMaterialNo(parent.getMaterialNo());
|
||||||
vo.setExceptionStatus(parent.getExceptionStatus());
|
vo.setExceptionStatus(parent.getExceptionStatus());
|
||||||
} else {
|
} else {
|
||||||
BomNewEbomChildEntity child = ebomChildService.getById(bom.getRowId());
|
BomNewEbomChildEntity child = ebomChildService.getById(bom.getRowId());
|
||||||
|
VUtils.isTure(Objects.isNull(child)).throwMessage(bom.getMaterialNo() + "不存在");
|
||||||
|
|
||||||
vo.setMaterialNo(child.getMaterialNo());
|
vo.setMaterialNo(child.getMaterialNo());
|
||||||
if (Objects.equals(child.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue())) {
|
if (Objects.equals(child.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue())) {
|
||||||
BomNewEbomParentEntity parent = getById(bom.getBomRowId());
|
BomNewEbomParentEntity parent = getById(bom.getBomRowId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue