校验单据状态,如何不是未审核则提示

This commit is contained in:
季圣华
2023-03-07 23:15:40 +08:00
parent 81c065ea5c
commit 58619fb9c2
2 changed files with 8 additions and 0 deletions

View File

@@ -1001,6 +1001,11 @@ public class DepotHeadService {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_BILL_NUMBER_EXIST_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_BILL_NUMBER_EXIST_MSG));
}
//校验单据状态,如何不是未审核则提示
if(!"0".equals(getDepotHead(depotHead.getId()).getStatus())) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_BILL_CANNOT_EDIT_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_BILL_CANNOT_EDIT_MSG));
}
//获取之前的金额数据
BigDecimal preTotalPrice = getDepotHead(depotHead.getId()).getTotalPrice().abs();
String subType = depotHead.getSubType();