|
@@ -42,7 +42,7 @@ public class PriceListServiceImpl extends ServiceImpl<IPriceListMapper, PriceLis
|
|
@Override
|
|
@Override
|
|
public BigDecimal getRobAmountByRepairId(String repairId) {
|
|
public BigDecimal getRobAmountByRepairId(String repairId) {
|
|
BigDecimal amount = BigDecimal.ZERO;
|
|
BigDecimal amount = BigDecimal.ZERO;
|
|
- List<PriceList> byRepairId = this.getByRepairIdAndStatusAndType(repairId,1);
|
|
|
|
|
|
+ List<PriceList> byRepairId = this.getCheckAmountByRepairId(repairId);
|
|
for (PriceList priceList : byRepairId) {
|
|
for (PriceList priceList : byRepairId) {
|
|
amount = amount.add(priceList.getPrice().multiply(new BigDecimal(priceList.getCount())));
|
|
amount = amount.add(priceList.getPrice().multiply(new BigDecimal(priceList.getCount())));
|
|
}
|
|
}
|
|
@@ -66,10 +66,10 @@ public class PriceListServiceImpl extends ServiceImpl<IPriceListMapper, PriceLis
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<PriceList> getByRepairIdAndStatusAndType(String repairId, Integer type) {
|
|
|
|
|
|
+ public List<PriceList> getCheckAmountByRepairId(String repairId) {
|
|
LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
|
|
wrapper.eq(PriceList::getRepairId,repairId);
|
|
wrapper.eq(PriceList::getRepairId,repairId);
|
|
- wrapper.eq(PriceList::getType,1);
|
|
|
|
|
|
+ wrapper.eq(PriceList::getLaborId,1);
|
|
return list(wrapper);
|
|
return list(wrapper);
|
|
}
|
|
}
|
|
|
|
|