|
@@ -64,7 +64,6 @@ public class RepairInfoService {
|
|
|
|
|
|
Customer customer = customerService.getByRepairId(repairId);
|
|
Customer customer = customerService.getByRepairId(repairId);
|
|
CustomerAddress customerAddress = customerAddressService.getByRepairId(repairId);
|
|
CustomerAddress customerAddress = customerAddressService.getByRepairId(repairId);
|
|
- List<PriceList> priceLists = priceListService.getByRepairId(repairId);
|
|
|
|
|
|
|
|
RepairPay repairPay = repairPayService.getByRepairId(repairId,1);
|
|
RepairPay repairPay = repairPayService.getByRepairId(repairId,1);
|
|
OrderReceivingVo receiving = orderReceivingService.getVoByRepairId(repairId);
|
|
OrderReceivingVo receiving = orderReceivingService.getVoByRepairId(repairId);
|
|
@@ -81,19 +80,26 @@ public class RepairInfoService {
|
|
detailVo.setRepairInvoice(repairInvoice);
|
|
detailVo.setRepairInvoice(repairInvoice);
|
|
detailVo.setApplyInvoice(1);
|
|
detailVo.setApplyInvoice(1);
|
|
}
|
|
}
|
|
- BigDecimal payAmount = BigDecimal.ZERO;
|
|
|
|
- if(repair.getStatus().equals(RepairStatusEnum.TO_BE_CANCELED.status())){
|
|
|
|
- payAmount = priceListService.getRobAmountByRepairId(repair.getRepairId());
|
|
|
|
|
|
+
|
|
|
|
+ List<PriceList> priceLists = new ArrayList<>();
|
|
|
|
+ if(repair.getCancelStatus() == 1){
|
|
|
|
+ priceLists = priceListService.getCheckAmountByRepairId(repairId);
|
|
}
|
|
}
|
|
- if(repair.getStatus().equals(RepairStatusEnum.TO_BE_PAID.status())){
|
|
|
|
- payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
|
|
|
|
|
|
+ if(repair.getCancelStatus() == 0){
|
|
|
|
+ priceLists = priceListService.getByRepairId(repairId);
|
|
}
|
|
}
|
|
- detailVo.setPayAmount(payAmount);
|
|
|
|
|
|
+ BigDecimal payAmount = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
+ for (PriceList priceList : priceLists) {
|
|
|
|
+ BigDecimal price = priceList.getDiscount() == 1 ? priceList.getPriceDiscount() : priceList.getPrice();
|
|
|
|
+ payAmount = payAmount.add(price);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ detailVo.setPayAmount(payAmount);
|
|
|
|
+ detailVo.setPriceList(priceLists);
|
|
detailVo.setCustomer(customer);
|
|
detailVo.setCustomer(customer);
|
|
detailVo.setCustomerAddress(customerAddress);
|
|
detailVo.setCustomerAddress(customerAddress);
|
|
detailVo.setRepairerVo(repair);
|
|
detailVo.setRepairerVo(repair);
|
|
- detailVo.setPriceList(priceLists);
|
|
|
|
detailVo.setRepairPay(repairPay);
|
|
detailVo.setRepairPay(repairPay);
|
|
detailVo.setOrderReceivingVo(receiving);
|
|
detailVo.setOrderReceivingVo(receiving);
|
|
detailVo.setRepairRegisterVo(repairRegisterVo);
|
|
detailVo.setRepairRegisterVo(repairRegisterVo);
|