lyhzzz 2 سال پیش
والد
کامیت
67e7380405
1فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 21 0
      src/main/java/com/fdkankan/sale/service/impl/RepairSupplyService.java

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

@@ -71,6 +71,27 @@ public class RepairSupplyService {
     }
 
     public List<RepairRegisterPartVo> partInfo(String repairId,Integer type) {
+        if(type == 0){  //获取备件出库单
+            List<RepairRegisterPartVo> parts = new ArrayList<>();
+            List<PriceList> priceListList = priceListService.getByRepairId(repairId);
+            for (PriceList priceList : priceListList) {
+                if(priceList.getStatus() == 1){
+                    RepairRegisterPartVo vo = new RepairRegisterPartVo();
+                    vo.setPartId(priceList.getPartId());
+                    vo.setPartName(priceList.getName());
+                    vo.setPartCount(priceList.getCount());
+                    if(priceList.getPartId() != null){
+                        Part part =  partService.getById(priceList.getPartId());
+                        if(part != null){
+                            vo.setPartNum(part.getPartNum());
+                        }
+                    }
+                    parts.add(vo);
+                }
+            }
+
+            return  parts;
+        }
 
         LambdaQueryWrapper<PartLog> wrapper2 = new LambdaQueryWrapper<>();
         wrapper2.eq(PartLog::getRepairId,repairId);