songhuangfeng123
2022-09-01 b854d8d7604329dcf99584d15f83ff02076d9e07
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
@@ -55,8 +55,8 @@
    @Resource
    private CommonService commonService;
   @Override
    public ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery) {
        Long pageIndex = pageQuery.getPageIndex();
@@ -80,6 +80,30 @@
        respList.forEach(f->{
            f.setExamineDepartmentName(depNameMap.get(f.getExamineDepartmentId()));
            f.setBeExaminedDepartmentName(depNameMap.get(f.getBeExaminedDepartmentId()));
        });
        //获取打分明细
        respList.forEach(dto->{
            List<CurrentExamineDto> list = JSONObject.parseArray( dto.getNumberDetailJson(), CurrentExamineDto.class);
            List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList());
            if(!idList.isEmpty()){
                List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
                Map<Long,ExamineItem> itemMap = itemList.stream().collect(
                        Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
                if(itemMap != null){
                    list.forEach(f->{
                        ExamineItem item = itemMap.get(f.getId());
                        if(item != null){
                            f.setItemDetail(item.getItemDetail());
                            f.setContent(item.getContent());
                            f.setJudgeStandard(item.getJudgeStandard());
                        }
                    });
                }
            }
            dto.setCurrentExamineDtoList(list);
        });
        return new SearchResultVO<>(
@@ -113,19 +137,21 @@
        //获取打分明细
        List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class);
        List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList());
        if (idList.isEmpty()){
            List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
            Map<Long,ExamineItem> itemMap = itemList.stream().collect(
                    Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
        List<ExamineItem> itemList = examineItemRepository.selectBatchIds(idList);
        Map<Long,ExamineItem> itemMap = itemList.stream().collect(
                Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1));
        if(itemMap != null){
            list.forEach(f->{
                ExamineItem item = itemMap.get(f.getId());
                if(item != null){
                    f.setItemDetail(item.getItemDetail());
                    f.setContent(item.getContent());
                }
            });
            if(itemMap != null){
                list.forEach(f->{
                    ExamineItem item = itemMap.get(f.getId());
                    if(item != null){
                        f.setItemDetail(item.getItemDetail());
                        f.setContent(item.getContent());
                        f.setJudgeStandard(item.getJudgeStandard());
                    }
                });
            }
        }
        dto.setCurrentExamineDtoList(list);
@@ -138,4 +164,4 @@
        return dto;
    }
}
}