lyhzzz 11 months ago
parent
commit
4edf104913

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

@@ -88,7 +88,7 @@ public class PriceListServiceImpl extends ServiceImpl<IPriceListMapper, PriceLis
     public void updateStatusByRepairId(String repairId,Integer status) {
         LambdaUpdateWrapper<PriceList> wrapper = new LambdaUpdateWrapper<>();
         wrapper.eq(PriceList::getRepairId,repairId);
-        wrapper.eq(PriceList::getType,0);
+        //wrapper.eq(PriceList::getType,0);
         wrapper.set(PriceList::getStatus,status);
         this.update(wrapper);
     }
@@ -97,18 +97,9 @@ public class PriceListServiceImpl extends ServiceImpl<IPriceListMapper, PriceLis
     public List<PriceList> getByRepairIdAndStatus(String repairId, Integer status) {
         LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(PriceList::getRepairId,repairId);
-        wrapper.eq(PriceList::getStatus,1);
+        wrapper.in(PriceList::getStatus,1,2);
         return list(wrapper);
     }
-    public List<PriceList> getByRepairIdsAndStatus(List<String> repairIds, Integer status) {
-        if(repairIds.size() >0){
-            LambdaQueryWrapper<PriceList> wrapper = new LambdaQueryWrapper<>();
-            wrapper.in(PriceList::getRepairId,repairIds);
-            wrapper.eq(PriceList::getStatus,1);
-            return list(wrapper);
-        }
-        return new ArrayList<>();
-    }
 
     @Override
     public List<PriceList> getCheckAmountByRepairId(String repairId) {

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

@@ -175,6 +175,7 @@ public class RepairRegisterServiceImpl extends ServiceImpl<IRepairRegisterMapper
             priceList.setPriceDiscount(part.getPartPriceDiscount());
             priceList.setPartUnit(part.getPartUnit());
             priceList.setType(0);
+            priceList.setStatus(0);
             priceLists.add(priceList);
         }
         priceListVo.setPriceLists(priceLists);

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

@@ -160,8 +160,8 @@ public class RepairSupplyService {
         }
         for (RepairRegisterPartVo partVo : partVoList) {
             partService.outStock(partVo.getPartId(),partVo.getPartCount(),userId,repair.getRepairId());
-            priceListService.updateStatusByRepairId(repair.getRepairId(),2);
         }
+        priceListService.updateStatusByRepairId(repair.getRepairId(),2);
 
         repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_REPAIRED.status(),repair.getStatus(),"备件出库");
     }