双重预防项目-国泰新华二开定制版
huangzhen
2022-10-09 2ccbb8881721a16ec5cf68b12346ecdc0b6941cf
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
@@ -1,6 +1,5 @@
package com.ruoyi.doublePrevention.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.StringUtils;
@@ -1136,4 +1135,18 @@
        return 0;
    }
    /**
     * @description 获取所有的风险分析单元的编码和姓名
     */
    @Override
    public List<PreventRiskUnitCodeAndNameListQueryRespDTO> listRiskUnitCodeAndName() {
        List<PreventRiskList> riskLists = preventRiskListService.listRiskUnitCodeAndName();
        List<PreventRiskUnitCodeAndNameListQueryRespDTO> listQueryRespDTOs= riskLists.stream().map((riskList)->{
            PreventRiskUnitCodeAndNameListQueryRespDTO listQueryRespDTO = new PreventRiskUnitCodeAndNameListQueryRespDTO();
            BeanUtils.copyProperties(riskList,listQueryRespDTO);
            return listQueryRespDTO;
        }).collect(Collectors.toList());
        return listQueryRespDTOs;
    }
}