From 02df595c0d49547f6f069eda40a74351db23230e Mon Sep 17 00:00:00 2001 From: WenG <450292408@qq.com> Date: Wed, 23 Sep 2020 21:21:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=A1=A8=E5=8D=95=E4=B8=AD=E7=9A=84=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/service/dynamic/IDynamicFormService.java | 9 +++++++++ .../dynamic/impl/DynamicFormServiceImpl.java | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicFormService.java b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicFormService.java index d8c1b38..3bcb434 100644 --- a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicFormService.java +++ b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicFormService.java @@ -112,4 +112,13 @@ public interface IDynamicFormService { * @param dynamicFormFormShowFieldDTOs */ void setDynamicFieldData(ModelAndView mv, List dynamicFormFormShowFieldDTOs); + + /** + * 从字段列表中获取字典字段 + * + * @param dynamicFormDTOs + * @return + * @throws SearchException + */ + List listDataDictionaryField(List dynamicFormDTOs) throws SearchException; } diff --git a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicFormServiceImpl.java b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicFormServiceImpl.java index fe742af..e64646a 100644 --- a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicFormServiceImpl.java +++ b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicFormServiceImpl.java @@ -242,6 +242,19 @@ public class DynamicFormServiceImpl extends AbstractService implements IDynamicF mv.addObject("radioMapList", radioMapList); } + @Override + public List listDataDictionaryField(List dynamicFormDTOs) throws SearchException { + List dataDictionaryFields = new ArrayList<>(); + for (DynamicFormDTO dynamicFormDTO : dynamicFormDTOs) { + if (StringUtils.equals(dynamicFormDTO.getFieldType(), FieldTypeEnum.SELECT.getValue()) + || StringUtils.equals(dynamicFormDTO.getFieldType(), FieldTypeEnum.RADIO.getValue()) + || StringUtils.equals(dynamicFormDTO.getFieldType(), FieldTypeEnum.CHECKBOX.getValue())) { + dataDictionaryFields.add(dynamicFormDTO.getFieldName()); + } + } + return dataDictionaryFields; + } + /** * 判断是否是动态字段 *