|
@@ -142,6 +142,11 @@ public class OaReceiveServiceImpl implements OaReceiveService {
|
|
|
// 保存子表信息
|
|
|
List<OaReceiveObjDO> oaReceiveObjs = stagingReqVO.getOaReceiveObjs();
|
|
|
if (CollectionUtil.isNotEmpty(oaReceiveObjs)) {
|
|
|
+ for (OaReceiveObjDO oaReceiveObj : oaReceiveObjs) {
|
|
|
+ if (oaReceiveObj.getAmount() != null && oaReceiveObj.getAmount() <= 0) {
|
|
|
+ throw exception(ErrorCodeConstants.OA_RECEIVE_OBJ_AMOUNT_ZERO);
|
|
|
+ }
|
|
|
+ }
|
|
|
updateOaReceiveObjList(oaReceive.getId(), oaReceiveObjs);
|
|
|
}
|
|
|
|
|
@@ -190,7 +195,7 @@ public class OaReceiveServiceImpl implements OaReceiveService {
|
|
|
if (StrUtil.isBlank(oaReceiveObj.getName())) {
|
|
|
throw exception(ErrorCodeConstants.OA_RECEIVE_OBJ_NAME_BLANK);
|
|
|
}
|
|
|
- if (oaReceiveObj.getAmount() == null || oaReceiveObj.getAmount() == 0) {
|
|
|
+ if (oaReceiveObj.getAmount() == null || oaReceiveObj.getAmount() <= 0) {
|
|
|
throw exception(ErrorCodeConstants.OA_RECEIVE_OBJ_AMOUNT_ZERO);
|
|
|
}
|
|
|
}
|