Browse Source

已取消,只支付检测费用

lyhzzz 2 years ago
parent
commit
67128db86e

+ 1 - 1
src/main/java/com/fdkankan/sale/service/IPriceListService.java

@@ -26,7 +26,7 @@ public interface IPriceListService extends IService<PriceList> {
 
     BigDecimal getRobAmountByRepairId(String repairId);
 
-    List<PriceList> getByRepairIdAndStatusAndType(String repairId, Integer type);
+    List<PriceList> getCheckAmountByRepairId(String repairId);
 
     void delNoCm(String repairId);
 

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

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

+ 1 - 1
src/main/java/com/fdkankan/sale/util/StatusUtil.java

@@ -24,7 +24,7 @@ public class StatusUtil {
         }
         switch (statusParam){
             case 0 : return Collections.singletonList(0);
-            case 1 : return Arrays.asList(1,2,3,5,7,8,9,10);
+            case 1 : return Arrays.asList(1,2,3,4,5,7,8,9,10);
             case 2 : return Arrays.asList(11,12,13);
             default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }