‘linchangsheng’ 5 달 전
부모
커밋
e98d53ec12
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerWarrantyLogic.java

+ 3 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerWarrantyLogic.java

@@ -240,6 +240,9 @@ public class WorkerWarrantyLogic {
                 workerWarranty.setRefundAmount(workerWarrantyListUp.get(0).getRefundAmount().add(workerWarranty.getRefundAmount()));
 
             workerWarranty.setWaitAmount(workerWarranty.getShouldAmount().subtract(workerWarranty.getPayableAmount() == null?BigDecimal.ZERO:workerWarranty.getPayableAmount()));
+
+            if (workerWarranty.getWaitAmount().doubleValue() < 0)
+                throw new RemoteServiceException("第"+rowIndex+"行"+"缴纳金额超过应缴纳金额");
             workerWarranties.add(workerWarranty);
 
         }