|
@@ -65,8 +65,13 @@ public class RepairSaleService {
|
|
param.setStatusList(repairStatus);
|
|
param.setStatusList(repairStatus);
|
|
Page<RepairerVo> voPage = repairService.saleOrderList(param);
|
|
Page<RepairerVo> voPage = repairService.saleOrderList(param);
|
|
sysUserService.setSaleNameAndRepairManName(voPage.getRecords());
|
|
sysUserService.setSaleNameAndRepairManName(voPage.getRecords());
|
|
|
|
+ BigDecimal payAmount;
|
|
for (RepairerVo record : voPage.getRecords()) {
|
|
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);
|
|
record.setPayAmount(payAmount);
|
|
}
|
|
}
|
|
return PageInfo.PageInfo(voPage);
|
|
return PageInfo.PageInfo(voPage);
|
|
@@ -223,10 +228,15 @@ public class RepairSaleService {
|
|
if(repair == null){
|
|
if(repair == null){
|
|
throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
|
|
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);
|
|
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 repairPay = new RepairPay();
|
|
repairPay.setRepairId(repair.getRepairId());
|
|
repairPay.setRepairId(repair.getRepairId());
|
|
repairPay.setPayType(param.getPayType());
|
|
repairPay.setPayType(param.getPayType());
|