lyhzzz %!s(int64=2) %!d(string=hai) anos
pai
achega
073a45316e

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

@@ -82,7 +82,13 @@ public class PriceListServiceImpl extends ServiceImpl<IPriceListMapper, PriceLis
     public void delNoCm(String repairId) {
         LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(PriceList::getRepairId,repairId);
+        wrapper.eq(PriceList::getStatus,0);
         this.remove(wrapper);
+
+        LambdaQueryWrapper<PriceList> wrapper2 = new LambdaQueryWrapper<>();
+        wrapper2.eq(PriceList::getRepairId,repairId);
+        wrapper2.eq(PriceList::getType,1);
+        this.remove(wrapper2);
     }
 
 }

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

@@ -200,10 +200,10 @@ public class RepairSaleService {
                 LaborCost laborCost = laborMap.get(priceList.getLaborId());
                 priceList.setPrice(laborCost.getPrice());
                 priceList.setName(laborCost.getName());
+                priceList.setPriceListId(null);
             }
-            priceList.setPriceListId(null);
             priceList.setRepairId(param.getRepairId());
-            priceListService.save(priceList);
+            priceListService.saveOrUpdate(priceList);
 
         }
         repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_CONFIRMED.status(),"维修报价");

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

@@ -73,7 +73,7 @@ public class RepairSupplyService {
     public List<RepairRegisterPartVo> partInfo(String repairId,Integer type) {
         LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(PriceList::getRepairId,repairId);
-        wrapper.in(PriceList::getStatus,1,2);
+        wrapper.in(PriceList::getStatus,1);
         wrapper.eq(PriceList::getType,0);
         List<PriceList> list = priceListService.list(wrapper);