fubin 1 год назад
Родитель
Сommit
16b23a1858
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      src/main/java/com/dk/mdm/service/mac/ReceiptService.java

+ 5 - 0
src/main/java/com/dk/mdm/service/mac/ReceiptService.java

@@ -303,6 +303,11 @@ public class ReceiptService extends BaseService<RecPay> {
             rollbackFor = {Exception.class}
     )
     public ResponseResultVO<?> update(RecPayVO recPayVO) {
+        RecPay recPayForUpdate = recPayMapper.selectByIdForUpdate(recPayVO.getRpId());
+        if(recPayForUpdate.getBiznisId() != null){
+            throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVOICE_FORBID_EDIT.getMessage());
+        }
+
         // 将之前的明细全部删除
         List<RecPayItem> recPayItemOriginalList = recPayItemMapper.selectByZIdForUpdate(recPayVO.getRpId());
         // 需要重新计算的资金账户