Selaa lähdekoodia

已取消订单付款登记

lyhzzz 2 vuotta sitten
vanhempi
commit
e918a0b826

+ 13 - 3
src/main/java/com/fdkankan/sale/service/impl/RepairSaleService.java

@@ -65,8 +65,13 @@ public class RepairSaleService {
         param.setStatusList(repairStatus);
         Page<RepairerVo>  voPage = repairService.saleOrderList(param);
         sysUserService.setSaleNameAndRepairManName(voPage.getRecords());
+        BigDecimal payAmount;
         for (RepairerVo record : voPage.getRecords()) {
-            BigDecimal payAmount = priceListService.getAmountByRepairId(record.getRepairId());
+            if(record.getStatus() == 4){
+                payAmount = priceListService.getRobAmountByRepairId(param.getRepairId());
+            }else {
+                payAmount = priceListService.getAmountByRepairId(record.getRepairId());
+            }
             record.setPayAmount(payAmount);
         }
         return PageInfo.PageInfo(voPage);
@@ -223,10 +228,15 @@ public class RepairSaleService {
         if(repair == null){
             throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
         }
-        if(repair.getStatus() !=9){
+        if(repair.getStatus() != 4 && repair.getStatus() !=9){
             throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
         }
-        BigDecimal payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
+        BigDecimal payAmount;
+        if(repair.getStatus() == 4){
+            payAmount = priceListService.getRobAmountByRepairId(repair.getRepairId());
+        }else {
+            payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
+        }
         RepairPay repairPay = new RepairPay();
         repairPay.setRepairId(repair.getRepairId());
         repairPay.setPayType(param.getPayType());