jinlin
2023-11-24 c041523ff100a6a43ebc4411125a3e566e19f193
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/utils/GetShowDictList.java
@@ -17,23 +17,28 @@
    @Autowired
    private SysDictTypeService sysDictTypeService;
    public String getShowDictList(String values, String DictTYpe, Boolean enter) {
        List<DictDto> userDicts = sysDictTypeService.getUserDicts();
        DictDto testType1Dict = userDicts.stream()
                .filter(c -> c.getDictType().equals(DictTYpe))
                .collect(Collectors.toList()).get(0);
        values = "," + values + ",";
    public String getShowDictList(Object paramValues, String DictTYpe, Boolean enter) {
        String result = "";
        int i = 0;
        for (DictItemDto dictItemDto : ((DictLeafDto) testType1Dict).getDataList()) {
            String value = dictItemDto.getDictValue();
            String desc = (values.contains("," + value + ",") ? "☑" : "□") + dictItemDto.getDictLabel();
            i++;
            if (enter && i < ((DictLeafDto) testType1Dict).getDataList().size()) {
                desc = desc + "\r\n";
        if (paramValues != null) {
            List<DictDto> userDicts = sysDictTypeService.getUserDicts();
            DictDto testType1Dict = userDicts.stream()
                    .filter(c -> c.getDictType().equals(DictTYpe))
                    .collect(Collectors.toList()).get(0);
            String values = "," + paramValues.toString() + ",";
            int i = 0;
            for (DictItemDto dictItemDto : ((DictLeafDto) testType1Dict).getDataList()) {
                String value = dictItemDto.getDictValue();
                String desc = (values.contains("," + value + ",") ? "☑" : "□") + dictItemDto.getDictLabel();
                i++;
                if (enter && i < ((DictLeafDto) testType1Dict).getDataList().size()) {
                    desc = desc + "\r\n";
                }
                result = result + desc;
            }
            result = result + desc;
        }
        return result;
    }
}