|
@@ -98,6 +98,10 @@ public class ModelFormHelper { |
|
|
PageDatasetField pdf = isField ? pds.getField(fn) : pds.getFilter(fn); |
|
|
PageDatasetField pdf = isField ? pds.getField(fn) : pds.getFilter(fn); |
|
|
if (pdf == null) throw new SwException("model[" + db + "]." + key + "未找到定义的数据集字段(" + fn + "),无法解析!"); |
|
|
if (pdf == null) throw new SwException("model[" + db + "]." + key + "未找到定义的数据集字段(" + fn + "),无法解析!"); |
|
|
|
|
|
|
|
|
|
|
|
if (CommUtil.isStrEquals(MapUtil.readString(field, "label"), pdf.label)) { |
|
|
|
|
|
field.remove("label"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//必填字段 |
|
|
//必填字段 |
|
|
if (pdf.isNotNull() == MapUtil.readBool(field, "required")) { |
|
|
if (pdf.isNotNull() == MapUtil.readBool(field, "required")) { |
|
|
field.remove("required"); |
|
|
field.remove("required"); |
|
@@ -193,7 +197,9 @@ public class ModelFormHelper { |
|
|
if (StringUtils.isEmpty(fn)) continue; |
|
|
if (StringUtils.isEmpty(fn)) continue; |
|
|
PageDatasetField pdf = isField ? dataSet.getField(fn) : dataSet.getFilter(fn); |
|
|
PageDatasetField pdf = isField ? dataSet.getField(fn) : dataSet.getFilter(fn); |
|
|
if (pdf == null) continue; |
|
|
if (pdf == null) continue; |
|
|
|
|
|
|
|
|
|
|
|
if (!field.containsKey("label")) { |
|
|
|
|
|
field.put("label", pdf.label); |
|
|
|
|
|
} |
|
|
//必填字段 |
|
|
//必填字段 |
|
|
if (!field.containsKey("required")) { |
|
|
if (!field.containsKey("required")) { |
|
|
field.put("required", pdf.isNotNull()); |
|
|
field.put("required", pdf.isNotNull()); |
|
|