新增获取动态表单中的字典字段
This commit is contained in:
parent
0e90165e9f
commit
02df595c0d
@ -112,4 +112,13 @@ public interface IDynamicFormService {
|
|||||||
* @param dynamicFormFormShowFieldDTOs
|
* @param dynamicFormFormShowFieldDTOs
|
||||||
*/
|
*/
|
||||||
void setDynamicFieldData(ModelAndView mv, List<DynamicFormFormShowFieldDTO> dynamicFormFormShowFieldDTOs);
|
void setDynamicFieldData(ModelAndView mv, List<DynamicFormFormShowFieldDTO> dynamicFormFormShowFieldDTOs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从字段列表中获取字典字段
|
||||||
|
*
|
||||||
|
* @param dynamicFormDTOs
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<String> listDataDictionaryField(List<DynamicFormDTO> dynamicFormDTOs) throws SearchException;
|
||||||
}
|
}
|
||||||
|
@ -242,6 +242,19 @@ public class DynamicFormServiceImpl extends AbstractService implements IDynamicF
|
|||||||
mv.addObject("radioMapList", radioMapList);
|
mv.addObject("radioMapList", radioMapList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> listDataDictionaryField(List<DynamicFormDTO> dynamicFormDTOs) throws SearchException {
|
||||||
|
List<String> 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否是动态字段
|
* 判断是否是动态字段
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user