guoyujia 5 mesi fa
parent
commit
af0e9fef0c

+ 6 - 0
src/main/java/cn/ezhizao/project/business/product/controller/SortDayworkController.java

@@ -199,6 +199,7 @@ public class SortDayworkController extends BaseController {
             BizInspectionInstruction inspectionInstruction = new BizInspectionInstruction();
             inspectionInstruction.setId(item.getInspectionInstructionId());
             inspectionInstruction.setStandard(item.getStandard());
+            inspectionInstruction.setType(1);
             inspectionInstructions.add(inspectionInstruction);
         });
         return success(inspectionInstructions);
@@ -226,6 +227,11 @@ public class SortDayworkController extends BaseController {
         if(!list.isEmpty()){
             List<Long> categoryIds = list.stream().map(BizInspectionCategory::getId).collect(Collectors.toList());
             List<BizInspectionInstruction> inspectionInstructionList = bizInspectionInstructionService.query().in("category_id", categoryIds).list();
+            if(!inspectionInstructionList.isEmpty()){
+                inspectionInstructionList.forEach(item->{
+                    item.setType(1);
+                });
+            }
             list.forEach(item->{
                 item.setInstructionList(inspectionInstructionList.stream().filter(inspectionInstruction -> inspectionInstruction.getCategoryId().equals(item.getId())).collect(Collectors.toList()));
             });